-
Notifications
You must be signed in to change notification settings - Fork 3k
UefiPayloadPlg: Configure serial based on Hob Data #10769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
63d7981
556bfc7
536abfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,11 @@ PlatformHookSerialPortInitialize ( | |
| return Status; | ||
| } | ||
|
|
||
| Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add backward compatible check here. |
||
| if (RETURN_ERROR (Status)) { | ||
| return Status; | ||
| } | ||
|
|
||
| return RETURN_SUCCESS; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -431,6 +431,7 @@ _ModuleEntryPoint ( | |
| UniversalSerialPort->UseMmio = (SerialPortInfo.Type == 1) ? FALSE : TRUE; | ||
| UniversalSerialPort->RegisterBase = SerialPortInfo.BaseAddr; | ||
| UniversalSerialPort->BaudRate = SerialPortInfo.Baud; | ||
| UniversalSerialPort->ClockRate = SerialPortInfo.InputHertz; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought this has been handled by commit (#6215), could you check if existing implementation is good enough? Some background: The PcdSerialClockRate should already have the value you need in line438 without relying on new field in UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO structure. |
||
| UniversalSerialPort->RegisterStride = (UINT8)SerialPortInfo.RegWidth; | ||
| // Set PCD here (vs in PlatformHookLib.c) to avoid adding a new field to UniversalSerialPort struct | ||
| if (SerialPortInfo.InputHertz > 0) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up backward compatible for structure, I want to recommend you put this code from line 22 to line 24