<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 5:19 PM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 2013-09-12 08:59, Hesham AL-Matary wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
---<br>
c/src/lib/libcpu/arm/shared/<u></u>include/arm-cp15.h | 21 +++++++++++++++++++++<br>
1 file changed, 21 insertions(+)<br>
<br>
diff --git a/c/src/lib/libcpu/arm/shared/<u></u>include/arm-cp15.h b/c/src/lib/libcpu/arm/shared/<u></u>include/arm-cp15.h<br>
index 0117a5e..badf96e 100644<br>
--- a/c/src/lib/libcpu/arm/shared/<u></u>include/arm-cp15.h<br>
+++ b/c/src/lib/libcpu/arm/shared/<u></u>include/arm-cp15.h<br>
@@ -7,6 +7,7 @@<br>
*/<br>
<br>
/*<br>
+ * Copyright (c) 2013 Hesham AL-Matary<br>
* Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.<br>
*<br>
* embedded brains GmbH<br>
@@ -139,6 +140,7 @@ extern "C" {<br>
#define ARM_CP15_CTRL_NMFI (1U << 27)<br>
#define ARM_CP15_CTRL_EE (1U << 25)<br>
#define ARM_CP15_CTRL_VE (1U << 24)<br>
+#define ARM_CP15_CTRL_XP (1U << 23) // ARMv6<br>
</blockquote>
<br></div>
Please avoid // comments.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
#define ARM_CP15_CTRL_U (1U << 22)<br>
#define ARM_CP15_CTRL_FI (1U << 21)<br>
#define ARM_CP15_CTRL_UWXN (1U << 20)<br>
@@ -173,6 +175,25 @@ extern "C" {<br>
<br>
/** @} */<br>
<br>
+/**<br>
+ * @name Fault Status Register Defines<br>
+ *<br>
+ * @{<br>
+ */<br>
+<br>
+#define ARM_CP15_FAULT_STATUS_MASK 0x040F<br>
</blockquote>
<br></div>
What is the purpose of this mask?<br></blockquote><div>To extract the bits that describe the reason of the error.</div><div>It should be ANDed with FSR and compared with the </div><div>definitions below. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
How can I access the FSR?<div class="im"><br></div></blockquote><div>By routines at the same file (arm-cp15.h).</div><div>arm_cp15_get_instruction_fault_status</div><div>arm_cp15_get_data_fault_status</div><div><br></div>
<div>I used these definitions and functions for debugging </div><div>purposes. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+<br>
+#define ARM_CP15_FSR_ALIGNMENT_FAULT 0x00000001<br>
+#define ARM_CP15_FSR_BACKGROUND_FAULT 0x0000<br>
+#define ARM_CP15_FSR_ACCESS_<u></u>PERMISSION_FAULT 0x000D<br>
+#define ARM_CP15_FSR_PRECISE_EXTERNAL_<u></u>ABORT_FAULT 0x0008<br>
+#define ARM_CP15_FSR_IMPRECISE_<u></u>EXTERNAL_ABORT_FAULT 0x0406<br>
+#define ARM_CP15_FSR_PRECISE_PARITY_<u></u>ERROR_EXCEPTION 0x0006<br>
+#define ARM_CP15_FSR_IMPRECISE_PARITY_<u></u>ERROR_EXCEPTION 0x0408<br>
+#define ARM_CP15_FSR_DEBUG_EVENT 0x0002<br>
+<br>
+/** @} */<br>
+<br>
static inline uint32_t arm_cp15_get_id_code(void)<br>
{<br>
ARM_SWITCH_REGISTERS;<br>
<br>
</blockquote>
<br>
<br>
-- <br></div>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</blockquote></div><br></div></div>