Skip to content

Commit d05a6e5

Browse files
committed
UefiPayloadPkg/PLatformHookLib: Set PcdSerialClockRate using HOB data
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
1 parent cafae7c commit d05a6e5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ PlatformHookSerialPortInitialize (
9494
return Status;
9595
}
9696

97+
Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate);
98+
if (RETURN_ERROR (Status)) {
99+
return Status;
100+
}
101+
97102
return RETURN_SUCCESS;
98103
}
99104

UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@
3838
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES
3939
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES
4040
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES
41+
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES

0 commit comments

Comments
 (0)