On 16/1/24 14:02, Clément Chigot wrote:
This implements the multiprocessor status register in grlib-irqmp and bind
it to a start signal, which will be later wired in leon3-generic to
start a cpu.

The EIRQ and BA bits are not implemented.

Based on https://gaisler.com/doc/gr712rc-usermanual.pdf, §8.3.5.

Co-developed-by: Frederic Konrad <[email protected]>
Signed-off-by: Clément Chigot <[email protected]>
---
  hw/intc/grlib_irqmp.c | 35 ++++++++++++++++++++++++++++++++---
  1 file changed, 32 insertions(+), 3 deletions(-)


@@ -325,6 +345,8 @@ static void grlib_irqmp_reset(DeviceState *d)
memset(irqmp->state, 0, sizeof *irqmp->state);
      irqmp->state->parent = irqmp;
+    irqmp->state->mpstatus = ((irqmp->ncpus - 1) << MP_STATUS_NCPU_SHIFT)
+        | ((1 << irqmp->ncpus) - 2);

Indentation off, otherwise:
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

  }


Reply via email to