]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pmac: Early debug output on screen on 64-bit macs
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 25 Jul 2013 02:12:32 +0000 (12:12 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:57:40 +0000 (14:57 +1000)
commitb353f8b9bc91506b5c7082f94b5e234d14451c9c
tree48e96713113f5c8a54a7021d0dd5bc6b31d32f15
parenta4cd21ccb221b5d8a64c317fb0f6d68e2e4bb858
powerpc/pmac: Early debug output on screen on 64-bit macs

We have a bunch of CONFIG_PPC_EARLY_DEBUG_* options that are intended
for bringup/debug only. They hard wire a machine specific udbg backend
very early on (before we even probe the platform), and use whatever
tricks are available on each machine/cpu to be able to get some kind
of output out there early on.

So far, on powermac with no serial ports, we have CONFIG_PPC_EARLY_DEBUG_BOOTX
to use the low-level btext engine on the screen, but it doesn't do much, at
least on 64-bit. It only really gets enabled after the platform has been
probed and the MMU enabled.

This adds a way to enable it much earlier. From prom_init.c (while still
running with Open Firmware), we grab the screen details and set things up
using the physical address of the frame buffer.

Then btext itself uses the "rm_ci" feature of the 970 processor (Real
Mode Cache Inhibited) to access it while in real mode.

We need to do a little bit of reorg of the btext code to inline things
better, in order to limit how much we touch memory while in this mode as
the consequences might be ... interesting.

This successfully allowed me to debug problems early on with the G5
(related to gold being broken vs. ppc64 kernels).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/btext.h
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/prom_init_check.sh
arch/powerpc/kernel/setup_64.c