summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/comboot.h
diff options
context:
space:
mode:
authorMichael Brown2009-02-17 01:47:35 +0100
committerMichael Brown2009-02-17 01:47:35 +0100
commit8904cd55f128941d53d9a8beef71fb32a920a92d (patch)
treea2ce11209520f09931d23ccae2682297ada99288 /src/arch/i386/include/comboot.h
parent[uri] Allow use of relative URIs when calling churi() (diff)
downloadipxe-8904cd55f128941d53d9a8beef71fb32a920a92d.tar.gz
ipxe-8904cd55f128941d53d9a8beef71fb32a920a92d.tar.xz
ipxe-8904cd55f128941d53d9a8beef71fb32a920a92d.zip
[comboot] Allow for tail recursion of COMBOOT images
Multi-level menus via COMBOOT rely on the COMBOOT program being able to exit and invoke a new COMBOOT program (the next menu). This works, but rapidly (within about five iterations) runs out of space in gPXE's internal stack, since each new image is executed in a new function context. Fix by allowing tail recursion between images; an image can now specify a replacement image for itself, and image_exec() will perform the necessary tail recursion.
Diffstat (limited to 'src/arch/i386/include/comboot.h')
-rw-r--r--src/arch/i386/include/comboot.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/arch/i386/include/comboot.h b/src/arch/i386/include/comboot.h
index 1fc3b718b..4376650f6 100644
--- a/src/arch/i386/include/comboot.h
+++ b/src/arch/i386/include/comboot.h
@@ -79,18 +79,14 @@ extern int comboot_resolv ( const char *name, struct in_addr *address );
/* setjmp/longjmp context buffer used to return after loading an image */
extern jmp_buf comboot_return;
-/* Command line to execute when returning via comboot_return
- * with COMBOOT_RETURN_RUN_KERNEL
- */
-extern char *comboot_kernel_cmdline;
-
-/* Execute comboot_image_cmdline */
-extern void comboot_run_kernel ( );
+/* Replacement image when exiting with COMBOOT_EXIT_RUN_KERNEL */
+extern struct image *comboot_replacement_image;
extern void *com32_external_esp;
-#define COMBOOT_RETURN_EXIT 1
-#define COMBOOT_RETURN_RUN_KERNEL 2
+#define COMBOOT_EXIT 1
+#define COMBOOT_EXIT_RUN_KERNEL 2
+#define COMBOOT_EXIT_COMMAND 3
extern void comboot_force_text_mode ( void );