Re: using the 36bit physical address on AMD AU1200

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

 



Thanks Dan for the reply.

I set the TLB as you mentioned on the DM9000 driver in YAMON.
UINT32 pte[5];

pte[0] = 0;                                       /* TLB Entry : 0    */
pte[1] = 0x01FFE000;                      /* Page Mask : 16MB */
pte[2] = 0xD0000000;                       /* EntryHi: 0xD0000000 */
pte[3] = (0xD0000000>>2) | 0x0017;  /* EntryLo0            */
pte[4] = (0xD0100000>>2) | 0x0017;  /* EntryLo1            */

sys_tlb_write(pte);                 /* set the TLB entry 0 */
CP0_wired_write(2);	            /* wired register for 2 entry */

After setting, I could access DM9000 with the Base address 0xD0000000.
In here, I have some more questions.
1. I set the 1 TLB entry, so others does not affect the address translation.
   so Whenever I use the 0xD0000000, it always converted to 0xD 0000 0000
   on the bootloader.
   Am I right?
2. On the linux, If I want to use ioremap for Dm9000, Do I need to set the TLB
    and do not need to change the ioremap source code ?

Thank you in advance,
youngduk



On 1/17/06, Dan Malek <dan@xxxxxxxxxxxxxxxxx> wrote:
>
> On Jan 16, 2006, at 10:40 PM, Youngduk Goo wrote:
>
> > I guess I need to convert this address to virtual address for access
> > it.
>
> You have to map it, yes.
>
> > But I don't know exactly how to do it. Do I need to configure the TBL?
> > I am using the YAMON as a bootloader. and try to access the DM9000.
>
> You will have to modify the YAMON source code to map TLB entries
> for the device.  Take a look at the sys_tlb_write() function along with
> ensuring you update the CP0 wired register so they don't disappear.
> Also, you will have to check what else may be doing this so you don't
> mess up other mappings.
>
> In Linux, all you need to do is call ioremap() and use the virtual
> address returned to you.
>
>        -- Dan
>
>


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux