2008-11-12 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder/solaris.git] / include / grub / i386 / coreboot / memory.h
blobb1b01547257a86ad96ba42a6a2a706ddb346d944
1 /* memory.h - describe the memory map */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2002,2007 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _GRUB_MEMORY_MACHINE_LB_HEADER
21 #define _GRUB_MEMORY_MACHINE_LB_HEADER 1
23 #include <grub/symbol.h>
24 #include <grub/i386/pc/memory.h>
26 #ifndef ASM_FILE
27 #include <grub/types.h>
28 #endif
30 #define GRUB_MEMORY_MACHINE_LOWER_USABLE 0x9fc00 /* 640 kiB - 1 kiB */
31 #define GRUB_MEMORY_MACHINE_LOWER_SIZE 0xf0000 /* 960 kiB */
33 #define GRUB_MEMORY_MACHINE_UPPER_START 0x100000 /* 1 MiB */
35 #ifndef ASM_FILE
37 struct grub_linuxbios_table_header
39 char signature[4];
40 grub_uint32_t size;
42 typedef struct grub_linuxbios_table_header *grub_linuxbios_table_header_t;
44 struct grub_linuxbios_table_item
46 #define GRUB_LINUXBIOS_MEMBER_UNUSED 0
47 #define GRUB_LINUXBIOS_MEMBER_MEMORY 1
48 grub_uint32_t tag;
49 grub_uint32_t size;
51 typedef struct grub_linuxbios_table_item *grub_linuxbios_table_item_t;
53 struct grub_linuxbios_mem_region
55 grub_uint64_t addr;
56 grub_uint64_t size;
57 #define GRUB_MACHINE_MEMORY_AVAILABLE 1
58 grub_uint32_t type;
60 typedef struct grub_linuxbios_mem_region *mem_region_t;
62 void grub_machine_mmap_init (void);
64 void EXPORT_FUNC(grub_machine_mmap_iterate)
65 (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
67 #endif
69 #endif /* ! _GRUB_MEMORY_MACHINE_HEADER */