Subject: Re: the prom: to map or not to map
To: None <netbsd-ports@NetBSD.ORG>
From: Jason Brazile <>
List: netbsd-ports
Date: 06/11/1997 10:09:15
> The OpenFirmware is non-reentrant, too.  This is taken care of by the
> OpenFirmware device drivers by disabling interrupts before jumping to the
> firmware routines.

Wow. Its hard to imagine having interrupts disabled during an entire
disk block transfer for instance. But that seems like a very interesting
way to get a port going quickly.

> Now for why this isn't the prom: the firmware, upon startup, copies itself
> from rom to ram (the speicification requires this, but note that OpenFirmware
> on PowerMacs doesn't do it), relocates itself to the ram addresses, and
> then runs from the ram image.

Also very interesting. I guess it allocates its own stack too?

> Even when I get around to use native deivce drivers for all the devices in
> a machine, I will still leave this prom copy in main memory in order to
> allow proper exit from the OS into the prom interpreter (the equivalent
> of L1-A on Suns).  On my machine, the prom copy occupies about .5 MB of
> ram, so that isn't enough to worry about (the machine has 64 MB standard).

I see. I guess the alternative would be to only allow entry back to the
firmware on shutdown where you would have to read it back in from rom as
a shutdown hook or something. Certainly for .5 MB and the convenience of
being able to pop into the firmware at any moment this makes the most
sense. Interesting.

Thanks for the info.