2
* GRUB -- GRand Unified Bootloader
3
* Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
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.
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.
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.
20
#ifndef GRUB_INIT_MACHINE_HEADER
21
#define GRUB_INIT_MACHINE_HEADER 1
23
#include <grub/types.h>
24
#include <grub/symbol.h>
26
/* FIXME: Should these be declared in memory.h? */
27
extern grub_size_t EXPORT_VAR(grub_lower_mem);
28
extern grub_size_t EXPORT_VAR(grub_upper_mem);
30
extern grub_addr_t EXPORT_VAR(grub_os_area_addr);
31
extern grub_size_t EXPORT_VAR(grub_os_area_size);
33
/* Get the memory size in KB. If EXTENDED is zero, return conventional
34
memory, otherwise return extended memory. */
35
grub_uint16_t grub_get_memsize (int extended);
37
/* Get a packed EISA memory map. Lower 16 bits are between 1MB and 16MB
38
in 1KB parts, and upper 16 bits are above 16MB in 64KB parts. */
39
grub_uint32_t grub_get_eisa_mmap (void);
41
struct grub_machine_mmap_entry
49
/* Get a memory map entry. Return next continuation value. Zero means
51
grub_uint32_t grub_get_mmap_entry (struct grub_machine_mmap_entry *entry,
54
/* Turn on/off Gate A20. */
55
void grub_gate_a20 (int on);
57
/* Reboot the machine. */
58
void EXPORT_FUNC (grub_reboot) (void);
60
/* Halt the system, using APM if possible. If NO_APM is true, don't
61
* use APM even if it is available. */
62
void EXPORT_FUNC (grub_halt) (int no_apm);
65
#endif /* ! GRUB_INIT_MACHINE_HEADER */