Fix crash in UnixPkg and BeagleBoard caused by gSmmBase2 getting added to the now incorectly named mARchProtocols list. CoreDispatchMissingArchProtocols() did to check to see if the element was an AP (not all are now). Also Missing entry was not bounds checked, it was assumed to be <= Index witch is no longer true. So in both UnixPkg and BeagleBoard the loop was blowing past the end and garbage data caused page faults. Also add m prefix to global.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10011 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2010-02-16 02:52:15 +00:00
parent d629c28396
commit b33339fa64
1 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ typedef struct {
CHAR8 *GuidString;
} GUID_TO_STRING_PROTOCOL_ENTRY;
GLOBAL_REMOVE_IF_UNREFERENCED CONST GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = {
GLOBAL_REMOVE_IF_UNREFERENCED CONST GUID_TO_STRING_PROTOCOL_ENTRY mMissingProtocols[] = {
{ &gEfiSecurityArchProtocolGuid, "Security" },
{ &gEfiCpuArchProtocolGuid, "CPU" },
{ &gEfiMetronomeArchProtocolGuid, "Metronome" },
@ -251,8 +251,8 @@ CoreDisplayMissingArchProtocols (
for (Index = 0; Index < sizeof (mArchProtocols) / sizeof (mArchProtocols[0]); Index++) {
Entry = &mArchProtocols[Index];
if (!Entry->Present) {
for (MissingEntry = MissingProtocols; TRUE ; MissingEntry++) {
if (!Entry->Present && Entry->ArchitecturalProtocol) {
for (MissingEntry = mMissingProtocols; MissingEntry < sizeof (mMissingProtocols)/sizeof (mMissingProtocols[0]) ; MissingEntry++) {
if (CompareGuid (Entry->ProtocolGuid, MissingEntry->ProtocolGuid)) {
DEBUG ((DEBUG_ERROR, "\n%a Arch Protocol not present!!\n", MissingEntry->GuidString));
break;