aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>2025-04-29 09:58:03 -0300
committerAlistair Francis <alistair.francis@wdc.com>2025-05-19 13:42:56 +1000
commit221e96cb7ae4535bcef7d54d1620a44be88b655e (patch)
tree1055a8640dccce48d679bc179ae5ff5fdb1f0f10 /python
parent8ab99a05f34bab3f9fae49299ee407ead78f0470 (diff)
downloadqemu-221e96cb7ae4535bcef7d54d1620a44be88b655e.zip
qemu-221e96cb7ae4535bcef7d54d1620a44be88b655e.tar.gz
qemu-221e96cb7ae4535bcef7d54d1620a44be88b655e.tar.bz2
hw/riscv/virt.c: enforce s->memmap use in machine_init()
Throughout the code we're accessing the board memmap, most of the time, by accessing it statically via 'virt_memmap'. This static map is also assigned in the machine state in s->memmap. We're also passing it as a variable to some fdt functions, which is unorthodox since we can spare a function argument by accessing it statically or via the machine state. All the current forms are valid but not all of the are scalable. In the future we will version this board, and then all this code will need rework because it should point to the updated memmap. In this case, we'll want to assign the adequate versioned memmap once during init, in s->memmap like it is being done today, and the rest of the code will access the updated map via s->memmap. We're also enforcing the pattern of using s->memmap instead of assigning it to a temp variable 'memmap'. Code is copy/pasted around all the time and being consistent is important. We'll start these rather mechanical changes with virt_machine_init(). Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Message-ID: <20250429125811.224803-2-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions