Skip to content

Commit

Permalink
UefiPayloadPkg/PLatformHookLib: Set PcdSerialClockRate using HOB data
Browse files Browse the repository at this point in the history
Fixes serial output on platforms using coreboot and a non-default clock rate
such as AMD Picasso and newer.

Signed-off-by: Matt DeVillier <[email protected]>
Change-Id: I91290397852176754e9a34ec6e5829044f41d15a
  • Loading branch information
MrChromebox committed Sep 18, 2024
1 parent 7d5bc3e commit 6867be6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ PlatformHookSerialPortInitialize (
return Status;
}

Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate);
if (RETURN_ERROR (Status)) {
return Status;
}

return RETURN_SUCCESS;
}

Expand Down
1 change: 1 addition & 0 deletions UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES

0 comments on commit 6867be6

Please sign in to comment.