Browse Source

Provide storage for an undi_device structure representing the preloaded

UNDI stack.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
937289cdc8
2 changed files with 51 additions and 0 deletions
  1. 35
    0
      src/arch/i386/drivers/net/undipreload.c
  2. 16
    0
      src/arch/i386/include/undipreload.h

+ 35
- 0
src/arch/i386/drivers/net/undipreload.c View File

@@ -0,0 +1,35 @@
1
+/*
2
+ * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
3
+ *
4
+ * This program is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU General Public License as
6
+ * published by the Free Software Foundation; either version 2 of the
7
+ * License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful, but
10
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
+ * General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with this program; if not, write to the Free Software
16
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
+ */
18
+
19
+#include <realmode.h>
20
+#include <undipreload.h>
21
+
22
+/** @file
23
+ *
24
+ * Preloaded UNDI stack
25
+ *
26
+ */
27
+
28
+/**
29
+ * Preloaded UNDI device
30
+ *
31
+ * This is the UNDI device that was present when Etherboot started
32
+ * execution (i.e. when loading a .kpxe image).  The first driver to
33
+ * claim this device must zero out this data structure.
34
+ */
35
+struct undi_device __data16 ( preloaded_undi );

+ 16
- 0
src/arch/i386/include/undipreload.h View File

@@ -0,0 +1,16 @@
1
+#ifndef _UNDIPRELOAD_H
2
+#define _UNDIPRELOAD_H
3
+
4
+/** @file
5
+ *
6
+ * Preloaded UNDI stack
7
+ *
8
+ */
9
+
10
+#include <realmode.h>
11
+#include <undi.h>
12
+
13
+extern struct undi_device __data16 ( preloaded_undi );
14
+#define preloaded_undi __use_data16 ( preloaded_undi )
15
+
16
+#endif /* _UNDIPRELOAD_H */

Loading…
Cancel
Save