Subject: video-less booting [was Re: for 1.9.3b3...]
To: Henry B. Hotz <henry.b.hotz@jpl.nasa.gov>
From: Brian R. Gaeke <brg@laird.ccds.cincinnati.oh.us>
List: port-mac68k
Date: 08/02/1996 20:30:42
And then spake Henry B. Hotz as follows:
> At 1:06 AM 8/2/96, Brian R. Gaeke wrote:
> >   when there is no video card installed. The current theory is that video
> >   address, although we are really in 32-bit mode, looks like a 24-bit
> >   address, and this is wrong. Probably, the whole rigmarole the booter goes
> [...]  Since we do a lot of work on
> SE/30's and IIcx's we will definitely run into [32-bit] "dirty" memory 
> manager code if we are not careful.

Ideally, since the Booter checks for 32-bit mode at startup, and will
refuse to run if the machine was not booted in 32-bit mode, we should be
able to assume automatically that all the addresses we are being given
by the OS are 32-bit addresses.

My worry is that if we are tripping up here in the boot process when
booting on a machine that has no video *at all*, we could be getting
either (a) a NULL video address or (b) a bogus 24-bit video address.

Chris: It would be helpful to have a bootlog from a video-less boot
with all the debugging options on and all the environment variables
displayed, as well as serial boot echo/serial console logs, in order to
understand what is really going on here. If it does turn out to be easy
to determine that there is no video (a NULL video address for example)
it would be convenient to elide the parts of the boot process concerned
with querying and disabling interrupts on all the video cards, getting
the bit depth, etc.

> [...] My inclination would be to look for some MacOS call that will tell us
> whether we are in 32-bit mode, and if it doesn't exist assume we're in
> 24-bit ('cause we're probably running System 6).  (Isn't this what the
> "Gestalt Manager" is for?  I'm not really as much a MacOS weenie as I might
> sound.)

The booter does do this, and you're right, it uses the Gestalt manager.
The relevant code is main.c:MacOS32BitMapping().

-Brian

-- 
Brian R. Gaeke <brg@laird.ccds.cincinnati.oh.us> - Ask me for my PGP public key!
"If I were a blue spider, I would certainly ride on a train all the way from
Avallon to Paris, and I would set up my house on the nose of a chocolate
penguin. It's just a matter of common sense." James Wright, "Against Surrealism"