qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/7] PPC: Implement e500 (FSL) MMU


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 5/7] PPC: Implement e500 (FSL) MMU
Date: Sat, 7 May 2011 23:36:29 +0200

On 07.05.2011, at 00:25, Scott Wood wrote:

> On Fri, 6 May 2011 14:00:35 +0200
> Alexander Graf <address@hidden> wrote:
> 
>> +static inline void booke206_flush_tlb_one(ppc_tlb_t *tlb, int num)
>> +{
>> +    int i;
>> +
>> +    for (i = 0; i < num; i++) {
>> +        if ((tlb[i].tlbe.prot & PAGE_VALID) &&
>> +           !(tlb[i].tlbe.attr & MAS1_IPROT)) {
>> +            tlb[i].tlbe.prot = 0;
>> +        }
>> +    }
>> +}
> 
> When this is called on reset, we want to ignore IPROT.

Ugh. Yes. This functions needs a constant parameter to know if it should check 
for IPROT - and not do so on reset :).

> The valid check seems unnecessary.

Yup, but it really helps to reduce debug output when putting in some in that 
line which I did :). It shouldn't really hurt, right?

>> +void helper_booke206_tlbsx(target_ulong address_hi, target_ulong address_lo)
> 
> What is address_hi?
> 
> From gen_tlbsx_booke206() it looks like these two arguments correspond to
> the two operands, so shouldn't they be added together?  I only see
> address_lo used.

Yup. According to the e500 spec:

  Note that rA = 0 is the preferred form for tlbsx and that some Freescale 
implementations, such as the e500, take an illegal instruction exception 
program interrupt if rA!=0.

So I figured that we're architecturally close enough if we just ignore it for 
now :).


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]