aboutsummaryrefslogtreecommitdiff
path: root/core/nvram.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-14nvram: force re-verification after writingOliver O'Halloran1-13/+32
The running OS is free to re-write the contents of NVRAM. The skiboot NVRAM parser relies on the NVRAM contents being valid so we need to force the NVRAM contents to be revalidated after the host OS has written to it. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30core/init: recheck nvram on fast rebootOliver O'Halloran1-9/+23
If the previously running OS modifies the NVRAM it may be left in an invalid state. To prevent errors we need to re-validate the nvram format in the fast-reboot path. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30nvram: rename nvram-format.h to nvram.hOliver O'Halloran1-1/+1
The NVRAM handling code was split into two files so that the partition parsing could be separately tested. Currently there is no nvram.h and the tests #include nvram-format.c directly. This patch renames nvram-format.h to something more sensible. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-17Use additional checks in skiboot for pointersBalbir Singh1-0/+8
The checks validate pointers sent in using opal_addr_valid() in opal_call API's provided via the console, cpu, fdt, flash, i2c, interrupts, nvram, opal-msg, opal, opal-pci, xscom and cec modules Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-27nvram: Add extra debug printing when NVRAM needs formattingCyril Bur1-1/+2
Be more verbose (at debug level) when formatting the NVRAM, this can help catch errors at other levels of the stack. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-24Move NVRAM format/check code out into separate file to unit testStewart Smith1-132/+8
We (slightly) change the internal API so that we operate on parameters rather than globals, this means it's easier to unit test too. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-04-01Remove redundant includes of opal-api.hMichael Ellerman1-1/+0
Now that opal.h includes opal-api.h, there are a bunch of files that include both but don't need to. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-06Move skiboot internal things from opal.h to opal-api.hStewart Smith1-0/+1
This is probably not the best collection of things in the world, but it means that opal.h is much closer to being directly usable by an OS. This triggers a bunch of #include fixes throughout the tree. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+248
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>