Attention is currently required from: Arthur Heymans, Kapil Porwal.
Arthur Heymans 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 20:
(4 comments)
File payloads/libpayload/arch/x86/exception.c:
https://review.coreboot.org/c/coreboot/+/81968/comment/3f0f1282_80510c34 : PS20, Line 150: printf("EIP: 0x%08x\n", exception_state->regs.eip); : printf("CS: 0x%04x\n", exception_state->regs.cs); : printf("EFLAGS: 0x%08x\n", exception_state->regs.eflags); : printf("EAX: 0x%08x\n", exception_state->regs.eax); : printf("ECX: 0x%08x\n", exception_state->regs.ecx); : printf("EDX: 0x%08x\n", exception_state->regs.edx); : printf("EBX: 0x%08x\n", exception_state->regs.ebx); : printf("ESP: 0x%08x\n", exception_state->regs.esp); : printf("EBP: 0x%08x\n", exception_state->regs.ebp); : printf("ESI: 0x%08x\n", exception_state->regs.esi); : printf("EDI: 0x%08x\n", exception_state->regs.edi); : printf("DS: 0x%04x\n", exception_state->regs.ds); : printf("ES: 0x%04x\n", exception_state->regs.es); : printf("SS: 0x%04x\n", exception_state->regs.ss); : printf("FS: 0x%04x\n", exception_state->regs.fs); : printf("GS: 0x%04x\n", exception_state->regs.gs); Needs 64bit version.
File payloads/libpayload/arch/x86/exception_asm_64.S:
https://review.coreboot.org/c/coreboot/+/81968/comment/730dd625_94974583 : 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
File payloads/libpayload/arch/x86/exec_64.S:
https://review.coreboot.org/c/coreboot/+/81968/comment/95d43b9f_550cd801 : PS20, Line 64: /* Jump to the code */ : call *8(%rbp) This is not going to work. The ABI uses registers, not stack to pass on the jump addr.
File payloads/libpayload/arch/x86/main.c:
https://review.coreboot.org/c/coreboot/+/81968/comment/e60a4365_3fc09246 : PS20, Line 37: unsigned long loader_eax; /**< The value of EAX passed from the loader */ : unsigned long loader_ebx; /**< The value of EBX passed from the loader */ Only used for multiboot stuff. Does not apply to long mode.