address translation with TLB
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
Quoted 6 lines · Tom Appermont
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_entryto add an entry to the TLB, modified the functionsvirt_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.
add_wired_entry is almost certainly the wrong thing to do. It's only recommended if you must address peripherals at physical addresses of
Quoted 1 line
=
0x100000000, that is on 64-bit machines. 32-bit addresses can
be represented in our pagetables.
Quoted 2 lines
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
Quoted 5 lines · Ralf Baechle
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.
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
Quoted 11 lines · Tom Appermont
Quoted 3 lines
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.
In the
setup.cfile 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?
These are not physical addresses but entry[01] entries so actually are addresses outside the low 512mb.
Ralf