Provide a buffer in base memory for code to fill with generated DHCP data.
authorMichael Brown <mcb30@etherboot.org>
Thu, 22 Mar 2007 16:18:07 +0000 (16:18 +0000)
committerMichael Brown <mcb30@etherboot.org>
Thu, 22 Mar 2007 16:18:07 +0000 (16:18 +0000)
src/arch/i386/core/dhcp_basemem.c [new file with mode: 0644]
src/arch/i386/include/dhcp_basemem.h [new file with mode: 0644]

diff --git a/src/arch/i386/core/dhcp_basemem.c b/src/arch/i386/core/dhcp_basemem.c
new file mode 100644 (file)
index 0000000..de40c30
--- /dev/null
@@ -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 (file)
index 0000000..82d5ccb
--- /dev/null
@@ -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 */