Update FV file path to follow the definition in Framework DxeCis 0.91.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8619 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2009-06-22 02:15:30 +00:00
parent 2d5e30efe8
commit 84dcd70d0e
3 changed files with 14 additions and 33 deletions

View File

@ -54,7 +54,6 @@
DevicePathLib
[Guids]
gEfiFrameworkDevicePathGuid # ALWAYS_CONSUMED
gEfiEventReadyToBootGuid # ALWAYS_CONSUMED
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED

View File

@ -30,7 +30,6 @@
#include <Guid/EventGroup.h>
#include <Guid/EventLegacyBios.h>
#include <Guid/FrameworkDevicePath.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>

View File

@ -294,21 +294,16 @@ EfiGetNameGuidFromFwVolDevicePathNode (
IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode
)
{
FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
ASSERT (FvDevicePathNode != NULL);
FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
//
// Use the new Device path that does not conflict with the UEFI
// EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10.
// In EdkCompatibility Package, we only support MEDIA_FW_VOL_FILEPATH_DEVICE_PATH that complies with
// EFI 1.10 and UEFI 2.10.
//
if (DevicePathType (&FrameworkFvDevicePathNode->Tiano.Header) == MEDIA_DEVICE_PATH &&
DevicePathSubType (&FrameworkFvDevicePathNode->Tiano.Header) == MEDIA_VENDOR_DP) {
if (CompareGuid (&gEfiFrameworkDevicePathGuid, &FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath)) {
if (FrameworkFvDevicePathNode->Tiano.Type == TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) {
return (EFI_GUID *) &FrameworkFvDevicePathNode->NameGuid;
}
}
if (DevicePathType (&FvDevicePathNode->Header) == MEDIA_DEVICE_PATH &&
DevicePathSubType (&FvDevicePathNode->Header) == MEDIA_PIWG_FW_FILE_DP) {
return (EFI_GUID *) &FvDevicePathNode->FvFileName;
}
return NULL;
@ -336,30 +331,18 @@ EfiInitializeFwVolDevicepathNode (
IN CONST EFI_GUID *NameGuid
)
{
FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
ASSERT (FvDevicePathNode != NULL);
ASSERT (NameGuid != NULL);
FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
//
// EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10.
// In EdkCompatibility Package, we only support MEDIA_FW_VOL_FILEPATH_DEVICE_PATH that complies with
// EFI 1.10 and UEFI 2.10.
//
FvDevicePathNode->Header.Type = MEDIA_DEVICE_PATH;
FvDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP;
SetDevicePathNodeLength (&FvDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
//
// Use the new Device path that does not conflict with the UEFI
//
FrameworkFvDevicePathNode->Tiano.Header.Type = MEDIA_DEVICE_PATH;
FrameworkFvDevicePathNode->Tiano.Header.SubType = MEDIA_VENDOR_DP;
SetDevicePathNodeLength (&FrameworkFvDevicePathNode->Tiano.Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
//
// Add the GUID for generic Tiano device paths
//
CopyGuid (&FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath, &gEfiFrameworkDevicePathGuid);
//
// Add in the FW Vol File Path Tiano defined information
//
FrameworkFvDevicePathNode->Tiano.Type = TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE;
CopyGuid (&FrameworkFvDevicePathNode->NameGuid, NameGuid);
CopyGuid (&FvDevicePathNode->FvFileName, NameGuid);
}