libpayload: x86/main - propagate return value of main()

According to coreboot’s payload API [1], the called payload should be
able to return a value via %eax. Support this by changing the prototype
of start_main() and pass on the return value of main() to the caller
instead of discarding it.


Change-Id: I8442faea19cc8e04487092f8e61aa4e5cba3ba76
Signed-off-by: Mathias Krause <>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <>
Reviewed-by: Aaron Durbin <>
1 file changed