mirror of https://github.com/acidanthera/audk.git
OvmfPkg: Add DEBUG messages to dump the contents of CMOS
The contents of CMOS on boot can describe some aspects of the system configuration. For example, the size of memory available to qemu/kvm. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11264 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
76389e18c0
commit
3ca15914df
|
@ -31,6 +31,7 @@
|
|||
#include <Guid/MemoryTypeInformation.h>
|
||||
|
||||
#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 ();
|
||||
|
|
Loading…
Reference in New Issue