Skip to content

Commit

Permalink
lasi: allow access to LAN MAC address registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hdeller committed Feb 11, 2024
1 parent f410b68 commit f2ffd6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/misc/lasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f2ffd6f

Please sign in to comment.