UefiPayloadPlg: Configure serial based on Hob Data#10769
UefiPayloadPlg: Configure serial based on Hob Data#10769Sean-StarLabs wants to merge 3 commits intotianocore:masterfrom
Conversation
Fixes serial output on platforms using coreboot and a non-default clock rate such as AMD Picasso and newer. Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Change-Id: I91290397852176754e9a34ec6e5829044f41d15a
…ialInfo Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Change-Id: If764bd7c0b691cf887205471d0343fdf62372141
…AL_PAYLOAD_SERIAL_PORT_INFO Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Change-Id: I9bcaf03ab63f6a45d2cf25a580f7a2eba388cbbd
gguo11837463
left a comment
There was a problem hiding this comment.
Please check my comment, once it got gixed I will give you code review + 1.
| BOOLEAN UseMmio; | ||
| UINT8 RegisterStride; | ||
| UINT32 BaudRate; | ||
| UINT32 ClockRate; |
There was a problem hiding this comment.
Follow up backward compatible for structure, I want to recommend you put this code from line 22 to line 24
| return Status; | ||
| } | ||
|
|
||
| Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate); |
There was a problem hiding this comment.
Add backward compatible check here.
if (SerialPortInfo->ClockRate != 0) {
Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate);
}
| UniversalSerialPort->UseMmio = (SerialPortInfo.Type == 1) ? FALSE : TRUE; | ||
| UniversalSerialPort->RegisterBase = SerialPortInfo.BaseAddr; | ||
| UniversalSerialPort->BaudRate = SerialPortInfo.Baud; | ||
| UniversalSerialPort->ClockRate = SerialPortInfo.InputHertz; |
There was a problem hiding this comment.
I thought this has been handled by commit (#6215), could you check if existing implementation is good enough?
Some background:
We prefer to not touch UniversalPayload/SerialPortInfo.h as that will require USF->UPL spec update which is unnecessary effort if we could eliminate.(https://universalscalablefirmware.github.io/documentation/2_universal_payload.html#serial-information)
The PcdSerialClockRate should already have the value you need in line438 without relying on new field in UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO structure.
|
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
PR can not be merged due to conflict. Please rebase and resubmit |
|
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions. |
No description provided.