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

[Xen-changelog] [xen-unstable] [IA64] kexec for xen



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1190927293 21600
# Node ID 4108c2589fd1c48688e4f8cf522a8b4e660b4e63
# Parent  ee498c9af856e8fc9d37d156a2123e1a26d83444
[IA64] kexec for xen

Basic port of kexec to xen

Signed-Off-By: Simon Horman <horms@xxxxxxxxxxxx>
---
 xen/arch/ia64/asm-offsets.c                  |    2 
 xen/arch/ia64/linux-xen/efi.c                |   63 ++++++++++
 xen/arch/ia64/linux-xen/entry.S              |    2 
 xen/arch/ia64/linux-xen/setup.c              |   36 ++++++
 xen/arch/ia64/vmx/vmx_vcpu.c                 |    2 
 xen/arch/ia64/xen/Makefile                   |    1 
 xen/arch/ia64/xen/crash.c                    |   31 ++++-
 xen/arch/ia64/xen/machine_kexec.c            |   83 +++++++++++++-
 xen/arch/ia64/xen/relocate_kernel.S          |  155 +++++++++++++++++++++++++++
 xen/include/asm-ia64/elf.h                   |   15 ++
 xen/include/asm-ia64/kexec.h                 |   15 ++
 xen/include/asm-ia64/linux-xen/asm/machvec.h |    8 +
 xen/include/asm-ia64/linux-xen/asm/meminit.h |    5 
 xen/include/asm-ia64/linux-xen/linux/efi.h   |    4 
 xen/include/public/kexec.h                   |    3 
 15 files changed, 407 insertions(+), 18 deletions(-)

diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/asm-offsets.c
--- a/xen/arch/ia64/asm-offsets.c       Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/asm-offsets.c       Thu Sep 27 15:08:13 2007 -0600
@@ -207,6 +207,8 @@ void foo(void)
 
        BLANK();
        DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET, offsetof (struct cpuinfo_ia64, 
nsec_per_cyc));
+       DEFINE(IA64_CPUINFO_PTCE_BASE_OFFSET, offsetof (struct cpuinfo_ia64, 
ptce_base));
+       DEFINE(IA64_CPUINFO_PTCE_COUNT_OFFSET, offsetof (struct cpuinfo_ia64, 
ptce_count));
        DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, offsetof (struct timespec, 
tv_nsec));
 
 
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/linux-xen/efi.c
--- a/xen/arch/ia64/linux-xen/efi.c     Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/linux-xen/efi.c     Thu Sep 27 15:08:13 2007 -0600
@@ -333,8 +333,13 @@ efi_memmap_walk_uc (efi_freemem_callback
  * Abstraction Layer chapter 11 in ADAG
  */
 
+#ifdef XEN
+static void *
+__efi_get_pal_addr (void)
+#else
 void *
 efi_get_pal_addr (void)
+#endif
 {
        void *efi_map_start, *efi_map_end, *p;
        efi_memory_desc_t *md;
@@ -401,6 +406,14 @@ efi_get_pal_addr (void)
 
 #ifdef XEN
 void *pal_vaddr = 0;
+
+void *
+efi_get_pal_addr(void)
+{
+       if (!pal_vaddr)
+               pal_vaddr = __efi_get_pal_addr();
+       return pal_vaddr;
+}
 #endif
 
 void
@@ -408,9 +421,7 @@ efi_map_pal_code (void)
 {
 #ifdef XEN
        u64 psr;
-       if (!pal_vaddr) {
-               pal_vaddr = efi_get_pal_addr ();
-       }
+       (void)efi_get_pal_addr();
 #else
        void *pal_vaddr = efi_get_pal_addr ();
        u64 psr;
@@ -1277,3 +1288,49 @@ vmcore_find_descriptor_size (unsigned lo
 }
 #endif
 #endif /* XEN */
+
+#ifdef XEN
+/* find a block of memory aligned to 64M exclude reserved regions
+ * rsvd_regions are sorted
+ */
+unsigned long
+kdump_find_rsvd_region(unsigned long size, struct rsvd_region *r, int n)
+{
+       int i;
+       u64 start, end;
+       u64 alignment = 1UL << _PAGE_SIZE_64M;
+       void *efi_map_start, *efi_map_end, *p;
+       efi_memory_desc_t *md;
+       u64 efi_desc_size;
+
+       efi_map_start = __va(ia64_boot_param->efi_memmap);
+       efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
+       efi_desc_size = ia64_boot_param->efi_memdesc_size;
+
+       for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
+               md = p;
+               if (!efi_wb(md))
+                       continue;
+               start = ALIGN(md->phys_addr, alignment);
+               end = efi_md_end(md);
+               for (i = 0; i < n; i++) {
+                       if (__pa(r[i].start) >= start && __pa(r[i].end) < end) {
+                               if (__pa(r[i].start) > start + size)
+                                       return start;
+                               start = ALIGN(__pa(r[i].end), alignment);
+                               if (i < n - 1
+                                   && __pa(r[i + 1].start) < start + size)
+                                       continue;
+                               else
+                                       break;
+                       }
+               }
+               if (end > start + size)
+                       return start;
+       }
+
+       printk(KERN_WARNING
+              "Cannot reserve 0x%lx byte of memory for crashdump\n", size);
+       return ~0UL;
+}
+#endif
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/linux-xen/entry.S
--- a/xen/arch/ia64/linux-xen/entry.S   Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/linux-xen/entry.S   Thu Sep 27 15:08:13 2007 -0600
@@ -1522,7 +1522,7 @@ ia64_hypercall_table:
        data8 do_hvm_op                 /*  */
        data8 do_sysctl                 /*  */                  /* 35 */
        data8 do_domctl                 /*  */
-       data8 do_ni_hypercall           /*  */
+       data8 do_kexec_op               /*  */
        data8 do_ni_hypercall           /*  */
        data8 do_ni_hypercall           /*  */
        data8 do_ni_hypercall           /*  */                 /* 40 */
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/linux-xen/setup.c
--- a/xen/arch/ia64/linux-xen/setup.c   Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/linux-xen/setup.c   Thu Sep 27 15:08:13 2007 -0600
@@ -64,6 +64,9 @@
 #ifdef XEN
 #include <asm/vmx.h>
 #include <asm/io.h>
+#include <asm/kexec.h>
+#include <public/kexec.h>
+#include <xen/kexec.h>
 #endif
 
 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
@@ -252,6 +255,39 @@ reserve_memory (void)
 
        efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end);
        n++;
+
+#ifdef XEN
+       /* crashkernel=size@offset specifies the size to reserve for a crash
+        * kernel. If offset is 0, then it is determined automatically.
+        * By reserving this memory we guarantee that linux never set's it
+        * up as a DMA target. Useful for holding code to do something
+        * appropriate after a kernel panic.
+        */
+       if (kexec_crash_area.size > 0) {
+               if (!kexec_crash_area.start) {
+                       sort_regions(rsvd_region, n);
+                       kexec_crash_area.start =
+                               kdump_find_rsvd_region(kexec_crash_area.size,
+                                                      rsvd_region, n);
+               }
+               if (kexec_crash_area.start != ~0UL) {
+                       printk("Kdump: %luMB (%lukB) at 0x%lx\n",
+                              kexec_crash_area.size >> 20,
+                              kexec_crash_area.size >> 10,
+                              kexec_crash_area.start);
+                       rsvd_region[n].start =
+                               (unsigned long)__va(kexec_crash_area.start);
+                       rsvd_region[n].end =
+                               (unsigned long)__va(kexec_crash_area.start +
+                                                   kexec_crash_area.size);
+                       n++;
+               }
+               else {
+                       kexec_crash_area.size = 0;
+                       kexec_crash_area.start = 0;
+               }
+       }
+#endif
 
        /* end of memory marker */
        rsvd_region[n].start = ~0UL;
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/vmx/vmx_vcpu.c
--- a/xen/arch/ia64/vmx/vmx_vcpu.c      Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/vmx/vmx_vcpu.c      Thu Sep 27 15:08:13 2007 -0600
@@ -42,6 +42,7 @@
 #include <asm/hw_irq.h>
 #include <asm/vmx_pal_vsa.h>
 #include <asm/kregs.h>
+#include <linux/efi.h>
 //unsigned long last_guest_rsm = 0x0;
 
 #ifdef VTI_DEBUG
@@ -161,7 +162,6 @@ IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, u6
 IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, u64 reg, u64 val)
 {
     ia64_rr oldrr,newrr;
-    extern void * pal_vaddr;
     u64 rrval;
 
     vcpu_get_rr(vcpu, reg, &oldrr.rrval);
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/xen/Makefile
--- a/xen/arch/ia64/xen/Makefile        Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/xen/Makefile        Thu Sep 27 15:08:13 2007 -0600
@@ -1,5 +1,6 @@ subdir-y += oprofile
 subdir-y += oprofile
 
+obj-y += relocate_kernel.o
 obj-y += machine_kexec.o
 obj-y += crash.o
 obj-y += acpi.o
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/xen/crash.c
--- a/xen/arch/ia64/xen/crash.c Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/xen/crash.c Thu Sep 27 15:08:13 2007 -0600
@@ -1,10 +1,33 @@
-#include <xen/lib.h>       /* for printk() used in stub */
-#include <xen/types.h>
-#include <public/kexec.h>
+/******************************************************************************
+ * crash.c
+ *
+ * Based heavily on arch/ia64/kernel/crash.c from Linux 2.6.20-rc1
+ *
+ * Xen port written by:
+ * - Simon 'Horms' Horman <horms@xxxxxxxxxxxx>
+ * - Magnus Damm <magnus@xxxxxxxxxxxxx>
+ */
+
+#include <xen/types.h>         /* Should be included by xen/kexec.h ? */
+#include <linux/thread_info.h> /* Should be included by linux/preempt.h ? */
+
+#include <xen/kexec.h>
+#include <linux/hardirq.h>
+#include <linux/smp.h>
+#include <asm/processor.h>
 
 void machine_crash_shutdown(void)
 {
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
+    //printk("machine_crash_shutdown: %d\n", smp_processor_id());
+    if (in_interrupt())
+        ia64_eoi();
+    kexec_crash_save_info();
+    printk(__FILE__ ": %s: save the eqivalent of x86's "
+           "dom0->shared_info->arch.pfn_to_mfn_frame_list_list?\n",
+           __FUNCTION__);
+#ifdef CONFIG_SMP
+    smp_send_stop();
+#endif
 }
 
 /*
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/xen/machine_kexec.c
--- a/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 15:08:13 2007 -0600
@@ -1,26 +1,97 @@
-#include <xen/lib.h>       /* for printk() used in stubs */
+/******************************************************************************
+ * machine_kexec.c
+ *
+ * Based on arch/ia64/kernel/machine_kexec.c from Linux 2.6.20-rc1
+ *
+ * Xen port written by:
+ * - Simon 'Horms' Horman <horms@xxxxxxxxxxxx>
+ * - Magnus Damm <magnus@xxxxxxxxxxxxx>
+ */
+
+#include <asm/smp.h>
+#include <xen/lib.h>
 #include <xen/types.h>
+#include <xen/smp.h>
 #include <public/kexec.h>
+#include <linux/efi.h>
+#include <asm/delay.h>
+#include <asm/meminit.h>
+#include <asm/hw_irq.h>
+#include <asm/kexec.h>
+
+typedef asmlinkage NORET_TYPE void (*relocate_new_kernel_t)(
+                                       unsigned long indirection_page,
+                                       unsigned long start_address,
+                                       struct ia64_boot_param *boot_param,
+                                       unsigned long pal_addr,
+                                       unsigned long cpu_data_pa,
+                                       unsigned long kernel_start,
+                                       unsigned long page_offset)
+                                       ATTRIB_NORET;
+
+#define kexec_flush_icache_page(page)                                  \
+do {                                                                   \
+       unsigned long page_addr = (unsigned long)page_address(page);    \
+       flush_icache_range(page_addr, page_addr + PAGE_SIZE);           \
+} while(0)
 
 int machine_kexec_load(int type, int slot, xen_kexec_image_t *image)
 {
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
-    return -1;
+       return 0;
 }
 
 void machine_kexec_unload(int type, int slot, xen_kexec_image_t *image)
 {
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
+}
+
+static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
+{
+       xen_kexec_image_t *image = arg;
+       relocate_new_kernel_t rnk;
+       unsigned long code_addr = (unsigned long)
+                                 __va(image->reboot_code_buffer);
+       unsigned long cpu_data_pa = (unsigned long)
+                                 __pa(cpu_data(smp_processor_id()));
+       int ii;
+
+       /* Interrupts aren't acceptable while we reboot */
+       local_irq_disable();
+
+       /* Mask CMC and Performance Monitor interrupts */
+       ia64_setreg(_IA64_REG_CR_PMV, 1 << 16);
+       ia64_setreg(_IA64_REG_CR_CMCV, 1 << 16);
+
+       /* Mask ITV and Local Redirect Registers */
+       ia64_set_itv(1 << 16);
+       ia64_set_lrr0(1 << 16);
+       ia64_set_lrr1(1 << 16);
+
+       /* terminate possible nested in-service interrupts */
+       for (ii = 0; ii < 16; ii++)
+               ia64_eoi();
+
+       /* unmask TPR and clear any pending interrupts */
+       ia64_setreg(_IA64_REG_CR_TPR, 0);
+       ia64_srlz_d();
+       while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
+               ia64_eoi();
+       platform_kernel_launch_event();
+       rnk = (relocate_new_kernel_t)&code_addr;
+       (*rnk)(image->indirection_page, image->start_address, ia64_boot_param,
+              GRANULEROUNDDOWN((unsigned long) pal_vaddr), cpu_data_pa,
+              KERNEL_START, PAGE_OFFSET);
+       BUG();
 }
 
 void machine_kexec(xen_kexec_image_t *image)
 {
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
+       unw_init_running(ia64_machine_kexec, image);
+       for(;;);
 }
 
 void machine_reboot_kexec(xen_kexec_image_t *image)
 {
-    printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__);
+       machine_kexec(image);
 }
 
 /*
diff -r ee498c9af856 -r 4108c2589fd1 xen/arch/ia64/xen/relocate_kernel.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/arch/ia64/xen/relocate_kernel.S       Thu Sep 27 15:08:13 2007 -0600
@@ -0,0 +1,155 @@
+/*
+ * arch/ia64/kernel/relocate_kernel.S
+ *
+ * Relocate kexec'able kernel and start it
+ *
+ * Copyright (C) 2005 Hewlett-Packard Development Company, L.P.
+ * Copyright (C) 2005 Khalid Aziz  <khalid.aziz@xxxxxx>
+ * Copyright (C) 2005 Intel Corp,  Zou Nan hai <nanhai.zou@xxxxxxxxx>
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2.  See the file COPYING for more details.
+ */
+#include <asm/asmmacro.h>
+#include <asm/kregs.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/mca_asm.h>
+
+GLOBAL_ENTRY(ia64_dump_cpu_regs)
+        .prologue
+        alloc loc0=ar.pfs,1,2,0,0
+        .body
+        mov     ar.rsc=0                // put RSE in enforced lazy mode
+        add     loc1=4*8, in0           // save r4 and r5 first
+        ;;
+{
+        flushrs                         // flush dirty regs to backing store
+        srlz.i
+}
+        st8 [loc1]=r4, 8
+        ;;
+        st8 [loc1]=r5, 8
+        ;;
+        add loc1=32*8, in0
+        mov r4=ar.rnat
+        ;;
+        st8 [in0]=r0, 8                        // r0
+        st8 [loc1]=r4, 8               // rnat
+        mov r5=pr
+        ;;
+        st8 [in0]=r1, 8                        // r1
+        st8 [loc1]=r5, 8               // pr
+        mov r4=b0
+        ;;
+        st8 [in0]=r2, 8                        // r2
+        st8 [loc1]=r4, 8               // b0
+        mov r5=b1;
+        ;;
+        st8 [in0]=r3, 24               // r3
+        st8 [loc1]=r5, 8               // b1
+        mov r4=b2
+        ;;
+        st8 [in0]=r6, 8                        // r6
+        st8 [loc1]=r4, 8               // b2
+       mov r5=b3
+        ;;
+        st8 [in0]=r7, 8                        // r7
+        st8 [loc1]=r5, 8               // b3
+        mov r4=b4
+        ;;
+        st8 [in0]=r8, 8                        // r8
+        st8 [loc1]=r4, 8               // b4
+        mov r5=b5
+        ;;
+        st8 [in0]=r9, 8                        // r9
+        st8 [loc1]=r5, 8               // b5
+        mov r4=b6
+        ;;
+        st8 [in0]=r10, 8               // r10
+        st8 [loc1]=r5, 8               // b6
+        mov r5=b7
+        ;;
+        st8 [in0]=r11, 8               // r11
+        st8 [loc1]=r5, 8               // b7
+        mov r4=b0
+        ;;
+        st8 [in0]=r12, 8               // r12
+        st8 [loc1]=r4, 8               // ip
+        mov r5=loc0
+       ;;
+        st8 [in0]=r13, 8               // r13
+        extr.u r5=r5, 0, 38            // ar.pfs.pfm
+       mov r4=r0                       // user mask
+        ;;
+        st8 [in0]=r14, 8               // r14
+        st8 [loc1]=r5, 8               // cfm
+        ;;
+        st8 [in0]=r15, 8               // r15
+        st8 [loc1]=r4, 8               // user mask
+       mov r5=ar.rsc
+        ;;
+        st8 [in0]=r16, 8               // r16
+        st8 [loc1]=r5, 8               // ar.rsc
+        mov r4=ar.bsp
+        ;;
+        st8 [in0]=r17, 8               // r17
+        st8 [loc1]=r4, 8               // ar.bsp
+        mov r5=ar.bspstore
+        ;;
+        st8 [in0]=r18, 8               // r18
+        st8 [loc1]=r5, 8               // ar.bspstore
+        mov r4=ar.rnat
+        ;;
+        st8 [in0]=r19, 8               // r19
+        st8 [loc1]=r4, 8               // ar.rnat
+        mov r5=ar.ccv
+        ;;
+        st8 [in0]=r20, 8               // r20
+       st8 [loc1]=r5, 8                // ar.ccv
+        mov r4=ar.unat
+        ;;
+        st8 [in0]=r21, 8               // r21
+        st8 [loc1]=r4, 8               // ar.unat
+        mov r5 = ar.fpsr
+        ;;
+        st8 [in0]=r22, 8               // r22
+        st8 [loc1]=r5, 8               // ar.fpsr
+        mov r4 = ar.unat
+        ;;
+        st8 [in0]=r23, 8               // r23
+        st8 [loc1]=r4, 8               // unat
+        mov r5 = ar.fpsr
+        ;;
+        st8 [in0]=r24, 8               // r24
+        st8 [loc1]=r5, 8               // fpsr
+        mov r4 = ar.pfs
+        ;;
+        st8 [in0]=r25, 8               // r25
+        st8 [loc1]=r4, 8               // ar.pfs
+        mov r5 = ar.lc
+        ;;
+        st8 [in0]=r26, 8               // r26
+        st8 [loc1]=r5, 8               // ar.lc
+        mov r4 = ar.ec
+        ;;
+        st8 [in0]=r27, 8               // r27
+        st8 [loc1]=r4, 8               // ar.ec
+        mov r5 = ar.csd
+        ;;
+        st8 [in0]=r28, 8               // r28
+        st8 [loc1]=r5, 8               // ar.csd
+        mov r4 = ar.ssd
+        ;;
+        st8 [in0]=r29, 8               // r29
+        st8 [loc1]=r4, 8               // ar.ssd
+        ;;
+        st8 [in0]=r30, 8               // r30
+        ;;
+       st8 [in0]=r31, 8                // r31
+        mov ar.pfs=loc0
+        ;;
+        br.ret.sptk.many rp
+END(ia64_dump_cpu_regs)
+
+
diff -r ee498c9af856 -r 4108c2589fd1 xen/include/asm-ia64/elf.h
--- a/xen/include/asm-ia64/elf.h        Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/include/asm-ia64/elf.h        Thu Sep 27 15:08:13 2007 -0600
@@ -4,7 +4,20 @@
 #include <xen/lib.h>       /* for printk() used in stub */
 
 typedef struct {
-    unsigned long dummy;
+    unsigned long r1;
+    unsigned long r2;
+    unsigned long r13;
+    unsigned long cr_iip;
+    unsigned long ar_rsc;
+    unsigned long r30;
+    unsigned long ar_bspstore;
+    unsigned long ar_rnat;
+    unsigned long ar_ccv;
+    unsigned long ar_unat;
+    unsigned long ar_pfs;
+    unsigned long r31;
+    unsigned long ar_csd;
+    unsigned long ar_ssd;
 } ELF_Gregset;
 
 typedef struct {
diff -r ee498c9af856 -r 4108c2589fd1 xen/include/asm-ia64/kexec.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/kexec.h      Thu Sep 27 15:08:13 2007 -0600
@@ -0,0 +1,15 @@
+#ifndef __IA64_KEXEC_H__
+#define __IA64_KEXEC_H__
+
+#include <xen/types.h>
+#include <xen/kexec.h>
+
+extern const unsigned int relocate_new_kernel_size;
+extern void relocate_new_kernel(unsigned long, unsigned long,
+                                struct ia64_boot_param *, unsigned long);
+void crash_save_xen_notes(void);
+void machine_kexec(xen_kexec_image_t *image);
+unsigned long kdump_find_rsvd_region(unsigned long size,
+                                     struct rsvd_region *rsvd_regions, int n);
+
+#endif /* __IA64_KEXEC_H__ */
diff -r ee498c9af856 -r 4108c2589fd1 
xen/include/asm-ia64/linux-xen/asm/machvec.h
--- a/xen/include/asm-ia64/linux-xen/asm/machvec.h      Thu Sep 27 12:22:16 
2007 -0600
+++ b/xen/include/asm-ia64/linux-xen/asm/machvec.h      Thu Sep 27 15:08:13 
2007 -0600
@@ -34,6 +34,7 @@ typedef int ia64_mv_pci_legacy_read_t (s
                                       u8 size);
 typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val,
                                        u8 size);
+typedef void ia64_mv_kernel_launch_event_t(void);
 
 /* DMA-mapping interface: */
 typedef void ia64_mv_dma_init (void);
@@ -263,6 +264,7 @@ extern void machvec_tlb_migrate_finish (
 #  define platform_readw_relaxed        ia64_mv.readw_relaxed
 #  define platform_readl_relaxed        ia64_mv.readl_relaxed
 #  define platform_readq_relaxed        ia64_mv.readq_relaxed
+#  define platform_kernel_launch_event  ia64_mv.kernel_launch_event
 #ifdef XEN
 #  define platform_fw_init      ia64_mv.fw_init
 #endif
@@ -314,6 +316,7 @@ struct ia64_machine_vector {
        ia64_mv_readw_relaxed_t *readw_relaxed;
        ia64_mv_readl_relaxed_t *readl_relaxed;
        ia64_mv_readq_relaxed_t *readq_relaxed;
+       ia64_mv_kernel_launch_event_t *kernel_launch_event;
 #ifdef XEN
        ia64_mv_fw_init_t *fw_init;
 #endif
@@ -362,6 +365,7 @@ struct ia64_machine_vector {
        platform_readw_relaxed,                 \
        platform_readl_relaxed,                 \
        platform_readq_relaxed,                 \
+       platform_kernel_launch_event,           \
        platform_fw_init,                       \
 }
 #else
@@ -407,6 +411,7 @@ struct ia64_machine_vector {
        platform_readw_relaxed,                 \
        platform_readl_relaxed,                 \
        platform_readq_relaxed,                 \
+       platform_kernel_launch_event            \
 }
 #endif
 
@@ -460,6 +465,9 @@ extern ia64_mv_dma_supported                swiotlb_dm
 #ifndef platform_tlb_migrate_finish
 # define platform_tlb_migrate_finish   machvec_noop_mm
 #endif
+#ifndef platform_kernel_launch_event
+# define platform_kernel_launch_event  machvec_noop
+#endif
 #ifndef platform_dma_init
 # define platform_dma_init             swiotlb_init
 #endif
diff -r ee498c9af856 -r 4108c2589fd1 
xen/include/asm-ia64/linux-xen/asm/meminit.h
--- a/xen/include/asm-ia64/linux-xen/asm/meminit.h      Thu Sep 27 12:22:16 
2007 -0600
+++ b/xen/include/asm-ia64/linux-xen/asm/meminit.h      Thu Sep 27 15:08:13 
2007 -0600
@@ -23,13 +23,14 @@
  *     - initrd (optional)
 #endif
  *     - Kernel memory map built from EFI memory map
+ *     - Crash kernel for kdump
  *
  * More could be added if necessary
  */
 #ifndef XEN
-#define IA64_MAX_RSVD_REGIONS 6
+#define IA64_MAX_RSVD_REGIONS 7
 #else
-#define IA64_MAX_RSVD_REGIONS 7
+#define IA64_MAX_RSVD_REGIONS 8
 #endif
 
 struct rsvd_region {
diff -r ee498c9af856 -r 4108c2589fd1 xen/include/asm-ia64/linux-xen/linux/efi.h
--- a/xen/include/asm-ia64/linux-xen/linux/efi.h        Thu Sep 27 12:22:16 
2007 -0600
+++ b/xen/include/asm-ia64/linux-xen/linux/efi.h        Thu Sep 27 15:08:13 
2007 -0600
@@ -21,6 +21,10 @@
 
 #include <asm/page.h>
 #include <asm/system.h>
+
+#ifdef XEN
+extern void * pal_vaddr;
+#endif
 
 #define EFI_SUCCESS            0
 #define EFI_LOAD_ERROR          ( 1 | (1UL << (BITS_PER_LONG-1)))
diff -r ee498c9af856 -r 4108c2589fd1 xen/include/public/kexec.h
--- a/xen/include/public/kexec.h        Thu Sep 27 12:22:16 2007 -0600
+++ b/xen/include/public/kexec.h        Thu Sep 27 15:08:13 2007 -0600
@@ -78,6 +78,9 @@ typedef struct xen_kexec_image {
 typedef struct xen_kexec_image {
 #if defined(__i386__) || defined(__x86_64__)
     unsigned long page_list[KEXEC_XEN_NO_PAGES];
+#endif
+#if defined(__ia64__)
+    unsigned long reboot_code_buffer;
 #endif
     unsigned long indirection_page;
     unsigned long start_address;

_______________________________________________
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®.