u-boot/arch/riscv/lib
Janne Grunau dabaa4ae32 dm: Add dm_remove_devices_active() for ordered device removal
This replaces dm_remove_devices_flags() calls in all boot
implementations to ensure non vital devices are consistently removed
first. All boot implementation except arch/arm/lib/bootm.c currently
just call dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL). This can result
in crashes when dependencies between devices exists. The driver model's
design document describes DM_FLAG_VITAL as "indicates that the device is
'vital' to the operation of other devices". Device removal at boot
should follow this.

Instead of adding dm_remove_devices_flags() with (DM_REMOVE_ACTIVE_ALL |
DM_REMOVE_NON_VITAL) everywhere add dm_remove_devices_active() which
does this.

Fixes a NULL pointer deref in the apple dart IOMMU driver during EFI
boot. The xhci-pci (driver which depends on the IOMMU to work) removes
its mapping on removal. This explodes when the IOMMU device was removed
first.

dm_remove_devices_flags() is kept since it is used for testing of
device_remove() calls in dm.

Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-24 15:41:28 -06:00
..
aclint_ipi.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
andes_plicsw.c riscv: andes: Fix enable register settings of PLICSW 2023-12-06 16:05:39 +08:00
asm-offsets.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
bdinfo.c riscv: add RISC-V fields to bdinfo command 2024-07-22 11:15:11 +08:00
boot.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
bootm.c dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
cache.c riscv: cache: Add CBO instructions 2024-10-28 18:56:54 +08:00
crt0_riscv_efi.S efi_loader: set IMAGE_DLLCHARACTERISTICS_NX_COMPAT 2024-02-28 14:37:46 +01:00
elf_riscv32_efi.lds riscv: separate .data and .text sections of EFI binaries 2024-01-29 11:30:10 +01:00
elf_riscv64_efi.lds riscv: separate .data and .text sections of EFI binaries 2024-01-29 11:30:10 +01:00
fdt_fixup.c riscv: add missing linefeed in error message 2024-10-28 16:11:33 +08:00
image.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
interrupts.c riscv: resume needs to be a global 2024-10-29 19:58:14 +08:00
Makefile Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD" 2024-10-11 12:23:25 -06:00
memcpy.S riscv: memcpy: check src and dst before copy 2023-02-01 16:17:45 +08:00
memmove.S riscv: Fix memmove and optimise memcpy when misalign 2021-05-17 16:47:33 +08:00
memset.S riscv: assembler versions of memcpy, memmove, memset 2021-04-08 15:37:29 +08:00
reloc_riscv_efi.c riscv: Remove unused _relocate arguments 2018-07-19 16:31:37 -04:00
reset.c riscv: Add a reset_cpu() function 2023-12-21 16:07:52 -05:00
sbi.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
sbi_ipi.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
semihosting.S riscv: semihosting: correct alignment 2024-07-22 11:15:11 +08:00
setjmp.S riscv: simplify longjmp 2021-04-08 15:37:29 +08:00
sifive_cache.c arch: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:47 -06:00
smp.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
spl.c riscv: Remove common.h usage 2023-10-24 16:34:45 -04:00
strcmp_zbb.S riscv: Add Zbb support for building U-Boot 2023-10-19 17:29:50 +08:00
strlen_zbb.S riscv: Add Zbb support for building U-Boot 2023-10-19 17:29:50 +08:00
strncmp_zbb.S riscv: Add Zbb support for building U-Boot 2023-10-19 17:29:50 +08:00