]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/BdsLib/BdsFilePath.c
ArmPkg/BdsLib: Prevent a hang in BdsConnectDevicePath() when a sub-device path is...
authorOlivier Martin <olivier.martin@arm.com>
Tue, 19 Aug 2014 13:35:14 +0000 (13:35 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Aug 2014 13:35:14 +0000 (13:35 +0000)
commit04ad241e2081312be62a9f299311949e85ed725c
treebe2ad95339379a54c7a35813504c7e39ef01e078
parent5e6322a53066b59c3d351d6ce3e07e07cd08e8dd
ArmPkg/BdsLib: Prevent a hang in BdsConnectDevicePath() when a sub-device path is not found

Some device paths were making BdsConnectDevicePath() hang.
To prevent these hangs we check if the handle returned by
gBS->LocateDevicePath() is the same after each iteration.

An example of a device path that hangs:
PciRoot(0x0)/Pci(0x1,0x0)/USB(0x0,0x0)/USB(0x3,0x0)/HD(...)
The connect controller function manages to find PciRoot()/Pci(0x1,0x0)
but the USB driver does not produce USB(0x0,0x0)/USB(0x3,0x0) and
returns EFI_SUCCESS on its initialization.

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