diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 833f62adff..66bb0984c8 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -31,6 +31,7 @@ #include #include "Platform.h" +#include "Cmos.h" EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = { { EfiACPIMemoryNVS, 0x004 }, @@ -200,6 +201,27 @@ ReserveEmuVariableNvStore ( } +VOID +DebugDumpCmos ( + VOID + ) +{ + UINTN Loop; + + DEBUG ((EFI_D_INFO, "CMOS:\n")); + + for (Loop = 0; Loop < 0x80; Loop++) { + if ((Loop % 0x10) == 0) { + DEBUG ((EFI_D_INFO, "%02x:", Loop)); + } + DEBUG ((EFI_D_INFO, " %02x", CmosRead8 (Loop))); + if ((Loop % 0x10) == 0xf) { + DEBUG ((EFI_D_INFO, "\n")); + } + } +} + + /** Perform Platform PEI initialization. @@ -220,6 +242,8 @@ InitializePlatform ( DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n")); + DebugDumpCmos (); + TopOfMemory = MemDetect (); ReserveEmuVariableNvStore ();