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