* suggestions on handling additional exception levels on ppc32
@ 2008-04-28 15:40 Kumar Gala
2008-04-28 15:59 ` Scott Wood
0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2008-04-28 15:40 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org list
I'm looking at fixing an issue parts that have multiple exception
levels (e300, 40x, booke).
One of the issues is the transfer_to_handler patch in entry_32.S
doesn't use the proper save/restore registers to transfer to C code.
The following bit of code is what I'm having issues with:
.globl transfer_to_handler_cont
transfer_to_handler_cont:
3:
mflr r9
lwz r11,0(r9) /* virtual address of handler
*/
lwz r9,4(r9) /* where to go when done */
mtspr SPRN_SRR0,r11
mtspr SPRN_SRR1,r10
mtlr r9
SYNC
RFI /* jump to handler, enable
MMU */
A few possibilities:
* introduce an additional function pointer as part of
EXC_XFER_TEMPLATE() to specifies the type of handler (normal, crit,
dbg, mcheck)
* use the traps field low order bits to determine normal, crit, dbg,
mcheck at run time.
* duplicate the code paths for each exception level
suggestions?
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: suggestions on handling additional exception levels on ppc32
2008-04-28 15:40 suggestions on handling additional exception levels on ppc32 Kumar Gala
@ 2008-04-28 15:59 ` Scott Wood
2008-04-28 16:58 ` Kumar Gala
0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2008-04-28 15:59 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list
On Mon, Apr 28, 2008 at 10:40:56AM -0500, Kumar Gala wrote:
> A few possibilities:
> * introduce an additional function pointer as part of
> EXC_XFER_TEMPLATE() to specifies the type of handler (normal, crit,
> dbg, mcheck)
> * use the traps field low order bits to determine normal, crit, dbg,
> mcheck at run time.
> * duplicate the code paths for each exception level
>
> suggestions?
You could temporarily disable all asynchronous exceptions, and use the
registers of the highest-priority exception type.
-Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: suggestions on handling additional exception levels on ppc32
2008-04-28 15:59 ` Scott Wood
@ 2008-04-28 16:58 ` Kumar Gala
2008-04-28 17:04 ` Scott Wood
0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2008-04-28 16:58 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org list
On Apr 28, 2008, at 10:59 AM, Scott Wood wrote:
> On Mon, Apr 28, 2008 at 10:40:56AM -0500, Kumar Gala wrote:
>> A few possibilities:
>> * introduce an additional function pointer as part of
>> EXC_XFER_TEMPLATE() to specifies the type of handler (normal, crit,
>> dbg, mcheck)
>> * use the traps field low order bits to determine normal, crit, dbg,
>> mcheck at run time.
>> * duplicate the code paths for each exception level
>>
>> suggestions?
>
> You could temporarily disable all asynchronous exceptions, and use the
> registers of the highest-priority exception type.
That doesn't work. We have NMIs or will have them in the future.
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: suggestions on handling additional exception levels on ppc32
2008-04-28 16:58 ` Kumar Gala
@ 2008-04-28 17:04 ` Scott Wood
2008-04-28 18:06 ` Kumar Gala
0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2008-04-28 17:04 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list
On Mon, Apr 28, 2008 at 11:58:58AM -0500, Kumar Gala wrote:
>
> On Apr 28, 2008, at 10:59 AM, Scott Wood wrote:
> >On Mon, Apr 28, 2008 at 10:40:56AM -0500, Kumar Gala wrote:
> >>A few possibilities:
> >>* introduce an additional function pointer as part of
> >>EXC_XFER_TEMPLATE() to specifies the type of handler (normal, crit,
> >>dbg, mcheck)
> >>* use the traps field low order bits to determine normal, crit, dbg,
> >>mcheck at run time.
> >>* duplicate the code paths for each exception level
> >>
> >>suggestions?
> >
> >You could temporarily disable all asynchronous exceptions, and use the
> >registers of the highest-priority exception type.
>
> That doesn't work. We have NMIs or will have them in the future.
Truly non-maskable? Ick. You could have a separate code path just for
the exception type that NMIs use, I guess, if there's a clear
highest-priority among the remaining interrupt types. What sort of
exceptions are they?
-Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: suggestions on handling additional exception levels on ppc32
2008-04-28 17:04 ` Scott Wood
@ 2008-04-28 18:06 ` Kumar Gala
0 siblings, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2008-04-28 18:06 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org list
On Apr 28, 2008, at 12:04 PM, Scott Wood wrote:
> On Mon, Apr 28, 2008 at 11:58:58AM -0500, Kumar Gala wrote:
>>
>> On Apr 28, 2008, at 10:59 AM, Scott Wood wrote:
>>> On Mon, Apr 28, 2008 at 10:40:56AM -0500, Kumar Gala wrote:
>>>> A few possibilities:
>>>> * introduce an additional function pointer as part of
>>>> EXC_XFER_TEMPLATE() to specifies the type of handler (normal, crit,
>>>> dbg, mcheck)
>>>> * use the traps field low order bits to determine normal, crit,
>>>> dbg,
>>>> mcheck at run time.
>>>> * duplicate the code paths for each exception level
>>>>
>>>> suggestions?
>>>
>>> You could temporarily disable all asynchronous exceptions, and use
>>> the
>>> registers of the highest-priority exception type.
>>
>> That doesn't work. We have NMIs or will have them in the future.
>
> Truly non-maskable? Ick. You could have a separate code path just
> for
> the exception type that NMIs use, I guess, if there's a clear
> highest-priority among the remaining interrupt types. What sort of
> exceptions are they?
The NMIs are machine check only so a separate path for them isn't a
terrible idea.
However, disabling all other interrupts seems worse than adding a
function pointer.
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-28 18:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 15:40 suggestions on handling additional exception levels on ppc32 Kumar Gala
2008-04-28 15:59 ` Scott Wood
2008-04-28 16:58 ` Kumar Gala
2008-04-28 17:04 ` Scott Wood
2008-04-28 18:06 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).