Thanks for the help so far. After hacking on mptable.c and irq_tables.c, there are definite signs of progress: interrupts are being routed from USB and Ethernet devices.
One code change I had to make outside the motherboard tree was to set bit 1 of register 0x74 in the LPC device (in ck804_lpc.c:lpc_common_init()). Without it, the APIC BAR is not exposed in register 0x14, which causes setup_ioapic() to be passed 0x0 instead of 0xfec00000. I hope this isn't the cause of my next issue:
Now, after Linux says "Write protecting the kernel read-only data", it just hangs; the next thing it should do is run init.
A few clues:
- after the hang, I still see messages from the USB driver when I plug or unplug a device, so the serial console is apparently still alive;
- if I pass the "noapic" kernel parameter, the kernel doesn't hang (but of course interrupts don't get configured properly);
- browsing the kernel source code, the only things that are supposed happen between that last message and running init are (1) calling pageattr.c:global_flush_tlb(), (2) calling mempolicy.c:numa_default_policy(), and (3) opening /dev/console.
I've attached a boot log. As always, any help would be appreciated.
--Ed