]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/nubus-device: round Declaration ROM memory region address to qemu_target_page_size()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 11 Jan 2024 10:29:52 +0000 (10:29 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 27 Feb 2024 08:36:25 +0000 (09:36 +0100)
commit9cda31193b84ea91684efb3916ac2cc34a6715bc
treea694322dd5167f34be4157e6961289a0ceea4d72
parent491da0af99527bb27859e576b12fa53f21ee2a13
hw/nubus-device: round Declaration ROM memory region address to qemu_target_page_size()

Declaration ROM binary images can be any arbitrary size, however if a host ROM
memory region is not aligned to qemu_target_page_size() then we fail the
"assert(!(iotlb & ~TARGET_PAGE_MASK))" check in tlb_set_page_full().

Ensure that the host ROM memory region is aligned to qemu_target_page_size()
and adjust the offset at which the Declaration ROM image is loaded, since Nubus
ROM images are unusual in that they are aligned to the end of the slot address
space.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20240111102954.449462-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/nubus/nubus-device.c