[PATCH 07/12] x86/boot: add cmdline_pa to struct boot_module

Daniel P. Smith posted 12 patches 2 weeks, 6 days ago
There is a newer version of this series
[PATCH 07/12] x86/boot: add cmdline_pa to struct boot_module
Posted by Daniel P. Smith 2 weeks, 6 days ago
Add an address field, cmdline_pa, to struct boot_module to hold the address of
the string field from struct mod.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
Changes since v7:
- renamed cmdline to cmdline_pa
- reword commit message for field rename

Changes since v5:
- changed boot_module element cmdline to paddr_t
---
 xen/arch/x86/include/asm/bootinfo.h | 2 ++
 xen/arch/x86/setup.c                | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm/bootinfo.h
index 6638da597073..819c8224d715 100644
--- a/xen/arch/x86/include/asm/bootinfo.h
+++ b/xen/arch/x86/include/asm/bootinfo.h
@@ -59,6 +59,8 @@ struct boot_module {
      */
     bool relocated:1;
     bool released:1;
+
+    paddr_t cmdline_pa;
 };
 
 /*
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 425467a0d977..aba9df8620ef 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -312,8 +312,12 @@ static struct boot_info *__init multiboot_fill_boot_info(
      * reserved for Xen.
      */
     for ( i = 0; i < MAX_NR_BOOTMODS && i < bi->nr_modules; i++ )
+    {
         bi->mods[i].mod = &mods[i];
 
+        bi->mods[i].cmdline_pa = mods[i].string;
+    }
+
     /* Variable 'i' should be one entry past the last module. */
     bi->mods[i].mod = &mods[bi->nr_modules];
     bi->mods[i].type = BOOTMOD_XEN;
-- 
2.30.2
Re: [PATCH 07/12] x86/boot: add cmdline_pa to struct boot_module
Posted by Jason Andryuk 2 weeks, 2 days ago
On 2024-11-02 13:25, Daniel P. Smith wrote:
> Add an address field, cmdline_pa, to struct boot_module to hold the address of
> the string field from struct mod.
> 
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Re: [PATCH 07/12] x86/boot: add cmdline_pa to struct boot_module
Posted by Daniel P. Smith 2 weeks, 2 days ago
On 11/6/24 17:19, Jason Andryuk wrote:
> On 2024-11-02 13:25, Daniel P. Smith wrote:
>> Add an address field, cmdline_pa, to struct boot_module to hold the 
>> address of
>> the string field from struct mod.
>>
>> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> 
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

Thank you.