Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: installing on a g5

On 04/12/14 11:24, Phileas Fogg wrote:
On 04/11/2014 09:33 PM, Christian Groessler wrote:

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.



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");

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.

I was using this approach:


#if 1 //def OFDEBUG
extern void ofprint(const char *, ...);
#define OFPRINTF ofprint
#define OFPRINTF while(0) printf

and then use

OFPRINTF("I'm here\r\n");

in the code.

It crashes when it calls *cn_tab->cn-putc() in sys/dev/cons.c(cnputc).

I've some questions:

- ofwoea_initppc calls OF_quiesce if it's a PowerMac11,1 or 11,2. What does this function do and why is it needed? I didn't see much difference when I called it.

- The POWERMAC_G5 config file has (commented) entries 'ofb*' and 'wsdisplay0 at ofb*'. Your POWERMAC_G5_11_2 has 'genfb*' and 'wsdisplay*' and genfb*'. The 32bit POWERMAC file has 'genfb*', too, but 'wsdisplay at wsemuldisplaydev?'. What is wsemuldisplaydev? For starters, I would be satisfied with a very simple console, using OF_xxx calls.


Home | Main Index | Thread Index | Old Index