mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
1. Add EFI LOADED IMAGE DEVICE PATH Protocol in LoadImage() service, per UEFI 2.1b.
2. Update comments for DHCP.transmitreceive(). 2. Update UefiPxeBcDxe.inf and PxeBcDxe.inf to assign correct protocol usages. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4758 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
77442a5a27
commit
ba39e316c9
@ -134,6 +134,7 @@
|
||||
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiEbcProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||
gEfiTcgPlatformProtocolGuid
|
||||
gEfiLoadedImageDevicePathProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
|
||||
[FixedPcd.common]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueDxeCoreEntry | 0x3041000 # EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_PC_ENTRY_POINT
|
||||
|
@ -55,7 +55,7 @@ typedef struct {
|
||||
|
||||
EFI_RUNTIME_IMAGE_ENTRY *RuntimeData; // Runtime image list
|
||||
|
||||
EFI_DEVICE_PATH_PROTOCOL *DeviceHandleDevicePath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath; // Pointer to Loaded Image Device Path Protocl
|
||||
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; // PeCoffLoader ImageContext
|
||||
|
||||
|
@ -74,7 +74,7 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage = {
|
||||
0, // Machine
|
||||
NULL, // Ebc
|
||||
NULL, // RuntimeData
|
||||
NULL, // DeviceHandleDevicePath
|
||||
NULL // LoadedImageDevicePath
|
||||
};
|
||||
|
||||
|
||||
@ -714,7 +714,6 @@ Returns:
|
||||
if (!EFI_ERROR (Status)) {
|
||||
FilePathSize = CoreDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);
|
||||
FilePath = (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *)FilePath) + FilePathSize );
|
||||
Image->DeviceHandleDevicePath = CoreDuplicateDevicePath (HandleFilePath);
|
||||
}
|
||||
|
||||
//
|
||||
@ -782,6 +781,26 @@ Returns:
|
||||
goto Done;
|
||||
}
|
||||
|
||||
//
|
||||
// If DevicePath parameter to the LoadImage() is not NULL, then make a copy of DevicePath,
|
||||
// otherwise Loaded Image Device Path Protocol is installed with a NULL interface pointer.
|
||||
//
|
||||
if (OriginalFilePath != NULL) {
|
||||
Image->LoadedImageDevicePath = CoreDuplicateDevicePath (OriginalFilePath);
|
||||
}
|
||||
|
||||
//
|
||||
// Install Loaded Image Device Path Protocol onto the image handle of a PE/COFE image
|
||||
//
|
||||
Status = CoreInstallProtocolInterface (
|
||||
&Image->Handle,
|
||||
&gEfiLoadedImageDevicePathProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
Image->LoadedImageDevicePath
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
//
|
||||
// Success. Return the image handle
|
||||
@ -1208,11 +1227,18 @@ Returns:
|
||||
|
||||
CoreRemoveDebugImageInfoEntry (Image->Handle);
|
||||
|
||||
Status = CoreUninstallProtocolInterface (
|
||||
Image->Handle,
|
||||
&gEfiLoadedImageDevicePathProtocolGuid,
|
||||
Image->LoadedImageDevicePath
|
||||
);
|
||||
|
||||
Status = CoreUninstallProtocolInterface (
|
||||
Image->Handle,
|
||||
&gEfiLoadedImageProtocolGuid,
|
||||
&Image->Info
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if (Image->RuntimeData != NULL) {
|
||||
@ -1239,8 +1265,8 @@ Returns:
|
||||
CoreFreePool (Image->Info.FilePath);
|
||||
}
|
||||
|
||||
if (Image->DeviceHandleDevicePath != NULL) {
|
||||
CoreFreePool (Image->DeviceHandleDevicePath);
|
||||
if (Image->LoadedImageDevicePath != NULL) {
|
||||
CoreFreePool (Image->LoadedImageDevicePath);
|
||||
}
|
||||
|
||||
if (Image->FixupData != NULL) {
|
||||
|
@ -984,13 +984,18 @@ SIGNAL_USER:
|
||||
|
||||
|
||||
/**
|
||||
Transmit and receive a packet through this DHCP service.
|
||||
This is unsupported.
|
||||
Transmits a DHCP formatted packet and optionally waits for responses.
|
||||
|
||||
@param This The DHCP protocol instance
|
||||
@param Token The transmit and receive instance
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
|
||||
@retval EFI_UNSUPPORTED It always returns unsupported.
|
||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@retval EFI_NOT_READY The previous call to this function has not finished yet. Try to call
|
||||
this function after collection process completes.
|
||||
@retval EFI_NO_MAPPING The default station address is not available yet.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval Others Some other unexpected error occurred.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
|
@ -81,8 +81,8 @@
|
||||
|
||||
[Protocols]
|
||||
gEfiBisProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeCallbackProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeCallbackProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiPxeBaseCodeProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiLoadFileProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
|
@ -83,9 +83,9 @@
|
||||
gEfiMtftp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiDhcp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeCallbackProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiLoadFileProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiPxeBaseCodeCallbackProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiPxeBaseCodeProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiLoadFileProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiDhcp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
gEfiNetworkInterfaceIdentifierProtocolGuid_31 # PROTOCOL ALWAYS_CONSUMED
|
||||
|
Loading…
x
Reference in New Issue
Block a user