Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: M68k backend has landed in LLVM - NetBSD support



On Nov 9, 2021, at 7:09 AM, John Klos <john%ziaspace.com@localhost> wrote:
>> Granted modern GCC will take a significant amount of time and memory to build as well, but I don't think it's as heavy in that respect as LLVM. Maybe it's time for someone versed in the intricacies of the m68k MMUs to add support for more root pages…
> 
> Now's the time... I have another Amiga with 336 megabytes - it could have as much as 912 megs - and a Macintosh Quadra with 520 megabytes, and neither can use the full amount yet.

Switching to 8KB pages is extremely simple and provides up to 960MB of virtual address space instead of 224MB; you change PGSHIFT from 12 to 13 and do a full rebuild. Here's the diff for hp300:

diff --git a/sys/arch/hp300/include/param.h b/sys/arch/hp300/include/param.h
index 53d561d3b183..8bad42a7c885 100644
--- a/sys/arch/hp300/include/param.h
+++ b/sys/arch/hp300/include/param.h
@@ -47,7 +47,7 @@
 #define        _MACHINE        hp300
 #define        MACHINE         "hp300"
 
-#define        PGSHIFT         12              /* LOG2(NBPG) */
+#define        PGSHIFT         13              /* LOG2(NBPG) */
 #define        KERNBASE        0x00000000      /* start of kernel virtual */
 
 #define        UPAGES          2               /* pages of u-area */


> I'd love to find any books, documentation, whatever, about MMU setup on m68k. I'm learning what I can from NetBSD's Alpha code - it ain't easy!

Bitsavers has all of the Motorola manuals online, in <http://www.bitsavers.org/components/motorola/68000/>. You'll want the 68851, 68030, 68040, and 68060 manuals.

Probably the simplest possible change beyond switching to 8KB pages would be to increase the size of the root. Even if it's only increased statically (say based on a kernel config parameter -- you aren't going to make use of 4GB of virtual address space on an 8MB system) it doesn't take much to enable vastly more VM.

  -- Chris



Home | Main Index | Thread Index | Old Index