[Skiboot] [PATCH v8 01/24] OPAL: Add OPAL boot entry address to device tree

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Jul 10 00:18:48 AEST 2019


On 07/09/2019 03:23 PM, Oliver O'Halloran wrote:
> On Fri, 2019-06-28 at 14:34 +0530, Vasant Hegde wrote:
>> On 06/28/2019 06:18 AM, Nicholas Piggin wrote:
>>> Vasant Hegde's on June 17, 2019 3:10 am:
>>>> Needed for creating OPAL core file.
>>>>
>>>> Sample output:
>>>> --------------
>>>>     sys/firmware/devicetree/base/ibm,opal # lsprop
>>>>     ...
>>>>     opal-boot-address
>>>> 		 00000000 30002560
>>>>     ...
>>>
>>> Why is this needed? We can't derive it from the symbol table?
>>
> 
>> Kernel needs this address to generate proper OPAL dump.
> 
> I looked at Hari's patches to try work out what a "proper dump"
> is. Looks like we use this to create the AT_ENTRY note for the
> opalcore which file. Sounds important, but I can't find where
> the same happens for the Linux vmcore, so maybe it's not?
> 

vmcore is analyzed by crash.. which may not need AT_ENTRY.
Hari can confirm.


>> We can read it
>> from symbol table. But then kernel has to read OPAL symbol table and
>> parse it to get the data.
> 
> You know... if we punted generating the opalcore to userspace rather
> than doing it in the kernel this wouldn't be an issue ;)

We did it in kernel so that it fits to existing dump flow.
(kernel will generate dump -> kdump will offload it -> reboot system)

> 
>> Hence I have added this property so that kernel can directly read DT
>> to get entry address.
> 
> The value you're reading out of the DT is the value for the currently
> running skiboot rather than the one that crashed so this fishy to begin
> with.

AFAIK entry point is fixed for give skiboot LID. Now across MPIPL boot
we don't expect to change skiboot LID (specially in production systems).
So I think we are good here.

> 
> We have two architected entry points: fdt_entry at SKIBOOT_BASE+0x10
> and hdat_entry at SKIBOOT_BASE+0x180. If you have to put this in the DT
> then use one of those.

These are hardcoded entry points used during boot depending on the type of entry
(fdt_entry when hostboot passes DT, hdat_entry if it expect OPAL to generate DT).
AFAIK this won't help in core generation. We need boot entry point.

-Vasant



More information about the Skiboot mailing list