Attention is currently required from: Julius Werner, Jérémy Compostella, Kapil Porwal, Nico Huber, Patrick Rudolph.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81960?usp=email )
Change subject: arch/x86: Enable long mode entry into payload for x86_64 support ......................................................................
Patch Set 3:
(1 comment)
File src/arch/x86/boot.c:
https://review.coreboot.org/c/coreboot/+/81960/comment/b9e37686_2edfd341 : PS3, Line 47: is_payload_64_bit_enabled
Handle the case when in ENV_X86_32 and is_payload_64_bit_enabled() returns true.
is this to ensure 32bit coreboot can even jump into a 64-bit payload? if yes, then the logic should be something like below:
``` void arch_prog_run(struct prog *prog) { #if ENV_RAMSTAGE bool pl64 = is_payload_64_bit_enabled(); if (pl64 && (ENV_X86_32 || ENV_X86_64)) { void (*doit)(void *arg); doit = prog_entry(prog); /* coreboot is loading payload in long mode */ doit(prog_entry_arg(prog)); } else { const uint32_t arg = pointer_to_uint32_safe(prog_entry_arg(prog)); const uint32_t entry = pointer_to_uint32_safe(prog_entry(prog)); /* On x86 coreboot payloads expect to be called in protected mode */ protected_mode_jump(entry, arg); } #else #if ENV_X86_64 void (*doit)(void *arg); #else /* Ensure the argument is pushed on the stack. */ asmlinkage void (*doit)(void *arg); #endif doit = prog_entry(prog); doit(prog_entry_arg(prog)); #endif }
```