mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
hw/riscv/virt.c: re-insert and deprecate 'riscv,delegate'
Commitb1f1e9dcfa
renamed 'riscv,delegate' to 'riscv,delegation' since it is the correct name as per dt-bindings, and the absence of the correct name will result in validation fails when dumping the dtb and using dt-validate. But this change has a side-effect: every other firmware available that is AIA capable is using 'riscv,delegate', and it will fault/misbehave if this property isn't present. The property was added back in QEMU 7.0, meaning we have 2 years of firmware development using the wrong property. Re-introducing 'riscv,delegate' while keeping 'riscv,delegation' allows older firmwares to keep booting with the 'virt' machine. 'riscv,delegate' is then marked for future deprecation with its use being discouraged from now on. Cc: Conor Dooley <conor@kernel.org> Cc: Anup Patel <apatel@ventanamicro.com> Fixes:b1f1e9dcfa
("hw/riscv/virt.c: aplic DT: rename prop to 'riscv, delegation'") Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20240715090455.145888-1-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
38c83e8d3a
commit
38facfa843
2 changed files with 20 additions and 0 deletions
|
@ -651,6 +651,15 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket,
|
|||
qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegation",
|
||||
aplic_child_phandle, 0x1,
|
||||
VIRT_IRQCHIP_NUM_SOURCES);
|
||||
/*
|
||||
* DEPRECATED_9.1: Compat property kept temporarily
|
||||
* to allow old firmwares to work with AIA. Do *not*
|
||||
* use 'riscv,delegate' in new code: use
|
||||
* 'riscv,delegation' instead.
|
||||
*/
|
||||
qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegate",
|
||||
aplic_child_phandle, 0x1,
|
||||
VIRT_IRQCHIP_NUM_SOURCES);
|
||||
}
|
||||
|
||||
riscv_socket_fdt_write_id(ms, aplic_name, socket);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue