[OpenBIOS] [PATCH] ppc: Don't do relative branches from relocated memory

Alexander Graf agraf at suse.de
Mon Feb 25 14:45:28 CET 2013


On 24.02.2013, at 23:32, Andreas Färber wrote:

> On startup, OpenBIOS copies exception vectors to 0x00000000.
> Therefore jumps cannot be performed relative to the compile-time address
> to outside the relocated exception vectors.
> 
> QEMU's g3beige and mac99 did not run into this so far, but prep does.
> 
> Signed-off-by: Andreas Färber <andreas.faerber at web.de>

This sounds wrong. You shouldn't get to 0x100 in RAM. It's the reset vector!


Alex

> ---
> arch/ppc/qemu/start.S |    4 +++-
> 1 Datei geändert, 3 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
> index 5c86d74..66987a0 100644
> --- a/arch/ppc/qemu/start.S
> +++ b/arch/ppc/qemu/start.S
> @@ -302,7 +302,9 @@ trap_error:
> 	bctr
> 
> VECTOR( 0x100, "SRE" ):
> -        b       _entry
> +    LOAD_REG_IMMEDIATE(r3, _entry)
> +    mtctr r3
> +    bctr
> 
> ILLEGAL_VECTOR( 0x200 )
> 
> -- 
> 1.7.10.4
> 




More information about the OpenBIOS mailing list