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
1 changed files with 23 additions and 24 deletions

View File

@ -174,16 +174,6 @@ _ModuleEntryPoint (
//
gBS = SystemTable->BootServices;
//
// Retrieve the Loaded Image Protocol
//
Status = gBS->HandleProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
(VOID*)&LoadedImage
);
ASSERT_EFI_ERROR (Status);
//
// Retrieve SMM Base Protocol
//
@ -203,6 +193,15 @@ _ModuleEntryPoint (
//
//
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
//
@ -222,8 +221,21 @@ _ModuleEntryPoint (
// Load the image in memory to SMRAM; it will automatically generate the
// SMI.
//
Status = SmmBase->Register (SmmBase, CompleteFilePath, NULL, 0, &Handle, FALSE);
Status = SmmBase->Register (SmmBase, CompleteFilePath, LoadedImage->ImageBase, 0, &Handle, FALSE);
ASSERT_EFI_ERROR (Status);
//
// Optionally install the unload handler
//
if (_gDriverUnloadImageCount > 0) {
Status = gBS->HandleProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
(VOID **)&LoadedImage
);
ASSERT_EFI_ERROR (Status);
LoadedImage->Unload = _DriverUnloadHandler;
}
return Status;
}
@ -232,19 +244,6 @@ _ModuleEntryPoint (
//
ProcessLibraryConstructorList (ImageHandle, SystemTable);
//
// Optionally install the unload handler
//
if (_gDriverUnloadImageCount > 0) {
Status = gBS->HandleProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
(VOID **)&LoadedImage
);
ASSERT_EFI_ERROR (Status);
LoadedImage->Unload = _DriverUnloadHandler;
}
//
// Call the list of driver entry points
//