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>
31
#define GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR 0x500
33
#define GRUB_MEMORY_MACHINE_LOWER_USABLE 0x9fc00 /* 640 kiB - 1 kiB */
34
#define GRUB_MEMORY_MACHINE_LOWER_SIZE 0xf0000 /* 960 kiB */
36
#define GRUB_MEMORY_MACHINE_UPPER_START 0x100000 /* 1 MiB */
40
struct grub_linuxbios_table_header
45
typedef struct grub_linuxbios_table_header *grub_linuxbios_table_header_t;
47
struct grub_linuxbios_table_item
49
#define GRUB_LINUXBIOS_MEMBER_UNUSED 0
50
#define GRUB_LINUXBIOS_MEMBER_MEMORY 1
54
typedef struct grub_linuxbios_table_item *grub_linuxbios_table_item_t;
56
struct grub_linuxbios_mem_region
60
#define GRUB_LINUXBIOS_MEMORY_AVAILABLE 1
63
typedef struct grub_linuxbios_mem_region *mem_region_t;
65
grub_err_t EXPORT_FUNC(grub_available_iterate)
66
(int (*hook) (mem_region_t));
70
#endif /* ! _GRUB_MEMORY_MACHINE_HEADER */