[PATCH -v7 2/3] x86 boot: boot parameters export via sysfs

Previous thread: [PATCH -v7 3/3] x86 boot: document for 32 bit boot protocol by Huang, Ying on Tuesday, October 23, 2007 - 1:06 am. (1 message)

Next thread: none
From: Huang, Ying
Date: Tuesday, October 23, 2007 - 1:06 am

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

Signed-off-by: Huang Ying <ying.huang@intel.com>

---

 Makefile_32 |    1 
 Makefile_64 |    1 
 ksysfs.c    |  236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 setup64.c   |    2 
 setup_32.c  |    2 
 5 files changed, 240 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/kernel/Makefile_64
===================================================================
--- linux-2.6.orig/arch/x86/kernel/Makefile_64	2007-10-22 09:18:08.000000000 +0800
+++ linux-2.6/arch/x86/kernel/Makefile_64	2007-10-22 14:12:53.000000000 +0800
@@ -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
Index: linux-2.6/arch/x86/kernel/setup64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup64.c	2007-10-22 09:18:08.000000000 +0800
+++ linux-2.6/arch/x86/kernel/setup64.c	2007-10-22 14:12:14.000000000 +0800
@@ -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;
 
Index: linux-2.6/arch/x86/kernel/ksysfs.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6/arch/x86/kernel/ksysfs.c	2007-10-22 14:12:14.000000000 +0800
@@ -0,0 +1,236 @@
+/*
+ * arch/i386/ksysfs.c - architecture specific sysfs attributes in /sys/kernel
+ *
+ * Copyright (C) 2007, Intel Corp.
+ *      Huang Ying <ying.huang@intel.com>
+ *
+ * This file is released under the GPLv2
+ */
+
+#include <linux/kobject.h>
+#include <linux/string.h>
+#include <linux/sysfs.h>
+#include <linux/init.h>
+#include <linux/stat.h>
+#include ...
Previous thread: [PATCH -v7 3/3] x86 boot: document for 32 bit boot protocol by Huang, Ying on Tuesday, October 23, 2007 - 1:06 am. (1 message)

Next thread: none