instantiate_rtas on Cell sim fails...

Paul Mackerras paulus at samba.org
Thu Dec 8 22:48:45 EST 2005


David Woodhouse writes:

> We never used to check for != 0; we used to check for == PROM_ERROR
> instead. And on mambo we get 1, not 0. This makes it work again, but is
> it the sim at fault, or the kernel?
> 
> --- linux-2.6.14/arch/powerpc/kernel/prom_init.c~	2005-12-07 23:33:20.000000000 +0100
> +++ linux-2.6.14/arch/powerpc/kernel/prom_init.c	2005-12-07 23:33:38.000000000 +0100
> @@ -1051,7 +1051,7 @@ static void __init prom_instantiate_rtas
>  
>  	if (call_prom_ret("call-method", 3, 2, &entry,
>  			  ADDR("instantiate-rtas"),
> -			  rtas_inst, base) != 0
> +			  rtas_inst, base) == PROM_ERROR

The call-method function is supposed to execute the named method
inside a catch.  The first return value, which is what call_prom_ret
returns, is the result from catch.  Catch returns false (i.e. 0) if
there was no throw call, or a non-zero error code if an error was
signalled with throw.  This is from IEEE 1275.  So I think that != 0
is correct and thus sim is at fault, unless of course the forth code
for instantiate-rtas is in fact calling throw for some reason, in
which case we need to find out what error the sim firmware is
detecting.

Paul.



More information about the Linuxppc64-dev mailing list