[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/boot: move mmap info to boot info
commit a285d2ac2e524c808091062c67142cf5924b56f6 Author: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> AuthorDate: Thu Oct 17 13:02:44 2024 -0400 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Oct 17 23:42:51 2024 +0100 x86/boot: move mmap info to boot info Transition the memory map info to be held in struct boot_info. No functional change intended. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/include/asm/bootinfo.h | 5 +++++ xen/arch/x86/setup.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm/bootinfo.h index c980f0bdb7..e7821e0603 100644 --- a/xen/arch/x86/include/asm/bootinfo.h +++ b/xen/arch/x86/include/asm/bootinfo.h @@ -8,6 +8,8 @@ #ifndef X86_BOOTINFO_H #define 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; }; diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 01e35b9659..163f5620da 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -297,6 +297,12 @@ static struct boot_info *__init multiboot_fill_boot_info(unsigned long mbi_p) if ( mbi->flags & MBI_CMDLINE ) bi->cmdline = cmdline_cook(__va(mbi->cmdline), bi->loader); + if ( mbi->flags & MBI_MEMMAP ) + { + bi->memmap_addr = mbi->mmap_addr; + bi->memmap_length = mbi->mmap_length; + } + return bi; } @@ -1187,13 +1193,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 -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |