lasi: allow access to LAN MAC address registers
authorHelge Deller <deller@gmx.de>
Fri, 2 Feb 2024 21:53:08 +0000 (22:53 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 11 Feb 2024 12:20:23 +0000 (13:20 +0100)
Firmware and qemu reads and writes the MAC address for the LASI LAN via
registers in LASI. Allow those accesses and return zero even if LASI
LAN isn't enabled to avoid HPMCs (=crashes).

Signed-off-by: Helge Deller <deller@gmx.de>
hw/misc/lasi.c

index 003f5b5ed86b2ce58ab10c9915ba8170d1e94136..9cfa5bb3161b4f2d7829c0c2b8cd457b5c799cee 100644 (file)
@@ -38,6 +38,7 @@ static bool lasi_chip_mem_valid(void *opaque, hwaddr addr,
     case LASI_LPT:
     case LASI_UART:
     case LASI_LAN:
+    case LASI_LAN + 12: /* LASI LAN MAC */
     case LASI_RTC:
 
     case LASI_PCR ... LASI_AMR:
@@ -78,6 +79,7 @@ static MemTxResult lasi_chip_read_with_attrs(void *opaque, hwaddr addr,
     case LASI_LPT:
     case LASI_UART:
     case LASI_LAN:
+    case LASI_LAN + 12:
         val = 0;
         break;
     case LASI_RTC: