[comboot] Allow for tail recursion of COMBOOT images
authorMichael Brown <mcb30@etherboot.org>
Tue, 17 Feb 2009 00:47:35 +0000 (00:47 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 17 Feb 2009 00:47:35 +0000 (00:47 +0000)
commit8904cd55f128941d53d9a8beef71fb32a920a92d
treea2ce11209520f09931d23ccae2682297ada99288
parent349868b8fdd043c19956594bd144b66395523f02
[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.
src/arch/i386/image/com32.c
src/arch/i386/image/comboot.c
src/arch/i386/include/bits/errfile.h
src/arch/i386/include/comboot.h
src/arch/i386/interface/syslinux/comboot_call.c
src/core/image.c
src/image/script.c
src/include/gpxe/image.h