nvramrc scripts like the ones originating from Apple which are included in XPostFacto (like PowerSurge.of) make small patches to Open Firmware before probe-all is executed.
After executing nvramrc, the firmware calls
BootX (also included in XPostFacto) on the otherhand, can override all the code of a package or device. For example, it includes a replacement for
Given all that, I wonder if it would be possible for BootX to execute without
Of course, before
If there's a limit on how big BootX can be, maybe it can load extra code from files. It does have HFS+ file system code (it's C code, not fcode or forth code) for reading kernel extensions or Extensions.mkext.
After executing nvramrc, the firmware calls
probe-all
, install-console
, and banner
. Anything output to console before install-console
is buffered and and not displayed until after install-console
. If you include banner
in nvramrc, then the firmware doesn't call probe-all
and install-console
. You can install-console
(or (install-console)
for beige G3) before probe-all
and banner
in the nvramrc so that your PCI fcode option ROMs can output to console immediately which is useful for debugging.BootX (also included in XPostFacto) on the otherhand, can override all the code of a package or device. For example, it includes a replacement for
packages/mac-parts
as fcode and a replacement for chaos/control
(the built-in graphics of a Power Mac 8600 and similar Power Macs) as forth code and it adds a sl_words
package and it overrides specific words (in InitDisplay
) of the chosen graphics output device.Given all that, I wonder if it would be possible for BootX to execute without
probe-all
being called (from a hard disk that doesn't require probe-all
), modify big chunks of the PCI probing code, then call probe-all
and banner
and continue to boot Mac OS X or switch to booting Mac OS 9? This can be easily tested without the modifying part. ci.c
in BootX has the Enter()
service that can return to the Open Firmware user interface console. The modifying part could do other interesting things such as load an fcode option rom to be executed by probe-all
by hooking into the PCI fcode option rom reading function and trapping attempts to read fcode from a PCI device with a specific vendor and device id.Of course, before
probe-all
there can be no graphics output device, so the console would need to be serial port until then.If there's a limit on how big BootX can be, maybe it can load extra code from files. It does have HFS+ file system code (it's C code, not fcode or forth code) for reading kernel extensions or Extensions.mkext.