Port-mips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: UserGenException argument passing (PR 43431)
On Jun 8, 2010, at 10:10 AM, Paul Koning wrote:
>>> could someone please explain how UserGenException
>> (arch/mips/mips/mipsX_subr.S)
>>> is supposed to pass the last argument (the trap frame pointer) to
>> trap()?
>>
>> I don't think it does, or ever did. The trap frame pointer points
>> to
>> the trap frame for kernel exceptions, and should only be used for
> them.
>> User exceptions save the registers in the PCB, and reference them from
>> there.
>
> That inconsistency is certainly there as far back as 1.6.2. So what's
> going on is that the "frame" argument in trap() is valid for kernel
> traps and garbage for user traps. Given that trap() doesn't reference
> the "frame" argument for user traps, this piece of sloppy coding doesn't
> actually cause trouble.
User exception fetch from the trapframe pointed to l->l_md.md_utf.
Since the arguments are redundant with what's in the trapframe, we
could supply tf and refetch but that's kind of wasteful but is done
on a number of ports.
The one argument that could be remove is vaddr since its only needed
for a subset of causes.
Home |
Main Index |
Thread Index |
Old Index