Commit 211c14f4 authored by Jing Li's avatar Jing Li Committed by guzitao
Browse files

sw64: apply new boot params from DTB chosen node

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

Starting from junzhang, we use the chosen node in DTB to pass boot
params, involving the following properties:

- bootargs
- linux,initrd-start
- linux,initrd-end
- linux,uefi-system-table
- linux,uefi-mmap-start
- linux,uefi-mmap-size
- linux,uefi-mmap-desc-size
- linux,uefi-mmap-desc-ver

This commit will not break backward compatibility.

Signed-off-by: default avatarJing Li <jingli@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent ee25fca8
Loading
Loading
Loading
Loading
+41 −40
Original line number Diff line number Diff line
@@ -103,12 +103,14 @@ config SW64
	select HAVE_RELIABLE_STACKTRACE if STACKTRACE
	select HAVE_RSEQ
	select HAVE_SYSCALL_TRACEPOINTS
	select IRQ_DOMAIN
	select IRQ_FORCED_THREADING
	select LOCK_MM_AND_FIND_VMA
	select MEMORY_HOTPLUG_SPARSE if MEMORY_HOTPLUG
	select MODULES_USE_ELF_RELA
	select NO_BOOTMEM
	select OF_EARLY_FLATTREE if OF
	select OF
	select OF_EARLY_FLATTREE
	select OLD_SIGSUSPEND
	select PCI_DOMAINS_GENERIC if PCI
	select PCI_ECAM if (ACPI && PCI)
@@ -508,13 +510,6 @@ endmenu

menu "Boot options"

config USE_OF
	bool "Flattened Device Tree support"
	select OF
	select IRQ_DOMAIN
	help
	  Include support for flattened device tree machine descriptions.

config BUILTIN_DTB
	bool "Embed DTB in kernel image"
	depends on OF
@@ -531,8 +526,10 @@ config BUILTIN_DTB_NAME

config EFI
	bool "UEFI runtime support"
	depends on OF
	select UCS2_STRING
	select EFI_RUNTIME_WRAPPERS
	select EFI_PARAMS_FROM_FDT
	default y
	help
	  This option provides support for runtime services provided
@@ -558,48 +555,52 @@ config DMI
	  firmware need to be enabled. This would require the DMI subsystem
	  to be enabled much earlier than we do on ARM, which is non-trivial.

config CMDLINE_BOOL
	bool "Built-in kernel command line"
config CMDLINE
	string "Built-in kernel command line"
	default ""
	help
	  Allow for specifying boot arguments to the kernel at
	  build time. On some systems (e.g. embedded ones), it is
	  necessary or convenient to provide some or all of the
	  kernel boot arguments with the kernel itself (that is,
	  to not rely on the boot loader to provide them.)
	  Allow for specifying boot arguments to the kernel at build
	  time. On some systems (e.g. embedded ones), it is necessary
	  or convenient to provide some or all of the kernel boot
	  arguments with the kernel itself (that is, to not rely on
	  firmware to provide them.)

	  To compile command line arguments into the kernel,
	  set this option to 'Y', then fill in the
	  boot arguments in CONFIG_CMDLINE.
	  Enter arguments here that should be compiled into the kernel
	  image. And choose how the kernel should use it later on.

	  Systems with fully functional boot loaders (i.e. non-embedded)
	  should leave this option set to 'N'.
	  In most cases, the command line (whether built-in or provided
	  by firmware) should specify the device for the root file system.

config CMDLINE
	string "Built-in kernel command string"
	depends on CMDLINE_BOOL
	default ""
choice
	prompt "Built-in kernel command line usage" if CMDLINE != ""
	default CMDLINE_FROM_FIRMWARE
	help
	  Enter arguments here that should be compiled into the kernel
	  image and used at boot time. If the boot loader provides a
	  command line at boot time, it is appended to this string to
	  form the full kernel command line, when the system boots.
	  Choose how the kernel will handle the provided built-in kernel
	  command line.

	  However, you can use the CONFIG_CMDLINE_OVERRIDE option to
	  change this behavior.
config CMDLINE_FROM_FIRMWARE
	bool "Use kernel command line provided by firmware"
	help
	  Use kernel command line provided by firmware. If the firmware
	  doesn't provide any, the built-in kernel command line provided
	  in CMDLINE will be used.

	  In most cases, the command line (whether built-in or provided
	  by the boot loader) should specify the device for the root
	  file system.
config CMDLINE_EXTEND
	bool "Extend kernel command line"
	help
	  The built-in kernel command line will be appended to the command
	  line provided by firmware. This is useful in cases where the
	  command line provided by firmware is insufficient and you don't
	  want to or cannot modify them.

config CMDLINE_OVERRIDE
	bool "Built-in command line overrides boot loader arguments"
	depends on CMDLINE_BOOL
config CMDLINE_FORCE
	bool "Always use built-in kernel command line"
	help
	  Set this option to 'Y' to have the kernel ignore the boot loader
	  command line, and use ONLY the built-in command line.
	  Always use built-in kernel command line, even if we get one
	  from firmware. This is useful in some cases. For example,
	  you need to work around broken boot loaders.

	  This is used to work around broken boot loaders. This should
	  be set to 'N' under normal conditions.
endchoice

config FORCE_MAX_ZONEORDER
	int
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_NUMA=y
CONFIG_HZ=100
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_USE_OF=y
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMI_SYSFS=m
CONFIG_ACPI_TAD=y
+2 −3
Original line number Diff line number Diff line
@@ -34,9 +34,8 @@ CONFIG_NUMA=y
CONFIG_HZ=100
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=y
CONFIG_USE_OF=y
CONFIG_SW64_BUILTIN_DTB=y
CONFIG_SW64_BUILTIN_DTB_NAME="chip_vt"
CONFIG_BUILTIN_DTB=y
CONFIG_BUILTIN_DTB_NAME="chip_vt"
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMI_SYSFS=m
CONFIG_GOOGLE_FIRMWARE=y
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_NUMA=y
CONFIG_HZ=100
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_USE_OF=y
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMI_SYSFS=m
# CONFIG_SUSPEND is not set
+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_NUMA=y
CONFIG_HZ=100
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_USE_OF=y
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMI_SYSFS=m
CONFIG_ACPI_TAD=y
Loading