From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf95m-0002h1-QE for qemu-devel@nongnu.org; Sat, 18 Feb 2017 12:46:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf95h-0008G7-F7 for qemu-devel@nongnu.org; Sat, 18 Feb 2017 12:46:42 -0500 References: <1486065742-28639-1-git-send-email-peter.maydell@linaro.org> <1486065742-28639-4-git-send-email-peter.maydell@linaro.org> <87mvdnvcxx.fsf@linaro.org> From: Michael Davidsaver Message-ID: <1e2962d7-1b50-9543-3e1d-9c388d4167c3@gmail.com> Date: Sat, 18 Feb 2017 12:45:51 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-arm , QEMU Developers , "patches@linaro.org" , Liviu Ionescu On 02/16/2017 09:11 AM, Peter Maydell wrote: > I haven't actually checked real hardware behaviour, but I think > we can fairly safely implement this as not checking the IPSR > exception field. (We might as well go with the "reads 1 in > handler mode" choice of UNKNOWN that the M3 documents, though.) For what it's worth, I dug up my TI TM4C1294 eval board and re-ran test10.c [1] which is designed to probe this behavior by nesting exceptions PendSV within SVC. RETTOBASE is 0x800 in ICSR. > 1..12 > # BASEPRI mask 000000e0 > # DEBUG prio 000000e0 > ok 1 - 00000000 == 00000000 ICSR > ok 2 - 00000000 == 00000000 SHCSR > # Call SVC > # In SVC > ok 3 - 0000080b == 0000080b ICSR > ok 4 - 00000080 == 00000080 SHCSR > # In PendSV > ok 5 - 0000000e == 0000000e ICSR > ok 6 - 00000480 == 00000480 SHCSR > # Back in SVC > ok 7 - 00000003 == 00000003 Back in SVC > ok 8 - 0000080b == 0000080b ICSR > ok 9 - 00000080 == 00000080 SHCSR > # Back in main > ok 10 - 00000004 == 00000004 Back in main > ok 11 - 00000000 == 00000000 ICSR > ok 12 - 00000000 == 00000000 SHCSR > # Done [1] https://github.com/mdavidsaver/baremetal/blob/qemutest/test10.c