From 84dcd70d0ec1319282074dea010b26182bf7a895 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 22 Jun 2009 02:15:30 +0000 Subject: 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 --- .../Library/FrameworkUefiLib/FrameworkUefiLib.inf | 1 - .../Library/FrameworkUefiLib/UefiLibInternal.h | 1 - .../Library/FrameworkUefiLib/UefiNotTiano.c | 45 +++++++--------------- 3 files changed, 14 insertions(+), 33 deletions(-) (limited to 'IntelFrameworkPkg') diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf b/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf index 14bd3889a5..84f36f7782 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf @@ -54,7 +54,6 @@ DevicePathLib [Guids] - gEfiFrameworkDevicePathGuid # ALWAYS_CONSUMED gEfiEventReadyToBootGuid # ALWAYS_CONSUMED gEfiEventLegacyBootGuid # ALWAYS_CONSUMED diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h index e8aed5b57b..f6f0535439 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c index cb6d2adfa5..de79fd3847 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c @@ -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; - - // - // 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); - + // 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. // - // 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); + FvDevicePathNode->Header.Type = MEDIA_DEVICE_PATH; + FvDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP; + SetDevicePathNodeLength (&FvDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH)); + + CopyGuid (&FvDevicePathNode->FvFileName, NameGuid); } -- cgit v1.2.3