summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-13 12:04:24 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-13 12:04:24 +0000
commita798a789068ae448f6236f68f5bc28b0fe523385 (patch)
tree16675bc24974f7fcff1c01fda27e84adb94fe770
parent03a2bbf3a1a1d28b5e29572cbe6cb6fc69339659 (diff)
downloadedk2-platforms-a798a789068ae448f6236f68f5bc28b0fe523385.tar.xz
ProcessCapsule() and BdsMemoryTest() are implemented in the BdsDxe module, which will be invoked at PlatformBds library.
It is not proper for a library implementation to assume the names of function in a parent module. Instead, they must be designed as the pointers to these two BdsDxe functions and passed in. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8929 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h47
-rw-r--r--IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c10
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c5
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c8
4 files changed, 61 insertions, 9 deletions
diff --git a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
index 9a5f6941b7..96cd87d1cf 100644
--- a/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
+++ b/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
@@ -20,6 +20,47 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/GenericBdsLib.h>
/**
+ Perform the memory test base on the memory test intensive level,
+ and update the memory resource.
+
+ @param Level The memory test intensive level.
+
+ @retval EFI_STATUS Success test all the system memory and update
+ the memory resource
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *BASEM_MEMORY_TEST)(
+ IN EXTENDMEM_COVERAGE_LEVEL Level
+ );
+
+/**
+ This routine is called to see if there are any capsules we need to process.
+ If the boot mode is not UPDATE, then we do nothing. Otherwise find the
+ capsule HOBS and produce firmware volumes for them via the DXE service.
+ Then call the dispatcher to dispatch drivers from them. Finally, check
+ the status of the updates.
+
+ This function should be called by BDS in case we need to do some
+ sort of processing even if there is no capsule to process. We
+ need to do this if an earlier update went away and we need to
+ clear the capsule variable so on the next reset PEI does not see it and
+ think there is a capsule available.
+
+ @param BootMode the current boot mode
+
+ @retval EFI_INVALID_PARAMETER boot mode is not correct for an update
+ @retval EFI_SUCCESS There is no error when processing capsule
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *PROCESS_CAPSULES)(
+ IN EFI_BOOT_MODE BootMode
+ );
+
+/**
Platform Bds initialization. Includes the platform firmware vendor, revision
and so crc check.
@@ -37,13 +78,17 @@ PlatformBdsInit (
@param DriverOptionList The header of the driver option link list
@param BootOptionList The header of the boot option link list
+ @param ProcessCapsules A pointer to ProcessCapsules()
+ @param BaseMemoryTest A pointer to BaseMemoryTest()
**/
VOID
EFIAPI
PlatformBdsPolicyBehavior (
IN LIST_ENTRY *DriverOptionList,
- IN LIST_ENTRY *BootOptionList
+ IN LIST_ENTRY *BootOptionList,
+ IN PROCESS_CAPSULES ProcessCapsules,
+ IN BASEM_MEMORY_TEST BaseMemoryTest
);
/**
diff --git a/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c b/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
index 3571f4c58b..e7bad074fd 100644
--- a/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
+++ b/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/BdsPlatform.c
@@ -81,12 +81,14 @@ PlatformBdsGetDriverOption (
@param MemoryTestLevel The memory test intensive level
@param QuietBoot Indicate if need to enable the quiet boot
+ @param BaseMemoryTest A pointer to BdsMemoryTest()
**/
VOID
PlatformBdsDiagnostics (
IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel,
- IN BOOLEAN QuietBoot
+ IN BOOLEAN QuietBoot,
+ IN BASEM_MEMORY_TEST BaseMemoryTest
)
{
}
@@ -98,13 +100,17 @@ PlatformBdsDiagnostics (
@param DriverOptionList The header of the driver option link list
@param BootOptionList The header of the boot option link list
+ @param ProcessCapsules A pointer to ProcessCapsules()
+ @param BaseMemoryTest A pointer to BaseMemoryTest()
**/
VOID
EFIAPI
PlatformBdsPolicyBehavior (
IN LIST_ENTRY *DriverOptionList,
- IN LIST_ENTRY *BootOptionList
+ IN LIST_ENTRY *BootOptionList,
+ IN PROCESS_CAPSULES ProcessCapsules,
+ IN BASEM_MEMORY_TEST BaseMemoryTest
)
{
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index 055a52df1b..25b5c63474 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -40,6 +40,9 @@ UINT16 *mBootNext = NULL;
EFI_HANDLE mBdsImageHandle;
+extern EFI_STATUS BdsMemoryTest (EXTENDMEM_COVERAGE_LEVEL Level);
+extern EFI_STATUS ProcessCapsules (EFI_BOOT_MODE BootMode);
+
/**
Install Boot Device Selection Protocol
@@ -347,7 +350,7 @@ BdsEntry (
//
// Setup some platform policy here
//
- PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList);
+ PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList, ProcessCapsules, BdsMemoryTest);
PERF_END (0, "PlatformBds", "BDS", 0);
//
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c b/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c
index 59759509e2..19a505e2b7 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c
@@ -193,15 +193,13 @@ PlatformBdsShowProgress (
}
/**
-
Perform the memory test base on the memory test intensive level,
and update the memory resource.
+ @param Level The memory test intensive level.
- @param Level The memory test intensive level.
-
- @retval EFI_STATUS Success test all the system memory and update
- the memory resource
+ @retval EFI_STATUS Success test all the system memory and update
+ the memory resource
**/
EFI_STATUS