Skip to contentSkip to conversation

Latest xen-unstable on IBM x440

DISCUSSION Arun Sharma 2 participants 2 messages May 5, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Jun
Quoted 6 lines

The point was that without specifying acpi=force, XenLinux will not boot. XenLinux can not find a root filesystem. Scsi devices are not
properly detected. It is my hope that this can be used as a
datapoint to aid in determining the work which still needs to be done so that one day XenLinux will run on machines as easily and as well as Linux does.

Quoted 4 lines

Arun's patch allows one to set "acpi=force" for dom0 xenlinux, fulling enabbling ACPI in dom0 up to the level where the native Linux supports. What's missing there is to fall back to MPS, which is required for "acpi=ht".

Parsing the MPS table is working now on my machine, but interrupts are still not getting routed. I'm probably a couple of bug fixes away from getting acpi=off/ht to work.

-Arun

#2 lore raw
Quoted 2 lines · Arun Sharma

Parsing the MPS table is working now on my machine, but interrupts are still not getting routed. I'm probably a couple of bug fixes away from getting acpi=off/ht to work.

People having trouble with the PCI/IOAPIC patch, could you give this patch a try?

It works with acpi=off and acpi=ht on my machine.

-Arun

PS: PCI initialization is sensitive to the order of object files within the Makefile. I think that's a bit fragile...

===== arch/xen/i386/Kconfig 1.21 vs edited =====

arch/xen/i386/Kconfig renamed from linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig +1 -1
@@ -961,7 +961,7 @@
 config X86_FIND_SMP_CONFIG
 	bool
 	depends on X86_LOCAL_APIC || X86_VOYAGER
-	default n
+	default y
 
 config X86_MPPARSE
 	bool

===== arch/xen/i386/kernel/apic.c 1.1 vs edited =====

arch/xen/i386/kernel/apic.c renamed from linux-2.6.11-xen-sparse/arch/xen/i386/kernel/apic.c +6 -0
@@ -49,5 +49,11 @@
  */
 int __init APIC_init_uniprocessor (void)
 {
+#ifdef CONFIG_X86_IO_APIC
+        extern int smp_found_config;
+	if (smp_found_config)
+                /* Xen assumes IO_APIC */
+		setup_IO_APIC();
+#endif
 	return 0;
 }

===== arch/xen/i386/kernel/io_apic.c 1.1 vs edited =====

arch/xen/i386/kernel/io_apic.c renamed from linux-2.6.11-xen-sparse/arch/xen/i386/kernel/io_apic.c +17 -0
@@ -108,6 +108,23 @@
 }
 
 /*
+ *
+ * IRQ's that are handled by the PIC in the MPS IOAPIC case.
+ * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ.
+ *   Linux doesn't really care, as it's not actually used
+ *   for any interrupt handling anyway.
+ */
+#define PIC_IRQS	(1 << PIC_CASCADE_IR)
+
+void __init setup_IO_APIC(void)
+{
+	if (acpi_ioapic)
+		io_apic_irqs = ~0;	/* all IRQs go through IOAPIC */
+	else
+		io_apic_irqs = ~PIC_IRQS;
+} 
+
+/*
  * The common case is 1:1 IRQ<->pin mappings. Sometimes there are
  * shared ISA-space IRQs, so we have to support them. We are super
  * fast in the common case, and fast for shared ISA-space IRQs.

===== arch/xen/i386/kernel/mpparse.c 1.2 vs edited =====

arch/xen/i386/kernel/mpparse.c renamed from linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c +6 -10
@@ -429,9 +429,7 @@
 			{
 				struct mpc_config_processor *m=
 					(struct mpc_config_processor *)mpt;
-				/* ACPI may have already provided this data */
-				if (!acpi_lapic)
-					MP_processor_info(m);
+				/* We ignore the processors in the MP table */
 				mpt += sizeof(*m);
 				count += sizeof(*m);
 				break;
@@ -482,9 +480,8 @@
 		++mpc_record;
 	}
 	clustered_apic_check();
-	if (!num_processors)
-		printk(KERN_ERR "SMP mptable: no processors registered!\n");
-	return num_processors;
+        num_processors = 1; /* Doesn't really matter */
+	return 1;
 }
 
 static int __init ELCR_trigger(unsigned int irq)
@@ -690,7 +687,7 @@
 		 * Read the physical hardware table.  Anything here will
 		 * override the defaults.
 		 */
-		if (!smp_read_mpc((void *)mpf->mpf_physptr)) {
+		if (!smp_read_mpc((void *)isa_bus_to_virt(mpf->mpf_physptr))) {
 			smp_found_config = 0;
 			printk(KERN_ERR "BIOS bug, MP table errors detected!...\n");
 			printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
@@ -726,6 +723,7 @@
 static int __init smp_scan_config (unsigned long base, unsigned long length)
 {
 	unsigned long *bp = isa_bus_to_virt(base);
+        unsigned long isa_bus_off = ((unsigned long) bp) - base;
 	struct intel_mp_floating *mpf;
 
 	Dprintk("Scan SMP from %p for %ld bytes.\n", bp,length);
@@ -742,8 +740,7 @@
 
 			smp_found_config = 1;
 			printk(KERN_INFO "found SMP MP-table at %08lx\n",
-						virt_to_phys(mpf));
-			reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE);
+						mpf - isa_bus_off);
 			if (mpf->mpf_physptr) {
 				/*
 				 * We cannot access to MPC table to compute
@@ -758,7 +755,6 @@
 				unsigned long end = max_low_pfn * PAGE_SIZE;
 				if (mpf->mpf_physptr + size > end)
 					size = end - mpf->mpf_physptr;
-				reserve_bootmem(mpf->mpf_physptr, size);
 			}
 
 			mpf_found = mpf;

===== arch/xen/i386/kernel/setup.c 1.45 vs edited =====

arch/xen/i386/kernel/setup.c renamed from linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c +6 -7
@@ -1133,13 +1133,6 @@
 	 */
 	acpi_reserve_bootmem();
 #endif
-#ifdef CONFIG_X86_FIND_SMP_CONFIG
-	/*
-	 * Find and reserve possible boot-time SMP configuration:
-	 */
-	find_smp_config();
-#endif
-
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (xen_start_info.mod_start) {
 		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -1566,6 +1559,12 @@
 	if (efi_enabled)
 		efi_map_memmap();
 
+#ifdef CONFIG_X86_FIND_SMP_CONFIG
+	/*
+	 * Find and reserve possible boot-time SMP configuration:
+	 */
+	find_smp_config();
+#endif
 	/*
 	 * Parse the ACPI tables for possible boot-time SMP configuration.
 	 */

===== arch/xen/i386/pci/Makefile 1.9 vs edited =====

arch/xen/i386/pci/Makefile renamed from linux-2.6.11-xen-sparse/arch/xen/i386/pci/Makefile +1 -2
@@ -10,8 +10,7 @@
 
 c-pci-y				:= fixup.o
 c-pci-$(CONFIG_ACPI_PCI)	+= acpi.o
-c-pci-y				+= legacy.o
-pci-y				+= irq.o
+c-pci-y				+= legacy.o irq.o
 
 c-pci-$(CONFIG_X86_VISWS)	:= visws.o fixup.o
 pci-$(CONFIG_X86_VISWS)		:=

===== arch/xen/i386/pci/irq.c 1.15 vs edited =====

arch/xen/i386/pci/irq.c renamed from linux-2.6.11-xen-sparse/arch/xen/i386/pci/irq.c +0 -2
@@ -21,8 +21,6 @@
 
 #include "pci.h"
 
-#define DBG printk
-
 #define PIRQ_SIGNATURE	(('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
 #define PIRQ_VERSION 0x0100
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel