summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg/Universal
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-21 07:57:29 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-21 07:57:29 +0000
commit19bf20e11acd88a02922201f97e6d64edcd16390 (patch)
treeea118f974e584162c4b666b6a75497f528fc253e /IntelFrameworkModulePkg/Universal
parentccd4b7dadebc65acc89c5bae5ae8d8cc50831bc7 (diff)
downloadedk2-19bf20e11acd88a02922201f97e6d64edcd16390.tar.gz
edk2-19bf20e11acd88a02922201f97e6d64edcd16390.tar.bz2
edk2-19bf20e11acd88a02922201f97e6d64edcd16390.zip
Clean up code
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8975 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h41
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c5
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c10
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c2
-rw-r--r--IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c73
5 files changed, 65 insertions, 66 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
index 31d6df5705..d4539d47ba 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
@@ -138,4 +138,45 @@ BdsEntry (
IN EFI_BDS_ARCH_PROTOCOL *This
);
+
+/**
+ 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
+
+**/
+EFI_STATUS
+BdsMemoryTest (
+ 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
+
+**/
+EFI_STATUS
+BdsProcessCapsules (
+ EFI_BOOT_MODE BootMode
+ );
+
#endif
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index dcaa488894..d671c1ea38 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -40,9 +40,6 @@ 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
@@ -350,7 +347,7 @@ BdsEntry (
//
// Setup some platform policy here
//
- PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList, ProcessCapsules, BdsMemoryTest);
+ PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList, BdsProcessCapsules, BdsMemoryTest);
PERF_END (NULL, "PlatformBds", "BDS", 0);
//
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index b6ea7ae8b2..790fe51d44 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -756,7 +756,7 @@ UpdateConModePage (
UINTN Row;
CHAR16 RowString[50];
CHAR16 ModeString[50];
- CHAR16 *pStr;
+ CHAR16 *PStr;
UINTN MaxMode;
UINTN ValidMode;
EFI_STRING_ID *ModeToken;
@@ -812,11 +812,11 @@ UpdateConModePage (
// Build mode string Column x Row
//
UnicodeValueToString (ModeString, 0, Col, 0);
- pStr = &ModeString[0];
- StrnCat (pStr, L" x ", StrLen(L" x "));
+ PStr = &ModeString[0];
+ StrnCat (PStr, L" x ", StrLen(L" x "));
UnicodeValueToString (RowString, 0, Row, 0);
- pStr = &ModeString[0];
- StrnCat (pStr, RowString, StrLen(RowString));
+ PStr = &ModeString[0];
+ StrnCat (PStr, RowString, StrLen(RowString));
ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c
index 3a998c6df6..47082f57d3 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c
@@ -34,7 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
EFI_STATUS
-ProcessCapsules (
+BdsProcessCapsules (
EFI_BOOT_MODE BootMode
)
{
diff --git a/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c b/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c
index c5467b222f..2a17fe7847 100644
--- a/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c
+++ b/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c
@@ -1,4 +1,4 @@
-/**
+/** @file
Produces the Legacy Region Protocol.
This generic implementation of the Legacy Region Protocol does not actually
@@ -23,61 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
-//
-// Function prototypes of the Legacy Region Protocol services this module produces
-//
-EFI_STATUS
-EFIAPI
-LegacyRegionDecode (
- IN EFI_LEGACY_REGION_PROTOCOL *This,
- IN UINT32 Start,
- IN UINT32 Length,
- IN BOOLEAN *On
- );
-
-EFI_STATUS
-EFIAPI
-LegacyRegionLock (
- IN EFI_LEGACY_REGION_PROTOCOL *This,
- IN UINT32 Start,
- IN UINT32 Length,
- OUT UINT32 *Granularity OPTIONAL
- );
-
-EFI_STATUS
-EFIAPI
-LegacyRegionBootLock (
- IN EFI_LEGACY_REGION_PROTOCOL *This,
- IN UINT32 Start,
- IN UINT32 Length,
- OUT UINT32 *Granularity OPTIONAL
- );
-
-EFI_STATUS
-EFIAPI
-LegacyRegionUnlock (
- IN EFI_LEGACY_REGION_PROTOCOL *This,
- IN UINT32 Start,
- IN UINT32 Length,
- OUT UINT32 *Granularity OPTIONAL
- );
-
-//
-// Module global for the handle the Legacy Region Protocol is installed
-//
-EFI_HANDLE mLegacyRegionHandle = NULL;
-
-//
-// Module global for the Legacy Region Protocol instance that is installed onto
-// mLegacyRegionHandle
-//
-EFI_LEGACY_REGION_PROTOCOL mLegacyRegion = {
- LegacyRegionDecode,
- LegacyRegionLock,
- LegacyRegionBootLock,
- LegacyRegionUnlock
-};
-
/**
Sets hardware to decode or not decode a region.
@@ -171,6 +116,22 @@ LegacyRegionUnlock (
return EFI_SUCCESS;
}
+//
+// Module global for the handle the Legacy Region Protocol is installed
+//
+EFI_HANDLE mLegacyRegionHandle = NULL;
+
+//
+// Module global for the Legacy Region Protocol instance that is installed onto
+// mLegacyRegionHandle
+//
+EFI_LEGACY_REGION_PROTOCOL mLegacyRegion = {
+ LegacyRegionDecode,
+ LegacyRegionLock,
+ LegacyRegionBootLock,
+ LegacyRegionUnlock
+};
+
/**
The user Entry Point for module LegacyRegionDxe. The user code starts with this function.