mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
PiSmmCore dispatcher should not use one Index for three loops.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Zachary Bobroff" <zacharyb@ami.com> Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17566 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
eb01c45a1f
commit
5d832d6216
@ -1215,7 +1215,9 @@ SmmDriverDispatchHandler (
|
|||||||
EFI_SMM_DRIVER_ENTRY *DriverEntry;
|
EFI_SMM_DRIVER_ENTRY *DriverEntry;
|
||||||
EFI_GUID *AprioriFile;
|
EFI_GUID *AprioriFile;
|
||||||
UINTN AprioriEntryCount;
|
UINTN AprioriEntryCount;
|
||||||
UINTN Index;
|
UINTN HandleIndex;
|
||||||
|
UINTN SmmTypeIndex;
|
||||||
|
UINTN AprioriIndex;
|
||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
UINT32 AuthenticationStatus;
|
UINT32 AuthenticationStatus;
|
||||||
UINTN SizeOfBuffer;
|
UINTN SizeOfBuffer;
|
||||||
@ -1232,8 +1234,8 @@ SmmDriverDispatchHandler (
|
|||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Index = 0; Index < HandleCount; Index++) {
|
for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {
|
||||||
FvHandle = HandleBuffer[Index];
|
FvHandle = HandleBuffer[HandleIndex];
|
||||||
|
|
||||||
if (FvHasBeenProcessed (FvHandle)) {
|
if (FvHasBeenProcessed (FvHandle)) {
|
||||||
//
|
//
|
||||||
@ -1268,13 +1270,13 @@ SmmDriverDispatchHandler (
|
|||||||
// Discover Drivers in FV and add them to the Discovered Driver List.
|
// Discover Drivers in FV and add them to the Discovered Driver List.
|
||||||
// Process EFI_FV_FILETYPE_SMM type and then EFI_FV_FILETYPE_COMBINED_SMM_DXE
|
// Process EFI_FV_FILETYPE_SMM type and then EFI_FV_FILETYPE_COMBINED_SMM_DXE
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < sizeof (mSmmFileTypes)/sizeof (EFI_FV_FILETYPE); Index++) {
|
for (SmmTypeIndex = 0; SmmTypeIndex < sizeof (mSmmFileTypes)/sizeof (EFI_FV_FILETYPE); SmmTypeIndex++) {
|
||||||
//
|
//
|
||||||
// Initialize the search key
|
// Initialize the search key
|
||||||
//
|
//
|
||||||
Key = 0;
|
Key = 0;
|
||||||
do {
|
do {
|
||||||
Type = mSmmFileTypes[Index];
|
Type = mSmmFileTypes[SmmTypeIndex];
|
||||||
GetNextFileStatus = Fv->GetNextFile (
|
GetNextFileStatus = Fv->GetNextFile (
|
||||||
Fv,
|
Fv,
|
||||||
&Key,
|
&Key,
|
||||||
@ -1315,10 +1317,10 @@ SmmDriverDispatchHandler (
|
|||||||
// is only valid for the FV that it resided in.
|
// is only valid for the FV that it resided in.
|
||||||
//
|
//
|
||||||
|
|
||||||
for (Index = 0; Index < AprioriEntryCount; Index++) {
|
for (AprioriIndex = 0; AprioriIndex < AprioriEntryCount; AprioriIndex++) {
|
||||||
for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {
|
for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {
|
||||||
DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);
|
DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);
|
||||||
if (CompareGuid (&DriverEntry->FileName, &AprioriFile[Index]) &&
|
if (CompareGuid (&DriverEntry->FileName, &AprioriFile[AprioriIndex]) &&
|
||||||
(FvHandle == DriverEntry->FvHandle)) {
|
(FvHandle == DriverEntry->FvHandle)) {
|
||||||
DriverEntry->Dependent = FALSE;
|
DriverEntry->Dependent = FALSE;
|
||||||
DriverEntry->Scheduled = TRUE;
|
DriverEntry->Scheduled = TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user