Skip to content

Commit

Permalink
efi_loader: remove non vital devices first
Browse files Browse the repository at this point in the history
DM_FLAG_VITAL marks devices which are essential for the operation of
other devices. This can be used to order device removal and remove for
example the PCI xhci device before its iommu on Apple silicon systems.

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau committed Oct 28, 2024
1 parent 893e8c8 commit df8e201
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/efi_loader/efi_boottime.c
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
if (IS_ENABLED(CONFIG_USB_DEVICE))
udc_disconnect();
board_quiesce_devices();
dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
}

Expand Down

0 comments on commit df8e201

Please sign in to comment.