Classic Mac OS debugging output: Difference between revisions
(→Notes: Be more specific) |
(→Bitflags: Note Mac OS 8.6) |
||
| Line 70: | Line 70: | ||
Adding all the bitflags together that enable logging (anything with an asterisk) gives 3013FFF. |
Adding all the bitflags together that enable logging (anything with an asterisk) gives 3013FFF. |
||
0x2000, and all options from 0x8000 onwards, do not exist in Mac OS 8.6. 0x1000 is labeled "Enable debugging output AFTER Open Firmware is gone." but it does not seem to do anything there. |
|||
== NanoKernel Log sample == |
== NanoKernel Log sample == |
||
Latest revision as of 07:14, 26 September 2025
You can make the Classic Mac OS dump a bunch of debugging output during boot.
Instructions
- Boot into Open Firmware (Command-Option-O-F).
- Since log output is massive, consider logging over the network instead of to the screen:
- Run
dev /packages/telnet. - Run
" enet:telnet,192.168.18.10" io, substituting the IP address as necessary.- On-screen text input and output will end.
- On another computer, telnet into that IP address.
- The screen will blank itself until booting begins.
- Run
- Use the #Bitflags table to choose a debugging configuration.
- Run
dev / 3013FFF encode-int " AAPL,debug" property, substituting the hexadecimal number as necessary. - Run
mac-boot.
Telnet output will end before the Happy Mac even appears. When this happens, the following is printed to the screen: Off to MacOS. The next (and last) call into OpenFirmware is quiesce().
After telnet output ends, a separate NanoKernel Log will appear on screen, get covered by the Welcome to Mac OS dialog, then appear a second time before disappearing entirely with the "Starting up..." text.
Bitflags
From the beginning of the debugging output, but formatted as a proper table:
| 1 | * | = Print general informative messages. |
| 2 | * | = Print formatted Mac OS tables (except config/universal info). |
| 4 | * | = Print formatted config info table. |
| 8 | * | = Dump Mac OS tables (except config/universal info). |
| 10 | * | = Print node names while copying the device tree. |
| 20 | * | = Print property info while copying the device tree. |
| 40 | * | = Print interrupt-related info. |
| 80 | * | = Print interrupt tree traversal info. |
| 100 | * | = Print address resolution info. |
| 200 | * | = Print NV-RAM info. |
| 400 | * | = Print Mac OS "universal" info. |
| 800 | * | = Print "special" node info. |
| 1000 | * | = Load EtherPrintf utility via parcel for post FCode debugging. |
| 2000 | * | = Print BOOTP/DHCP/BSDP information. |
| 4000 | = Allocate writable ROM aperture. | |
| 8000 | = Mark Toolbox image as non-cacheable. | |
| 10000 | * | = Print parcel info while copying the device tree. |
| 20000 | = Print information on device tree data checksums. | |
| 1000000 | * | = Enable the Nanokernel debugger. |
| 2000000 | * | = Display the Nanokernel log during boot. |
| 10000000 | = Dont attempt to unhibernate system. | |
| 40000000 | = Halt after end of FCode (useful if outputting to screen). |
Adding all the bitflags together that enable logging (anything with an asterisk) gives 3013FFF.
0x2000, and all options from 0x8000 onwards, do not exist in Mac OS 8.6. 0x1000 is labeled "Enable debugging output AFTER Open Firmware is gone." but it does not seem to do anything there.
NanoKernel Log sample
Manually transcribed from a video I took of Mac OS 9.2.2 on crocodile:
First initialization
NanoKernel Log
--------------
Hello from the builtin multitasking NanoKernel. Version: 0228
Kernel code base at 0x00f10000 Physical RAM size 0x17ffc000 bytes
Created motherboard coherence group. ID 00010001
NKCreateAddressSpaceSub - group at 0x177fc1c0 00010001
Created system address space. ID 00030001
BATs ffc0007f 00c00043 6800001f 00f00043 00000000 00000000 00000000 00000000
Init ready queue 00000000 00000000 00004329
Init ready queue 00000001 00000000 00021948
Init ready queue 00000002 00000000 0010ca40
Init ready queue 00000003 00000000 00865200
System context at 0x177ff100 Vector save area at 0x00008000 SDR1 0x1780003f
Adding blue task 00050001 to the ready queue
Starting timeslicing
Adding idle task 00070001 to the ready queue
NKCreateAddressSpaceSub - group at 0x177fc1c0 00010001
Priming the system free list with 65 pages.
VMMaxVirtualPages: 0005fffe VMLogicalPages: 00000000
Interrupt handler kind: 0a
Converting PMDTs to areas
CreateArea [ 00000000 177f4fff ] ID 000a0001 placed ... created
CreateArea [ 5fffe000 5fffefff ] ID 000b0001 placed ... created
CreateArea [ 64000000 6417ffff ] ID 000c0001 placed ... created
CreateArea [ 68fef000 68feffff ] ID 000d0001 placed ... created
CreateArea [ 68ff5000 68ffefff ] ID 000e0001 placed ... created
CreateArea [ 68fff000 68ffffff ] ID 000f0001 placed ... created
CreateArea [ 80800000 80800fff ] ID 00100001 placed ... created
CreateArea [ 80801000 8087ffff ] ID 00110001 placed ... created
CreateArea [ 80880000 80880fff ] ID 00120001 placed ... created
CreateArea [ 80881000 80881fff ] ID 00130001 placed ... created
CreateArea [ 81000000 81ffffff ] ID 00140001 placed ... created
CreateArea [ f0000000 ffffffff ] ID 00150001 placed ... created
CreateArea [ 68f16000 68f16fff ] ID 00160001 placed ... created
CreateArea [ deadb000 deadbfff ] ID 00170001 placed ... created
Reset system - Into the 68K fire: 0000d032 6806e8c0
ResetSystem trap entered
After re-initialization
Kernel code base at 0x00f10000 Physical RAM size 0x17ffc000 bytes Created motherboard coherence group. ID 00010001 NKCreateAddressSpaceSub - group at 0x177fc1c0 00010001 Created system address space. ID 00030001 BATs ffc0007f 00c00043 6800001f 00f00043 00000000 00000000 00000000 00000000 Init ready queue 00000000 00000000 00004329 Init ready queue 00000001 00000000 00021948 Init ready queue 00000002 00000000 0010ca40 Init ready queue 00000003 00000000 00865200 System context at 0x177ff100 Vector save area at 0x00008000 SDR1 0x1780003f Adding blue task 00050001 to the ready queue Starting timeslicing Adding idle task 00070001 to the ready queue NKCreateAddressSpaceSub - group at 0x177fc1c0 00010001 Priming the system free list with 65 pages. VMMaxVirtualPages: 0005fffe VMLogicalPages: 000177f5 Interrupt handler kind: 0a Converting PMDTs to areas CreateArea [ 00000000 177f4fff ] ID 000a0001 placed ... created CreateArea [ 5fffe000 5fffefff ] ID 000b0001 placed ... created CreateArea [ 64000000 6417ffff ] ID 000c0001 placed ... created CreateArea [ 68fef000 68feffff ] ID 000d0001 placed ... created CreateArea [ 68ff5000 68ffefff ] ID 000e0001 placed ... created CreateArea [ 68fff000 68ffffff ] ID 000f0001 placed ... created CreateArea [ 80800000 80800fff ] ID 00100001 placed ... created CreateArea [ 80801000 8087ffff ] ID 00110001 placed ... created CreateArea [ 80880000 80880fff ] ID 00120001 placed ... created CreateArea [ 80881000 80881fff ] ID 00130001 placed ... created CreateArea [ 81000000 81ffffff ] ID 00140001 placed ... created CreateArea [ f0000000 ffffffff ] ID 00150001 placed ... created CreateArea [ 68f16000 68f16fff ] ID 00160001 placed ... created CreateArea [ deadb000 deadbfff ] ID 00170001 placed ... created Reset system - Into the 68K fire: 0002d032 6806c9e8 VMAllocateMemory - creating area at 0x69000000 00080000 CreateArea [ 69000000 6907ffff ] ID 00180001 placed ... created VMMakePageCacheable for I/O 00080881 CPU plugin registered Extend free pool: 0x17fce000 virt 0x00000000 count: 1 Extend free pool: 0x17fcd000 virt 0x00000000 count: 2 Extend free pool: 0x17fcc000 virt 0x00000000 count: 3 Extend free pool: 0x17fcb000 virt 0x00000000 count: 4 Extend free pool: 0x17fca000 virt 0x00000000 count: 5 Extend free pool: 0x17fc9000 virt 0x00000000 count: 6 Extend free pool: 0x17fc8000 virt 0x00000000 count: 7 Extend free pool: 0x17fc7000 virt 0x00000000 count: 8 Legacy VMInit 0003ff00 003e4000 Adjusting area 000a0001 to size 3ff00000 Extend free pool: 0x17fc6000 virt 0x00000000 count: 9
Notes
- This does not work on a tray-loading iMac G3 because
/packages/telnetdoes not exist. - The NanoKernel Log suggests that it initializes itself once without on-disk virtual memory support then immediately re-initializes itself with it enabled.
- It calls
CreateAreafor the 4096-byte page containingdeadbeef, possibly so it is always a valid address? It shows up in PowerMacInfo for some preemptive tasks. - From the NanoKernel Log, VMMaxVirtualPages (0x0005fffe) * 4096 = 1,610,604,544 (1,536 MiB - 8 KiB). Could this be the source of the max memory limit in the classic Mac OS?