[Skiboot] [PATCH v2] nvram: Fix 'missing' nvram on FSP systems.
Stewart Smith
stewart at linux.vnet.ibm.com
Fri Dec 1 17:39:41 AEDT 2017
Cyril Bur <cyril.bur at au1.ibm.com> writes:
> commit ba4d46fdd9eb ("console: Set log level from nvram") wants to read
> from NVRAM rather early. This works fine on BMC based systems as
> nvram_init() is actually synchronous. This is not true for FSP systems
> and it turns out that the query for the console log level simply
> queries blank nvram.
>
> The simple fix is to wait for the NVRAM read to complete before
> performing any query. Unfortunately it turns out that the fsp-nvram
> code does not inform the generic NVRAM layer when the read is complete,
> rather, it must be prompted to do so.
>
> This patch addresses both these problems. This patch adds a check before
> the first read of the NVRAM (for the console log level) that the read
> has completed. The fsp-nvram code has been updated to inform the generic
> layer as soon as the read completes.
>
> The old prompt to the fsp-nvram code has been removed but a check to
> ensure that the NVRAM has been loaded remains. It is conservative but
> if the NVRAM is not done loading before the host is booted it will not
> have an nvram device-tree node which means it won't be able to access
> the NVRAM at all, ever, even after the NVRAM has loaded.
>
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> ---
> core/init.c | 2 +-
> core/nvram-format.c | 9 +++++++++
> core/nvram.c | 35 +++++++++++++++++++++++++++++++++++
> core/test/run-nvram-format.c | 10 ++++++++++
> hw/fsp/fsp-nvram.c | 28 ++++------------------------
> include/fsp.h | 1 -
> include/nvram.h | 2 ++
> 7 files changed, 61 insertions(+), 26 deletions(-)
It compiles, SHIP IT!
Merged to master as of 92813a8bf9f3658dac5315c0c02025b74a8b0533.
And actually tested, on an FSP system. So, you know, even more than just
compiles :)
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list