From f7cdf5cdd38d0b5740046c26c7ca22f3d19ecb41 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sun, 7 Jun 2009 04:43:19 +0000 Subject: [PATCH] Remove EFI_BDS_ARCH_PROTOCOL_INSTANCE from PlatformBdsLib.h and BdsDxe module git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8491 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Include/Library/PlatformBdsLib.h | 34 +------------------ .../Library/PlatformBdsLibNull/BdsPlatform.c | 13 +------ .../Universal/BdsDxe/Bds.h | 7 ---- .../Universal/BdsDxe/BdsEntry.c | 31 ++++++----------- 4 files changed, 12 insertions(+), 73 deletions(-) diff --git a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h index e9e713aa49..5a85deb5fe 100644 --- a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h +++ b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h @@ -20,45 +20,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -// -// Bds AP Context data -// -#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE SIGNATURE_32 ('B', 'd', 's', 'A') -typedef struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE EFI_BDS_ARCH_PROTOCOL_INSTANCE; - -struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE { - UINTN Signature; - EFI_HANDLE Handle; - EFI_BDS_ARCH_PROTOCOL Bds; - /// - /// Save the current boot mode - /// - EFI_BOOT_MODE BootMode; - /// - /// Set true if boot with default settings - /// - BOOLEAN DefaultBoot; - /// - /// The system default timeout for choose the boot option - /// - UINT16 TimeoutDefault; - /// - /// Memory Test Level - /// - EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel; -}; - /** Platform Bds init. Include the platform firmware vendor, revision and so crc check. - @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance - **/ VOID EFIAPI PlatformBdsInit ( - IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData + VOID ); /** @@ -66,7 +36,6 @@ PlatformBdsInit ( is driven by boot mode. IBV/OEM can customize this code for their specific policy action. - @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance @param DriverOptionList The header of the driver option link list @param BootOptionList The header of the boot option link list @@ -74,7 +43,6 @@ PlatformBdsInit ( VOID EFIAPI PlatformBdsPolicyBehavior ( - IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData, IN LIST_ENTRY *DriverOptionList, IN LIST_ENTRY *BootOptionList ); diff --git a/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c b/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c index f202c9778a..855faf6ee0 100644 --- a/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c +++ b/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c @@ -21,16 +21,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Platform Bds init. Include the platform firmware vendor, revision and so crc check. - @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance - **/ VOID EFIAPI PlatformBdsInit ( - IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData + VOID ) { - return; } /** @@ -62,7 +59,6 @@ PlatformBdsConnectSequence ( VOID ) { - return; } /** @@ -77,7 +73,6 @@ PlatformBdsGetDriverOption ( IN OUT LIST_ENTRY *BdsDriverLists ) { - return; } /** @@ -94,7 +89,6 @@ PlatformBdsDiagnostics ( IN BOOLEAN QuietBoot ) { - return; } /** @@ -102,7 +96,6 @@ PlatformBdsDiagnostics ( is driven by boot mode. IBV/OEM can customize this code for their specific policy action. - @param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance @param DriverOptionList The header of the driver option link list @param BootOptionList The header of the boot option link list @@ -110,12 +103,10 @@ PlatformBdsDiagnostics ( VOID EFIAPI PlatformBdsPolicyBehavior ( - IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData, IN LIST_ENTRY *DriverOptionList, IN LIST_ENTRY *BootOptionList ) { - return ; } /** @@ -133,7 +124,6 @@ PlatformBdsBootSuccess ( IN BDS_COMMON_OPTION *Option ) { - return; } /** @@ -154,7 +144,6 @@ PlatformBdsBootFail ( IN UINTN ExitDataSize ) { - return; } /** diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h index 0b9b19a996..d92ab8298b 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h @@ -64,13 +64,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_FROM_THIS(_this) \ - CR ((_this), \ - EFI_BDS_ARCH_PROTOCOL_INSTANCE, \ - Bds, \ - EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE \ - ) - #pragma pack(1) /// diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c index ac37f10529..322cb59f99 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c @@ -30,14 +30,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /// Please refer to the library useage of BdsLibGetBootMode, BdsLibGetTimeout /// and PlatformBdsDiagnostics in BdsPlatform.c /// -EFI_BDS_ARCH_PROTOCOL_INSTANCE gBdsInstanceTemplate = { - EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE, - NULL, - {BdsEntry}, - 0xFFFF, - TRUE, - 0, - EXTENSIVE +EFI_HANDLE gBdsHandle = NULL; + +EFI_BDS_ARCH_PROTOCOL gBds = { + BdsEntry }; UINT16 *mBootNext = NULL; @@ -70,11 +66,10 @@ BdsInitialize ( // // Install protocol interface // - Status = gBS->InstallProtocolInterface ( - &gBdsInstanceTemplate.Handle, - &gEfiBdsArchProtocolGuid, - EFI_NATIVE_INTERFACE, - &gBdsInstanceTemplate.Bds + Status = gBS->InstallMultipleProtocolInterfaces ( + &gBdsHandle, + &gEfiBdsArchProtocolGuid, &gBds, + NULL ); ASSERT_EFI_ERROR (Status); @@ -280,7 +275,6 @@ BdsEntry ( IN EFI_BDS_ARCH_PROTOCOL *This ) { - EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData; LIST_ENTRY DriverOptionList; LIST_ENTRY BootOptionList; UINTN BootNextSize; @@ -302,16 +296,11 @@ BdsEntry ( // InitializeHotkeyService (); - // - // Get the BDS private data - // - PrivateData = EFI_BDS_ARCH_PROTOCOL_INSTANCE_FROM_THIS (This); - // // Do the platform init, can be customized by OEM/IBV // PERF_START (0, "PlatformBds", "BDS", 0); - PlatformBdsInit (PrivateData); + PlatformBdsInit (); InitializeHwErrRecSupport(); @@ -344,7 +333,7 @@ BdsEntry ( // // Setup some platform policy here // - PlatformBdsPolicyBehavior (PrivateData, &DriverOptionList, &BootOptionList); + PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList); PERF_END (0, "PlatformBds", "BDS", 0); //