Unify memory types.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include memory.h. * grub-core/commands/lsmmap.c (grub_cmd_lsmmap): Output user-readable types. * grub-core/kern/i386/multiboot_mmap.c (grub_lower_mem): Removed. (grub_upper_mem): Likewise. * grub-core/kern/ieee1275/init.c (grub_upper_mem): Likewise. * include/grub/memory.h (grub_memory_type_t): New enum. All users updated.
This commit is contained in:
commit
a1d84a5e5e
52 changed files with 315 additions and 443 deletions
|
@ -181,8 +181,10 @@ grub_machine_init (void)
|
|||
grub_lower_mem - GRUB_MEMORY_MACHINE_RESERVED_END);
|
||||
#endif
|
||||
|
||||
auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
|
||||
int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type)
|
||||
auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
|
||||
grub_memory_type_t);
|
||||
int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
|
||||
grub_memory_type_t type)
|
||||
{
|
||||
/* Avoid the lower memory. */
|
||||
if (addr < 0x100000)
|
||||
|
@ -195,7 +197,7 @@ grub_machine_init (void)
|
|||
}
|
||||
|
||||
/* Ignore >4GB. */
|
||||
if (addr <= 0xFFFFFFFF && type == GRUB_MACHINE_MEMORY_AVAILABLE)
|
||||
if (addr <= 0xFFFFFFFF && type == GRUB_MEMORY_AVAILABLE)
|
||||
{
|
||||
grub_size_t len;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue