summaryrefslogtreecommitdiff
path: root/core/minute-ia/task.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-03-11 17:37:28 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-03-13 21:05:08 -0700
commita898b6cc70e1a32494d474620e40076fa5741125 (patch)
treee152defbb08fcdb3b138ecabaf160e808feea86e /core/minute-ia/task.c
parent88c5b086b2722b6f959f2608de298b3ba8299888 (diff)
downloadchrome-ec-a898b6cc70e1a32494d474620e40076fa5741125.tar.gz
minute-ia: Print panic info on processor exception
This adds appropriate x86 exception handlers to print helpful panic info when a processor exception occurs. An example is shown below: > rw 0xFFFFFFFF 0xDEADBEEF write 0xffffffff = 0xdeadbeef ========== PANIC ========== General Protection Fault Error Code = 0xFF010000 EIP = 0xFF006363 CS = 0x00000008 EFLAGS = 0x00010202 EAX = 0x00000060 EBX = 0xDEADBEEF ECX = 0xFF01519F EDX = 0x00103085 ESI = 0xFF015280 EDI = 0xFFFFFFFF Resetting system... =========================== In addition, this fixes a bug with get_current_vector_number, causing it to return 0x100 when ISR=0. BUG=b:126691187,b:128444630 BRANCH=none TEST=loaded onto arcada using ISH shim loader, used memory access and divide by zero instructions to trigger a processor exception Change-Id: Ibd58e6cb3a28b4d9cf3aa7bfb0f13d4f6fdbb77e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1515949 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/minute-ia/task.c')
-rw-r--r--core/minute-ia/task.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 9975cc62d7..62481d96f0 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -269,6 +269,8 @@ void __keep task_start_irq_handler(void *unused)
* pre-empted.
*/
uint32_t t = get_time().le.lo;
+
+ /* ISR is occasionally zero, see b:128444630 */
uint32_t vector = get_current_interrupt_vector();
int irq = VEC_TO_IRQ(vector);