xref: /illumos-gate/usr/src/grub/grub-0.97/netboot/etherboot.h (revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809)
1 /*
2  *  GRUB  --  GRand Unified Bootloader
3  *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 /*
21  * Transport layer to use Etherboot NIC drivers in GRUB.
22  */
23 
24 #ifndef ETHERBOOT_H
25 #define ETHERBOOT_H
26 
27 #include "shared.h"
28 #include "osdep.h"
29 #include "if_ether.h"
30 #include "in.h"
31 
32 /* Link configuration time in tenths of a second */
33 #ifndef VALID_LINK_TIMEOUT
34 #define VALID_LINK_TIMEOUT	100 /* 10.0 seconds */
35 #endif
36 
37 #ifndef	NULL
38 #define NULL	((void *)0)
39 #endif
40 
41 
42 #define gateA20_set() gateA20(1)
43 #define gateA20_unset() gateA20(0)
44 #if !defined(__sun)
45 #define EBDEBUG 0
46 #endif
47 /* The 'rom_info' maybe arch depended. It must be moved to some other
48  * place */
49 struct rom_info {
50 	unsigned short	rom_segment;
51 	unsigned short	rom_length;
52 };
53 
54 extern void poll_interruptions P((void));
55 
56 /* For UNDI drivers */
57 extern uint32_t get_free_base_memory ( void );
58 extern void *allot_base_memory ( size_t );
59 extern void forget_base_memory ( void*, size_t );
60 extern void free_unused_base_memory ( void );
61 
62 #endif /* ETHERBOOT_H */
63