~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/i386/linuxbios/memory.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2007-11-01 13:18:51 UTC
  • mto: (17.3.1 squeeze) (1.9.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071101131851-63uqsb4dax2h1cbm
Tags: upstream-1.95+20071101
ImportĀ upstreamĀ versionĀ 1.95+20071101

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* memory.h - describe the memory map */
 
2
/*
 
3
 *  GRUB  --  GRand Unified Bootloader
 
4
 *  Copyright (C) 2002,2007  Free Software Foundation, Inc.
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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/>.
 
18
 */
 
19
 
 
20
#ifndef _GRUB_MEMORY_MACHINE_LB_HEADER
 
21
#define _GRUB_MEMORY_MACHINE_LB_HEADER      1
 
22
 
 
23
#include <grub/symbol.h>
 
24
#include <grub/i386/pc/memory.h>
 
25
 
 
26
#ifndef ASM_FILE
 
27
#include <grub/types.h>
 
28
#include <grub/err.h>
 
29
#endif
 
30
 
 
31
#define GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR        0x500
 
32
 
 
33
#define GRUB_MEMORY_MACHINE_LOWER_USABLE                0x9fc00         /* 640 kiB - 1 kiB */
 
34
#define GRUB_MEMORY_MACHINE_LOWER_SIZE                  0xf0000         /* 960 kiB */
 
35
 
 
36
#define GRUB_MEMORY_MACHINE_UPPER_START                 0x100000        /* 1 MiB */
 
37
 
 
38
#ifndef ASM_FILE
 
39
 
 
40
struct grub_linuxbios_table_header
 
41
{
 
42
  char signature[4];
 
43
  grub_uint32_t size;
 
44
};
 
45
typedef struct grub_linuxbios_table_header *grub_linuxbios_table_header_t;
 
46
 
 
47
struct grub_linuxbios_table_item
 
48
{
 
49
#define GRUB_LINUXBIOS_MEMBER_UNUSED            0
 
50
#define GRUB_LINUXBIOS_MEMBER_MEMORY            1
 
51
  grub_uint32_t tag;
 
52
  grub_uint32_t size;
 
53
};
 
54
typedef struct grub_linuxbios_table_item *grub_linuxbios_table_item_t;
 
55
 
 
56
struct grub_linuxbios_mem_region
 
57
{
 
58
  grub_uint64_t addr;
 
59
  grub_uint64_t size;
 
60
#define GRUB_LINUXBIOS_MEMORY_AVAILABLE 1
 
61
  grub_uint32_t type;
 
62
};
 
63
typedef struct grub_linuxbios_mem_region *mem_region_t;
 
64
 
 
65
grub_err_t EXPORT_FUNC(grub_available_iterate)
 
66
     (int (*hook) (mem_region_t));
 
67
 
 
68
#endif
 
69
 
 
70
#endif /* ! _GRUB_MEMORY_MACHINE_HEADER */