From patchwork Wed Feb 15 08:53:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 141277 X-Patchwork-Delegate: afleming@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 04DEEB6FD4 for ; Wed, 15 Feb 2012 20:09:20 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F1D7280B6; Wed, 15 Feb 2012 10:09:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 680xUBBHju56; Wed, 15 Feb 2012 10:09:16 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B4EA280AA; Wed, 15 Feb 2012 10:09:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7EB0C280AA for ; Wed, 15 Feb 2012 10:09:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I2L43shCYhoM for ; Wed, 15 Feb 2012 10:09:11 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from TX2EHSOBE007.bigfish.com (tx2ehsobe003.messaging.microsoft.com [65.55.88.13]) by theia.denx.de (Postfix) with ESMTPS id E91C9280A9 for ; Wed, 15 Feb 2012 10:09:09 +0100 (CET) Received: from mail99-tx2-R.bigfish.com (10.9.14.235) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 14.1.225.23; Wed, 15 Feb 2012 08:53:58 +0000 Received: from mail99-tx2 (localhost [127.0.0.1]) by mail99-tx2-R.bigfish.com (Postfix) with ESMTP id 7F195403F3 for ; Wed, 15 Feb 2012 08:53:58 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail99-tx2 (localhost.localdomain [127.0.0.1]) by mail99-tx2 (MessageSwitch) id 1329296036844363_27004; Wed, 15 Feb 2012 08:53:56 +0000 (UTC) Received: from TX2EHSMHS039.bigfish.com (unknown [10.9.14.248]) by mail99-tx2.bigfish.com (Postfix) with ESMTP id C082E200048 for ; Wed, 15 Feb 2012 08:53:56 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS039.bigfish.com (10.9.99.139) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 15 Feb 2012 08:53:54 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.355.3; Wed, 15 Feb 2012 02:53:53 -0600 Received: from b32579-VirtualBox.ap.freescale.net (b32579-VirtualBox.ap.freescale.net [10.232.132.74]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id q1F8roE3002541; Wed, 15 Feb 2012 02:53:51 -0600 (CST) From: Prabhakar Kushwaha To: Date: Wed, 15 Feb 2012 14:23:47 +0530 Message-ID: <1329296027-28471-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: afleming@freescale.com, Radu Lazarescu Subject: [U-Boot] [PATCH 1/4] doc: Add documentation for mpc85xx debugger support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Prabhakar Kushwaha --- 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.