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

Alexander Graf agraf at suse.de
Mon Jun 20 11:33:30 CEST 2016


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?


Alex




More information about the OpenBIOS mailing list