[Skiboot] [PATCH 2/2] hdat: Parse BMC nodes much earlier

Oliver O'Halloran oohall at gmail.com
Fri Mar 10 11:07:51 AEDT 2017


On Thu, Mar 9, 2017 at 10:22 PM, Vasant Hegde
<hegdevasant at linux.vnet.ibm.com> wrote:
> On 03/07/2017 09:46 AM, Oliver O'Halloran wrote:
>>
>> This moves the parsing of the BMC and LPC details to the start of the
>> HDAT parsing. This allows us to enable the Skiboot log console earlier
>> so we can get debug output while parsing the rest of the HDAT.
>>
>> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
>> Acked-by: Michael Neuling <mikey at neuling.org>
>> ---
>>   hdata/fsp.c        | 28 +++++++++++++++++++++++++++-
>>   hdata/hdata.h      |  1 +
>>   hdata/spira.c      |  7 +++++--
>>   hdata/test/stubs.c |  1 +
>>   hw/lpc-uart.c      | 34 ++++++++++++++++++++++++++++++++++
>>   include/skiboot.h  |  1 +
>>   6 files changed, 69 insertions(+), 3 deletions(-)
>
>
> .../...
>
>>                         break;
>>
>>                 case SP_BAD:
>> diff --git a/hdata/hdata.h b/hdata/hdata.h
>> index 1d0da1e9992e..53927a3acc5b 100644
>> --- a/hdata/hdata.h
>> +++ b/hdata/hdata.h
>> @@ -23,6 +23,7 @@ extern void memory_parse(void);
>>   extern int paca_parse(void);
>>   extern bool pcia_parse(void);
>>   extern void fsp_parse(void);
>> +extern void bmc_parse(void);
>>   extern void io_parse(void);
>>   extern struct dt_node *dt_add_vpd_node(const struct HDIF_common_hdr
>> *hdr,
>>                                        int indx_fru, int indx_vpd);
>> diff --git a/hdata/spira.c b/hdata/spira.c
>> index 4ebbc43ee2aa..512784f105aa 100644
>> --- a/hdata/spira.c
>> +++ b/hdata/spira.c
>> @@ -1230,6 +1230,9 @@ int parse_hdat(bool is_opal)
>>         dt_add_property_cells(dt_root, "#size-cells", 2);
>>         dt_add_property_string(dt_root, "lid-type", is_opal ? "opal" :
>> "phyp");
>>
>> +       /* Add any BMCs and enable the LPC UART */
>> +       bmc_parse();
>
>
> I know I'm late and this patch is already merged.
>
> May be we should rename fsp_parse to sp_parse() and call here instead of
> calling both bmc/fsp_parse functions separately.
>
> -Vasant

This is what I did originally. The problem is that the FSP requires
the PSI nodes to exist in the devicetree before calling fsp_parse().
I decided that parsing them separately made the most sense given that
the BMC has no dependencies and I wanted the UART to be enabled as
early as possible.

Oliver


More information about the Skiboot mailing list