diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-11-29 15:37:00 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-03 22:10:55 -0600 |
commit | 602c6d44a302aedb02065934ab8db57311261654 (patch) | |
tree | c25ef810c301075e8bc1cc0a868b4f308a5b43d3 /core/opal.c | |
parent | b41553c2240240fee094830b0ef80699791ca47d (diff) | |
download | talos-skiboot-602c6d44a302aedb02065934ab8db57311261654.tar.gz talos-skiboot-602c6d44a302aedb02065934ab8db57311261654.zip |
core/opal: always verify cpu->pir on entry
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/opal.c')
-rw-r--r-- | core/opal.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/opal.c b/core/opal.c index 4d528279..752dd302 100644 --- a/core/opal.c +++ b/core/opal.c @@ -98,11 +98,6 @@ static void opal_trace_entry(struct stack_frame *eframe __unused) union trace t; unsigned nargs, i; - if (this_cpu()->pir != mfspr(SPR_PIR)) { - printf("CPU MISMATCH ! PIR=%04lx cpu @%p -> pir=%04x\n", - mfspr(SPR_PIR), this_cpu(), this_cpu()->pir); - abort(); - } if (eframe->gpr[0] > OPAL_LAST) nargs = 0; else @@ -125,8 +120,15 @@ int64_t opal_entry_check(struct stack_frame *eframe); int64_t opal_entry_check(struct stack_frame *eframe) { + struct cpu_thread *cpu = this_cpu(); uint64_t token = eframe->gpr[0]; + if (cpu->pir != mfspr(SPR_PIR)) { + printf("CPU MISMATCH ! PIR=%04lx cpu @%p -> pir=%04x token=%llu\n", + mfspr(SPR_PIR), cpu, cpu->pir, token); + abort(); + } + opal_trace_entry(eframe); if (!opal_check_token(token)) |