hw/core/loader.c: Track last-seen ROM in rom_check_and_register_reset()
commit5b1de5204776284283019e18a3a45310c6e83be6
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 29 Nov 2020 20:39:20 +0000 (29 20:39 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 15 Dec 2020 12:04:30 +0000 (15 12:04 +0000)
tree1c357253c35e33ea47a37be83f31143ef1b47aaa
parent05bcbcf27954e664d85627f026970f62556fefa5
hw/core/loader.c: Track last-seen ROM in rom_check_and_register_reset()

In rom_check_and_register_reset() we detect overlaps by looking at
whether the ROM blob we're currently examining is in the same address
space and starts before the previous ROM blob ends.  (This works
because the ROM list is kept sorted in order by AddressSpace and then
by address.)

Instead of keeping the AddressSpace and last address of the previous ROM
blob in local variables, just keep a pointer to it.

This will allow us to print more useful information when we do detect
an overlap.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201129203923.10622-2-peter.maydell@linaro.org
hw/core/loader.c