aboutsummaryrefslogtreecommitdiff
path: root/hw/npu2.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2019-05-13 17:09:39 +1000
committerStewart Smith <stewart@linux.ibm.com>2019-05-15 15:43:19 +1000
commit5beda3c6fe5b72aac95b4c13746ae598dfd64c01 (patch)
tree9f8db43611af7bf743c4a70c6843fb5e614be400 /hw/npu2.c
parentc8b5e8a95caf029ffe73ea18769fdd7f2da48ab4 (diff)
downloadskiboot-5beda3c6fe5b72aac95b4c13746ae598dfd64c01.zip
skiboot-5beda3c6fe5b72aac95b4c13746ae598dfd64c01.tar.gz
skiboot-5beda3c6fe5b72aac95b4c13746ae598dfd64c01.tar.bz2
nvram: Flag dangerous NVRAM options
Most nvram options used by skiboot are just for debug or testing for regressions. They should never be used long term. We've hit a number of issues in testing and the field where nvram options have been set "temporarily" but haven't been properly cleared after, resulting in crashes or real bugs being masked. This patch marks most nvram options used by skiboot as dangerous and prints a chicken to remind users of the problem. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/npu2.c')
-rw-r--r--hw/npu2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/npu2.c b/hw/npu2.c
index 0d79d8a..97139dd 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -1473,7 +1473,7 @@ int npu2_nvlink_init_npu(struct npu2 *npu)
* it throws machine checkstop. Disabling snarfing fixes this so let's
* disable it by default.
*/
- if (nvram_query_eq("opal-npu2-snarf-cpm", "enable")) {
+ if (nvram_query_eq_dangerous("opal-npu2-snarf-cpm", "enable")) {
prlog(PR_WARNING, "NPU2#%d: enabling Probe.I.MO snarfing, a bad GPU driver may crash the system!\n",
npu->index);
val |= PPC_BIT(40); /* CONFIG_ENABLE_SNARF_CPM */