[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 Brad,

On 12/03/21 2:18 pm, Brad Boyer wrote:
On Thu, Mar 11, 2021 at 11:39:41AM -0700, Stan Johnson wrote:
When booting modern kernels (4.x or 5.x) on a Mac IIci, the kernel sees
only half of installed memory if the built-in video is used.  Using a
Nubus video card, all of the installed memory is seen.  This may be a
Penguin issue, though it's not clear why the kernel is ignoring
available memory.  I'm documenting it here in case anyone has an idea
how to fix it.
I'm not sure how to fix it, but I suspect this is changed due to the
way some of the memory management code now works. With built-in video
on an RBV model like the IIci, the video chip steals RAM out of the
first bank (at physical address 0). That means the first bank isn't
entirely usable for the kernel. With this in mind, it's both simpler
and faster to put the kernel into the second bank. However, newer
kernels can't cleanly handle adding the first bank (which has lower
physical addresses) to usable memory after the second bank. I'm
pretty sure that used to work. It's somewhat similar to the problem
between the fast and slow RAM on the Atari systems.

I'm pretty sure this has never worked. Though there ought to be a way to make use of RAM in bank 0 for video as long as the kernel is loaded at address 0 in that bank. Or if that's not possible, use the same trick as I do on Atari - ioremap some of the bank 0 memory for use by video, and make sure the video driver uses a dedicated low memory pool allocator for that ioremapped RAM.

Cheers,

    Michael



	Brad Boyer
	flar@allandria.com



Reply to: