x86: Display correct CS/EIP/EFLAGS when there is an error code
authorBin Meng <bmeng.cn@gmail.com>
Fri, 10 Jul 2015 02:38:32 +0000 (10:38 +0800)
committerSimon Glass <sjg@chromium.org>
Tue, 28 Jul 2015 16:36:21 +0000 (10:36 -0600)
commit013cf483c9d431e36d4ef2b854ee621cce51b8ce
tree513378f5f4dafc512599d43bc3e338a00dc52bd0
parent66d10c18bf2c34698362b6fe1891bcc6e8755243
x86: Display correct CS/EIP/EFLAGS when there is an error code

Some exceptions cause an error code to be saved on the current stack
after the EIP value. We should extract CS/EIP/EFLAGS from different
position on the stack based on the exception number.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/interrupts.c
arch/x86/include/asm/interrupt.h
arch/x86/include/asm/ptrace.h