summaryrefslogtreecommitdiffstats
path: root/src/interface/efi
diff options
context:
space:
mode:
authorMichael Brown2018-03-26 13:10:09 +0200
committerMichael Brown2018-03-26 13:10:09 +0200
commit4f362a032b21ae201a58f59b5885e7613e326db3 (patch)
tree4e331740f21d9b0a78376b01013a33ff455f3bf2 /src/interface/efi
parent[efi] Release SNP devices before starting SAN boot image (diff)
downloadipxe-4f362a032b21ae201a58f59b5885e7613e326db3.tar.gz
ipxe-4f362a032b21ae201a58f59b5885e7613e326db3.tar.xz
ipxe-4f362a032b21ae201a58f59b5885e7613e326db3.zip
[efi] Do not raise TPL within EFI_DRIVER_BINDING_PROTOCOL.Supported()
When booting some versions of the UEFI shell, our driver binding protocol's Supported() entry point is called at TPL_NOTIFY for no discernible reason. Attempting to raise to TPL_CALLBACK triggers an immediate assertion failure in the firmware. Since our Supported() method can run at any TPL, fix by simply not attempting to raise the TPL within this method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi')
-rw-r--r--src/interface/efi/efi_driver.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/interface/efi/efi_driver.c b/src/interface/efi/efi_driver.c
index fe73630f..04796414 100644
--- a/src/interface/efi/efi_driver.c
+++ b/src/interface/efi/efi_driver.c
@@ -95,9 +95,7 @@ struct efi_device * efidev_parent ( struct device *dev ) {
static EFI_STATUS EFIAPI
efi_driver_supported ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
EFI_HANDLE device, EFI_DEVICE_PATH_PROTOCOL *child ) {
- EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
struct efi_driver *efidrv;
- EFI_TPL saved_tpl;
int rc;
DBGCP ( device, "EFIDRV %s DRIVER_SUPPORTED",
@@ -113,22 +111,17 @@ efi_driver_supported ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
return EFI_ALREADY_STARTED;
}
- /* Raise TPL */
- saved_tpl = bs->RaiseTPL ( TPL_CALLBACK );
-
/* Look for a driver claiming to support this device */
for_each_table_entry ( efidrv, EFI_DRIVERS ) {
if ( ( rc = efidrv->supported ( device ) ) == 0 ) {
DBGC ( device, "EFIDRV %s has driver \"%s\"\n",
efi_handle_name ( device ), efidrv->name );
- bs->RestoreTPL ( saved_tpl );
return 0;
}
}
DBGCP ( device, "EFIDRV %s has no driver\n",
efi_handle_name ( device ) );
- bs->RestoreTPL ( saved_tpl );
return EFI_UNSUPPORTED;
}