17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * GRUB -- GRand Unified Bootloader 37c478bd9Sstevel@tonic-gate * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate * This program is free software; you can redistribute it and/or modify 67c478bd9Sstevel@tonic-gate * it under the terms of the GNU General Public License as published by 77c478bd9Sstevel@tonic-gate * the Free Software Foundation; either version 2 of the License, or 87c478bd9Sstevel@tonic-gate * (at your option) any later version. 97c478bd9Sstevel@tonic-gate * 107c478bd9Sstevel@tonic-gate * This program is distributed in the hope that it will be useful, 117c478bd9Sstevel@tonic-gate * but WITHOUT ANY WARRANTY; without even the implied warranty of 127c478bd9Sstevel@tonic-gate * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 137c478bd9Sstevel@tonic-gate * GNU General Public License for more details. 147c478bd9Sstevel@tonic-gate * 157c478bd9Sstevel@tonic-gate * You should have received a copy of the GNU General Public License 167c478bd9Sstevel@tonic-gate * along with this program; if not, write to the Free Software 177c478bd9Sstevel@tonic-gate * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 187c478bd9Sstevel@tonic-gate */ 197c478bd9Sstevel@tonic-gate 207c478bd9Sstevel@tonic-gate /* 217c478bd9Sstevel@tonic-gate * Transport layer to use Etherboot NIC drivers in GRUB. 227c478bd9Sstevel@tonic-gate */ 237c478bd9Sstevel@tonic-gate 247c478bd9Sstevel@tonic-gate #ifndef ETHERBOOT_H 257c478bd9Sstevel@tonic-gate #define ETHERBOOT_H 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #include "shared.h" 287c478bd9Sstevel@tonic-gate #include "osdep.h" 297c478bd9Sstevel@tonic-gate #include "if_ether.h" 307c478bd9Sstevel@tonic-gate #include "in.h" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate /* Link configuration time in tenths of a second */ 337c478bd9Sstevel@tonic-gate #ifndef VALID_LINK_TIMEOUT 347c478bd9Sstevel@tonic-gate #define VALID_LINK_TIMEOUT 100 /* 10.0 seconds */ 357c478bd9Sstevel@tonic-gate #endif 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate #ifndef NULL 387c478bd9Sstevel@tonic-gate #define NULL ((void *)0) 397c478bd9Sstevel@tonic-gate #endif 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #define gateA20_set() gateA20(1) 437c478bd9Sstevel@tonic-gate #define gateA20_unset() gateA20(0) 447c478bd9Sstevel@tonic-gate #if !defined(__sun) 457c478bd9Sstevel@tonic-gate #define EBDEBUG 0 467c478bd9Sstevel@tonic-gate #endif 477c478bd9Sstevel@tonic-gate /* The 'rom_info' maybe arch depended. It must be moved to some other 487c478bd9Sstevel@tonic-gate * place */ 497c478bd9Sstevel@tonic-gate struct rom_info { 507c478bd9Sstevel@tonic-gate unsigned short rom_segment; 517c478bd9Sstevel@tonic-gate unsigned short rom_length; 527c478bd9Sstevel@tonic-gate }; 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate extern void poll_interruptions P((void)); 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate /* For UNDI drivers */ 577c478bd9Sstevel@tonic-gate extern uint32_t get_free_base_memory ( void ); 587c478bd9Sstevel@tonic-gate extern void *allot_base_memory ( size_t ); 597c478bd9Sstevel@tonic-gate extern void forget_base_memory ( void*, size_t ); 607c478bd9Sstevel@tonic-gate extern void free_unused_base_memory ( void ); 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate #endif /* ETHERBOOT_H */ 63