diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-16 02:52:15 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-16 02:52:15 +0000 |
commit | b33339fa64dcecce552c5227e0a1f038f550d4d8 (patch) | |
tree | a0ae74f1d09cf80ad45bd02df068aa20ba3e5865 | |
parent | d629c28396030c476b77e3f4c552da201e4dffe5 (diff) | |
download | edk2-platforms-b33339fa64dcecce552c5227e0a1f038f550d4d8.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c index 3b805a9f9d..96338adec8 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c @@ -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;
|