summaryrefslogtreecommitdiffstats
path: root/src/include
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/include
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/include')
-rw-r--r--src/include/pxe.h1
-rw-r--r--src/include/pxe_api.h22
2 files changed, 23 insertions, 0 deletions
diff --git a/src/include/pxe.h b/src/include/pxe.h
index f17d8f77..8b3ca14c 100644
--- a/src/include/pxe.h
+++ b/src/include/pxe.h
@@ -63,6 +63,7 @@ union u_PXENV_ANY {
struct s_PXENV_FILE_SELECT file_select;
struct s_PXENV_FILE_READ file_read;
struct s_PXENV_GET_FILE_SIZE get_file_size;
+ struct s_PXENV_FILE_EXEC file_exec;
};
typedef union u_PXENV_ANY PXENV_ANY_t;
diff --git a/src/include/pxe_api.h b/src/include/pxe_api.h
index 8dc1607a..53708ed4 100644
--- a/src/include/pxe_api.h
+++ b/src/include/pxe_api.h
@@ -1684,6 +1684,28 @@ extern PXENV_EXIT_t pxenv_get_file_size ( struct s_PXENV_GET_FILE_SIZE
/** @} */ /* pxenv_get_file_size */
+/** @defgroup pxenv_file_exec PXENV_FILE_EXEC
+ *
+ * FILE EXEC
+ *
+ * @{
+ */
+
+/** PXE API function code for pxenv_file_exec() */
+#define PXENV_FILE_EXEC 0x00e5
+
+/** Parameter block for pxenv_file_exec() */
+struct s_PXENV_FILE_EXEC {
+ PXENV_STATUS_t Status; /**< PXE status code */
+ SEGOFF16_t Command; /**< Command to execute */
+} PACKED;
+
+typedef struct s_PXENV_FILE_EXEC PXENV_FILE_EXEC_t;
+
+extern PXENV_EXIT_t pxenv_file_exec ( struct s_PXENV_FILE_EXEC *file_exec );
+
+/** @} */ /* pxenv_file_exec */
+
/** @} */ /* pxe_file_api */
/** @defgroup pxe_loader_api PXE Loader API