Attention is currently required from: Arthur Heymans, Kapil Porwal.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81968?usp=email )
Change subject: libpayload: Add x86_64 (64-bit) support ......................................................................
Patch Set 24:
(1 comment)
File payloads/libpayload/arch/x86/exception_asm_64.S:
https://review.coreboot.org/c/coreboot/+/81968/comment/af59c448_a0fea03f : PS20, Line 132: push vector : push error_code : push %gs : push %fs : push 4(%rax) : push 8(%rax) : push (%rax) : push %rdi : push %rsi : push %rbp : push old_rsp : push %rbx : push %rdx : push %rcx : push old_rax
You want a different exception state than 32bit mode
looks like 64-bit mode exception handling code is not proper. We need to implement the code nicely.
@Arthur, please feel free to pick this (if u wish) as I'll be OOO for next 2 week.
btw, I have dropped the wrong 64-bit exception handing code w/ latest CL https://review.coreboot.org/c/coreboot/+/81968/24/payloads/libpayload/arch/x... so, it will allow someone to work independently w/o my CL to add 64-bit support
In absence of 64-bit exception handler code in libpayload, I have verified that it picked the previously used coreboot exception handler for x84 bit.
for example: ``` [EMERG] CPU Index 0 - APIC 16 Unexpected Exception: [EMERG] 14 @ 48:0000000030022ded - Halting [EMERG] Code: 0 rflags: 0000000000010046 cr2: 0000000100000000 [EMERG] rax: 000000000000000a rbx: 0000000100000000 [EMERG] rcx: 0000000000000001 rdx: 0000000000000001 [EMERG] rdi: 0000000034074b90 rsi: 0000000000000028 [EMERG] rbp: 000000000000000a rsp: 0000000034074b78 [EMERG] r08: 000000000000000a r09: 0000000000000000 [EMERG] r10: 00000000300482ac r11: 0000000034074a0f [EMERG] r12: 0000000000000004 r13: 0000000000000001 [EMERG] r14: 0000000034074b86 r15: 0000000000000004
[EMERG] 0x30022da8: 00 00 00 31 f6 e8 91 db [EMERG] 0x30022db0: 00 00 48 89 c3 4d 63 fc [EMERG] 0x30022db8: 4c 8d 74 24 0e be 32 00 [EMERG] 0x30022dc0: 00 00 48 89 d9 31 c0 4c [EMERG] 0x30022dc8: 89 f7 48 8d 15 95 5b 02 [EMERG] 0x30022dd0: 00 e8 f2 e6 00 00 be 32 [EMERG] 0x30022dd8: 00 00 00 48 63 f8 48 89 [EMERG] 0x30022de0: fd 48 29 fe 4c 01 f7 41 [EMERG] 0x30022de8: 83 fc 04 75 0b 8b 0b 48 [EMERG] 0x30022df0: 8d 15 77 5b 02 00 eb 1c [EMERG] 0x30022df8: 41 83 fc 02 75 0c 0f b7 [EMERG] 0x30022e00: 0b 48 8d 15 6b 5b 02 00 [EMERG] 0x30022e08: eb 0a 0f b6 0b 48 8d 15 [EMERG] 0x30022e10: f7 f4 01 00 31 c0 e8 ad [EMERG] 0x30022e18: e6 00 00 be 32 00 00 00 [EMERG] 0x30022e20: 48 8d 15 52 5b 02 00 01 [EMERG] 0x30022e28: c5 31 c0 48 63 ed 48 29 [EMERG] 0x30022e30: ee 49 8d 3c 2e e8 8e e6 [EMERG] 0x30022e38: 00 00 48 8d 35 bf e7 04 [EMERG] 0x30022e40: 00 4c 89 f7 e8 9b f2 ff [EMERG] 0x30022e48: ff 85 c0 74 70 ff c8 75 [EMERG] 0x30022e50: 09 80 3d a8 e7 04 00 2d [EMERG] 0x30022e58: 74 51 ba 10 00 00 00 48 [EMERG] 0x30022e60: 89 e6 48 8d 3d 97 e7 04 [EMERG] 0x30022e68: 00 e8 d5 da 00 00 48 8b [EMERG] 0x30022e70: 14 24 48 8d 0d 87 e7 04 [EMERG] 0x30022e78: 00 48 29 ca 41 89 d0 85 [EMERG] 0x30022e80: d2 74 4e 41 83 fc 04 75 [EMERG] 0x30022e88: 04 89 03 eb 0d 41 83 fc [EMERG] 0x30022e90: 02 75 05 66 89 03 eb 02 [EMERG] 0x30022e98: 88 03 45 85 ed 0f 84 15 [EMERG] 0x30022ea0: ff ff ff 4c 01 fb e9 0d [EMERG] 0x34074c74: 0x00000000 [EMERG] 0x34074bb8: 0x34074c4c ```