2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
xnu support * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h (pkglib_MODULES): add xnu.mod (xnu_mod_SOURCES): new variable (xnu_mod_CFLAGS): likewise (xnu_mod_LDFLAGS): likewise (xnu_mod_ASFLAGS): likewise * conf/i386-pc.rmk: likewise * conf/x86_64-efi.rmk: likewise * include/grub/efi/efi.h (grub_efi_finish_boot_services): new declaration * include/grub/i386/macho.h: new file * include/grub/i386/xnu.h: likewise * include/grub/macho.h: likewise * include/grub/machoload.h: likewise * include/grub/x86_64/macho.h: likewise * include/grub/x86_64/xnu.h: likewise * include/grub/xnu.h: likewise * kern/efi/efi.c (grub_efi_finish_boot_services): new function * kern/efi/mm.c (MAX_HEAP_SIZE): increase * loader/i386/efi/xnu.c: new file * loader/i386/pc/xnu.c: likewise * loader/i386/xnu.c: likewise * loader/i386/xnu_helper.S: likewise * loader/macho.c: likewise * loader/xnu.c: likewise * loader/xnu_resume.c: likewise * util/grub-dumpdevtree: likewise * include/grub/i386/pit.h: include grub/err.h (grub_pit_wait): export * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
This commit is contained in:
parent
5caf964d75
commit
bbee0f2b56
24 changed files with 3378 additions and 6 deletions
|
@ -734,3 +734,26 @@ grub_efi_print_device_path (grub_efi_device_path_t *dp)
|
|||
dp = (grub_efi_device_path_t *) ((char *) dp + len);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
grub_efi_finish_boot_services (void)
|
||||
{
|
||||
grub_efi_uintn_t mmap_size = 0;
|
||||
grub_efi_uintn_t map_key;
|
||||
grub_efi_uintn_t desc_size;
|
||||
grub_efi_uint32_t desc_version;
|
||||
void *mmap_buf = 0;
|
||||
|
||||
if (grub_efi_get_memory_map (&mmap_size, mmap_buf, &map_key,
|
||||
&desc_size, &desc_version) < 0)
|
||||
return 0;
|
||||
|
||||
mmap_buf = grub_malloc (mmap_size);
|
||||
|
||||
if (grub_efi_get_memory_map (&mmap_size, mmap_buf, &map_key,
|
||||
&desc_size, &desc_version) <= 0)
|
||||
return 0;
|
||||
|
||||
return grub_efi_exit_boot_services (map_key);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ static struct allocated_page *allocated_pages = 0;
|
|||
|
||||
/* The minimum and maximum heap size for GRUB itself. */
|
||||
#define MIN_HEAP_SIZE 0x100000
|
||||
#define MAX_HEAP_SIZE (16 * 0x100000)
|
||||
#define MAX_HEAP_SIZE (1600 * 0x100000)
|
||||
|
||||
|
||||
/* Allocate pages. Return the pointer to the first of allocated pages. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue