[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Domain 0 crashed when booting OMAP5 uEVM
long time ago, when we faced similar problems, we did a debug patch:
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index f3f88d4..76ec21c 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c
@@ -862,6 +862,27 @@ done: if (first) unmap_domain_page(first); } +#ifdef DEBUG_DOMAIN
+static uint32_t exec_vector_base(void) { + if (READ_SYSREG(SCTLR_EL1) & SCTLR_V) + return EXC_BASE_ADDR_HI;
+ else if (READ_SYSREG32(ID_PFR1_EL1) & PFR1_SE_MASK) + return READ_SYSREG(VBAR_EL1);
+ else + return EXC_BASE_ADDR_LO; +}
+ +static void domain_data_abort(struct cpu_user_regs *regs) { + printk("Data abort invokation on the domain side...\n");
+ regs->spsr_abt = regs->cpsr; + regs->lr_abt = regs->pc + 8;
+ WRITE_SYSREG(READ_SYSREG(HCR_EL2) | HCR_VA, HCR_EL2); + regs->cpsr &= ~(PSR_JAZELLE | PSR_IT_MASK | PSR_MODE_MASK);
+ regs->cpsr |= PSR_MODE_ABT | PSR_IRQ_MASK | PSR_ABT_MASK; + regs->pc = exec_vector_base() + DATA_ABORT_OFFSET;
+} +#endif + static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
struct hsr_dabt dabt) { @@ -917,7 +938,11 @@ bad_data_abort: else
dump_guest_s1_walk(current->domain, info.gva); show_execution_state(regs); +#ifndef DEBUG_DOMAIN domain_crash_synchronous();
+#else + domain_data_abort(regs); +#endif }
asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs) diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h index a782d96..4de8431 100644
--- a/xen/include/asm-arm/arm32/processor.h +++ b/xen/include/asm-arm/arm32/processor.h @@ -107,6 +107,11 @@ struct cpu_user_regs
#define READ_SYSREG(R...) READ_SYSREG32(R) #define WRITE_SYSREG(V, R...) WRITE_SYSREG32(V, R) +#define EXC_BASE_ADDR_HI 0xffff0000
+#define EXC_BASE_ADDR_LO 0x00000000 + +#define DATA_ABORT_OFFSET 0x10 +
#endif /* __ASSEMBLY__ */ #endif /* __ASM_ARM_ARM32_PROCESSOR_H */ diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 3333399..a07a33c 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -228,6 +228,10 @@ typedef uint64_t xen_callback_t;
#define PSR_BIG_ENDIAN (1<<9) /* Big Endian Mode */ #define PSR_JAZELLE (1<<24) /* Jazelle Mode */ +/* If-Then execution state bits mask for the Thumb IT (If-Then) instruction */ +#define PSR_IT_MASK (0x3F<<10 | 0x3<<25)
+#define PFR1_SE_MASK (0xF<<4) /* PFR1 Security Extensions bits mask */ + #endif /* __XEN_PUBLIC_ARCH_ARM_H__ */ /* -- 1.7.9.5 The idea was to invoke data abort on domain side, to see call stack. This patch applied to the code we forked near the March this year, I don't know if it would fit current code. It worked for Dom0 only.
Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |