[OpenBIOS] [PATCH] ppc: use rfid when running under a CPU from the 970 family.

Cédric Le Goater clg at kaod.org
Mon Jun 20 14:59:57 CEST 2016


On 06/20/2016 11:49 AM, Mark Cave-Ayland wrote:
> On 20/06/16 10:33, Alexander Graf wrote:
> 
>> On 06/20/2016 11:32 AM, Cédric Le Goater wrote:
>>> On 06/20/2016 09:39 AM, Alexander Graf wrote:
>>>>
>>>> On 20.06.16 09:34, Cédric Le Goater wrote:
>>>>> A recent attempt to restrict the use of rfi to 64bit cpus in qemu
>>>>> broke 32bit OpenBIOS when run under a 970.
>>>>>
>>>>> This is adding a dynamic check on the pvr to choose between rfi and
>>>>> rfid. Only the 970 family is supported.
>>>>>
>>>>> Signed-off-by: Cédric Le Goater <clg at kaod.org>
>>>>> ---
>>>>>
>>>>>   Tested on qemu.
>>>>>
>>>>>   arch/ppc/qemu/start.S |   25 +++++++++++++++++++++++--
>>>>>   arch/ppc/start.S      |   25 +++++++++++++++++++++++--
>>>>>   2 files changed, 46 insertions(+), 4 deletions(-)
>>>>>
>>>>> Index: openbios.git/arch/ppc/qemu/start.S
>>>>> ===================================================================
>>>>> --- openbios.git.orig/arch/ppc/qemu/start.S
>>>>> +++ openbios.git/arch/ppc/qemu/start.S
>>>>> @@ -27,6 +27,27 @@
>>>>>     #ifdef CONFIG_PPC_64BITSUPPORT
>>>>>   +/* When running on ppc64, we cannot use rfi anymore. Let's try to
>>>>> + * catch which cpu we are running on and act accordingly. This is
>>>>> + * for 970s only.
>>>> Do you think you could move the check into the cpu init function and use
>>>> a global variable / live patching instead? I don't remember if we need
>>>> to handle any faults before we reach that path.
>>> So we get an ISI really early, when returning from setup_mmu(), which is
>>> the first call in _entry.
>>
>> Ok, can we add the check there?
> 
> Bear in mind that the code for entry/context switching has been reworked
> pending commit whilst we switch the OpenBIOS repository over from SVN to
> git. The relevant commits are here:
> https://www.coreboot.org/pipermail/openbios/2016-May/009395.html.
> 
> So please consider OpenBIOS git master plus the patchset above to be the
> latest code.

OK. The first version applies fine. I pushed everything here :

	https://github.com/legoater/openbios/commits/master

I am still looking at what Alex is asking for : a global variable doing 
live patching for rfi.

Cheers,

C. 

> Jeff/Stefan - completing the migration is becoming increasing important
> now, any news on an ETA?
> 
> 
> ATB,
> 
> Mark.
> 




More information about the OpenBIOS mailing list