Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-19 Thread Michael Davidsaver
On 02/18/2017 01:38 PM, Peter Maydell wrote: > On 18 February 2017 at 17:45, Michael Davidsaver > wrote: >> 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 >>> excepti

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-18 Thread Peter Maydell
On 18 February 2017 at 17:45, Michael Davidsaver wrote: > 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 >>

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-18 Thread Michael Davidsaver
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.

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-16 Thread Peter Maydell
On 15 February 2017 at 13:34, Peter Maydell wrote: > On 15 February 2017 at 12:46, Alex Bennée wrote: >> Can we not calculate a vector index rather than abusing the meaning of >> offset while switching on it? > > Yeah, we could. (This is just a case where I thought "I could > rewrite the code Mic

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-16 Thread Peter Maydell
On 15 February 2017 at 13:34, Peter Maydell wrote: > On 15 February 2017 at 12:46, Alex Bennée wrote: >> >> Peter Maydell writes: >>> +/* Return the value of the ISCR RETTOBASE bit: >>> + * 1 if there is exactly one active exception >>> + * 0 if there is more than one active exception >>> + * UN

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-15 Thread Alex Bennée
Peter Maydell writes: > On 15 February 2017 at 14:14, Alex Bennée wrote: >> I guess it would be easier to remove the asserts if we had run test >> cases that explicitly exercised all this code. What are you currently >> running to test this code? > > The cover letter has a pointer to the tests

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-15 Thread Peter Maydell
On 15 February 2017 at 14:14, Alex Bennée wrote: > I guess it would be easier to remove the asserts if we had run test > cases that explicitly exercised all this code. What are you currently > running to test this code? The cover letter has a pointer to the tests I've been using (plus the usual "

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-15 Thread Alex Bennée
Peter Maydell writes: > On 15 February 2017 at 12:46, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> From: Michael Davidsaver >>> >>> Despite some superficial similarities of register layout, the >>> M-profile NVIC is really very different from the A-profile GIC. >>> Our current attemp

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-15 Thread Peter Maydell
On 15 February 2017 at 12:46, Alex Bennée wrote: > > Peter Maydell writes: > >> From: Michael Davidsaver >> >> Despite some superficial similarities of register layout, the >> M-profile NVIC is really very different from the A-profile GIC. >> Our current attempt to reuse the GIC code means that

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-15 Thread Alex Bennée
Peter Maydell writes: > From: Michael Davidsaver > > Despite some superficial similarities of register layout, the > M-profile NVIC is really very different from the A-profile GIC. > Our current attempt to reuse the GIC code means that we have > significant bugs in our NVIC. > > Implement the N

[Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-02 Thread Peter Maydell
From: Michael Davidsaver Despite some superficial similarities of register layout, the M-profile NVIC is really very different from the A-profile GIC. Our current attempt to reuse the GIC code means that we have significant bugs in our NVIC. Implement the NVIC as an entirely separate device, to