]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/BdsLib/BdsFilePath.c
ArmPkg/BdsLib: Fix booting with partial paths
authorMark Salter <msalter@redhat.com>
Thu, 8 May 2014 15:09:27 +0000 (15:09 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 May 2014 15:09:27 +0000 (15:09 +0000)
commit10ddca8db92de5a535ca1ab71b780260aae8003d
tree1ec92ac1721e2b5a0074b033383d12a0b7834249
parent79e12331ef1e7c24b5be70d7bc79977ca103bab4
ArmPkg/BdsLib: Fix booting with partial paths

Boot entries created by efibootmgr may contain a partial device path
to the EFI application to boot. These entries begin with a partition
device path whereas entries created via ARM Boot Manager contain a
full path to the EFI application. The ARM BDS code will fill in the
missing parts of this partial device path as it does for removeable
device paths. This allows the application to be loaded and started.
However, the current code passes the original partial device path to
gBS->LoadImage() and thus LoadImage is unable to find a DeviceHandle
for the path. This means the application being booted cannot find the
boot device from the Loaded Image Protocol structure. In the case of
grub, this prevents the grub config file from being found. This patch
fixes this by making sure the full path is propagated back to the
caller of gBS->LoadImage() so that a proper DeviceHandle gets passed
to the application being booted.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15518 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Library/BdsLib/BdsFilePath.c