This implements a barebones Sun 3/60 that can boot a standard firmware, pass all the diagnostic tests and fully netboot both NetBSD 10 and SunOS 4.1.1
It has the minimum necessary devices: memory/MMU, diagnostic and error registers, interrupt, TOD clock, DMA, IDprom and configuration eeprom. I/O is the console serial and lance ethernet.
There are a few modifications needed to emulate a proper 68020, support another external MMU and sun3 specific ways of u sing the escc and ethernet devices.
Next steps are implementing SCSI, graphics, and patching through the keyboard and mouse.
This is part of the Sun 3/60 preservation project: https://github.com/54weasels/sun3_60
54weasels (7):
target/m68k: Implement Physical Bus Error exception handling
hw/net/lance: Add Sun-3 Native DMA byte-swapping support
hw/char/escc: Expose diagnostic RS232 I/O routing
hw/timer: Introduce Intersil 7170 RTC implementation
hw/m68k: Overhaul Sun-3 MMU and Boot PROM mapping
tests/qtest: Add Sun-3 hardware interaction tests
tests/functional: Add Sun-3 firmware boot and diagnostic test
hw/char/escc.c | 33 +-
hw/m68k/Kconfig | 8 +
hw/m68k/meson.build | 1 +
hw/m68k/sun3.c | 499 ++++++++++++++++++++
hw/m68k/sun3_eeprom_data.h | 259 ++++++++++
hw/m68k/sun3mmu.c | 705 ++++++++++++++++++++++++++++
hw/net/lance.c | 111 ++++-
hw/net/meson.build | 3 +-
hw/timer/Kconfig | 3 +
hw/timer/intersil7170.c | 216 +++++++++
hw/timer/meson.build | 1 +
include/hw/char/escc.h | 3 +
include/hw/m68k/sun3mmu.h | 65 +++
include/hw/net/lance.h | 3 +
include/hw/timer/intersil7170.h | 9 +
target/m68k/cpu.c | 5 +-
target/m68k/cpu.h | 18 +-
target/m68k/helper.c | 130 ++++-
target/m68k/op_helper.c | 176 ++++---
target/m68k/translate.c | 31 +-
tests/functional/m68k/meson.build | 1 +
tests/functional/m68k/test_sun3.py | 34 ++
tests/functional/qemu_test/asset.py | 11 +-
tests/qtest/meson.build | 1 +
tests/qtest/sun3-test.c | 67 +++
25 files changed, 2294 insertions(+), 99 deletions(-)
create mode 100644 hw/m68k/sun3.c
create mode 100644 hw/m68k/sun3_eeprom_data.h
create mode 100644 hw/m68k/sun3mmu.c
create mode 100644 hw/timer/intersil7170.c
create mode 100644 include/hw/m68k/sun3mmu.h
create mode 100644 include/hw/timer/intersil7170.h
create mode 100755 tests/functional/m68k/test_sun3.py
create mode 100644 tests/qtest/sun3-test.c
--
2.50.1 (Apple Git-155)