On Sun, 30 Mar 2025 12:42:57 Taylor R Campbell wrote: > > Date: Sun, 30 Mar 2025 11:29:38 +1100 > > From: Nat Sloss <nathanialsl...@yahoo.com.au> > > > > The attached patch fixes it and I'd like to commit it if there are no > > objections. > > > > maxaddr = high[numranges - 1] - m68k_ptob(1); > > > > - high[numranges - 1] -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(1)); > > + high[numranges - 1] -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(8)); > > Please put a comment here explaining what's going on. > > Is maxaddr still correct? Should you apply the same substitution on > that line too? If not, the comment must explain why maxaddr has > m68k_ptob(1) subtracted while high[numranges - 1] has m68k_ptob(8) > subtracted.
Is something like this OK? Best regards, Nat
diff -r d60e61cd41cf sys/arch/mac68k/mac68k/pmap_bootstrap.c --- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c Sat Mar 29 01:43:38 2025 +0000 +++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c Sun Mar 30 13:36:45 2025 +1100 @@ -503,7 +503,14 @@ pmap_bootstrap(paddr_t nextpa, paddr_t f physmem = m68k_btop(avail_remaining + nextpa - firstpa); maxaddr = high[numranges - 1] - m68k_ptob(1); - high[numranges - 1] -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(1)); + + /* + * Reduce high by an extra 7 pages which seem to be used by the EASC + * ascaudio(4) on some machines. maxaddr is unchanged as the last page + * can still be safetly used to reboot the system. + */ + high[numranges - 1] -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(8)); + avail_end = high[numranges - 1]; mem_size = m68k_ptob(physmem); virtual_end = VM_MAX_KERNEL_ADDRESS;