From owner-svn-src-head@freebsd.org Tue Aug 25 16:49:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 524C899A90A; Tue, 25 Aug 2015 16:49:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42F9511F; Tue, 25 Aug 2015 16:49:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7PGnBlu033946; Tue, 25 Aug 2015 16:49:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7PGnBhR033945; Tue, 25 Aug 2015 16:49:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201508251649.t7PGnBhR033945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 25 Aug 2015 16:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287134 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2015 16:49:11 -0000 Author: andrew Date: Tue Aug 25 16:49:10 2015 New Revision: 287134 URL: https://svnweb.freebsd.org/changeset/base/287134 Log: Call into kdb on a data abort when it's enabled. This is needed to correctly handle trying to access an invalid address in the debugger. While here document that the breakpoint handler is supposed to fall through to the following case. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Aug 25 16:43:32 2015 (r287133) +++ head/sys/arm64/arm64/trap.c Tue Aug 25 16:49:10 2015 (r287134) @@ -155,6 +155,13 @@ data_abort(struct trapframe *frame, uint uint64_t far; int error, sig, ucode; +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return; + } +#endif + td = curthread; pcb = td->td_pcb; @@ -221,6 +228,11 @@ data_abort(struct trapframe *frame, uint frame->tf_elr = pcb->pcb_onfault; return; } +#ifdef KDB + if (debugger_on_panic || kdb_active) + if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame)) + return; +#endif panic("vm_fault failed: %lx", frame->tf_elr); } } @@ -293,6 +305,7 @@ do_el1h_sync(struct trapframe *frame) break; } #endif + /* FALLTHROUGH */ case EXCP_WATCHPT_EL1: case EXCP_SOFTSTP_EL1: #ifdef KDB