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
diff --git a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
index e9e713a..5a85deb 100644
--- a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
+++ b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
@@ -20,45 +20,15 @@
#include <Protocol/GenericMemoryTest.h>
#include <Library/GenericBdsLib.h>
-//
-// 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 @@
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 @@
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 f202c97..855faf6 100644
--- a/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
+++ b/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
@@ -21,16 +21,13 @@
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 @@
VOID
)
{
- return;
}
/**
@@ -77,7 +73,6 @@
IN OUT LIST_ENTRY *BdsDriverLists
)
{
- return;
}
/**
@@ -94,7 +89,6 @@
IN BOOLEAN QuietBoot
)
{
- return;
}
/**
@@ -102,7 +96,6 @@
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 @@
VOID
EFIAPI
PlatformBdsPolicyBehavior (
- IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,
IN LIST_ENTRY *DriverOptionList,
IN LIST_ENTRY *BootOptionList
)
{
- return ;
}
/**
@@ -133,7 +124,6 @@
IN BDS_COMMON_OPTION *Option
)
{
- return;
}
/**
@@ -154,7 +144,6 @@
IN UINTN ExitDataSize
)
{
- return;
}
/**
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
index 0b9b19a..d92ab82 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
@@ -64,13 +64,6 @@
#include <Library/GenericBdsLib.h>
#include <Library/PlatformBdsLib.h>
-#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 ac37f10..322cb59 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -30,14 +30,10 @@
/// 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 @@
//
// 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 @@
IN EFI_BDS_ARCH_PROTOCOL *This
)
{
- EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData;
LIST_ENTRY DriverOptionList;
LIST_ENTRY BootOptionList;
UINTN BootNextSize;
@@ -303,15 +297,10 @@
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 @@
//
// Setup some platform policy here
//
- PlatformBdsPolicyBehavior (PrivateData, &DriverOptionList, &BootOptionList);
+ PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList);
PERF_END (0, "PlatformBds", "BDS", 0);
//