[OpenBIOS] [RFC 3/3] ppc: RTAS WIP

Andreas Färber andreas.faerber at web.de
Sat Oct 16 11:26:17 CEST 2010


Am 16.10.2010 um 10:50 schrieb Alexander Graf:

> On 15.10.2010, at 22:56, Andreas Färber wrote:
>
>> Am 15.10.2010 um 22:28 schrieb Alexander Graf:
>>
>>> On 15.10.2010, at 22:22, Andreas Färber wrote:
>>>
>>>> 7-11. RTAS must preserve the following user mode registers: R1- 
>>>> R2, R13-R31, and CR.
>>>
>>> Except for CR, C is the same. So you really only need to save/ 
>>> restore cr :).
>>
>> Huh? Doesn't that depend on the ABI used rather than on C? If  
>> someone uses a differently configured GCC (or clang or ...), such  
>> assumptions might not hold.
>
> I thought we're using the Linux ABI internally?

All I can say for sure is that I'm using --target=powerpc-elf-, which  
together with powerpc-linux-gnu- and powerpc-eabi- is one of the cross- 
compilers switch-arch allows for qemu-ppc.

--target=powerpc[64]-linux[-gnu] GCCs 4.4-4.6 don't build for Blue and  
me, cf. thread "starting". Any hints welcome!

Andreas

>> What about r3-r4? The SysV ABI ppc supplement has them listed as  
>> volatile, so if I want to continue to access the private data area,  
>> I still need to save and restore r4, no?
>
> r3 and r4 are volatile, yes. But those are not listed in the  
> paragraphs here either :).
>
>
> Alex




More information about the OpenBIOS mailing list