Skip to content

Commit

Permalink
Merge branch 'master' into EfiError
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 20, 2024
2 parents 169722b + c358009 commit 1869293
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions UefiCpuPkg/Library/MtrrLib/MtrrLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ MtrrLibIsMtrrSupported (
CPUID_VERSION_INFO_EDX Edx;
MSR_IA32_MTRRCAP_REGISTER MtrrCap;

//
// MTRR is not supported in TD-Guest.
//
if (TdIsEnabled ()) {
return FALSE;
}

//
// Check CPUID(1).EDX[12] for MTRR capability
//
Expand Down
8 changes: 8 additions & 0 deletions UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ _ModuleEntryPoint (
UniversalSerialPort->RegisterBase = SerialPortInfo.BaseAddr;
UniversalSerialPort->BaudRate = SerialPortInfo.Baud;
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) {
Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);
if (RETURN_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Failed to set PcdSerialClockRate; Status = %r\n", Status));
return Status;
}
}
}

// The library constructors might depend on serial port, so call it after serial port hob
Expand Down
1 change: 1 addition & 0 deletions UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy ## SOMETIMES_CONSUMES

gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES

0 comments on commit 1869293

Please sign in to comment.