[OpenPower-Firmware] SBE questions
Stewart Smith
stewart at linux.ibm.com
Thu Jul 18 11:46:56 AEST 2019
"Marty E. Plummer" <hanetzer at startmail.com> writes:
>> > So, I'm doing some preliminary work on the idea of a coreboot port for
>> > p9 (specifically the talos ii based systems) and have a few questions
>> Which pieces are you planning on replacing with coreboot?
>>
> The intent and plan here is a reworked SBE firmware which understands
> the cbfs (coreboot file system) instead of pnor, with hostboot being
> replaced with bootblock/romstage/ramstage, and skiboot reworked into a
> coreboot payload, which would be followed by a linux payload (skiboot
> hangs around as OPAL right?) which would have the petitboot payload.
> This would be the 'default' setup for these systems, but I don't see any
> reason someone couldn't do the work to use alternative boot payloads
> like grub or uefi (someone was working on uefi for power(9?) I saw
> online at one point).
You can just hack the Hostboot Boot Loader (part of hostboot, see
src/bootloader/) to understand CBFS and that'll get the SBE loading
things.
I might suggest going in reverse order though through the firmware
stack, first get skiboot to understand CBFS (likely in a simulator like
qemu or Mambo - aka POWER9 Functional Simulator), then get Hostboot to
understand it, then the Hostboot Boot Loader.
TBH, re-using a data structure and code for it for our flash layout
would be an improvement over what we have now.
There's also mboxd on the BMC which can construct a FFS image on-the-fly
based on files in the BMC filesystem, and it could be modified to
present a CBFS image, and likely largely just unit tested.
Looking at the Coreboot docs, it looks like there's a redesign of cbfs
going on? Perhaps even replacing it with Flashmap?
There have been *two* PoC implementations of UEFI for POWER, and it's
something we've discussed a few times. The biggest disadvantage is that
it's a giant monstor of a code-stack that has to be maintained, and
there just aren't resources for it. Balance that with the "you can take
Petitboot from our cold dead hands" attitude of anyone who ever uses it
after any other firmware environment, and I'm not sure we'd gain much
there.
Also consider that although "option ROMs" is also presented as an
advantage to UEFI, there's been literally zero option ROMS ever shipped
in EFI Byte Code, so you'd get to include an x86-64 emulator, and have
to deal with IO space and other things that just don't exist in POWER
hardware.
An idea discussed was to make Petitboot be a UEFI application (like GRUB
is), and that's probably the sanest and most backwards-compatible way to
look at a UEFI implementation.
--
Stewart Smith
OPAL Architect, IBM.
More information about the OpenPower-Firmware
mailing list