summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c')
-rw-r--r--UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
index 004fcd8b7c..60a17b8fc2 100644
--- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
+++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
@@ -13,7 +13,6 @@
#include <Library/PcdLib.h>
#include <Library/HobLib.h>
-
/** Library Constructor
@retval RETURN_SUCCESS Success.
@@ -57,13 +56,13 @@ PlatformHookSerialPortInitialize (
return EFI_NOT_FOUND;
}
- GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) GET_GUID_HOB_DATA (GuidHob);
+ GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_DATA (GuidHob);
if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) {
return EFI_NOT_FOUND;
}
if (GenericHeader->Revision == UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO_REVISION) {
- SerialPortInfo = (UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO *) GET_GUID_HOB_DATA (GuidHob);
+ SerialPortInfo = (UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO *)GET_GUID_HOB_DATA (GuidHob);
if (GenericHeader->Length < UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UNIVERSAL_PAYLOAD_SERIAL_PORT_INFO, RegisterBase)) {
//
// Return if can't find the Serial Port Info Hob with enough length
@@ -75,14 +74,17 @@ PlatformHookSerialPortInitialize (
if (RETURN_ERROR (Status)) {
return Status;
}
+
Status = PcdSet64S (PcdSerialRegisterBase, SerialPortInfo->RegisterBase);
if (RETURN_ERROR (Status)) {
return Status;
}
+
Status = PcdSet32S (PcdSerialRegisterStride, SerialPortInfo->RegisterStride);
if (RETURN_ERROR (Status)) {
return Status;
}
+
Status = PcdSet32S (PcdSerialBaudRate, SerialPortInfo->BaudRate);
if (RETURN_ERROR (Status)) {
return Status;