From 6f98fc30fdef746a5637e6d0c55ee36c27b0b892 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Tue, 13 May 2014 22:33:12 +0800 Subject: libpayload: Provide selfboot function. The calling convention of payload entry function is different by architecture. For example, X86 takes no arguments and ARM needs first param to be a cb_header_ptr*. To help payloads load and execute other payloads easily and correctly, we should provide the selfboot() function in libpayload, using same prototype as defined in coreboot environment. BUG=none TEST=emerge-nyan libpayload # pass BRANCH=none Original-Change-Id: I8f1cb2c0df788794b2f6f7f5500a3910328a4f84 Original-Signed-off-by: Hung-Te Lin Original-Reviewed-on: https://chromium-review.googlesource.com/199503 Original-Reviewed-by: Stefan Reinauer (cherry picked from commit 1e916cf021ce68886eb9668982c392eadedc7b7e) Signed-off-by: Marc Jones Change-Id: I7279ef27f49ef581d25a455dd8f1f2f7f1ba58cb Reviewed-on: http://review.coreboot.org/7907 Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- payloads/libpayload/include/cbfs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'payloads/libpayload/include/cbfs.h') diff --git a/payloads/libpayload/include/cbfs.h b/payloads/libpayload/include/cbfs.h index df3bb1c8c8..c5c811cd3d 100644 --- a/payloads/libpayload/include/cbfs.h +++ b/payloads/libpayload/include/cbfs.h @@ -82,8 +82,7 @@ void *cbfs_simple_buffer_unmap(struct cbfs_simple_buffer *buffer, int run_address(void *f); /* Defined in src/lib/selfboot.c */ -struct lb_memory; -int selfboot(struct lb_memory *mem, struct cbfs_payload *payload); +void selfboot(void *entry); /* Defined in individual arch / board implementation. */ int init_default_cbfs_media(struct cbfs_media *media); -- cgit v1.2.3