Classic Mac OS debugging output: Difference between revisions

From Computers Wiki
Jump to navigationJump to search
(Move log phases out of Notes section)
(Add NanoKernel Log)
Line 47: Line 47:


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.

== NanoKernel Log sample ==

Manually transcribed from a video I took of Mac OS 9.2.2 on [[crocodile]]:

<div class="toccolours mw-collapsible mw-collapsed">
First initialization
<pre class="mw-collapsible-content">
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
</pre>
</div>

<div class="toccolours mw-collapsible mw-collapsed">
After re-initialization
<pre class="mw-collapsible-content">
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
</pre>
</div>


== Notes ==
== Notes ==
* This does not work on a tray-loading iMac G3 because <code>/packages/telnet</code> does not exist.
* This does not work on a tray-loading iMac G3 because <code>/packages/telnet</code> does not exist.
* The NanoKernel Log suggests that it initializes itself once without virtual memory then immediately re-initializes itself with virtual memory.
* It calls <code>CreateArea</code> for the 4096-byte page containing <code>deadbeef</code>, possibly so it is always a valid address? It shows up in [[PowerMacInfo]] for some preemptive tasks.


[[Category:Guides]]
[[Category:Guides]]

Revision as of 06:12, 26 September 2025

You can make the Classic Mac OS dump a bunch of debugging output during boot.

Instructions

  1. Boot into Open Firmware (Command-Option-O-F).
  2. Since log output is massive, consider logging over the network instead of to the screen:
    1. Run dev /packages/telnet.
    2. Run " enet:telnet,192.168.18.10" io, substituting the IP address as necessary.
      • On-screen text input and output will end.
    3. On another computer, telnet into that IP address.
      • The screen will blank itself until booting begins.
  3. Use the #Bitflags table to choose a debugging configuration.
  4. Run dev / 3013FFF encode-int " AAPL,debug" property, substituting the hexadecimal number as necessary.
  5. 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:

AAPL,debug bit settings (-OR- bits together):
       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.

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/telnet does not exist.
  • The NanoKernel Log suggests that it initializes itself once without virtual memory then immediately re-initializes itself with virtual memory.
  • It calls CreateArea for the 4096-byte page containing deadbeef, possibly so it is always a valid address? It shows up in PowerMacInfo for some preemptive tasks.