Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream resolved issue in DxeServicesLib for FvHandle being NULL #10

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 25 additions & 41 deletions MdePkg/Library/DxeServicesLib/DxeServicesLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,17 @@ GetSectionFromAnyFv (
// will locate the FFS faster.
//
FvHandle = InternalImageHandleToFvHandle (gImageHandle);
if (NULL != FvHandle) { // MS_CHANGE
Status = InternalGetSectionFromFv(
FvHandle,
NameGuid,
SectionType,
SectionInstance,
Buffer,
Size
);
if (!EFI_ERROR (Status)) {
return EFI_SUCCESS;
}
} // MS_CHANGE
Status = InternalGetSectionFromFv (
FvHandle,
NameGuid,
SectionType,
SectionInstance,
Buffer,
Size
);
if (!EFI_ERROR (Status)) {
return EFI_SUCCESS;
}

HandleBuffer = NULL;
Status = gBS->LocateHandleBuffer (
Expand Down Expand Up @@ -510,14 +508,8 @@ GetSectionFromFv (
OUT UINTN *Size
)
{
EFI_HANDLE FvHandle; // MS_CHANGE

FvHandle = InternalImageHandleToFvHandle(gImageHandle); // MS_CHANGE
if (NULL == FvHandle) { // MS_CHANGE
return EFI_NOT_FOUND; // MS_CHANGE
} // MS_CHANGE
return InternalGetSectionFromFv(
FvHandle, // MS_CHANGE
return InternalGetSectionFromFv (
InternalImageHandleToFvHandle(gImageHandle),
NameGuid,
SectionType,
SectionInstance,
Expand Down Expand Up @@ -578,14 +570,8 @@ GetSectionFromFfs (
OUT UINTN *Size
)
{
EFI_HANDLE FvHandle; //mschange

FvHandle = InternalImageHandleToFvHandle(gImageHandle); //mschange
if (NULL == FvHandle) { //mschange
return EFI_NOT_FOUND; //mschange
} //mschange
return InternalGetSectionFromFv(
FvHandle, //mschange
InternalImageHandleToFvHandle(gImageHandle),
&gEfiCallerIdGuid,
SectionType,
SectionInstance,
Expand Down Expand Up @@ -1022,19 +1008,17 @@ GetFileDevicePathFromAnyFv (
// will locate the FFS faster.
//
FvHandle = InternalImageHandleToFvHandle (gImageHandle);
if (FvHandle != NULL) { // MS_CHANGE
Status = InternalGetSectionFromFv(
FvHandle,
NameGuid,
SectionType,
SectionInstance,
&Buffer,
&Size
);
if (!EFI_ERROR (Status)) {
goto Done;
}
} // MS_CHANGE
Status = InternalGetSectionFromFv (
FvHandle,
NameGuid,
SectionType,
SectionInstance,
&Buffer,
&Size
);
if (!EFI_ERROR (Status)) {
goto Done;
}

Status = gBS->LocateHandleBuffer (
ByProtocol,
Expand Down