public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] doc: Add documentation for mpc85xx debugger support
@ 2012-02-15  8:53 Prabhakar Kushwaha
  2012-03-06 14:39 ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Prabhakar Kushwaha @ 2012-02-15  8:53 UTC (permalink / raw)
  To: u-boot

This describes requirement of e500 and e500v2 processor to support any
debugger. it also provide an insight of switch used and defined.

Signed-off-by: Radu Lazarescu <radu.lazarescu@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 Applies on http://git.denx.de/u-boot.git branch master

 doc/README.mpc85xx_debugger |   44 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.mpc85xx_debugger

diff --git a/doc/README.mpc85xx_debugger b/doc/README.mpc85xx_debugger
new file mode 100644
index 0000000..b35d710
--- /dev/null
+++ b/doc/README.mpc85xx_debugger
@@ -0,0 +1,44 @@
+Overview
+--------
+Debugger's ability to debug an application is constrained by the
+architecture's debug IP / run-control solution that may impose certain
+requirements for the application itself.
+
+Similarly, when referring to the e500 and e500v2 architecture, there are two
+basic rules any application has to respect in order to allow full debugging
+support:
+        1. Keep MSR[DE] bit set
+        2. Have a valid opcode that can be fetched from the debug exception
+	vector [IVPR|IVOR15].
+Where:
+	MSR  : Machine State register
+	IVPR : Interrupt Vector Prefix Register
+	IVOR : Interrupt Vector Offset Register
+
+Depending upon above 2 points there various place in powerpc/mpc85xx/ code
+which break the rules:
+	- MSR[DE] is not se
+        - Changing the context with a rfi instruction, but omitting to preserve
+	the [DE] bit in SRR1
+	- Changing IVPR/IVOR15 to a new location, before that location is
+	  un-accessible
+        - Changing IVPR/IVOR15 to a location that does not have a valid opcode
+	at [IVOR|IVOR15]
+	- While executing in translated space (AS=1), whenever a debug
+	  exception is generated, the MSR[DS/IS] gets cleared and the processor
+	  tries to fetch an instruction from the debug exception vector
+	  (IVPR|IVOR15); since now we are in AS=0, the application needs to
+	  ensure the proper configuration to have IVOR|IVOR15 accessible from
+	  AS=0 also
+
+Config Switches:
+----------------
+CONFIG_E500_V1_V2		Enables code taking care of above mentioned rule.
+CONFIG_DEBUGGER_TEMP_TLB	Define temporary TLB number.
+				It will be used to create temporary TLB for AS0
+				during execution in AS1. The TLB entry will be
+				created for debug exception vector.
+				Becuase on debug exception MSR[DS/IS] get
+				cleared i.e.  execution space is shifted back
+				to AS0 and a TLB is required to have debug
+				exception vecor accessible.
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-15  3:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15  8:53 [U-Boot] [PATCH 1/4] doc: Add documentation for mpc85xx debugger support Prabhakar Kushwaha
2012-03-06 14:39 ` Wolfgang Denk
2012-03-07  3:32   ` Prabhakar Kushwaha
     [not found]   ` <071A08F2C6A57E4E94D980ECA553F874575244@039-SN1MPN1-005.039d.mgd.msft.net>
2012-03-07  6:24     ` Wolfgang Denk
2012-03-07  8:50       ` Prabhakar Kushwaha
2012-03-07 12:30         ` Wolfgang Denk
2012-03-13  7:14           ` Prabhakar Kushwaha
2012-03-14  9:35             ` Prabhakar Kushwaha
2012-03-14 19:30               ` Scott Wood
2012-03-15  3:51                 ` Prabhakar Kushwaha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox