diff options
author | Subrata Banik <subrata.banik@intel.com> | 2018-04-18 11:48:58 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2018-05-02 01:39:34 +0000 |
commit | 8cfd76d44eef62a821c355dc70a4e345e50b4f05 (patch) | |
tree | a93aa9379a48534f5f363914aec4b8eabbf83efa | |
parent | 6dc7b220a30aae322928cbb845988d9f5aa7ef78 (diff) |
arch/x86: Print CPU Index and APIC ID in case of exception
BUG=b:74436746
BRANCH=none
TEST=Able to get APIC ID number for debug.
Change-Id: I2d3776c9259747197a5f2410032f9b03786407fb
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/25709
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
-rw-r--r-- | src/arch/x86/exception.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/arch/x86/exception.c b/src/arch/x86/exception.c index c89371ee7f..f668ffcadb 100644 --- a/src/arch/x86/exception.c +++ b/src/arch/x86/exception.c @@ -11,6 +11,7 @@ * GNU General Public License for more details. */ +#include <arch/cpu.h> #include <arch/early_variables.h> #include <arch/exception.h> #include <commonlib/helpers.h> @@ -18,6 +19,7 @@ #include <console/console.h> #include <console/streams.h> #include <cpu/x86/cr.h> +#include <cpu/x86/lapic.h> #include <rules.h> #include <stdint.h> #include <string.h> @@ -502,11 +504,18 @@ void x86_exception(struct eregs *info) } #else /* !CONFIG_GDB_STUB */ #define MDUMP_SIZE 0x80 + unsigned int logical_processor = 0; + +#if ENV_RAMSTAGE + logical_processor = cpu_index(); +#endif printk(BIOS_EMERG, - "Unexpected Exception: %d @ %02x:%08x - Halting\n" + "CPU Index %d - APIC %d Unexpected Exception:" + "%d @ %02x:%08x - Halting\n" "Code: %d eflags: %08x cr2: %08x\n" "eax: %08x ebx: %08x ecx: %08x edx: %08x\n" "edi: %08x esi: %08x ebp: %08x esp: %08x\n", + logical_processor, (unsigned int)lapicid(), info->vector, info->cs, info->eip, info->error_code, info->eflags, read_cr2(), info->eax, info->ebx, info->ecx, info->edx, |