Clean up the gBS sevice (CopyMem, SetMem, AllocatePool, FreePool) with the corresponding APIs defined in Mde library class for these modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2456 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -107,7 +107,7 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
gBS->SetMem (IvtEntryTable, sizeof (IvtEntryTable), 0);
|
||||
SetMem (IvtEntryTable, sizeof (IvtEntryTable), 0);
|
||||
ExternalInterruptCount = 0;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ Returns:
|
||||
//
|
||||
// re-init IvtEntryTable
|
||||
//
|
||||
gBS->SetMem (&IvtEntryTable[ExceptionType], sizeof (IVT_ENTRY), 0);
|
||||
SetMem (&IvtEntryTable[ExceptionType], sizeof (IVT_ENTRY), 0);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
@@ -356,15 +356,15 @@ Returns:
|
||||
//
|
||||
// copy original bundles from IVT to IvtEntryTable so we can restore them later
|
||||
//
|
||||
gBS->CopyMem (
|
||||
IvtEntryTable[ExceptionType].OrigBundles,
|
||||
B0Ptr,
|
||||
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB
|
||||
);
|
||||
CopyMem (
|
||||
IvtEntryTable[ExceptionType].OrigBundles,
|
||||
B0Ptr,
|
||||
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB
|
||||
);
|
||||
//
|
||||
// insert new B0
|
||||
//
|
||||
gBS->CopyMem (B0Ptr, NewBundles, sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB);
|
||||
CopyMem (B0Ptr, NewBundles, sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB);
|
||||
|
||||
//
|
||||
// fixup IVT entry so it stores its index and whether or not to chain...
|
||||
@@ -406,11 +406,11 @@ Returns:
|
||||
//
|
||||
// restore original bundles in IVT
|
||||
//
|
||||
gBS->CopyMem (
|
||||
B0Ptr,
|
||||
IvtEntryTable[ExceptionType].OrigBundles,
|
||||
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB
|
||||
);
|
||||
CopyMem (
|
||||
B0Ptr,
|
||||
IvtEntryTable[ExceptionType].OrigBundles,
|
||||
sizeof (BUNDLE) * NUM_BUNDLES_IN_STUB
|
||||
);
|
||||
InstructionCacheFlush (B0Ptr, 5);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user