[OpenBIOS] [PATCH 13/24] x86: move Forth/FCode over to use new context wrappers
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Tue Sep 6 00:01:29 CEST 2016
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
arch/x86/boot.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/x86/boot.c b/arch/x86/boot.c
index 6573259..1eae76c 100644
--- a/arch/x86/boot.c
+++ b/arch/x86/boot.c
@@ -11,12 +11,13 @@
#include "libopenbios/bindings.h"
#include "arch/common/nvram.h"
#include "libc/diskio.h"
+#include "libopenbios/initprogram.h"
#include "libopenbios/sys_info.h"
#include "boot.h"
void go(void)
{
- ucell address, type, size;
+ ucell address, type;
int image_retval = 0;
/* Get the entry point and the type (see forth/debugging/client.fs) */
@@ -24,8 +25,6 @@ void go(void)
address = POP();
feval("load-state >ls.file-type @");
type = POP();
- feval("load-state >ls.file-size @");
- size = POP();
printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type);
@@ -47,19 +46,14 @@ void go(void)
case 0x10:
/* Start Fcode image */
- printk("Evaluating FCode...\n");
- PUSH(address);
- PUSH(1);
- fword("byte-load");
- image_retval = 0;
+ image_retval = start_elf((unsigned long)&init_fcode_context,
+ (uint32_t)NULL);
break;
case 0x11:
/* Start Forth image */
- PUSH(address);
- PUSH(size);
- fword("eval2");
- image_retval = 0;
+ image_retval = start_elf((unsigned long)&init_forth_context,
+ (uint32_t)NULL);
break;
}
--
1.7.10.4
More information about the OpenBIOS
mailing list