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

Re: Kernel uses only half of Mac IIci memory with built-in video

Hi Michael,

On Mon, Mar 22, 2021 at 2:19 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
> On 21/03/21 2:31 pm, Finn Thain wrote:
> > This "hack" first appeared in Penguin-14. The file Penguin.doc says,
> >
> >    Status: Changed 980301
> >
> >    New setting - "68020: Don't force kernel into bank A".
> >    Normally the 020's requires the kernel to be placed in
> >    bank A memory. The Penguin will force the kernel to be put
> >    in that bank on these machines. This setting will ignore
> >    the "forcing" and put the kernel in the bank with the
> >    largest amount of memory available.
> >    NOTE: Current kernels will fail if the kernel is not
> >    forced into bank A. Emergency setting if all else fails.
> >    Only available on 020's.
> >
> > That suggests that the bank A requirement comes from a kernel limitation,
> > perhaps stemming from a 68551 quirk (?).
> The 68020/68851 combo is functionally equivalent to the 68030 as far as
> I recall. I don't think such a limitation exists today in today's head.S.
> >
> > Looking at MMU code in head.S in current kernels, mmu_map_tt() seems to
> > contain the only special case for '020. But mmu_map_tt() is only used for
> > Nubus slot space. So I'm none the wiser.
> Yes, and what mmu_map_tt falls back to on 020 is the same code that gets
> otherwise used on 030 and 020 alike. I can't see a reason why this hack
> would still be necessary.
> > Perhaps we need to look at head.S from before 1998 to figure out what
> > motivated Penguin's '020 special case and the option to disable it?
> I know the head.S MMU code was completely rewritten around that time to
> accommodate changes needed for the Mac port. What we used before on
> Atari and Amiga bears little to no relation to what we have now. My
> guess is that 030 (has transparent translation register) and 020 (does
> not have tt1) used distinct code paths before the rewrite, but share
> much of the code now.

But the 68020 does have early termination pages, which map (IIRC) 2 MiB
at once.  In the early days, 2 MiB should have been fine to map the kernel.
As that's the only mechanism used by head.S, perhaps the real reason for
picking the largest chunk on Mac is that you cannot map contiguously
using early termination pages a series of discontiguous 1 MiB banks?



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Reply to: