aboutsummaryrefslogtreecommitdiff
path: root/core/cpu.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2018-05-18 11:58:27 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-05-18 15:02:51 +1000
commit3d019581c98153fc047821e3266d90852141f70d (patch)
tree57946067898419915d4e70dcfe8cb5e56e43f6e8 /core/cpu.c
parent2339591c446548a4d8bbad0d1ceb093a095955be (diff)
downloadskiboot-3d019581c98153fc047821e3266d90852141f70d.zip
skiboot-3d019581c98153fc047821e3266d90852141f70d.tar.gz
skiboot-3d019581c98153fc047821e3266d90852141f70d.tar.bz2
cpu: Clear PCR SPR in opal_reinit_cpus()
Currently if Linux boots with a non-zero PCR, things can go bad where some early userspace programs can take illegal instructions. This is being fixed in Linux, but in the mean time, we should cleanup in skiboot also. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/cpu.c')
-rw-r--r--core/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/cpu.c b/core/cpu.c
index 1569c9f..0077103 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1333,6 +1333,7 @@ static void cpu_cleanup_one(void *param __unused)
{
mtspr(SPR_AMR, 0);
mtspr(SPR_IAMR, 0);
+ mtspr(SPR_PCR, 0);
}
static int64_t cpu_cleanup_all(void)