File tree Expand file tree Collapse file tree 5 files changed +30
-21
lines changed Expand file tree Collapse file tree 5 files changed +30
-21
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ zephyr_library_sources_ifdef(CONFIG_X86_MMU x86_mmu.c)
21
21
zephyr_library_sources_ifdef (CONFIG_USERSPACE userspace.c )
22
22
zephyr_library_sources_ifdef (CONFIG_ARCH_CACHE cache .c )
23
23
24
+ zephyr_library_sources_ifdef (CONFIG_DYNAMIC_BOOTARGS bootargs.c )
25
+
24
26
zephyr_library_sources_ifdef (CONFIG_X86_VERY_EARLY_CONSOLE early_serial.c )
25
27
26
28
zephyr_library_sources_ifdef (CONFIG_THREAD_LOCAL_STORAGE tls.c )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Cadence Design Systems, Inc.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #include <zephyr/kernel.h>
8
+
9
+ #if defined(CONFIG_MULTIBOOT_INFO )
10
+
11
+ __pinned_noinit char multiboot_cmdline [CONFIG_BOOTARGS_ARGS_BUFFER_SIZE ];
12
+
13
+ const char * get_bootargs (void )
14
+ {
15
+ return multiboot_cmdline ;
16
+ }
17
+
18
+ #elif defined(CONFIG_X86_EFI )
19
+
20
+ __pinned_noinit char efi_bootargs [CONFIG_BOOTARGS_ARGS_BUFFER_SIZE ];
21
+
22
+ const char * get_bootargs (void )
23
+ {
24
+ return efi_bootargs ;
25
+ }
26
+
27
+ #endif
Original file line number Diff line number Diff line change @@ -18,10 +18,6 @@ static uint64_t __aligned(64) efi_stack[1024];
18
18
19
19
struct efi_boot_arg * efi ;
20
20
21
- #ifdef CONFIG_DYNAMIC_BOOTARGS
22
- __pinned_noinit char efi_bootargs [CONFIG_BOOTARGS_ARGS_BUFFER_SIZE ];
23
- #endif
24
-
25
21
void * efi_get_acpi_rsdp (void )
26
22
{
27
23
if (efi == NULL ) {
@@ -173,10 +169,3 @@ int arch_printk_char_out(int c)
173
169
return efi_console_putchar (c );
174
170
}
175
171
#endif
176
-
177
- #ifdef CONFIG_DYNAMIC_BOOTARGS
178
- const char * get_bootargs (void )
179
- {
180
- return efi_bootargs ;
181
- }
182
- #endif /* CONFIG_DYNAMIC_BOOTARGS */
Original file line number Diff line number Diff line change 11
11
12
12
struct multiboot_info multiboot_info ;
13
13
14
- #ifdef CONFIG_DYNAMIC_BOOTARGS
15
- __pinned_noinit char multiboot_cmdline [CONFIG_BOOTARGS_ARGS_BUFFER_SIZE ];
16
-
17
- const char * get_bootargs (void )
18
- {
19
- return multiboot_cmdline ;
20
- }
21
- #endif /* CONFIG_DYNAMIC_BOOTARGS */
22
-
23
14
/*
24
15
* called very early in the boot process to fetch data out of the multiboot
25
16
* info struct. we need to grab the relevant data before any dynamic memory
Original file line number Diff line number Diff line change @@ -1061,7 +1061,7 @@ config BOOTARGS
1061
1061
1062
1062
config DYNAMIC_BOOTARGS
1063
1063
bool "Support dynamic bootargs"
1064
- depends on BOOTARGS && (MULTIBOOT_INFO || BUILD_OUTPUT_EFI)
1064
+ depends on BOOTARGS
1065
1065
help
1066
1066
Enables dynamic bootargs support.
1067
1067
You can’t perform that action at this time.
0 commit comments