{"id":2232144,"url":"http://patchwork.ozlabs.org/api/covers/2232144/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20260503015756.99176-1-54weasels@gmail.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260503015756.99176-1-54weasels@gmail.com>","list_archive_url":null,"date":"2026-05-03T01:57:49","name":"[0/7] m68k: Add Sun-3 Machine Emulation","submitter":{"id":93309,"url":"http://patchwork.ozlabs.org/api/people/93309/?format=json","name":"54weasels","email":"54weasels@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20260503015756.99176-1-54weasels@gmail.com/mbox/","series":[{"id":502564,"url":"http://patchwork.ozlabs.org/api/series/502564/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502564","date":"2026-05-03T01:57:51","name":"m68k: Add Sun-3 Machine Emulation","version":1,"mbox":"http://patchwork.ozlabs.org/series/502564/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2232144/comments/","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ZCta2gSE;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g7YyW3hd2z1yK4\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 03 May 2026 15:59:45 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wJPqu-00011x-N5; Sun, 03 May 2026 01:58:52 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <54weasels@gmail.com>)\n id 1wJM5v-0004sE-4U\n for qemu-devel@nongnu.org; Sat, 02 May 2026 21:58:07 -0400","from mail-dl1-x1233.google.com ([2607:f8b0:4864:20::1233])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <54weasels@gmail.com>)\n id 1wJM5t-0000QW-DB\n for qemu-devel@nongnu.org; Sat, 02 May 2026 21:58:06 -0400","by mail-dl1-x1233.google.com with SMTP id\n a92af1059eb24-12c726ef332so4732485c88.1\n for <qemu-devel@nongnu.org>; Sat, 02 May 2026 18:58:04 -0700 (PDT)","from newsled.lan ([76.133.142.170]) by smtp.gmail.com with ESMTPSA\n id\n 5a478bee46e88-2ee38d79eb9sm14361735eec.8.2026.05.02.18.58.02\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Sat, 02 May 2026 18:58:02 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777773483; x=1778378283; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=r0aJxiFDsApRbUYKQFWya19YjRrC0xxvy142a2wjPBo=;\n b=ZCta2gSE9F+aYICVNu5YaFVJx2RgY65iAZ7IRv2jWl60AlYTepeIW/qjsmtoegrag2\n 8YtpdyUy4A2qQIsj7yVZZ4qW4hET5YBt8XDKMMp1MYDI4e+g3yEVkF2+Uo066GDy+SfC\n vyLhTm3W94hEIFLn/ZSA3lsJspjvcNoAgw5MEMp5ylzQT++WfYavEnDWP4rjXSWLfhV8\n X1RrWXjSCGo9tjOTng3U9NsKyLcnfrhrI2+qxRoc7uv+dpyV3xRamJpCWSsxpUDKaEC5\n Al9uEU8nFebOlrqlgA7e3YuXEu545E+uqfTxZnm7hfZGuVYp2FM67nwvuEbwmqt4cRD8\n b5xA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777773483; x=1778378283;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=r0aJxiFDsApRbUYKQFWya19YjRrC0xxvy142a2wjPBo=;\n b=LsPetQMNimJlL8SgRy0q9OciqCw5HwUS3gzQKs3n8P1dbV9HA4LC4mj/02MRNvo8JD\n SQiyIeuMyB7n5ArJ68GLi1AImLg8HdcEOShRq6DIv8C4CmYAX4xVu4o+wKyVbn54mZJK\n kLmhlO/Rftysd8aj5etTwJqV0cNCRo1g9b0JGYO1EkkfUopSEN092bfNyhk2fvE6O7yD\n 3z8f15MB/yRnS4iIAdL/XILLdUgVB7MQmBnQqgeOCFkaj82NUZyLVLahjV8U1UvvZAJK\n BOg2PxKBGheH+FS2zWo8v612Ivjt5VJXfuDZtvihEzvVq0JZJ0RiRUMaLh1va239m43m\n 3nBQ==","X-Gm-Message-State":"AOJu0YxOcYAquQMF/ruWjQogE1dM5A+T5ySSR7/RDOEeX+84ysPvox8v\n Cy1LvVjgQOo0k97w01+c6XObDAU86my5WggeO8hW9+tEoQfULqb7pFYJR5N07A==","X-Gm-Gg":"AeBDiesSTZ3tQy/OARrvTpRvQNMoTLbXqmyeMkUYc2TgUWdCqIGIKCJnXpLU18JxeWs\n OoRNzPoNzZJqTCsGdcTj+qtPJSVdjEowk9eMferM3csbo5YIZ3RoEzWajcPbQ5G3RbrMEjB70oV\n kVt7OgOKAvwb5PNwcO4ndEtfUMXd5ZJjwNPlPKlwlp1MNZRXXydMACeXj6isUg4qe57EN+sfQxu\n yiG/ggAt+keNQLs5gDk1kMZfxQWBBwdujV1e/Q0yJkwx//8NF3yVHZxKlTsDGM1bcyhodHa0wmw\n aSieV9f4Y5i3DKlP/8Lrl0un4o9L42QSusL+H3QhPl3bZj2UU7cYbuV5HqqP+78N1Rz/49jWdT5\n hpMKm/5HJp4p8BXwFMmMsUujoyipZcQJ2Rv9G+hSW9OC0DXFdD5bh4V3TgJo9VhkHuVWRWCtmV4\n JjRvJQrdFuIh20Qq/23EgBPyAbgG1T7cQghEDPjpDg808uRsKFHbG9eUrq8q43","X-Received":"by 2002:a05:7300:a49a:b0:2d2:129a:1694 with SMTP id\n 5a478bee46e88-2efb9e7bb88mr2096779eec.18.1777773482936;\n Sat, 02 May 2026 18:58:02 -0700 (PDT)","From":"54weasels <54weasels@gmail.com>","To":"qemu-devel@nongnu.org","Cc":"laurent@vivier.eu,\n\tthuth@redhat.com,\n\t54weasels <54weasels@gmail.com>","Subject":"[PATCH 0/7] m68k: Add Sun-3 Machine Emulation","Date":"Sat,  2 May 2026 18:57:49 -0700","Message-ID":"<20260503015756.99176-1-54weasels@gmail.com>","X-Mailer":"git-send-email 2.50.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2607:f8b0:4864:20::1233;\n envelope-from=54weasels@gmail.com; helo=mail-dl1-x1233.google.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-Mailman-Approved-At":"Sun, 03 May 2026 01:58:47 -0400","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"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\nIt 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.\nThere 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.\nNext steps are implementing SCSI, graphics, and patching through the keyboard and mouse.\n\nThis is part of the Sun 3/60 preservation project: https://github.com/54weasels/sun3_60\n\n54weasels (7):\n  target/m68k: Implement Physical Bus Error exception handling\n  hw/net/lance: Add Sun-3 Native DMA byte-swapping support\n  hw/char/escc: Expose diagnostic RS232 I/O routing\n  hw/timer: Introduce Intersil 7170 RTC implementation\n  hw/m68k: Overhaul Sun-3 MMU and Boot PROM mapping\n  tests/qtest: Add Sun-3 hardware interaction tests\n  tests/functional: Add Sun-3 firmware boot and diagnostic test\n\n hw/char/escc.c                      |  33 +-\n hw/m68k/Kconfig                     |   8 +\n hw/m68k/meson.build                 |   1 +\n hw/m68k/sun3.c                      | 499 ++++++++++++++++++++\n hw/m68k/sun3_eeprom_data.h          | 259 ++++++++++\n hw/m68k/sun3mmu.c                   | 705 ++++++++++++++++++++++++++++\n hw/net/lance.c                      | 111 ++++-\n hw/net/meson.build                  |   3 +-\n hw/timer/Kconfig                    |   3 +\n hw/timer/intersil7170.c             | 216 +++++++++\n hw/timer/meson.build                |   1 +\n include/hw/char/escc.h              |   3 +\n include/hw/m68k/sun3mmu.h           |  65 +++\n include/hw/net/lance.h              |   3 +\n include/hw/timer/intersil7170.h     |   9 +\n target/m68k/cpu.c                   |   5 +-\n target/m68k/cpu.h                   |  18 +-\n target/m68k/helper.c                | 130 ++++-\n target/m68k/op_helper.c             | 176 ++++---\n target/m68k/translate.c             |  31 +-\n tests/functional/m68k/meson.build   |   1 +\n tests/functional/m68k/test_sun3.py  |  34 ++\n tests/functional/qemu_test/asset.py |  11 +-\n tests/qtest/meson.build             |   1 +\n tests/qtest/sun3-test.c             |  67 +++\n 25 files changed, 2294 insertions(+), 99 deletions(-)\n create mode 100644 hw/m68k/sun3.c\n create mode 100644 hw/m68k/sun3_eeprom_data.h\n create mode 100644 hw/m68k/sun3mmu.c\n create mode 100644 hw/timer/intersil7170.c\n create mode 100644 include/hw/m68k/sun3mmu.h\n create mode 100644 include/hw/timer/intersil7170.h\n create mode 100755 tests/functional/m68k/test_sun3.py\n create mode 100644 tests/qtest/sun3-test.c"}