Attention is currently required from: Julius Werner, Jérémy Compostella, Kapil Porwal, Nico Huber, Patrick Rudolph.
1 comment:
File src/arch/x86/boot.c:
Patch Set #3, 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
}
```
To view, visit change 81960. To unsubscribe, or for help writing mail filters, visit settings.