From 73e0036b9926d69cdff974e8adef707af42f1611 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Sun, 29 Oct 2017 08:13:11 -0700 Subject: [PATCH] Change the default IRQs. * Reserve IRQ 0 to be used as a "non-maskable interrupt" (NMI) in the future. * Use IRQ 2 for the LiteX. This matches the standard mor1k config which connects the UART to IRQ 2. This change is needed for Linux running on LiteX as it gets grumpy with using IRQ 0 for anything other other than an NMI. --- litex/soc/integration/soc_core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index 13723e4ef..9e4daac3c 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -36,8 +36,9 @@ class SoCCore(Module): "leds": 6, # user } interrupt_map = { - "uart": 0, - "timer0": 1, + "nmi": 0, # Reserve zero for "non-maskable interrupt" + "timer0": 1, # LiteX Timer + "uart": 2, # LiteX UART (IRQ 2 for UART matches mor1k standard config). } mem_map = { "rom": 0x00000000, # (default shadow @0x80000000)