aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-05-03 11:45:33 +0200
committerStafford Horne <shorne@gmail.com>2022-05-15 10:33:01 +0900
commita92162f4f1dfc2daf1bc8f2bbc3cad3c9d1ea729 (patch)
treed1da2ced71483501d752df1e6237b84b08c6076b
parent777784bda46847fc0587d711c3aacff8fff3c3f9 (diff)
downloadqemu-a92162f4f1dfc2daf1bc8f2bbc3cad3c9d1ea729.zip
qemu-a92162f4f1dfc2daf1bc8f2bbc3cad3c9d1ea729.tar.gz
qemu-a92162f4f1dfc2daf1bc8f2bbc3cad3c9d1ea729.tar.bz2
hw/openrisc: use right OMPIC size variable
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size. But actually that smaller OMPIC size is wrong too and doesn't allow the IPI to work in Linux. So set it to the old value. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> [smh:Updated OR1KSIM_OMPIC size to use OR1KSIM_CPUS_MAX] Signed-off-by: Stafford Horne <shorne@gmail.com>
-rw-r--r--hw/openrisc/openrisc_sim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 6873124..35adce1 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -82,7 +82,7 @@ static const struct MemmapEntry {
[OR1KSIM_DRAM] = { 0x00000000, 0 },
[OR1KSIM_UART] = { 0x90000000, 0x100 },
[OR1KSIM_ETHOC] = { 0x92000000, 0x800 },
- [OR1KSIM_OMPIC] = { 0x98000000, 16 },
+ [OR1KSIM_OMPIC] = { 0x98000000, OR1KSIM_CPUS_MAX * 8 },
};
static struct openrisc_boot_info {
@@ -418,7 +418,7 @@ static void openrisc_sim_init(MachineState *machine)
if (smp_cpus > 1) {
openrisc_sim_ompic_init(state, or1ksim_memmap[OR1KSIM_OMPIC].base,
- or1ksim_memmap[OR1KSIM_UART].size,
+ or1ksim_memmap[OR1KSIM_OMPIC].size,
smp_cpus, cpus, OR1KSIM_OMPIC_IRQ);
}