Skip to content

m68k: Add Sun-3 Machine Emulation

54weasels qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7target/m68k: Implement Physical Bus Error exception handlingtarget/m68k/cpu.c target/m68k/cpu.h target/m68k/helper.c +2 more+283 -772 replies
2/7hw/net/lance: Add Sun-3 Native DMA byte-swapping supporthw/net/lance.c hw/net/meson.build include/hw/net/lance.h+109 -80 replies
3/7hw/char/escc: Expose diagnostic RS232 I/O routinghw/char/escc.c include/hw/char/escc.h+27 -90 replies
4/7hw/timer: Introduce Intersil 7170 RTC implementationhw/timer/Kconfig hw/timer/intersil7170.c hw/timer/meson.build +1 more+229 -00 replies
5/7hw/m68k: Overhaul Sun-3 MMU and Boot PROM mappinghw/m68k/Kconfig hw/m68k/meson.build hw/m68k/sun3.c +3 more+1537 -00 replies
6/7tests/qtest: Add Sun-3 hardware interaction teststests/qtest/meson.build tests/qtest/sun3-test.c+68 -00 replies
7/7tests/functional: Add Sun-3 firmware boot and diagnostic testtests/functional/m68k/meson.build tests/functional/m68k/test_sun3.py tests/functional/qemu_test/asset.py+41 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] m68k: Add Sun-3 Machine Emulation

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
Signature · 1 line
2.50.1 (Apple Git-155)