[OpenBIOS] [PATCH] sparc64: fix registers dealing with client
blauwirbel at gmail.com
Fri Jul 10 21:20:40 CEST 2009
On 7/6/09, Igor Kovalenko <igor.v.kovalenko at gmail.com> wrote:
> This patch improves previous proposal and adds:
> - save/restore global registers across client interface calls.
> Since OS kernel generally has it's own idea of what
> the ABI is we have to follow this requirement.
> - adjust stack to allow using unoptimized openbios
> build with linux kernel. Linux provides only 128 bytes
> on stack which is not enough to save arguments by
> code generated with gcc -O0
> - fix switch_to so it actually could be used to switch
> to client image. context pointer must be volatile to
> prevent gcc optimizing out stores to it.
> Signed-off-by: igor.v.kovalenko at gmail.com
Thanks, but with the patch applied, SILO in most of my test images no
longer boots. For example, HelenOS 0.2.0.5:
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
CPUs: 1 x SUNW,UltraSPARC-II
Welcome to OpenBIOS v1.0 built on Jul 10 2009 19:12
Type 'help' for detailed information
[sparc64] Booting file 'cdrom' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
switching to new context: entry point 0x4000 stack 0x00000000ffe51999
SIUnhandled Exception 0x0000000000000068
PC = 0x00000000ffd0ff14 NPC = 0x00000000ffd0ff18
More information about the OpenBIOS