[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] First VT-i code drop



ChangeSet 1.1389.23.1, 2005/05/18 13:02:35-07:00, 
adsharma@xxxxxxxxxxxxxxxxxxxxxx

          First VT-i code drop



 arch/ia64/Makefile                       |    7 
 arch/ia64/Rules.mk                       |    4 
 arch/ia64/acpi.c                         |  979 +++++++++----------
 arch/ia64/asm-offsets.c                  |   28 
 arch/ia64/dom_fw.c                       |   69 +
 arch/ia64/domain.c                       |  342 ++++++
 arch/ia64/entry.h                        |   97 +
 arch/ia64/mm_init.c                      |   14 
 arch/ia64/mmio.c                         |  325 ++++++
 arch/ia64/patch/linux-2.6.11/entry.S     |   38 
 arch/ia64/patch/linux-2.6.11/head.S      |   58 +
 arch/ia64/patch/linux-2.6.11/hpsim_ssc.h |    7 
 arch/ia64/patch/linux-2.6.11/interrupt.h |   19 
 arch/ia64/patch/linux-2.6.11/io.h        |    8 
 arch/ia64/patch/linux-2.6.11/irq_ia64.c  |    9 
 arch/ia64/patch/linux-2.6.11/kregs.h     |   30 
 arch/ia64/patch/linux-2.6.11/mca_asm.h   |    7 
 arch/ia64/patch/linux-2.6.11/page.h      |   17 
 arch/ia64/patch/linux-2.6.11/pal.S       |   11 
 arch/ia64/patch/linux-2.6.11/processor.h |   19 
 arch/ia64/patch/linux-2.6.11/setup.c     |   37 
 arch/ia64/patch/linux-2.6.11/system.h    |   21 
 arch/ia64/patch/linux-2.6.11/unaligned.c |   47 
 arch/ia64/process.c                      |   13 
 arch/ia64/tools/README.RunVT             |   59 +
 arch/ia64/vcpu.c                         |   13 
 arch/ia64/vlsapic.c                      |  504 +++++++++
 arch/ia64/vmmu.c                         |  801 +++++++++++++++
 arch/ia64/vmx_entry.S                    |  611 ++++++++++++
 arch/ia64/vmx_init.c                     |  275 +++++
 arch/ia64/vmx_interrupt.c                |  388 +++++++
 arch/ia64/vmx_ivt.S                      |  978 +++++++++++++++++++
 arch/ia64/vmx_minstate.h                 |  329 ++++++
 arch/ia64/vmx_phy_mode.c                 |  393 +++++++
 arch/ia64/vmx_process.c                  |  345 ++++++
 arch/ia64/vmx_utility.c                  |  659 +++++++++++++
 arch/ia64/vmx_vcpu.c                     |  436 ++++++++
 arch/ia64/vmx_virt.c                     | 1501 +++++++++++++++++++++++++++++
 arch/ia64/vmx_vsa.S                      |   84 +
 arch/ia64/vtlb.c                         | 1004 +++++++++++++++++++
 arch/ia64/xenmem.c                       |   32 
 arch/ia64/xenmisc.c                      |   25 
 arch/ia64/xensetup.c                     |   18 
 arch/ia64/xentime.c                      |  165 +++
 common/elf.c                             |    3 
 include/asm-ia64/config.h                |   11 
 include/asm-ia64/domain.h                |   29 
 include/asm-ia64/gcc_intrin.h            |  657 ++++++++++++
 include/asm-ia64/ia64_int.h              |    4 
 include/asm-ia64/ia64regs.h              |  129 ++
 include/asm-ia64/mm.h                    |   18 
 include/asm-ia64/mmu_context.h           |    4 
 include/asm-ia64/pal.h                   | 1567 +++++++++++++++++++++++++++++++
 include/asm-ia64/privop.h                |   14 
 include/asm-ia64/ptrace.h                |  341 ++++++
 include/asm-ia64/regionreg.h             |   13 
 include/asm-ia64/regs.h                  |    1 
 include/asm-ia64/serial.h                |   14 
 include/asm-ia64/tlb.h                   |   14 
 include/asm-ia64/virt_event.h            |  114 ++
 include/asm-ia64/vmmu.h                  |  344 ++++++
 include/asm-ia64/vmx.h                   |   35 
 include/asm-ia64/vmx_mm_def.h            |  176 +++
 include/asm-ia64/vmx_pal.h               |  120 ++
 include/asm-ia64/vmx_pal_vsa.h           |   44 
 include/asm-ia64/vmx_phy_mode.h          |  126 ++
 include/asm-ia64/vmx_platform.h          |   37 
 include/asm-ia64/vmx_ptrace.h            |   97 +
 include/asm-ia64/vmx_vcpu.h              |  598 +++++++++++
 include/asm-ia64/vmx_vpd.h               |  193 +++
 include/asm-ia64/vtm.h                   |   68 +
 include/xen/sched.h                      |    2 
 72 files changed, 14999 insertions(+), 600 deletions(-)


diff -Nru a/xen/arch/ia64/Makefile b/xen/arch/ia64/Makefile
--- a/xen/arch/ia64/Makefile    2005-05-23 12:03:44 -04:00
+++ b/xen/arch/ia64/Makefile    2005-05-23 12:03:45 -04:00
@@ -10,6 +10,12 @@
        extable.o linuxextable.o xenirq.o xentime.o \
        regionreg.o entry.o unaligned.o privop.o vcpu.o \
        irq_ia64.o irq_lsapic.o vhpt.o xenasm.o dom_fw.o
+
+ifeq ($(CONFIG_VTI),y)
+OBJS += vmx_init.o vmx_virt.o vmx_vcpu.o vmx_process.o vmx_vsa.o vmx_ivt.o \
+       vmx_phy_mode.o vmx_utility.o vmx_interrupt.o vmx_entry.o vmmu.o \
+       vtlb.o mmio.o vlsapic.o
+endif
 # perfmon.o
 # unwind.o needed for kernel unwinding (rare)
 
@@ -38,6 +44,7 @@
 clean:
        rm -f *.o *~ core  xen.lds.s 
$(BASEDIR)/include/asm-ia64/.offsets.h.stamp
        rm -f lib/*.o
+       $(MAKE) -C lib clean
 
 # setup.o contains bits of compile.h so it must be blown away
 delete-unfresh-files:
diff -Nru a/xen/arch/ia64/Rules.mk b/xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk    2005-05-23 12:03:45 -04:00
+++ b/xen/arch/ia64/Rules.mk    2005-05-23 12:03:45 -04:00
@@ -1,6 +1,7 @@
 ########################################
 # ia64-specific definitions
 
+CONFIG_VTI     ?= y
 ifneq ($(COMPILE_ARCH),$(TARGET_ARCH))
 CROSS_COMPILE ?= /usr/local/sp_env/v2.2.5/i686/bin/ia64-unknown-linux-
 endif
@@ -17,4 +18,7 @@
 CFLAGS  += -DIA64 -DXEN -DLINUX_2_6
 CFLAGS += -ffixed-r13 -mfixed-range=f12-f15,f32-f127
 CFLAGS += -w -g
+ifeq ($(CONFIG_VTI),y)
+CFLAGS  += -DCONFIG_VTI
+endif
 LDFLAGS := -g
diff -Nru a/xen/arch/ia64/acpi.c b/xen/arch/ia64/acpi.c
--- a/xen/arch/ia64/acpi.c      2005-05-23 12:03:45 -04:00
+++ b/xen/arch/ia64/acpi.c      2005-05-23 12:03:45 -04:00
@@ -1,9 +1,16 @@
 /*
  *  acpi.c - Architecture-Specific Low-Level ACPI Support
  *
- *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@xxxxxxxxx>
- *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@xxxxxxxxx>
- *  Copyright (C) 2001 Patrick Mochel <mochel@xxxxxxxx>
+ *  Copyright (C) 1999 VA Linux Systems
+ *  Copyright (C) 1999,2000 Walt Drummond <drummond@xxxxxxxxxxx>
+ *  Copyright (C) 2000, 2002-2003 Hewlett-Packard Co.
+ *     David Mosberger-Tang <davidm@xxxxxxxxxx>
+ *  Copyright (C) 2000 Intel Corp.
+ *  Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@xxxxxxxxx>
+ *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@xxxxxxxxx>
+ *  Copyright (C) 2001 Jenna Hall <jenna.s.hall@xxxxxxxxx>
+ *  Copyright (C) 2001 Takayoshi Kochi <t-kochi@xxxxxxxxxxxxx>
+ *  Copyright (C) 2002 Erich Focht <efocht@xxxxxxxxxx>
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
@@ -19,667 +26,651 @@
  *
  *  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
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
-#include <xen/config.h>
-#include <xen/kernel.h>
-#include <xen/init.h>
-#include <xen/types.h>
-/*#include <xen/stddef.h>*/
-#include <xen/slab.h>
-#include <xen/pci.h>
-/*#include <xen/bootmem.h>*/
-#include <xen/irq.h>
-#include <xen/acpi.h>
-//#include <asm/mpspec.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/irq.h>
+#include <linux/acpi.h>
+#include <linux/efi.h>
+#include <linux/mmzone.h>
 #include <asm/io.h>
-//#include <asm/apic.h>
-//#include <asm/apicdef.h>
+//#include <asm/iosapic.h>
+#include <asm/machvec.h>
 #include <asm/page.h>
-/*#include <asm/pgtable.h>*/
-#include <asm/pgalloc.h>
-//#include <asm/io_apic.h>
-#include <asm/acpi.h>
-/*#include <asm/save_state.h>*/
-//#include <asm/smpboot.h>
-
+#include <asm/system.h>
+#include <asm/numa.h>
+#include <asm/sal.h>
+//#include <asm/cyclone.h>
+
+#define BAD_MADT_ENTRY(entry, end) (                                        \
+               (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
+               ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
 
 #define PREFIX                 "ACPI: "
 
-int acpi_lapic = 0;
-int acpi_ioapic = 0;
-
-/* --------------------------------------------------------------------------
-                              Boot-time Configuration
-   -------------------------------------------------------------------------- 
*/
+void (*pm_idle) (void);
+EXPORT_SYMBOL(pm_idle);
+void (*pm_power_off) (void);
+
+unsigned char acpi_kbd_controller_present = 1;
+unsigned char acpi_legacy_devices;
+
+const char *
+acpi_get_sysname (void)
+{
+#ifdef CONFIG_IA64_GENERIC
+       unsigned long rsdp_phys;
+       struct acpi20_table_rsdp *rsdp;
+       struct acpi_table_xsdt *xsdt;
+       struct acpi_table_header *hdr;
+
+       rsdp_phys = acpi_find_rsdp();
+       if (!rsdp_phys) {
+               printk(KERN_ERR "ACPI 2.0 RSDP not found, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       rsdp = (struct acpi20_table_rsdp *) __va(rsdp_phys);
+       if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) {
+               printk(KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       xsdt = (struct acpi_table_xsdt *) __va(rsdp->xsdt_address);
+       hdr = &xsdt->header;
+       if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) {
+               printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       if (!strcmp(hdr->oem_id, "HP")) {
+               return "hpzx1";
+       }
+       else if (!strcmp(hdr->oem_id, "SGI")) {
+               return "sn2";
+       }
+
+       return "dig";
+#else
+# if defined (CONFIG_IA64_HP_SIM)
+       return "hpsim";
+# elif defined (CONFIG_IA64_HP_ZX1)
+       return "hpzx1";
+# elif defined (CONFIG_IA64_SGI_SN2)
+       return "sn2";
+# elif defined (CONFIG_IA64_DIG)
+       return "dig";
+# else
+#      error Unknown platform.  Fix acpi.c.
+# endif
+#endif
+}
 
 #ifdef CONFIG_ACPI_BOOT
-//int acpi_noirq __initdata = 0;  /* skip ACPI IRQ initialization */
-int acpi_ht __initdata = 1;     /* enable HT */
 
-enum acpi_irq_model_id         acpi_irq_model;
+#define ACPI_MAX_PLATFORM_INTERRUPTS   256
+
+#if 0
+/* Array to record platform interrupt vectors for generic interrupt routing. */
+int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = {
+       [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
+};
 
+enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC;
 
 /*
- * 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.
+ * Interrupt routing API for device drivers.  Provides interrupt vector for
+ * a generic platform event.  Currently only CPEI is implemented.
  */
-char *__acpi_map_table(unsigned long phys, unsigned long size)
+int
+acpi_request_vector (u32 int_type)
 {
-       unsigned long base, offset, mapped_size;
-       int idx;
-
-       if (phys + size < 8*1024*1024) 
-               return __va(phys); 
+       int vector = -1;
 
-       offset = phys & (PAGE_SIZE - 1);
-       mapped_size = PAGE_SIZE - offset;
-#ifndef XEN
-// where is FIX_ACPI_*? hack for now, FIXME later
-       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 0;       /* cannot handle this */
-               phys += PAGE_SIZE;
-               set_fixmap(idx, phys);
-               mapped_size += PAGE_SIZE;
-       }
+       if (int_type < ACPI_MAX_PLATFORM_INTERRUPTS) {
+               /* corrected platform error interrupt */
+               vector = platform_intr_list[int_type];
+       } else
+               printk(KERN_ERR "acpi_request_vector(): invalid interrupt 
type\n");

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.