diff options
author | Star Zeng <star.zeng@intel.com> | 2013-10-11 03:54:13 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-11 03:54:13 +0000 |
commit | c79351059ee7ee24ebed312413cb5e57076c5b56 (patch) | |
tree | d93c9f8f4d87bd568aef4da644888348e2a147fc /MdeModulePkg/Core/Pei/Dispatcher | |
parent | 71fd9fae8bda10f41a9c6445f01eed82b99883da (diff) | |
download | edk2-platforms-c79351059ee7ee24ebed312413cb5e57076c5b56.tar.xz |
1. Enable use-cases in PEI using SecurityPPI co-equal to the use-cases in DXE using the Security Arch Protocol
2. Add support to find section by instance rather than only 0 at PEI phase.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14763 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei/Dispatcher')
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index b0e4b6d12a..f4392b78dd 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -764,8 +764,14 @@ PeiDispatcher ( //
// For Fv type file, Produce new FV PPI and FV hob
//
- Status = ProcessFvFile (&Private->Fv[FvCount], PeimFileHandle);
- AuthenticationState = 0;
+ Status = ProcessFvFile (Private, &Private->Fv[FvCount], PeimFileHandle);
+ if (Status == EFI_SUCCESS) {
+ //
+ // PEIM_STATE_NOT_DISPATCHED move to PEIM_STATE_DISPATCHED
+ //
+ Private->Fv[FvCount].PeimState[PeimCount]++;
+ Private->PeimDispatchOnThisPass = TRUE;
+ }
} else {
//
// For PEIM driver, Load its entry point
@@ -777,50 +783,45 @@ PeiDispatcher ( &EntryPoint,
&AuthenticationState
);
- }
-
- if (Status == EFI_SUCCESS) {
- //
- // The PEIM has its dependencies satisfied, and its entry point
- // has been found, so invoke it.
- //
- PERF_START (PeimFileHandle, "PEIM", NULL, 0);
-
- ExtendedData.Handle = (EFI_HANDLE)PeimFileHandle;
-
- REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
- EFI_PROGRESS_CODE,
- (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN),
- (VOID *)(&ExtendedData),
- sizeof (ExtendedData)
- );
-
- Status = VerifyPeim (Private, CoreFvHandle->FvHandle, PeimFileHandle);
- if (Status != EFI_SECURITY_VIOLATION && (AuthenticationState == 0)) {
+ if (Status == EFI_SUCCESS) {
//
- // PEIM_STATE_NOT_DISPATCHED move to PEIM_STATE_DISPATCHED
+ // The PEIM has its dependencies satisfied, and its entry point
+ // has been found, so invoke it.
//
- Private->Fv[FvCount].PeimState[PeimCount]++;
+ PERF_START (PeimFileHandle, "PEIM", NULL, 0);
- if (FvFileInfo.FileType != EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {
+ ExtendedData.Handle = (EFI_HANDLE)PeimFileHandle;
+
+ REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
+ EFI_PROGRESS_CODE,
+ (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN),
+ (VOID *)(&ExtendedData),
+ sizeof (ExtendedData)
+ );
+
+ Status = VerifyPeim (Private, CoreFvHandle->FvHandle, PeimFileHandle, AuthenticationState);
+ if (Status != EFI_SECURITY_VIOLATION) {
+ //
+ // PEIM_STATE_NOT_DISPATCHED move to PEIM_STATE_DISPATCHED
+ //
+ Private->Fv[FvCount].PeimState[PeimCount]++;
//
// Call the PEIM entry point for PEIM driver
//
PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint;
PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES **) PeiServices);
+ Private->PeimDispatchOnThisPass = TRUE;
}
- Private->PeimDispatchOnThisPass = TRUE;
- }
-
- REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
- EFI_PROGRESS_CODE,
- (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END),
- (VOID *)(&ExtendedData),
- sizeof (ExtendedData)
- );
- PERF_END (PeimFileHandle, "PEIM", NULL, 0);
+ REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
+ EFI_PROGRESS_CODE,
+ (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END),
+ (VOID *)(&ExtendedData),
+ sizeof (ExtendedData)
+ );
+ PERF_END (PeimFileHandle, "PEIM", NULL, 0);
+ }
}
if (Private->SwitchStackSignal) {
|