ArmPkg/BdsLib: Replaced BdsLoadApplication() by LocateEfiApplicationInFv()
Replaced the function BdsLoadApplication() by two explicit functions that load the EFI application either by its GUID or its Name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17966 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
4fc18df913
commit
0c72676d37
@@ -1069,17 +1069,27 @@ BootShell (
|
||||
IN LIST_ENTRY *BootOptionsList
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH* EfiShellDevicePath;
|
||||
|
||||
// Start EFI Shell
|
||||
Status = BdsLoadApplication (gImageHandle, L"Shell", 0, NULL);
|
||||
// Find the EFI Shell
|
||||
Status = LocateEfiApplicationInFvByName (L"Shell", &EfiShellDevicePath);
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
Print (L"Error: EFI Application not found.\n");
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
Print (L"Error: Status Code: 0x%X\n",(UINT32)Status);
|
||||
}
|
||||
return Status;
|
||||
} else if (EFI_ERROR (Status)) {
|
||||
Print (L"Error: Status Code: 0x%X\n", (UINT32)Status);
|
||||
return Status;
|
||||
} else {
|
||||
// Need to connect every drivers to ensure no dependencies are missing for the application
|
||||
Status = BdsConnectAllDrivers ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "FAIL to connect all drivers\n"));
|
||||
return Status;
|
||||
}
|
||||
|
||||
return Status;
|
||||
return BdsStartEfiApplication (gImageHandle, EfiShellDevicePath, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
struct BOOT_MAIN_ENTRY {
|
||||
|
Reference in New Issue
Block a user