[OpenPower-Firmware] HDAT documentation

Krystian Hebel krystian.hebel at 3mdeb.com
Sat May 22 03:58:19 AEST 2021


On 20.05.2021 17:29, Stewart Smith wrote:
> On Thu, May 20, 2021, at 8:09 AM, Krystian Hebel wrote:
>> Hi,
>>
>> We are working on coreboot support for POWER9.
>> Recently we have achieved the milestone where we could initialize the
>> memory on the Talos II platform and start the coreboot ramstage phase [1].
> Oh, that's really cool!
>
> I'd love to know more and any thoughts on getting it going on a Blackbird.

First we have to finish work on Talos, then we'll see. Given that Blackbird
is by design using one CPU and what we did so far is "only" RAM 
initialization
it may even be better supported by the current state of code than Talos,
unless there are more subtle differences in hardware. Unfortunately, we
don't have access to that platform so we have no way of testing.

>> What we would like to achieve next is to start skiboot from coreboot.
>>
>> We can see that there is this HDAT interface between Hostboot and skiboot
>> [2] which we probably would need to reimplement.
>>
>> Sadly, the documentation says that "The HDAT specification is currently
>> not public.".
>> Any idea why is that? Can we get some more information about
>> the HDAT somewhere (apart from reading the Hostboot code)?
> I have even better news: skiboot will *happily* take Device Tree instead.
>
> I'd solidly recommend just producing a dtb Device Tree blob for skiboot. It'll save you significant pain.
That is great news! There is support for Device Tree for Arm in coreboot.
I'm not sure how much of it is actually implemented, coreboot tends to
keep code base as small as possible, but this is still better than nothing.

Is there any list of the minimal set of entries required in such Device 
Tree?
So far I've seen only documentation about the DT produced by skiboot, not
the one consumed by it.

> Background:
> During initial bringup on POWER7 machines, the FSP would generate HDAT, and thus we had to read it in skiboot (there was no way we were going to convince everyone else to change for something that was just a bit of research at the time), and this was also true for POWER8 when it was a bit of a mixed responsibility between Hostboot and the FSP to generate HDAT. On OpenPOWER POWER8 systems, we got a device tree from hostboot, but this mean Hostboot was producing two data structures with roughly the same data, but sometimes the DT was missing things... and it wasn't as fun as we would have liked. For POWER9, we said "just give us HDAT, it's fine" as a compromise, as at least it's only one bit of code for Hostboot to maintain.
> There are places where P9 skiboot gets everything in DT such as some simulation environments, and pdbg also will use device tree exclusively.

Thanks for this background. It is exactly this transition from DT on POWER8
to no DT on POWER9 that made me believe HDAT is the way to go.

-- 
Krystian Hebel
Firmware Engineer
https://3mdeb.com | @3mdeb_com



More information about the OpenPower-Firmware mailing list