diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-03-07 15:16:21 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-07 15:40:32 +1100 |
commit | 8e88933f7e2779a15aab81a57a5f5bb452f6533a (patch) | |
tree | f242ece2f270e38483481000a93b6e9afa5511dc /hdata/fsp.c | |
parent | fb27dd8ac6c4c80511e2ca674a6886cd504e1a2c (diff) | |
download | skiboot-8e88933f7e2779a15aab81a57a5f5bb452f6533a.zip skiboot-8e88933f7e2779a15aab81a57a5f5bb452f6533a.tar.gz skiboot-8e88933f7e2779a15aab81a57a5f5bb452f6533a.tar.bz2 |
hdat: Parse BMC nodes much earlier
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@gmail.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/fsp.c')
-rw-r--r-- | hdata/fsp.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c index 3896dc4..0a89d66 100644 --- a/hdata/fsp.c +++ b/hdata/fsp.c @@ -400,6 +400,32 @@ static void bmc_create_node(const struct HDIF_common_hdr *sp) ); } +/* + * Search for and instanciate BMC nodes. This is mostly the same as fsp_parse() + * below, but it can be called earlier since BMCs don't depend on the psihb + * nodes being added. + */ +void bmc_parse(void) +{ + bool found = false; + const void *sp; + int i; + + sp = get_hdif(&spira.ntuples.sp_subsys, SPSS_HDIF_SIG); + if (!sp) + return; + + for_each_ntuple_idx(&spira.ntuples.sp_subsys, sp, i, SPSS_HDIF_SIG) { + if (find_service_proc_type(sp, i) == SP_BMC) { + bmc_create_node(sp); + found = true; + } + } + + if (found) + early_uart_init(); +} + void fsp_parse(void) { struct dt_node *fsp_root = NULL, *fsp_node; @@ -433,7 +459,7 @@ void fsp_parse(void) break; case SP_BMC: - bmc_create_node(sp); + /* Handled above */ break; case SP_BAD: |