http://git.etherboot.org
/
people
/
mcb30
/
edk2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.Port Platform driver override protocol utility application in MdeModulePkg.dsc.
[people/mcb30/edk2.git]
/
edk2
/
MdeModulePkg
/
Library
/
DxePlatDriOverLib
/
PlatDriOverLib.c
diff --git
a/edk2/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOverLib.c
b/edk2/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOverLib.c
index
0ba63fc
..
497446b
100644
(file)
--- a/
edk2/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOverLib.c
+++ b/
edk2/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOverLib.c
@@
-666,7
+666,6
@@
GetDriverFromMapping (
EFI_HANDLE *ImageHandleBuffer;
\r
UINTN ImageHandleCount;
\r
UINTN Index;
\r
EFI_HANDLE *ImageHandleBuffer;
\r
UINTN ImageHandleCount;
\r
UINTN Index;
\r
- EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
\r
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
\r
EFI_HANDLE DriverBindingHandle;
\r
BOOLEAN FoundLastReturned;
\r
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
\r
EFI_HANDLE DriverBindingHandle;
\r
BOOLEAN FoundLastReturned;
\r
@@
-677,8
+676,7
@@
GetDriverFromMapping (
EFI_DEVICE_PATH_PROTOCOL *TempDriverImagePath;
\r
EFI_HANDLE ImageHandle;
\r
EFI_HANDLE Handle;
\r
EFI_DEVICE_PATH_PROTOCOL *TempDriverImagePath;
\r
EFI_HANDLE ImageHandle;
\r
EFI_HANDLE Handle;
\r
- EFI_DEVICE_PATH_PROTOCOL *LoadedImageHandleDevicePath;
\r
- EFI_DEVICE_PATH_PROTOCOL *TatalFilePath;
\r
+ EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath;
\r
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *BusSpecificDriverOverride;
\r
UINTN DevicePathSize;
\r
\r
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *BusSpecificDriverOverride;
\r
UINTN DevicePathSize;
\r
\r
@@
-786,39
+784,28
@@
GetDriverFromMapping (
}
\r
\r
for(Index = 0; Index < ImageHandleCount; Index ++) {
\r
}
\r
\r
for(Index = 0; Index < ImageHandleCount; Index ++) {
\r
- Status = gBS->HandleProtocol (
\r
- ImageHandleBuffer[Index],
\r
- &gEfiLoadedImageProtocolGuid,
\r
- (VOID **) &LoadedImage
\r
- );
\r
- if (EFI_ERROR (Status)) {
\r
- continue;
\r
- }
\r
-
\r
//
\r
//
\r
- // Get the
driver image total file path
\r
+ // Get the
EFI Loaded Image Device Path Protocol
\r
//
\r
//
\r
- LoadedImage
Handle
DevicePath = NULL;
\r
+ LoadedImageDevicePath = NULL;
\r
Status = gBS->HandleProtocol (
\r
Status = gBS->HandleProtocol (
\r
-
LoadedImage->DeviceHandle
,
\r
- &gEfiDevicePathProtocolGuid,
\r
- (VOID **) &LoadedImage
Handle
DevicePath
\r
+
ImageHandleBuffer[Index]
,
\r
+ &gEfi
LoadedImage
DevicePathProtocolGuid,
\r
+ (VOID **) &LoadedImageDevicePath
\r
);
\r
if (EFI_ERROR (Status)) {
\r
//
\r
);
\r
if (EFI_ERROR (Status)) {
\r
//
\r
- // Maybe Not all
LoadedImage->DeviceHandle has valid value. Skip the invalid image
.
\r
+ // Maybe Not all
EFI Loaded Image Device Path Protocol existed
.
\r
//
\r
continue;
\r
}
\r
\r
//
\r
continue;
\r
}
\r
\r
- TatalFilePath = AppendDevicePath (LoadedImageHandleDevicePath, LoadedImage->FilePath);
\r
-
\r
DevicePathSize = GetDevicePathSize (DriverImageInfo->DriverImagePath);
\r
DevicePathSize = GetDevicePathSize (DriverImageInfo->DriverImagePath);
\r
- if (DevicePathSize == GetDevicePathSize (
TatalFil
ePath)) {
\r
+ if (DevicePathSize == GetDevicePathSize (
LoadedImageDevic
ePath)) {
\r
if (CompareMem (
\r
DriverImageInfo->DriverImagePath,
\r
if (CompareMem (
\r
DriverImageInfo->DriverImagePath,
\r
-
TatalFil
ePath,
\r
- GetDevicePathSize (
TatalFil
ePath)
\r
+
LoadedImageDevic
ePath,
\r
+ GetDevicePathSize (
LoadedImageDevic
ePath)
\r
) == 0
\r
) {
\r
ImageFound = TRUE;
\r
) == 0
\r
) {
\r
ImageFound = TRUE;
\r
@@
-1881,7
+1868,7
@@
ConnectDevicePath (
// change, so next time will do the dispatch, then dispatch's status
\r
// will take effect
\r
// 2. If the connect success, the RemainingDevicepath and handle will
\r
// change, so next time will do the dispatch, then dispatch's status
\r
// will take effect
\r
// 2. If the connect success, the RemainingDevicepath and handle will
\r
- // change, then avoid the dispatch, we have chance to continue the
\r
+
// change, then avoid the dispatch, we have chance to continue the
\r
// next connection
\r
//
\r
gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE);
\r
// next connection
\r
//
\r
gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE);
\r