summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/interface
diff options
context:
space:
mode:
authorMichael Brown2008-03-04 19:16:30 +0100
committerMichael Brown2008-03-04 19:16:30 +0100
commitb62f2325ba2bc4cfacf9d4ce1db6fd37cd966f9c (patch)
tree66cde99a8b09d12b2fd9cbb487b7c2d87b6809db /src/arch/i386/interface
parent[Command] Add "sanboot" command. (diff)
downloadipxe-b62f2325ba2bc4cfacf9d4ce1db6fd37cd966f9c.tar.gz
ipxe-b62f2325ba2bc4cfacf9d4ce1db6fd37cd966f9c.tar.xz
ipxe-b62f2325ba2bc4cfacf9d4ce1db6fd37cd966f9c.zip
[PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.
This allows pxelinux to execute arbitrary gPXE commands. This is remarkably unsafe (not least because some of the commands will assume full ownership of memory and do nasty things like edit the e820 map underneath the calling pxelinux), but it does allow access to the "sanboot" command.
Diffstat (limited to 'src/arch/i386/interface')
-rw-r--r--src/arch/i386/interface/pxe/pxe_call.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c
index 8f1dd0a22..b9c21ce55 100644
--- a/src/arch/i386/interface/pxe/pxe_call.c
+++ b/src/arch/i386/interface/pxe/pxe_call.c
@@ -96,6 +96,7 @@ union pxenv_call {
PXENV_EXIT_t ( * file_select ) ( struct s_PXENV_FILE_SELECT * );
PXENV_EXIT_t ( * file_read ) ( struct s_PXENV_FILE_READ * );
PXENV_EXIT_t ( * get_file_size ) ( struct s_PXENV_GET_FILE_SIZE * );
+ PXENV_EXIT_t ( * file_exec ) ( struct s_PXENV_FILE_EXEC * );
};
/**
@@ -294,6 +295,10 @@ __cdecl void pxe_api_call ( struct i386_all_regs *ix86 ) {
pxenv_call.get_file_size = pxenv_get_file_size;
param_len = sizeof ( pxenv_any.get_file_size );
break;
+ case PXENV_FILE_EXEC:
+ pxenv_call.file_exec = pxenv_file_exec;
+ param_len = sizeof ( pxenv_any.file_exec );
+ break;
default:
DBG ( "PXENV_UNKNOWN_%hx", opcode );
pxenv_call.unknown = pxenv_unknown;