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
This commit is contained in:
@@ -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);
|
||||
|
||||
//
|
||||
|
@@ -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;
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user