@@ -8,6 +8,8 @@
#ifndef __XEN_X86_BOOTINFO_H__
#define __XEN_X86_BOOTINFO_H__
+#include <xen/types.h>
+
/*
* Xen internal representation of information provided by the
* bootloader/environment, or derived from the information.
@@ -16,6 +18,9 @@ struct boot_info {
const char *loader;
const char *cmdline;
+ paddr_t memmap_addr;
+ size_t memmap_length;
+
unsigned int nr_modules;
};
@@ -296,6 +296,12 @@ static struct boot_info *__init multiboot_fill_boot_info(unsigned long mbi_p)
else
bi->cmdline = "";
+ if ( mbi->flags & MBI_MEMMAP )
+ {
+ bi->memmap_addr = mbi->mmap_addr;
+ bi->memmap_length = mbi->mmap_length;
+ }
+
return bi;
}
@@ -1185,13 +1191,13 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)
{
memmap_type = "Xen-e820";
}
- else if ( mbi->flags & MBI_MEMMAP )
+ else if ( bi->memmap_length )
{
memmap_type = "Multiboot-e820";
- while ( bytes < mbi->mmap_length &&
+ while ( bytes < bi->memmap_length &&
e820_raw.nr_map < ARRAY_SIZE(e820_raw.map) )
{
- memory_map_t *map = __va(mbi->mmap_addr + bytes);
+ memory_map_t *map = __va(bi->memmap_addr + bytes);
/*
* This is a gross workaround for a BIOS bug. Some bootloaders do