summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2007-03-22 17:18:07 +0100
committerMichael Brown2007-03-22 17:18:07 +0100
commitff7d0af585edbd2b4e65e409523e246f08ff7ffd (patch)
tree0e6f6380fe5c7fb92fe36a1f2a619aa07c7fc3bc /src/arch
parentTypo (diff)
downloadipxe-ff7d0af585edbd2b4e65e409523e246f08ff7ffd.tar.gz
ipxe-ff7d0af585edbd2b4e65e409523e246f08ff7ffd.tar.xz
ipxe-ff7d0af585edbd2b4e65e409523e246f08ff7ffd.zip
Provide a buffer in base memory for code to fill with generated DHCP data.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/core/dhcp_basemem.c29
-rw-r--r--src/arch/i386/include/dhcp_basemem.h13
2 files changed, 42 insertions, 0 deletions
diff --git a/src/arch/i386/core/dhcp_basemem.c b/src/arch/i386/core/dhcp_basemem.c
new file mode 100644
index 000000000..de40c30de
--- /dev/null
+++ b/src/arch/i386/core/dhcp_basemem.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/**
+ * @file
+ *
+ * DHCP parameter block provided to external programs in base memory
+ *
+ */
+
+#include <dhcp_basemem.h>
+
+#undef dhcp_basemem
+char __data16_array ( dhcp_basemem, [DHCP_BASEMEM_LEN] );
diff --git a/src/arch/i386/include/dhcp_basemem.h b/src/arch/i386/include/dhcp_basemem.h
new file mode 100644
index 000000000..82d5ccb99
--- /dev/null
+++ b/src/arch/i386/include/dhcp_basemem.h
@@ -0,0 +1,13 @@
+#ifndef DHCP_BASEMEM_H
+#define DHCP_BASEMEM_H
+
+#include <realmode.h>
+
+/** Maximum length of a DHCP data buffer */
+#define DHCP_BASEMEM_LEN 1514
+
+/** DHCP data buffer */
+extern char __data16_array ( dhcp_basemem, [DHCP_BASEMEM_LEN] );
+#define dhcp_basemem __use_data16 ( dhcp_basemem )
+
+#endif /* DHCP_BASEMEM_H */