head 1.24; access; symbols netbsd-11-0-RC4:1.4.4.1 netbsd-11-0-RC3:1.4.4.1 netbsd-11-0-RC2:1.4.4.1 netbsd-11-0-RC1:1.4.4.1 perseant-exfatfs-base-20250801:1.4 netbsd-11:1.4.0.4 netbsd-11-base:1.4 perseant-exfatfs-base-20240630:1.4 perseant-exfatfs:1.4.0.2 perseant-exfatfs-base:1.4; locks; strict; comment @# @; 1.24 date 2026.04.26.13.21.40; author thorpej; state Exp; branches; next 1.23; commitid hKK2M5sHGXcWgtDG; 1.23 date 2026.04.09.12.49.35; author thorpej; state Exp; branches; next 1.22; commitid qzoWnU8z2p8HDhBG; 1.22 date 2026.04.04.00.55.45; author thorpej; state Exp; branches; next 1.21; commitid CettCiZp0mjXQzAG; 1.21 date 2026.04.04.00.23.09; author thorpej; state Exp; branches; next 1.20; commitid Gjj2fN0BFcBdFzAG; 1.20 date 2026.04.03.14.58.01; author thorpej; state Exp; branches; next 1.19; commitid pvu6jHqfb8zdxwAG; 1.19 date 2026.04.02.03.56.44; author thorpej; state Exp; branches; next 1.18; commitid kRVSWMJogARkUkAG; 1.18 date 2026.03.30.03.32.23; author thorpej; state Exp; branches; next 1.17; commitid lx9pFwq6OheuSWzG; 1.17 date 2026.03.29.20.42.51; author thorpej; state Exp; branches; next 1.16; commitid KmjCYxX4b971CUzG; 1.16 date 2026.03.29.19.57.34; author thorpej; state Exp; branches; next 1.15; commitid nUEnRPIOb4IhmUzG; 1.15 date 2026.03.29.19.06.47; author thorpej; state Exp; branches; next 1.14; commitid BTJbkRJQH8m05UzG; 1.14 date 2026.03.29.15.55.19; author thorpej; state Exp; branches; next 1.13; commitid 3K6YJOtodFlu1TzG; 1.13 date 2026.03.29.15.50.24; author thorpej; state Exp; branches; next 1.12; commitid YaRhj4H2nfxKZSzG; 1.12 date 2026.03.29.15.15.50; author thorpej; state Exp; branches; next 1.11; commitid DLC8r32oxVazNSzG; 1.11 date 2026.03.29.14.00.17; author thorpej; state Exp; branches; next 1.10; commitid hjBlRg1SCmfOnSzG; 1.10 date 2026.03.28.02.48.19; author thorpej; state Exp; branches; next 1.9; commitid d2YJJSInai1iHGzG; 1.9 date 2026.03.28.01.44.38; author thorpej; state Exp; branches; next 1.8; commitid CrpTEhF9t4MFlGzG; 1.8 date 2026.03.21.20.14.58; author thorpej; state Exp; branches; next 1.7; commitid etOtJrKRuTo8ISyG; 1.7 date 2026.03.10.01.27.23; author thorpej; state Exp; branches; next 1.6; commitid HI1SM6M1s4OTOmxG; 1.6 date 2025.11.20.18.05.00; author thorpej; state Exp; branches; next 1.5; commitid TzcoWwMRUfX2SjjG; 1.5 date 2025.11.08.08.26.08; author thorpej; state Exp; branches; next 1.4; commitid Y6JnNFKKBgwo4JhG; 1.4 date 2024.01.13.17.10.58; author thorpej; state Exp; branches 1.4.4.1; next 1.3; commitid 9U5cLo8l6KeKljUE; 1.3 date 2024.01.09.04.16.27; author thorpej; state Exp; branches; next 1.2; commitid A40ANcSIlLD5bJTE; 1.2 date 2024.01.02.18.11.44; author thorpej; state Exp; branches; next 1.1; commitid ZhtJFUmh7i4m2USE; 1.1 date 2024.01.02.07.40.59; author thorpej; state Exp; branches; next ; commitid nIRNj5Gb4AQBwQSE; 1.4.4.1 date 2025.11.21.09.53.25; author martin; state Exp; branches; next ; commitid kMENB4DXduMv8pjG; desc @@ 1.24 log @Make a common shareable bus_space implementatino for the simple (and common) case and make virt68k use. @ text @# $NetBSD: files.virt68k,v 1.23 2026/04/09 12:49:35 thorpej Exp $ # config file for virt68k # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 8 # Generic devices include "dev/scsipi/files.scsipi" # SCSI device mainbus { [addr = -1] } attach mainbus at root file arch/virt68k/dev/mainbus.c mainbus attach gfpic at mainbus with gfpic_mainbus file arch/virt68k/dev/gfpic_mainbus.c gfpic_mainbus attach gftty at mainbus with gftty_mainbus file arch/virt68k/dev/gftty_mainbus.c gftty_mainbus attach gfrtc at mainbus with gfrtc_mainbus file arch/virt68k/dev/gfrtc_mainbus.c gfrtc_mainbus attach virtio at mainbus with virtio_mainbus: virtio_mmio file arch/virt68k/dev/virtio_mainbus.c virtio_mainbus device virtctrl attach virtctrl at mainbus file arch/virt68k/dev/virtctrl.c virtctrl # Memory disk for installer file dev/md_root.c memory_disk_hooks file arch/virt68k/virt68k/autoconf.c file arch/virt68k/virt68k/clock.c file arch/virt68k/virt68k/intr.c file arch/virt68k/virt68k/machdep.c file arch/virt68k/virt68k/pmap_bootstrap.c !__have_new_pmap_68k file arch/m68k/m68k/bus_dma.c file arch/m68k/m68k/bus_space_simple.c file arch/m68k/m68k/db_memrw.c ddb | kgdb file arch/m68k/m68k/dumpsys.c file arch/m68k/m68k/m68k_intr_stubs.s file arch/m68k/m68k/linux_bootinfo.c file dev/cons.c file kern/subr_disk_4bsd.c include "arch/virt68k/conf/majors.virt68k" @ 1.23 log @Re-factor dumpsys() and related functions. This requires the platform to use phys_seg_list[] to describe the RAM. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.22 2026/04/04 00:55:45 thorpej Exp $ a34 1 file arch/virt68k/virt68k/bus_space.c d40 1 @ 1.22 log @Use the common auto-vector interrupt stub. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.21 2026/04/04 00:23:09 thorpej Exp $ d42 1 @ 1.21 log @Re-factor the simple "basic 4BSD disklabel scheme" into kern/subr_disk_4bsd.c, the implementation itself lifted verbatim from hp300. virt68k differed only by RCS IDs, news68k differed in older copyright notice plus some whitespace differences in 2 diffrent source lines. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.20 2026/04/03 14:58:01 thorpej Exp $ d42 1 @ 1.20 log @Merge mvme68k and virt68k bus_dma into the common m68k bus_dma and remove their local copies. Minor cleanup tweaks to other platforms that already use the common version. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.19 2026/04/02 03:56:44 thorpej Exp $ a36 1 file arch/virt68k/virt68k/disksubr.c d43 1 d45 1 @ 1.19 log @Merge the m68k trap code. Still a bit more tidying up to do here, but this eliminates a significant chunk of code duplication. Biggest change here is for Amiga, whose different-from-everyone-else's 68040 write-back code was voted off the island. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.18 2026/03/30 03:32:23 thorpej Exp $ a34 1 file arch/virt68k/virt68k/bus_dma.c d41 1 @ 1.18 log @Build cacheops.c if 68020, 68030, 68040, or 68060 is configured. Adapt sun3 to this new reality. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.17 2026/03/29 20:42:51 thorpej Exp $ a41 1 file arch/virt68k/virt68k/trap.c @ 1.17 log @Decorate all of the legacy pmap_bootstrap1() routines with __attribute__((no_instrument_function)) rather than using compile-with "${NOPROF_C}". @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.16 2026/03/29 19:57:34 thorpej Exp $ a42 1 file arch/m68k/m68k/cacheops.c @ 1.16 log @Consolidate a bunch of sub-includes of various config definitions that were extremely-but-not-universally-common across the various m68k platforms into files.m68k. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.15 2026/03/29 19:06:47 thorpej Exp $ d41 1 a41 1 file arch/virt68k/virt68k/pmap_bootstrap.c !__have_new_pmap_68k compile-with "${NOPROF_C}" @ 1.15 log @Apparently we have kgdb_machdep.c and kgdb_m68k.c, the latter is already in files.m68k, and the former everyone uses the same one, so move it to files.m68k, too. Obviously, more cleanup in this area is going to be needed. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.14 2026/03/29 15:55:19 thorpej Exp $ a47 18 # Motorola 68060 support package include "arch/m68k/060sp/files.060sp" # NetBSD m68k a.out Binary Compatibility (COMPAT_AOUT_M68K) include "compat/aoutm68k/files.aoutm68k" # SunOS Binary Compatibility (COMPAT_SUNOS) include "compat/sunos/files.sunos" file arch/m68k/m68k/sunos_machdep.c compat_sunos # Linux binary compatibility (COMPAT_LINUX) include "compat/linux/files.linux" include "compat/linux/arch/m68k/files.linux_m68k" file arch/m68k/m68k/linux_trap.c compat_linux # OSS audio driver compatibility include "compat/ossaudio/files.ossaudio" @ 1.14 log @No need for everyone to how their own entry for vm_machdep.c @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.13 2026/03/29 15:50:24 thorpej Exp $ a44 1 file arch/m68k/m68k/kgdb_machdep.c kgdb @ 1.13 log @No need for everyone to how their own entry for procfs_machdep.c @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.12 2026/03/29 15:15:50 thorpej Exp $ a46 1 file arch/m68k/m68k/vm_machdep.c @ 1.12 log @sun2 and sun3 don't *really* need their own trimmed-down copy of sys_machdep.c; the common version was already perfectly suitable for sun3, and can be easily conditionally-trimmed-down for the 68010 case. (Sharing is caring!) @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.11 2026/03/29 14:00:17 thorpej Exp $ a46 1 file arch/m68k/m68k/procfs_machdep.c procfs @ 1.11 log @Put all of the pmap_motorola.c vs pmap_68k.c logic into files.m68k. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.10 2026/03/28 02:48:19 thorpej Exp $ a47 1 file arch/m68k/m68k/sys_machdep.c @ 1.10 log @Make m68k/mmu_subr.s incldued conditionally on M68K_MMU_MOTOROLA || M68K_MMU_HP. Tweak the sun3x pmap to use some of the common routines. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.9 2026/03/28 01:44:38 thorpej Exp $ a46 2 file arch/m68k/m68k/pmap_motorola.c !__have_new_pmap_68k file arch/m68k/m68k/pmap_68k.c __have_new_pmap_68k @ 1.9 log @Clean up / re-factor trace and trap15: - Everyone now gets a shared implementatio of trace and trap15 trap handlers, largely based on the sun2/sun3 versions. - Have a single copy of trap_kdebug() that calls KGDB, DDB, and a machine-specific fallback hook (to accommodate the sun2/sun3 "give PROM a chance"). - The new shared trap_kdebug() is slightly different in that it takes the trapframe argument by reference rather than by value, making it easier to use as the back-end of ... - ... oh hey look, a new shared straytrap() that also invokes trap_kdebug(). @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.8 2026/03/21 20:14:58 thorpej Exp $ a46 1 file arch/m68k/m68k/mmu_subr.s @ 1.8 log @Re-factor m68k FP exception handling: - Move the FP exception stubs into the shared trap_subr.s. Remove as many conditionals from the stubs as feasible, having separate stubs for each case that needs to be handled. This doesn't really result in any more (or duplicated) code, and makes it all a lot easier to read. - All platforms now call the new fpu_init() function, which is renamed from fpu_probe(), and centralizes all of the FP-related initialization. Platforms that don't need to probe for the FPU aren't forced to do so; the probe only occurs if the fputype is FPU_UNKNOWN at the time fpu_init() is called. - Even on platforms that don't actually need to probe the FPU, make sure the "nofault" code is present in trap() to do so; this is meant to reduce diffs that need to be resolved later then the trap() function is re-factored. - On Amiga and Atari, remove the bespoke vectab code and just use the shared vec_init(). Additional cleanup is possible in this area. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.7 2026/03/10 01:27:23 thorpej Exp $ a46 1 file arch/m68k/m68k/m68k_trap.c @ 1.7 log @Move virt68k's bootinfo code to a generic m68k location with names linux_bootinfo.[ch] (since that's what this data is compatible with). Facilitates use by other m68k platforms in the future. Also, don't bother installing the header file; nothing in userland needs it. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.6 2025/11/20 18:05:00 thorpej Exp $ a52 1 file arch/m68k/m68k/vectors.c @ 1.6 log @Defflag the M060SP option in one place, and make sure to include opt_m060sp.h (and opt_fpsp.h) in the right places. PR port-m68k/59776 @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.5 2025/11/08 08:26:08 thorpej Exp $ a34 1 file arch/virt68k/virt68k/bootinfo.c d46 1 @ 1.5 log @__HAVE_NEW_PMAP_68K glue. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.4 2024/01/13 17:10:58 thorpej Exp $ a7 2 defflag opt_m060sp.h M060SP @ 1.4 log @Switch to common m68k vector table. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.3 2024/01/09 04:16:27 thorpej Exp $ d44 1 a44 1 file arch/virt68k/virt68k/pmap_bootstrap.c compile-with "${NOPROF_C}" d51 2 a52 1 file arch/m68k/m68k/pmap_motorola.c @ 1.4.4.1 log @Pull up following revision(s) (requested by thorpej in ticket #95): sys/arch/amiga/conf/files.amiga: revision 1.187 sys/arch/mvme68k/conf/files.mvme68k: revision 1.71 sys/arch/atari/conf/files.atari: revision 1.126 sys/arch/x68k/conf/files.x68k: revision 1.87 sys/arch/m68k/m68k/vectors.c: revision 1.4 sys/arch/mvme68k/mvme68k/machdep.c: revision 1.171 sys/arch/m68k/conf/files.m68k: revision 1.58 sys/arch/virt68k/virt68k/machdep.c: revision 1.18 sys/arch/virt68k/conf/files.virt68k: revision 1.6 Defflag the M060SP option in one place, and make sure to include opt_m060sp.h (and opt_fpsp.h) in the right places. PR port-m68k/59776 @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.4 2024/01/13 17:10:58 thorpej Exp $ d8 2 @ 1.3 log @Remove duplicated / slightly-tweaked loadustp() (load user segment table) routines from all of the m68k ports using the shared pmap. Instead, in pmap_init(), set up a function pointer to the appropriate mmu_load_urp*() function in mmu_subr.s. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.2 2024/01/02 18:11:44 thorpej Exp $ d54 1 @ 1.2 log @Add a driver for the Qemu Virtual System Controller that can be used to halt or reset the system. @ text @d1 1 a1 1 # $NetBSD: files.virt68k,v 1.1 2024/01/02 07:40:59 thorpej Exp $ d50 1 @ 1.1 log @Add a port to the Qemu m68k "virt" platform, a 68040-based virtual machine with VirtIO I/O devices. This is a work-in-progress, but "successfully mounts root file system and then complains about missing /sbin/init that is, in fact, not there" seems like a good checkpoint. @ text @d1 1 a1 1 # $NetBSD$ d29 4 @