WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Phase 1 of upgrading platform code to be derived from Li

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Phase 1 of upgrading platform code to be derived from Linux 2.6.11
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 09 May 2005 17:50:11 +0000
Delivery-date: Mon, 09 May 2005 18:08:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1459.1.1, 2005/05/09 18:50:11+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Phase 1 of upgrading platform code to be derived from Linux 2.6.11
        rather than 2.4.x.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 b/xen/arch/x86/Makefile                                 |    1 
 b/xen/arch/x86/Rules.mk                                 |    4 
 b/xen/arch/x86/acpi/boot.c                              |  912 +++++++++
 b/xen/arch/x86/apic.c                                   |   19 
 b/xen/arch/x86/i8259.c                                  |   10 
 b/xen/arch/x86/io_apic.c                                | 1604 +++++++++-------
 b/xen/arch/x86/irq.c                                    |    1 
 b/xen/arch/x86/microcode.c                              |    7 
 b/xen/arch/x86/mpparse.c                                |  710 ++-----
 b/xen/arch/x86/mtrr/main.c                              |    1 
 b/xen/arch/x86/nmi.c                                    |   10 
 b/xen/arch/x86/physdev.c                                |    2 
 b/xen/arch/x86/smpboot.c                                |   32 
 b/xen/arch/x86/x86_32/asm-offsets.c                     |    2 
 b/xen/arch/x86/x86_32/mm.c                              |    2 
 b/xen/arch/x86/x86_32/traps.c                           |    8 
 b/xen/arch/x86/x86_64/mm.c                              |    2 
 b/xen/common/bitmap.c                                   |  365 +++
 b/xen/common/xmalloc.c                                  |    2 
 b/xen/drivers/acpi/tables.c                             |   61 
 b/xen/include/acpi/acconfig.h                           |   31 
 b/xen/include/acpi/acexcep.h                            |   10 
 b/xen/include/acpi/acglobal.h                           |   81 
 b/xen/include/acpi/achware.h                            |   43 
 b/xen/include/acpi/aclocal.h                            |   54 
 b/xen/include/acpi/acmacros.h                           |   63 
 b/xen/include/acpi/acobject.h                           |   31 
 b/xen/include/acpi/acoutput.h                           |    4 
 b/xen/include/acpi/acpi.h                               |    2 
 b/xen/include/acpi/acpi_bus.h                           |   69 
 b/xen/include/acpi/acpi_drivers.h                       |  284 --
 b/xen/include/acpi/acpiosxf.h                           |   38 
 b/xen/include/acpi/acpixf.h                             |   45 
 b/xen/include/acpi/acstruct.h                           |   27 
 b/xen/include/acpi/actbl.h                              |   33 
 b/xen/include/acpi/actbl1.h                             |    2 
 b/xen/include/acpi/actbl2.h                             |   94 
 b/xen/include/acpi/actypes.h                            |  149 +
 b/xen/include/acpi/acutils.h                            |   43 
 b/xen/include/acpi/platform/acenv.h                     |   23 
 b/xen/include/acpi/platform/acgcc.h                     |    4 
 b/xen/include/acpi/platform/aclinux.h                   |    6 
 b/xen/include/asm-ia64/config.h                         |    8 
 b/xen/include/asm-x86/apic.h                            |   56 
 b/xen/include/asm-x86/apicdef.h                         |  279 ++
 b/xen/include/asm-x86/config.h                          |    4 
 b/xen/include/asm-x86/domain.h                          |    2 
 b/xen/include/asm-x86/fixmap.h                          |   33 
 b/xen/include/asm-x86/io_apic.h                         |  148 -
 b/xen/include/asm-x86/irq.h                             |   52 
 b/xen/include/asm-x86/mach-default/apm.h                |   75 
 b/xen/include/asm-x86/mach-default/bios_ebda.h          |   15 
 b/xen/include/asm-x86/mach-default/do_timer.h           |   85 
 b/xen/include/asm-x86/mach-default/entry_arch.h         |   34 
 b/xen/include/asm-x86/mach-default/io_ports.h           |   30 
 b/xen/include/asm-x86/mach-default/irq_vectors.h        |   96 
 b/xen/include/asm-x86/mach-default/irq_vectors_limits.h |   21 
 b/xen/include/asm-x86/mach-default/mach_apic.h          |  133 +
 b/xen/include/asm-x86/mach-default/mach_apicdef.h       |   13 
 b/xen/include/asm-x86/mach-default/mach_ipi.h           |   30 
 b/xen/include/asm-x86/mach-default/mach_mpparse.h       |   28 
 b/xen/include/asm-x86/mach-default/mach_mpspec.h        |    8 
 b/xen/include/asm-x86/mach-default/mach_reboot.h        |   30 
 b/xen/include/asm-x86/mach-default/mach_time.h          |  122 +
 b/xen/include/asm-x86/mach-default/mach_timer.h         |   48 
 b/xen/include/asm-x86/mach-default/mach_traps.h         |   29 
 b/xen/include/asm-x86/mach-default/mach_wakecpu.h       |   41 
 b/xen/include/asm-x86/mach-default/pci-functions.h      |   19 
 b/xen/include/asm-x86/mach-default/setup_arch_post.h    |   40 
 b/xen/include/asm-x86/mach-default/setup_arch_pre.h     |    5 
 b/xen/include/asm-x86/mach-default/smpboot_hooks.h      |   44 
 b/xen/include/asm-x86/mpspec.h                          |  282 --
 b/xen/include/asm-x86/mpspec_def.h                      |  188 +
 b/xen/include/asm-x86/page.h                            |    2 
 b/xen/include/asm-x86/processor.h                       |   15 
 b/xen/include/asm-x86/smp.h                             |   92 
 b/xen/include/asm-x86/smpboot.h                         |  116 -
 b/xen/include/asm-x86/system.h                          |    1 
 b/xen/include/asm-x86/time.h                            |    2 
 b/xen/include/xen/acpi.h                                |  126 +
 b/xen/include/xen/bitmap.h                              |  249 ++
 b/xen/include/xen/bitops.h                              |  129 +
 b/xen/include/xen/config.h                              |    6 
 b/xen/include/xen/cpumask.h                             |   25 
 b/xen/include/xen/irq.h                                 |    3 
 b/xen/include/xen/smp.h                                 |   19 
 b/xen/include/xen/spinlock.h                            |    3 
 b/xen/include/xen/types.h                               |    6 
 xen/arch/x86/acpi.c                                     |  729 -------
 xen/include/asm-x86/io_ports.h                          |   30 
 xen/include/asm-x86/mach_apic.h                         |   32 
 91 files changed, 5428 insertions(+), 3046 deletions(-)


diff -Nru a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
--- a/xen/arch/x86/Makefile     2005-05-09 14:09:07 -04:00
+++ b/xen/arch/x86/Makefile     2005-05-09 14:09:07 -04:00
@@ -3,6 +3,7 @@
 
 OBJS += $(patsubst %.S,%.o,$(wildcard $(TARGET_SUBARCH)/*.S))
 OBJS += $(patsubst %.c,%.o,$(wildcard $(TARGET_SUBARCH)/*.c))
+OBJS += $(patsubst %.c,%.o,$(wildcard acpi/*.c))
 OBJS += $(patsubst %.c,%.o,$(wildcard mtrr/*.c))
 
 OBJS := $(subst $(TARGET_SUBARCH)/asm-offsets.o,,$(OBJS))
diff -Nru a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk     2005-05-09 14:09:07 -04:00
+++ b/xen/arch/x86/Rules.mk     2005-05-09 14:09:07 -04:00
@@ -2,8 +2,8 @@
 # x86-specific definitions
 
 CFLAGS  += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
-CFLAGS  += -iwithprefix include -Wall -Werror -pipe
-CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
+CFLAGS  += -iwithprefix include -Wall -Werror -Wno-pointer-arith -pipe
+CFLAGS  += -I$(BASEDIR)/include -I$(BASEDIR)/include/asm-x86/mach-default
 
 ifeq ($(optimize),y)
 CFLAGS  += -O3 -fomit-frame-pointer
diff -Nru a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/xen/arch/x86/acpi/boot.c  2005-05-09 14:09:07 -04:00
@@ -0,0 +1,912 @@
+/*
+ *  boot.c - Architecture-Specific Low-Level ACPI Boot Support
+ *
+ *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@xxxxxxxxx>
+ *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@xxxxxxxxx>
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#include <xen/config.h>
+#include <xen/errno.h>
+#include <xen/init.h>
+#include <xen/acpi.h>
+#include <xen/irq.h>
+#include <xen/sched.h>
+#include <asm/page.h>
+#include <asm/apic.h>
+#include <asm/io_apic.h>
+#include <asm/apic.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mpspec.h>
+
+int sbf_port; /* XXX XEN */
+
+#ifdef CONFIG_X86_64
+
+static inline void  acpi_madt_oem_check(char *oem_id, char *oem_table_id) { }
+extern void __init clustered_apic_check(void);
+static inline int ioapic_setup_disabled(void) { return 0; }
+#include <asm/proto.h>
+
+#else  /* X86 */
+
+#ifdef CONFIG_X86_LOCAL_APIC
+#include <mach_apic.h>
+#include <mach_mpparse.h>
+#endif /* CONFIG_X86_LOCAL_APIC */
+
+#endif /* X86 */
+
+#define BAD_MADT_ENTRY(entry, end) (                                       \
+               (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
+               ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
+
+#define PREFIX                 "ACPI: "
+
+#ifdef CONFIG_ACPI_PCI
+int acpi_noirq __initdata;     /* skip ACPI IRQ initialization */
+int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization 
*/
+#else
+int acpi_noirq __initdata = 1;
+int acpi_pci_disabled __initdata = 1;
+#endif
+int acpi_ht __initdata = 1;    /* enable HT */
+
+int acpi_lapic;
+int acpi_ioapic;
+int acpi_strict;
+EXPORT_SYMBOL(acpi_strict);
+
+acpi_interrupt_flags acpi_sci_flags __initdata;
+int acpi_sci_override_gsi __initdata;
+int acpi_skip_timer_override __initdata;
+
+#ifdef CONFIG_X86_LOCAL_APIC
+static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
+#endif
+
+#ifndef __HAVE_ARCH_CMPXCHG
+#warning ACPI uses CMPXCHG, i486 and later hardware
+#endif
+
+#define MAX_MADT_ENTRIES       256
+u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
+                       { [0 ... MAX_MADT_ENTRIES-1] = 0xff };
+EXPORT_SYMBOL(x86_acpiid_to_apicid);
+
+/* --------------------------------------------------------------------------
+                              Boot-time Configuration
+   -------------------------------------------------------------------------- 
*/
+
+/*
+ * The default interrupt routing model is PIC (8259).  This gets
+ * overriden if IOAPICs are enumerated (below).
+ */
+enum acpi_irq_model_id         acpi_irq_model = ACPI_IRQ_MODEL_PIC;
+
+#ifdef CONFIG_X86_64
+
+/* rely on all ACPI tables being in the direct mapping */
+char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
+{
+       if (!phys_addr || !size)
+       return NULL;
+
+       if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+               return __va(phys_addr);
+
+       return NULL;
+}
+
+#else
+
+/*
+ * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
+ * to map the target physical address. The problem is that set_fixmap()
+ * provides a single page, and it is possible that the page is not
+ * sufficient.
+ * By using this area, we can map up to MAX_IO_APICS pages temporarily,
+ * i.e. until the next __va_range() call.
+ *
+ * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
+ * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
+ * count idx down while incrementing the phys address.
+ */
+char *__acpi_map_table(unsigned long phys, unsigned long size)
+{
+       unsigned long base, offset, mapped_size;
+       int idx;
+
+       if (phys + size < 8*1024*1024) 
+               return __va(phys); 
+
+       offset = phys & (PAGE_SIZE - 1);
+       mapped_size = PAGE_SIZE - offset;
+       set_fixmap(FIX_ACPI_END, phys);
+       base = fix_to_virt(FIX_ACPI_END);
+
+       /*
+        * Most cases can be covered by the below.
+        */
+       idx = FIX_ACPI_END;
+       while (mapped_size < size) {
+               if (--idx < FIX_ACPI_BEGIN)
+                       return NULL;    /* cannot handle this */
+               phys += PAGE_SIZE;
+               set_fixmap(idx, phys);
+               mapped_size += PAGE_SIZE;
+       }
+
+       return ((unsigned char *) base + offset);
+}
+#endif
+
+#ifdef CONFIG_PCI_MMCONFIG
+static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
+{
+       struct acpi_table_mcfg *mcfg;
+
+       if (!phys_addr || !size)
+               return -EINVAL;
+
+       mcfg = (struct acpi_table_mcfg *) __acpi_map_table(phys_addr, size);
+       if (!mcfg) {
+               printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
+               return -ENODEV;
+       }
+
+       if (mcfg->base_reserved) {
+               printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n");
+               return -ENODEV;
+       }
+
+       pci_mmcfg_base_addr = mcfg->base_address;
+
+       return 0;
+}
+#else
+#define        acpi_parse_mcfg NULL
+#endif /* !CONFIG_PCI_MMCONFIG */
+
+#ifdef CONFIG_X86_LOCAL_APIC
+static int __init
+acpi_parse_madt (
+       unsigned long           phys_addr,
+       unsigned long           size)
+{
+       struct acpi_table_madt  *madt = NULL;
+
+       if (!phys_addr || !size)
+               return -EINVAL;
+
+       madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size);
+       if (!madt) {
+               printk(KERN_WARNING PREFIX "Unable to map MADT\n");
+               return -ENODEV;
+       }
+
+       if (madt->lapic_address) {
+               acpi_lapic_addr = (u64) madt->lapic_address;
+
+               printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n",
+                       madt->lapic_address);
+       }
+
+       acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
+       
+       return 0;
+}
+
+
+static int __init
+acpi_parse_lapic (
+       acpi_table_entry_header *header, const unsigned long end)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Phase 1 of upgrading platform code to be derived from Linux 2.6.11, BitKeeper Bot <=