Clean up PiSmmCore to pass K8 scan

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10098 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hhuan13 2010-02-26 04:35:23 +00:00
parent 34f60e4d77
commit 5b422a7bbd
2 changed files with 3 additions and 3 deletions

View File

@ -321,14 +321,13 @@ SmmLocateHandle (
break; break;
case ByRegisterNotify: case ByRegisterNotify:
GetNext = SmmGetNextLocateByRegisterNotify;
// //
// Must have SearchKey for locate ByRegisterNotify // Must have SearchKey for locate ByRegisterNotify
// //
if (SearchKey == NULL) { if (SearchKey == NULL) {
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
break;
} }
GetNext = SmmGetNextLocateByRegisterNotify;
break; break;
case ByProtocol: case ByProtocol:

View File

@ -101,7 +101,7 @@ InternalAllocPoolByIndex (
if (PoolIndex == MAX_POOL_INDEX) { if (PoolIndex == MAX_POOL_INDEX) {
Hdr = (FREE_POOL_HEADER *)AllocatePages (EFI_SIZE_TO_PAGES (MAX_POOL_SIZE << 1)); Hdr = (FREE_POOL_HEADER *)AllocatePages (EFI_SIZE_TO_PAGES (MAX_POOL_SIZE << 1));
if (Hdr == NULL) { if (Hdr == NULL) {
Status = EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
} else if (!IsListEmpty (&mSmmPoolLists[PoolIndex])) { } else if (!IsListEmpty (&mSmmPoolLists[PoolIndex])) {
Hdr = BASE_CR (GetFirstNode (&mSmmPoolLists[PoolIndex]), FREE_POOL_HEADER, Link); Hdr = BASE_CR (GetFirstNode (&mSmmPoolLists[PoolIndex]), FREE_POOL_HEADER, Link);
@ -146,6 +146,7 @@ InternalFreePoolByIndex (
PoolIndex = HighBitSet32 ((UINT32)FreePoolHdr->Header.Size) - MIN_POOL_SHIFT; PoolIndex = HighBitSet32 ((UINT32)FreePoolHdr->Header.Size) - MIN_POOL_SHIFT;
FreePoolHdr->Header.Available = TRUE; FreePoolHdr->Header.Available = TRUE;
ASSERT (PoolIndex < MAX_POOL_INDEX);
InsertHeadList (&mSmmPoolLists[PoolIndex], &FreePoolHdr->Link); InsertHeadList (&mSmmPoolLists[PoolIndex], &FreePoolHdr->Link);
return EFI_SUCCESS; return EFI_SUCCESS;
} }