Skip to contentSkip to conversation

enable CONFIG_EDD for 3.1-testing

PATCH New S.Çağlar Onur 1 participant 1 message Feb 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enable CONFIG_EDD for 3.1-testing

Hi;

Following patch enables CONFIG_EDD (is needed for our distro. specific tools) for xen-3.1-testing, backported from xen-unstable ([1] and [2]). Please apply.

[1] http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/706976fe8333
[2] http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/6433fb4f88d6

buildconfigs/linux-defconfig_xen0_x86_32 +2 -0
diff -r dbe47d8cb825 buildconfigs/linux-defconfig_xen0_x86_32
@@ -155,12 +155,14 @@ CONFIG_VM86=y
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
+CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
buildconfigs/linux-defconfig_xenU_x86_32 +2 -0
diff -r dbe47d8cb825 buildconfigs/linux-defconfig_xenU_x86_32
@@ -152,12 +152,14 @@ CONFIG_VM86=y
 # CONFIG_TOSHIBA is not set
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_X86_MSR is not set
 CONFIG_X86_CPUID=y
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+# CONFIG_EDD is not set
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
buildconfigs/linux-defconfig_xen_x86_32 +2 -0
diff -r dbe47d8cb825 buildconfigs/linux-defconfig_xen_x86_32
@@ -160,12 +160,14 @@ CONFIG_VM86=y
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
+CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=m
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 # CONFIG_NOHIGHMEM is not set
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c +3 -0
diff -r dbe47d8cb825 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
@@ -66,6 +66,7 @@
 #include <xen/interface/physdev.h>
 #include <xen/interface/memory.h>
 #include <xen/features.h>
+#include <xen/firmware.h>
 #include <xen/xencons.h>
 #include <setup_arch.h>
 #include <bios_ebda.h>
@@ -740,6 +741,7 @@ struct edd edd;
 #ifdef CONFIG_EDD_MODULE
 EXPORT_SYMBOL(edd);
 #endif
+#ifndef CONFIG_XEN
 /**
  * copy_edd() - Copy the BIOS EDD information
  *              from boot_params into a safe place.
@@ -752,6 +754,7 @@ static inline void copy_edd(void)
      edd.mbr_signature_nr = EDD_MBR_SIG_NR;
      edd.edd_info_nr = EDD_NR;
 }
+#endif
 #else
 static inline void copy_edd(void)
 {
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +3 -0
diff -r dbe47d8cb825 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
@@ -71,6 +71,7 @@
 #include <asm/hypervisor.h>
 #include <xen/interface/nmi.h>
 #include <xen/features.h>
+#include <xen/firmware.h>
 #include <xen/xencons.h>
 #define PFN_UP(x)       (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
 #define PFN_PHYS(x)     ((x) << PAGE_SHIFT)
@@ -534,6 +535,7 @@ struct edd edd;
 #ifdef CONFIG_EDD_MODULE
 EXPORT_SYMBOL(edd);
 #endif
+#ifndef CONFIG_XEN
 /**
  * copy_edd() - Copy the BIOS EDD information
  *              from boot_params into a safe place.
@@ -546,6 +548,7 @@ static inline void copy_edd(void)
      edd.mbr_signature_nr = EDD_MBR_SIG_NR;
      edd.edd_info_nr = EDD_NR;
 }
+#endif
 #else
 static inline void copy_edd(void)
 {
linux-2.6-xen-sparse/drivers/firmware/Kconfig +0 -1
diff -r dbe47d8cb825 linux-2.6-xen-sparse/drivers/firmware/Kconfig
@@ -8,7 +8,6 @@ config EDD
 config EDD
 	tristate "BIOS Enhanced Disk Drive calls determine boot disk"
 	depends on !IA64
-	depends on !XEN
 	help
 	  Say Y or M here if you want to enable BIOS Enhanced Disk Drive
 	  Services real mode BIOS calls to determine which disk
linux-2.6-xen-sparse/drivers/xen/core/Makefile +1 -1
diff -r dbe47d8cb825 linux-2.6-xen-sparse/drivers/xen/core/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
+obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o firmware.o
 
 obj-$(CONFIG_PROC_FS)		+= xen_proc.o
 obj-$(CONFIG_SYS_HYPERVISOR)	+= hypervisor_sysfs.o
linux-2.6-xen-sparse/drivers/xen/core/firmware.c new file +56 -0

56 lines not on this page · raw message

linux-2.6-xen-sparse/include/xen/firmware.h new file +8 -0
diff -r dbe47d8cb825 linux-2.6-xen-sparse/include/xen/firmware.h
@@ -0,0 +1,8 @@
+#ifndef __XEN_FIRMWARE_H__
+#define __XEN_FIRMWARE_H__
+
+#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
+void copy_edd(void);
+#endif
+
+#endif /* __XEN_FIRMWARE_H__ */

Cheers

Signature · 4 lines
S.Çağlar Onur <[email protected]>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!