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

Re: [Embedded-pv-devel] Xen bring up on TI DRA7xxx (J6) EVM



Akshay,

The problem here is because device tree for OMAP-like chips does not
describe machine completely. In this particular case PRCM registers
are not described and
We solved that for our setup via dummy device nodes which described
PRCM registers for devices assigned to particular domain. The complete
set of registers accessed we discovered with a patch similar to
following:

From 6a3288ac10f5c1ab65a741cbede543a0f30024ee Mon Sep 17 00:00:00 2001
From: Oleksandr Tyshchenko <oleksandr.tyshchenko@xxxxxxxxxxxxxxx>
Date: Thu, 15 May 2014 17:10:48 +0300
Subject: [PATCH] xen/debug: Show traps

Change-Id: If4398a43e92cb3c0d0c3955c3ae0b567cd196efc
Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@xxxxxxxxxxxxxxx>
---

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 4c93250..4220255 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -324,6 +324,7 @@
     regs->pc32 = exception_handler32(VECTOR32_UND);
 }

+#if 0
 /* Injects an Abort exception into the current vcpu, PC is the exact
  * address of the faulting instruction (without pipeline
  * adjustments). See TakePrefetchAbortException and
@@ -398,6 +399,7 @@
 {
     inject_abt32_exception(regs, 1, addr);
 }
+#endif // if 0

 #ifdef CONFIG_ARM_64
 /*
@@ -442,6 +444,7 @@
     WRITE_SYSREG32(esr.bits, ESR_EL1);
 }

+#if 0
 /* Inject an abort exception into a 64 bit guest */
 static void inject_abt64_exception(struct cpu_user_regs *regs,
                                    int prefetch,
@@ -496,6 +499,7 @@
 {
     inject_abt64_exception(regs, 1, addr, instr_len);
 }
+#endif // if 0

 #endif

@@ -510,6 +514,7 @@
 #endif
 }

+#if 0
 static void inject_iabt_exception(struct cpu_user_regs *regs,
                                   register_t addr,
                                   int instr_len)
@@ -533,6 +538,7 @@
             inject_dabt64_exception(regs, addr, instr_len);
 #endif
 }
+#endif

 struct reg_ctxt {
     /* Guest-side state */
@@ -552,7 +558,7 @@
     uint64_t vttbr_el2;
 };

-static const char *mode_string(uint32_t cpsr)
+const char *mode_string(uint32_t cpsr)
 {
     uint32_t mode;
     static const char *mode_strings[] = {
@@ -1939,18 +1945,21 @@
     if (first) unmap_domain_page(first);
 }

+#if 0
 static void do_trap_instr_abort_guest(struct cpu_user_regs *regs,
                                       union hsr hsr)
 {
     register_t addr = READ_SYSREG(FAR_EL2);
     inject_iabt_exception(regs, addr, hsr.len);
 }
+#endif // if 0

 static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
                                      union hsr hsr)
 {
     struct hsr_dabt dabt = hsr.dabt;
-    int rc;
+    const char *msg;
+    int rc, level = -1;
     mmio_info_t info;

     if ( !check_conditional_instr(regs, hsr) )
@@ -1998,7 +2007,34 @@
     }

 bad_data_abort:
+
+     msg = decode_fsc( dabt.dfsc, &level);
+
+     /* XXX inject a suitable fault into the guest */
+     printk("Guest data abort: %s%s%s\n"
+            "    gva=%"PRIvaddr"\n",
+            msg, dabt.s1ptw ? " S2 during S1" : "",
+            fsc_level_str(level),
+            info.gva);
+     if ( !dabt.s1ptw )
+         printk("    gpa=%"PRIpaddr"\n", info.gpa);
+     if ( dabt.valid )
+         printk("    size=%d sign=%d write=%d reg=%d\n",
+                dabt.size, dabt.sign, dabt.write, dabt.reg);
+     else
+         printk("    instruction syndrome invalid\n");
+     printk("    eat=%d cm=%d s1ptw=%d dfsc=%d\n",
+            dabt.eat, dabt.cache, dabt.s1ptw, dabt.dfsc);
+     if ( !dabt.s1ptw )
+         dump_p2m_lookup(current->domain, info.gpa);
+     else
+         dump_guest_s1_walk(current->domain, info.gva);
+     show_execution_state(regs);
+     domain_crash_synchronous();
+
+#if 0
     inject_dabt_exception(regs, info.gva, hsr.len);
+#endif // if 0
 }

 static void enter_hypervisor_head(struct cpu_user_regs *regs)
@@ -2098,9 +2134,11 @@
         break;
 #endif

+#if 0
     case HSR_EC_INSTR_ABORT_LOWER_EL:
         do_trap_instr_abort_guest(regs, hsr);
         break;
+#endif // if 0
     case HSR_EC_DATA_ABORT_LOWER_EL:
         do_trap_data_abort_guest(regs, hsr);
         break;

Unfortunately we are not ready to provide complete patch set for the
basic system bringup for all components.

Andrii Anisov | Team Lead
GlobalLogic
Kyiv, 03038, Protasov Business Park, M.Grinchenka, 2/1
P +38.044.492.9695x3664  M +380505738852  S andriyanisov
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel


 


Rackspace

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