1 /* memory.h - describe the memory map */
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>
27 #include <grub/types.h>
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 */
37 struct grub_linuxbios_table_header
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
51 typedef struct grub_linuxbios_table_item
*grub_linuxbios_table_item_t
;
53 struct grub_linuxbios_mem_region
57 #define GRUB_MACHINE_MEMORY_AVAILABLE 1
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
));
69 #endif /* ! _GRUB_MEMORY_MACHINE_HEADER */