merge mainline into newreloc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-01 15:10:44 +02:00
commit c6fb51295b
35 changed files with 414 additions and 394 deletions

View file

@ -147,7 +147,7 @@ grub_efi_free_pages (grub_efi_physical_address_t address,
}
grub_err_t
grub_efi_finish_boot_services (grub_size_t *outbuf_size, void *outbuf,
grub_efi_finish_boot_services (grub_efi_uintn_t *outbuf_size, void *outbuf,
grub_efi_uintn_t *map_key,
grub_efi_uintn_t *efi_desc_size,
grub_efi_uint32_t *efi_desc_version)

View file

@ -102,7 +102,9 @@ grub_machine_init (void)
return 0;
}
#ifdef GRUB_MACHINE_MULTIBOOT
grub_machine_mmap_init ();
#endif
grub_machine_mmap_iterate (heap_init);
grub_tsc_init ();

View file

@ -57,13 +57,23 @@ signature_found:
(long) table_header->size);
for (; table_item->size;
table_item = (grub_linuxbios_table_item_t) ((long) table_item + (long) table_item->size))
if (hook (table_item))
return 1;
{
if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
&& check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
*(grub_uint64_t *) (table_item + 1)))
{
table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
*(grub_uint64_t *) (table_item + 1);
goto signature_found;
}
if (hook (table_item))
return 1;
}
return 0;
}
void
grub_err_t
grub_machine_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t))
{
mem_region_t mem_region;

View file

@ -66,10 +66,12 @@ multiboot_header:
.long -0x1BADB002 - MULTIBOOT_MEMORY_INFO
codestart:
#ifdef GRUB_MACHINE_MULTIBOOT
cmpl $MULTIBOOT_BOOTLOADER_MAGIC, %eax
jne 0f
movl %ebx, EXT_C(startup_multiboot_info)
0:
#endif
/* initialize the stack */
movl $GRUB_MEMORY_MACHINE_PROT_STACK, %esp

View file

@ -249,12 +249,11 @@ grub_parser_execute (char *source)
}
p = grub_strchr (source, '\n');
if (p)
*p = 0;
*line = grub_strdup (source);
if (p)
*p = '\n';
*line = grub_strndup (source, p - source);
else
*line = grub_strdup (source);
source = p ? p + 1 : 0;
return 0;
}