[Skiboot] [PATCH 3/6] Write boot progress to LPC port 80h

Stewart Smith stewart at linux.ibm.com
Thu May 2 18:14:51 AEST 2019


Timothy Pearson <tpearson at raptorengineering.com> writes:
> This is an adaptation of what we currently do for op_display() on FSP
> machines, inventing an encoding for what we can write into the single
> byte at LPC port 80h.
>
> Port 80h is often used on x86 systems to indicate boot progress/status
> and dates back a decent amount of time. Since a byte isn't exactly very
> expressive for everything that can go on (and wrong) during boot, it's
> all about compromise.
>
> Some systems (such as Zaius/Barreleye G2) have a physical dual 7 segment
> display that display these codes. So far, this has only been driven by
> hostboot (see hostboot commit 90ec2e65314c).
>
> +/*
> + * Convert our detailed op_display() call into 1 byte for LPC port 80h
> + *
> + * Our layout looks like this:
> + * MSB (bit 7): 1 = Comes from OPAL
> + *      bit 6 : 0 = OP_MOD_INIT (the main one), 1 = (see bit 5)
> + *      bit 5432 : (if bit 6=0, low nibble of op-panel code)
> + *      bit 5432 : (if bit 6=1, other OP_MOD_ values in bits 54:
> + *                              00b=OP_MOD_CPU, 01b=OP_MOD_LOCK,
> + *                              10b=OP_MOD_MEM, 11b=OP_MOD_CHIPTOD
> + *                  bits 0,1 from code in bits 32)
> + *
> + *      bit 1,0: 00b=OP_LOG, 10b=OP_WARN, 01b=OP_ERROR, 11b=OP_FATAL
> + *               i.e. bit 0 indicates ERROR or FATAL.
> + *
> + * If port 80h number has the MSB and LSB set, then you died in OPAL.
> + * Any *odd* number with the MSB set (i.e. > 0x80) indicates error.
> + */

After merging my own code, I realised I should have told myself off and
then gone and copied the above text into something in doc/ so that we
had a solid record of this that was somewhere other than the source code
:)

Also, come to think of it, I missed an *excellent* opportunity to go and
make someone physically sit and watch a zaius boot.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list