Subject: address translation with TLB

From: Tom Appermont <[email-masked]>
Date: Sat, 14 Apr 2001 10:29:01 +0200

Howdy,

What are the things to do to use the TLB for access to otherwize
unreachable PCI memory or IO areas? I have used the function
add_wired_entry to add an entry to the TLB, modified the 
functions virt_to_phys, phys_to_virt, virt_to_bus, bus_to_virt,
and ioremap to do the translations I want , but I wonder if there
are other things to do to get this working. Even more so, because
none of the mips boards currently in the tree seem to need TLB
remapping.

Greetz,

Tom

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 17 Apr 2001 14:11:22 -0300

On Sat, Apr 14, 2001 at 10:29:01AM +0200, Tom Appermont wrote:

> and ioremap to do the translations I want, but I wonder if there
> are other things to do to get this working.

add_wired_entry is almost certainly the wrong thing to do.  It's only
recommended if you must address peripherals at physical addresses of
>= 0x100000000, that is on 64-bit machines.  32-bit addresses can
be represented in our pagetables.

> Even more so, because none of the mips boards currently in the tree seem
> to need TLB remapping.

Sane designs make sure that peripherals are at physical addresses of 512mb
or less so can be addressed through KSEG1 without using TLB entries.  So
far the only violation of this rule are the Jazz systems.

  Ralf

---

From: Tom Appermont <[email-masked]>
Date: Thu, 19 Apr 2001 10:01:47 +0200

> far the only violation of this rule are the Jazz systems.

In the setup.c file for the jazz board, is written:

        add_wired_entry (0x02000017, 0x03c00017, 0xe0000000, PM_64K);
        add_wired_entry (0x02400017, 0x02440017, 0xe2000000, PM_16M);
        add_wired_entry (0x01800017, 0x01000017, 0xe4000000, PM_4M);

Why do these physical addresses which are all below 512MB need TLB entries? 

Greetz,

Tom

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 19 Apr 2001 09:57:43 -0300

> Why do these physical addresses which are all below 512MB need TLB entries? 

These are not physical addresses but entry[01] entries so actually are
addresses outside the low 512mb.

  Ralf