This enables them to be launched from a native context.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- include/libopenbios/initprogram.h | 3 +++ libopenbios/initprogram.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+)
diff --git a/include/libopenbios/initprogram.h b/include/libopenbios/initprogram.h index 01fc0c1..406b84a 100644 --- a/include/libopenbios/initprogram.h +++ b/include/libopenbios/initprogram.h @@ -20,4 +20,7 @@ extern int arch_init_program(void); extern void init_program(void);
+void init_fcode_context(void); +void init_forth_context(void); + #endif /* _H_INITPROGRAM */ diff --git a/libopenbios/initprogram.c b/libopenbios/initprogram.c index 1fa33ba..9cf3780 100644 --- a/libopenbios/initprogram.c +++ b/libopenbios/initprogram.c @@ -83,3 +83,22 @@ void init_program(void) #endif
} + +void init_fcode_context(void) +{ + /* Execute FCode payload */ + printk("Evaluating FCode...\n"); + fword("load-base"); + PUSH(1); + fword("byte-load"); +} + + +void init_forth_context(void) +{ + /* Execute Forth payload */ + printk("Evaluating Forth...\n"); + fword("load-base"); + feval("load-state >ls.file-size @"); + fword("eval2"); +}