This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to select MMU-401 TLB description format?

Hi experts,

MMU-401 TLB support for the following:

— ARMv7 4KB, 2MB, and 1GB page sizes.

— ARMv8 64KB and 512MB page sizes.

In TRM, there is a register bit about PAGESIZE, 0:4KB, 1:64KB. So, I think user can select the TLB description format by this bit, that is, user must use 4KB,2MB,1GB, when selected PAGESIZE=4KB, otherwise, user must use 64KB,512MB.

Is my understanding correct? If no,  how do MMU-401 to distingguish the 4KB and 64KB TLB format?

 

Thanks.

  • There are a couple of related - but separate - things here.

    The SMMU has a concept of "pagesize", which relates to the SMMU's registers.  The SMMU registers are grouped into pages, such as "Global address space 0".  The alignment of these pages can be either 4KB or 64KB, see the "Identification Register 1" register for details.

    Then there is the translation table formats.  MMU-400 supports the ARMv7-A Long and Short descriptor formats, which both have a granularity (smallest describable block or page) of 4K.  MMU-401 additionally has limited support for the ARMv8-A Long descriptor format, with a granularity of 64K.  When configuring a context, software has to specify which format it is using.

    The TLBs hold caches of translations.  A translation can describe varying sized block/page, depending on the selected table format and the level of the translation table walk.  For example...

    ARMv7-A Long Descriptor format:

    Level 1 table: Each entry in the table covers 1 GB of VA space.  Each entry can be Fault, Block (maps VA to same sized block of PA) or a pointer to a level 2 table

    Level 2 table: Each entry in the table covers 2MB of VA space.  Each entry can be Fault, Block (maps VA to same sized block of PA) or a pointer to a level 3 table

    Level 3 table: Each entry in the table covers 4KB of VA space.  Each entry can be Fault or Block (maps VA to same sized block of PA)

    So a cached translation from a Level 2 table would cover 2MB, a cache translation from a Level 3 table would cover 4KB.  The format of the TLB entry comes from what kind of translation its caching, it's not something that you have to directly control.