Port-powerpc archive

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

Re: battable size



On Mon, Sep 07, 1998 at 03:48:45AM +0900, Tsubai Masanari wrote:
> >currently, the battable size is fixed by the declaration in
> >powerpc/include/bat.h:
> >
> >Can we move the battable size to a port-specific file, please? Any 
> >suggestions?
> 
> How about "BATU(vaddr, mask)" and "BATL(raddr, mask, wimg)"?
> I think they should have variable length mask.

Uhm, yes... I would need it. More important than masking the addr parameter
passed in would be to generate or pass in the mask in  the BATL.

My suggestion is to have:

#define BATU(vaddr, shft) \
        (((vaddr & (0xffffffff << sfht)) | ((0x1FFF >> (28 - shft)) & 0x1FFE))

#define BATL(raddr, shft, wimg) \
        (((raddr & (0xffffffff << shft)) | (wimg) | 0x2)

Should I, in addition to the changes I sent to the list 5 minutes ago, 
do this change, and change all pre-existing calls to include a shft of 28?

        -is



Home | Main Index | Thread Index | Old Index