remove the gEfiLoadPeImageProtocolGuid and replace all references for it with BasePeCoffLib.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8095 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-04-16 02:43:41 +00:00
parent f8b30ae529
commit d46dfe99e5

View File

@ -174,16 +174,6 @@ _ModuleEntryPoint (
// //
gBS = SystemTable->BootServices; gBS = SystemTable->BootServices;
//
// Retrieve the Loaded Image Protocol
//
Status = gBS->HandleProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
(VOID*)&LoadedImage
);
ASSERT_EFI_ERROR (Status);
// //
// Retrieve SMM Base Protocol // Retrieve SMM Base Protocol
// //
@ -203,6 +193,15 @@ _ModuleEntryPoint (
// //
// //
if (!InSmm) { if (!InSmm) {
//
// Retrieve the Loaded Image Protocol
//
Status = gBS->HandleProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
(VOID*)&LoadedImage
);
ASSERT_EFI_ERROR (Status);
// //
// Retrieve the Device Path Protocol from the DeviceHandle from which this driver was loaded // Retrieve the Device Path Protocol from the DeviceHandle from which this driver was loaded
// //
@ -222,16 +221,8 @@ _ModuleEntryPoint (
// Load the image in memory to SMRAM; it will automatically generate the // Load the image in memory to SMRAM; it will automatically generate the
// SMI. // SMI.
// //
Status = SmmBase->Register (SmmBase, CompleteFilePath, NULL, 0, &Handle, FALSE); Status = SmmBase->Register (SmmBase, CompleteFilePath, LoadedImage->ImageBase, 0, &Handle, FALSE);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
return Status;
}
//
// Call constructor for all libraries
//
ProcessLibraryConstructorList (ImageHandle, SystemTable);
// //
// Optionally install the unload handler // Optionally install the unload handler
// //
@ -245,6 +236,14 @@ _ModuleEntryPoint (
LoadedImage->Unload = _DriverUnloadHandler; LoadedImage->Unload = _DriverUnloadHandler;
} }
return Status;
}
//
// Call constructor for all libraries
//
ProcessLibraryConstructorList (ImageHandle, SystemTable);
// //
// Call the list of driver entry points // Call the list of driver entry points
// //