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