~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include <grub/i386/memory.h>
31
31
 
 
32
#include <grub/offsets.h>
 
33
 
32
34
/* The scratch buffer used in real mode code.  */
33
35
#define GRUB_MEMORY_MACHINE_SCRATCH_ADDR        0x68000
34
36
#define GRUB_MEMORY_MACHINE_SCRATCH_SEG (GRUB_MEMORY_MACHINE_SCRATCH_ADDR >> 4)
40
42
/* The size of the protect mode stack.  */
41
43
#define GRUB_MEMORY_MACHINE_PROT_STACK_SIZE     0x8000
42
44
 
43
 
/* The upper memory area (starting at 640 kiB).  */
44
 
#define GRUB_MEMORY_MACHINE_UPPER               0xa0000
45
 
 
46
45
/* The protected mode stack.  */
47
46
#define GRUB_MEMORY_MACHINE_PROT_STACK  \
48
47
        (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + GRUB_MEMORY_MACHINE_SCRATCH_SIZE \
89
88
  grub_uint8_t unused2[0xf0 - 0x18];
90
89
};
91
90
 
92
 
struct grub_machine_mmap_entry
93
 
{
94
 
  grub_uint32_t size;
95
 
  grub_uint64_t addr;
96
 
  grub_uint64_t len;
97
 
#define GRUB_MACHINE_MEMORY_AVAILABLE   1
98
 
#define GRUB_MACHINE_MEMORY_RESERVED    2
99
 
#define GRUB_MACHINE_MEMORY_ACPI        3
100
 
#define GRUB_MACHINE_MEMORY_NVS         4
101
 
#define GRUB_MACHINE_MEMORY_MAX_TYPE    4
102
 
  /* This one is special: it's used internally but is never reported
103
 
     by firmware. */
104
 
#define GRUB_MACHINE_MEMORY_HOLE        5
105
 
 
106
 
  grub_uint32_t type;
107
 
} __attribute__((packed));
108
 
 
109
 
grub_err_t EXPORT_FUNC(grub_machine_mmap_iterate)
110
 
     (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
111
 
 
112
 
grub_uint64_t grub_mmap_get_post64 (void);
113
 
grub_uint64_t grub_mmap_get_upper (void);
114
 
grub_uint64_t grub_mmap_get_lower (void);
115
 
 
116
 
#define GRUB_MMAP_MALLOC_LOW 1
117
 
 
118
 
#ifdef GRUB_MACHINE_PCBIOS
119
91
grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,
120
92
                                       int type, int handle);
121
93
grub_err_t grub_machine_mmap_unregister (int handle);
122
 
#else
123
 
static inline grub_err_t
124
 
grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)),
125
 
                            grub_uint64_t size __attribute__ ((unused)),
126
 
                            int type __attribute__ ((unused)),
127
 
                            int handle __attribute__ ((unused)))
128
 
{
129
 
  return GRUB_ERR_NONE;
130
 
}
131
 
static inline grub_err_t
132
 
grub_machine_mmap_unregister (int handle  __attribute__ ((unused)))
133
 
{
134
 
  return GRUB_ERR_NONE;
135
 
}
136
 
#endif
137
94
 
138
95
#endif
139
96