The per-arch context is held via __context, so what he hold here is effectively just information about the last loaded file.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/ppc/qemu/init.c | 2 +- arch/sparc32/boot.c | 6 +++--- arch/sparc64/boot.c | 6 +++--- arch/x86/boot.c | 6 +++--- forth/debugging/client.fs | 15 +++++++-------- libopenbios/aout_load.c | 6 +++--- libopenbios/bootcode_load.c | 8 ++++---- libopenbios/elf_load.c | 16 ++++++++-------- libopenbios/fcode_load.c | 8 ++++---- libopenbios/forth_load.c | 6 +++--- libopenbios/load.c | 10 +++++----- libopenbios/xcoff_load.c | 8 ++++---- 12 files changed, 48 insertions(+), 49 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 8f264f4..f6bbce2 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -608,7 +608,7 @@ go(void) fword("insert-copyright-property"); }
- feval("saved-program-state >sps.entry @"); + feval("load-state >ls.entry @"); addr = POP();
start_elf((unsigned long)addr, 0); diff --git a/arch/sparc32/boot.c b/arch/sparc32/boot.c index 49ec4cf..af1a263 100644 --- a/arch/sparc32/boot.c +++ b/arch/sparc32/boot.c @@ -196,11 +196,11 @@ void go(void) int image_retval = 0;
/* Get the entry point and the type (see forth/debugging/client.fs) */ - feval("saved-program-state >sps.entry @"); + feval("load-state >ls.entry @"); address = POP(); - feval("saved-program-state >sps.file-type @"); + feval("load-state >ls.file-type @"); type = POP(); - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); size = POP();
setup_romvec(); diff --git a/arch/sparc64/boot.c b/arch/sparc64/boot.c index 5107be6..48922d4 100644 --- a/arch/sparc64/boot.c +++ b/arch/sparc64/boot.c @@ -25,11 +25,11 @@ void go(void) int image_retval = 0;
/* Get the entry point and the type (see forth/debugging/client.fs) */ - feval("saved-program-state >sps.entry @"); + feval("load-state >ls.entry @"); address = POP(); - feval("saved-program-state >sps.file-type @"); + feval("load-state >ls.file-type @"); type = POP(); - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); size = POP();
printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type); diff --git a/arch/x86/boot.c b/arch/x86/boot.c index d40ab8c..6573259 100644 --- a/arch/x86/boot.c +++ b/arch/x86/boot.c @@ -20,11 +20,11 @@ void go(void) int image_retval = 0;
/* Get the entry point and the type (see forth/debugging/client.fs) */ - feval("saved-program-state >sps.entry @"); + feval("load-state >ls.entry @"); address = POP(); - feval("saved-program-state >sps.file-type @"); + feval("load-state >ls.file-type @"); type = POP(); - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); size = POP();
printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type); diff --git a/forth/debugging/client.fs b/forth/debugging/client.fs index f374404..d1e2953 100644 --- a/forth/debugging/client.fs +++ b/forth/debugging/client.fs @@ -17,12 +17,12 @@
\ 7.6.2 Program download and execute
-struct ( saved-program-state ) - /n field >sps.entry - /n field >sps.file-size - /n field >sps.file-type -constant saved-program-state.size -create saved-program-state saved-program-state.size allot +struct ( load-state ) + /n field >ls.entry + /n field >ls.file-size + /n field >ls.file-type +constant load-state.size +create load-state load-state.size allot
variable state-valid 0 state-valid ! @@ -34,8 +34,7 @@ variable file-size : load-size file-size @ ;
-\ File types identified by (init-program) - +\ File types identified by (load-state) 0 constant elf-boot 1 constant elf 2 constant bootinfo diff --git a/libopenbios/aout_load.c b/libopenbios/aout_load.c index e9d2002..2433106 100644 --- a/libopenbios/aout_load.c +++ b/libopenbios/aout_load.c @@ -156,10 +156,10 @@ aout_load(struct sys_info *info, ihandle_t dev)
// Initialise saved-program-state PUSH(addr_fixup(start)); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(size); - feval("saved-program-state >sps.file-size !"); - feval("aout saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("aout load-state >ls.file-type !");
feval("-1 state-valid !");
diff --git a/libopenbios/bootcode_load.c b/libopenbios/bootcode_load.c index 0fabf55..c560240 100644 --- a/libopenbios/bootcode_load.c +++ b/libopenbios/bootcode_load.c @@ -83,12 +83,12 @@ bootcode_load(ihandle_t dev) size = offset; }
- /* Initialise saved-program-state */ + /* Initialise load-state */ PUSH(entry); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(size); - feval("saved-program-state >sps.file-size !"); - feval("bootcode saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("bootcode load-state >ls.file-type !");
feval("-1 state-valid !");
diff --git a/libopenbios/elf_load.c b/libopenbios/elf_load.c index 9c7850e..b0b19ee 100644 --- a/libopenbios/elf_load.c +++ b/libopenbios/elf_load.c @@ -441,9 +441,9 @@ elf_load(struct sys_info *info, ihandle_t dev, const char *cmdline, void **boot_ ELF */ if (boot_notes) { *boot_notes = (void *)virt_to_phys(build_boot_notes(info, cmdline)); - feval("elf-boot saved-program-state >sps.file-type !"); + feval("elf-boot load-state >ls.file-type !"); } else { - feval("elf saved-program-state >sps.file-type !"); + feval("elf load-state >ls.file-type !"); }
//debug("current time: %lu\n", currticks()); @@ -452,9 +452,9 @@ elf_load(struct sys_info *info, ihandle_t dev, const char *cmdline, void **boot_
// Initialise saved-program-state PUSH(addr_fixup(ehdr.e_entry)); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(file_size); - feval("saved-program-state >sps.file-size !"); + feval("load-state >ls.file-size !");
feval("-1 state-valid !");
@@ -526,12 +526,12 @@ elf_init_program(void) #endif }
- // Initialise saved-program-state + // Initialise load-state PUSH(ehdr->e_entry); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(total_size); - feval("saved-program-state >sps.file-size !"); - feval("elf saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("elf load-state >ls.file-type !");
feval("-1 state-valid !"); } diff --git a/libopenbios/fcode_load.c b/libopenbios/fcode_load.c index f4eb7bf..5258357 100644 --- a/libopenbios/fcode_load.c +++ b/libopenbios/fcode_load.c @@ -75,12 +75,12 @@ fcode_load(ihandle_t dev) debug("Loaded %lu bytes\n", size); debug("entry point is %#lx\n", start);
- // Initialise saved-program-state + // Initialise load-state PUSH(start); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(size); - feval("saved-program-state >sps.file-size !"); - feval("fcode saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("fcode load-state >ls.file-type !");
feval("-1 state-valid !");
diff --git a/libopenbios/forth_load.c b/libopenbios/forth_load.c index c3a1929..35835fb 100644 --- a/libopenbios/forth_load.c +++ b/libopenbios/forth_load.c @@ -65,10 +65,10 @@ int forth_load(ihandle_t dev)
// Initialise saved-program-state PUSH((ucell)forthtext); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH((ucell)forthsize); - feval("saved-program-state >sps.file-size !"); - feval("forth saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("forth load-state >ls.file-type !");
feval("-1 state-valid !");
diff --git a/libopenbios/load.c b/libopenbios/load.c index 4bc12ea..1c54d19 100644 --- a/libopenbios/load.c +++ b/libopenbios/load.c @@ -71,7 +71,7 @@ void load(ihandle_t dev) feval("state-valid @"); valid = POP(); if (valid) { - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); return; } #endif @@ -81,7 +81,7 @@ void load(ihandle_t dev) feval("state-valid @"); valid = POP(); if (valid) { - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); return; } #endif @@ -91,7 +91,7 @@ void load(ihandle_t dev) feval("state-valid @"); valid = POP(); if (valid) { - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); return; } #endif @@ -101,7 +101,7 @@ void load(ihandle_t dev) feval("state-valid @"); valid = POP(); if (valid) { - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); return; } #endif @@ -112,7 +112,7 @@ void load(ihandle_t dev) feval("state-valid @"); valid = POP(); if (valid) { - feval("saved-program-state >sps.file-size @"); + feval("load-state >ls.file-size @"); return; } #endif diff --git a/libopenbios/xcoff_load.c b/libopenbios/xcoff_load.c index 0dcb28c..bd14343 100644 --- a/libopenbios/xcoff_load.c +++ b/libopenbios/xcoff_load.c @@ -136,12 +136,12 @@ xcoff_init_program(void)
DPRINTF("XCOFF entry point: %x\n", *(uint32_t*)ahdr->entry);
- // Initialise saved-program-state + // Initialise load-state PUSH(*(uint32_t*)(uintptr_t)ahdr->entry); - feval("saved-program-state >sps.entry !"); + feval("load-state >ls.entry !"); PUSH(total_size); - feval("saved-program-state >sps.file-size !"); - feval("xcoff saved-program-state >sps.file-type !"); + feval("load-state >ls.file-size !"); + feval("xcoff load-state >ls.file-type !");
feval("-1 state-valid !"); }