diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-10 03:47:56 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-10 03:47:56 +0000 |
commit | 797a9d6791a7529c20c7b10f2843e9f38ed5a6a5 (patch) | |
tree | 8af8218c32963366e55a3f9757b34f02a8d0b44d /MdeModulePkg/Core/Pei | |
parent | 256a0cc3c2cb522246e8a9555887b8f50705771e (diff) | |
download | edk2-platforms-797a9d6791a7529c20c7b10f2843e9f38ed5a6a5.tar.xz |
MdeModule cleanup for PI:
1) PeiMain:
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
2) DxeMain:
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
- Do not produce SectionExtraction protocol which is belong to IntelFramework specification.
- Update many macro for PI specifications.
3) DxeIpl
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
4) Add SectionExtractionDxe module (IntelFrameworkModulePkg)
- This module will produce EFI_SECTION_EXTRACTION_PROTOCOL defined in framework specification. If a old platform want to use this protocol, then this platform need dispatch this DXE driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4376 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 27 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/FwVol/FwVol.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.inf | 3 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 2 |
5 files changed, 20 insertions, 18 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 5a140ed7bd..73a6245b7e 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -23,6 +23,11 @@ Revision History #include <PeiMain.h>
+typedef struct {
+ EFI_STATUS_CODE_DATA DataHeader;
+ EFI_HANDLE Handle;
+} PEIM_FILE_HANDLE_EXTENDED_DATA;
+
STATIC
VOID
InvokePeiCore (
@@ -223,7 +228,7 @@ Returns: UINTN PeimCount;
UINT32 AuthenticationState;
EFI_PHYSICAL_ADDRESS EntryPoint;
- EFI_PEIM_ENTRY_POINT PeimEntryPoint;
+ EFI_PEIM_ENTRY_POINT2 PeimEntryPoint;
BOOLEAN PeimNeedingDispatch;
BOOLEAN PeimDispatchOnThisPass;
UINTN SaveCurrentPeimCount;
@@ -231,7 +236,7 @@ Returns: EFI_PEI_FILE_HANDLE SaveCurrentFileHandle;
VOID *TopOfStack;
PEI_CORE_PARAMETERS PeiCoreParameters;
- EFI_DEVICE_HANDLE_EXTENDED_DATA ExtendedData;
+ PEIM_FILE_HANDLE_EXTENDED_DATA ExtendedData;
EFI_FV_FILE_INFO FvFileInfo;
@@ -270,10 +275,10 @@ Returns: //
// Call the PEIM entry point
//
- PeimEntryPoint = (EFI_PEIM_ENTRY_POINT)(UINTN)EntryPoint;
+ PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint;
PERF_START (0, "PEIM", NULL, 0);
- PeimEntryPoint(PeimFileHandle, &Private->PS);
+ PeimEntryPoint(PeimFileHandle, (const EFI_PEI_SERVICES **) &Private->PS);
PERF_END (0, "PEIM", NULL, 0);
}
@@ -357,7 +362,7 @@ Returns: REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
EFI_PROGRESS_CODE,
- EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN,
+ FixedPcdGet32(PcdStatusCodeValuePeimDispatch),
(VOID *)(&ExtendedData),
sizeof (ExtendedData)
);
@@ -373,18 +378,16 @@ Returns: //
// Call the PEIM entry point for PEIM driver
//
- PeimEntryPoint = (EFI_PEIM_ENTRY_POINT)(UINTN)EntryPoint;
- PeimEntryPoint (PeimFileHandle, PeiServices);
+ PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint;
+ PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES **) PeiServices);
}
- //
- // One module has been dispatched.
- //
+
PeimDispatchOnThisPass = TRUE;
}
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
EFI_PROGRESS_CODE,
- EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END,
+ FixedPcdGet32(PcdStatusCodeValuePeimDispatch),
(VOID *)(&ExtendedData),
sizeof (ExtendedData)
);
@@ -483,7 +486,7 @@ Returns: // We call the entry point a 2nd time so the module knows it's shadowed.
//
//PERF_START (PeiServices, L"PEIM", PeimFileHandle, 0);
- PeimEntryPoint (PeimFileHandle, PeiServices);
+ PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES **) PeiServices);
//PERF_END (PeiServices, L"PEIM", PeimFileHandle, 0);
//
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 621fb16f18..358889213e 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -198,7 +198,7 @@ Returns: FileHeader = (EFI_FFS_FILE_HEADER **)FileHandle;
FvLength = FwVolHeader->FvLength;
- if (FwVolHeader->Attributes & EFI_FVB_ERASE_POLARITY) {
+ if (FwVolHeader->Attributes & EFI_FVB2_ERASE_POLARITY) {
ErasePolarity = 1;
} else {
ErasePolarity = 0;
@@ -781,7 +781,7 @@ Returns: return EFI_INVALID_PARAMETER;
}
- if (((EFI_FIRMWARE_VOLUME_HEADER*)VolumeHandle)->Attributes & EFI_FVB_ERASE_POLARITY) {
+ if (((EFI_FIRMWARE_VOLUME_HEADER*)VolumeHandle)->Attributes & EFI_FVB2_ERASE_POLARITY) {
ErasePolarity = 1;
} else {
ErasePolarity = 0;
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 84d187ed97..4876851cbe 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -25,8 +25,6 @@ Revision History #define _PEI_MAIN_H_
#include <PiPei.h>
-#include <FrameworkPei.h>
-#include <Guid/StatusCodeDataTypeId.h>
#include <Ppi/DxeIpl.h>
#include <Ppi/MemoryDiscovered.h>
#include <Ppi/StatusCode.h>
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf index 0d58f9555a..1d2c8fc5df 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.inf +++ b/MdeModulePkg/Core/Pei/PeiMain.inf @@ -65,7 +65,6 @@ [Packages]
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses]
TimerLib
@@ -101,6 +100,8 @@ [FixedPcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv
+ gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeimDispatch
+ gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiCoreEntry
[FeaturePcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index 1dd7ed3d4f..4e2d9b10aa 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -213,7 +213,7 @@ Returns: //
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
- EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT
+ FixedPcdGet32 (PcdStatusCodeValuePeiCoreEntry)
);
PERF_START (NULL,"PEI", NULL, mTick);
|