|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 09/12] x86/boot: add start and size fields to struct boot_module
On 11/7/24 15:47, Jason Andryuk wrote: On 2024-11-02 13:25, Daniel P. Smith wrote:Introduce the start and size fields to struct boot_module andassigns their value during boot_info construction. All uses of module_t to getthe address and size of a module are replaced with start and size.The EFI entry point is a special case, as the EFI file loading boot service may load a file beyond the 4G barrier. As a result, to make the address fit in the 32bit integer used by the MB1 module_t structure, the frame number is stored in mod_start and size in mod_end. Until the EFI entry point is enlightened to workwith boot_info and boot_module, multiboot_fill_boot_info will handle the alternate values in mod_start and mod_end when EFI is detected. A result of the switch to start/size removes all uses of the mod field instruct boot_modules, along with the uses of bootstra_map() and release_module()functions. With all usage gone, they all are dropped here. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> -- Changes since v7: - add the start/size change to bootstrap_map_bm() - convert all BM start/size when introduced, consolidates: x86/boot: populate boot module for xen entry x86/boot: transition relocation calculations to struct boot_module - consolidates all the removal commits Changes since v6: - put the efi conversion for mod_start and mod_end back along with check - dropped unnecessary cast- updated the population of start and size fields to take into account efiChanges since v5: - switched EFI population of mod_start/mod_end to addresses a# edit 336ac1fc0019 x86/boot: introduce boot domain ---diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index d9785acf89b6..18b93d6a272a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c@@ -313,13 +313,29 @@ static struct boot_info *__init multiboot_fill_boot_info( Ack. + bi->mods[i].start = pfn_to_paddr(mods[i].mod_start); + bi->mods[i].size = mods[i].mod_end; + } } /* Variable 'i' should be one entry past the last module. */ - bi->mods[i].mod = &mods[bi->nr_modules]; bi->mods[i].type = BOOTMOD_XEN; return bi;@@ -335,8 +351,8 @@ unsigned long __init initial_images_nrpages(nodeid_t node) Yes, and honestly probably a bad names for the vars as start/end tends to refer to addresses while pages usually have mfn/pfn in their name. The question is the churn from variable name not desired. + unsigned long end = start + PFN_UP(bi->mods[i].size); if ( end > node_start && node_end > start ) nr += min(node_end, end) - max(node_start, start); Out of curiosity, why are you thinking that module start would never be paged aligned? You don't have to change anything. Just noting something I noticed. Ack. v/r, dps
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |