Skip to contentSkip to conversation

x86 boot: boot parameters export via sysfs

PATCH In review Huang, Ying 1 participant 1 message Oct 22, 2007 x86

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 x86 boot: boot parameters export via sysfs

This patch export the boot parameters via sysfs. This can be used for debugging and kexec.

---

 Makefile_32 |    1 
 Makefile_64 |    1 
 ksysfs.c    |  236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 setup64.c   |    2 
 setup_32.c  |    2 
 5 files changed, 240 insertions(+), 2 deletions(-)
arch/x86/kernel/Makefile_64 +1 -0
Index: linux-2.6/arch/x86/kernel/Makefile_64
===================================================================
@@ -37,6 +37,7 @@
 obj-$(CONFIG_X86_VSMP)		+= vsmp_64.o
 obj-$(CONFIG_K8_NB)		+= k8.o
 obj-$(CONFIG_AUDIT)		+= audit_64.o
+obj-$(CONFIG_SYSFS)		+= ksysfs.o
 
 obj-$(CONFIG_MODULES)		+= module_64.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
arch/x86/kernel/setup64.c +1 -1
Index: linux-2.6/arch/x86/kernel/setup64.c
===================================================================
@@ -24,7 +24,7 @@
 #include <asm/sections.h>
 #include <asm/setup.h>
 
-struct boot_params __initdata boot_params;
+struct boot_params boot_params;
 
 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
arch/x86/kernel/ksysfs.c new file +236 -0

236 lines not on this page · raw message

arch/x86/kernel/Makefile_32 +1 -0
Index: linux-2.6/arch/x86/kernel/Makefile_32
===================================================================
@@ -41,6 +41,7 @@
 obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
 obj-$(CONFIG_K8_NB)		+= k8.o
 obj-$(CONFIG_MGEODE_LX)		+= geode_32.o mfgpt_32.o
+obj-$(CONFIG_SYSFS)		+= ksysfs.o
 
 obj-$(CONFIG_VMI)		+= vmi_32.o vmiclock_32.o
 obj-$(CONFIG_PARAVIRT)		+= paravirt_32.o
arch/x86/kernel/setup_32.c +1 -1
Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
@@ -125,7 +125,7 @@
 
 static char __initdata command_line[COMMAND_LINE_SIZE];
 
-struct boot_params __initdata boot_params;
+struct boot_params boot_params;
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 struct edd edd;