On 04/11/2014 09:33 PM, Christian Groessler wrote:
Hi,
On 04/10/14 10:48, Phileas Fogg wrote:
One more thing.
On my G5 it is importnat to apply the patch ofw_machdep.c.patch else
my kernel hangs just like yours.
I don't know why yet.
Hmm, seems printfs are evil at this moment.
On my machine it crashes in sys/arch/powerpc/oea/ofw_consinit.c, line
309, when it issues a printf.
regards,
chris
hmm,
in such a case you should try to narrow down the piece of code which
hangs. for such cases where you cannot rely on prinbf i used a simple
method painting my screen in certain color, like this:
void paint(unsigned int color)
{
static volatile unsigned int *base = (volatile unsigned int *)
0x98020000;
static unsigned int size = 0x2000;
static volatile unsigned int *ptr;
ptr = base;
while (ptr <= base + size) {
*ptr = color;
__asm __volatile ("sync");
__asm __volatile ("dcbst 0,%0" :: "r"((unsigned int) ptr));
__asm __volatile ("sync");
ptr++;
}
}
Declare this function and then use it somewhere where you think it
hangs and see if you reach that place. That piece of code helped me
debugging MMU problems and in other places where prinntf is not
working yet.