summaryrefslogtreecommitdiff
path: root/src/arch/riscv
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/riscv')
-rw-r--r--src/arch/riscv/Makefile.inc2
-rw-r--r--src/arch/riscv/boot.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc
index 242fd404e6..30c84a93e2 100644
--- a/src/arch/riscv/Makefile.inc
+++ b/src/arch/riscv/Makefile.inc
@@ -31,6 +31,7 @@ ifeq ($(CONFIG_ARCH_BOOTBLOCK_RISCV),y)
bootblock_lds = $(src)/arch/riscv/bootblock.ld
bootblock-y = bootblock.S stages.c
+bootblock-y += boot.c
bootblock-y += rom_media.c
bootblock-y += \
$(top)/src/lib/memchr.c \
@@ -52,6 +53,7 @@ endif
################################################################################
ifeq ($(CONFIG_ARCH_ROMSTAGE_RISCV),y)
+romstage-y += boot.c
romstage-y += stages.c
romstage-y += rom_media.c
romstage-y += \
diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c
index 4c2be031c2..f66c02ff2e 100644
--- a/src/arch/riscv/boot.c
+++ b/src/arch/riscv/boot.c
@@ -17,11 +17,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <arch/stages.h>
#include <program_loading.h>
-void arch_payload_run(const struct payload *payload)
+void arch_prog_run(struct prog *prog)
{
-// uart_rx_byte(0);
- stage_exit(prog_entry(&payload->prog));
+ void (*doit)(void *);
+
+ doit = prog_entry(prog);
+ doit(prog_entry_arg(prog));
+}
+
+void arch_payload_run(struct payload *payload)
+{
+ arch_prog_run(&payload->prog);
}