/* The following register addresses are accessible via ASI_DMMU * and ASI_IMMU, that is there is a distinct and unique copy of * each these registers for each TLB.
*/ #define TSB_TAG_TARGET 0x0000000000000000 /* All chips */ #define TLB_SFSR 0x0000000000000018 /* All chips */ #define TSB_REG 0x0000000000000028 /* All chips */ #define TLB_TAG_ACCESS 0x0000000000000030 /* All chips */ #define VIRT_WATCHPOINT 0x0000000000000038 /* All chips */ #define PHYS_WATCHPOINT 0x0000000000000040 /* All chips */ #define TSB_EXTENSION_P 0x0000000000000048 /* Ultra-III and later */ #define TSB_EXTENSION_S 0x0000000000000050 /* Ultra-III and later, D-TLB only */ #define TSB_EXTENSION_N 0x0000000000000058 /* Ultra-III and later */ #define TLB_TAG_ACCESS_EXT 0x0000000000000060 /* Ultra-III+ and later */
/* These registers only exist as one entity, and are accessed * via ASI_DMMU only.
*/ #define PRIMARY_CONTEXT 0x0000000000000008 #define SECONDARY_CONTEXT 0x0000000000000010 #define DMMU_SFAR 0x0000000000000020 #define VIRT_WATCHPOINT 0x0000000000000038 #define PHYS_WATCHPOINT 0x0000000000000040
/* * The following CPU_ID_xxx constants are used * to identify the CPU type in the setup phase * (see head_64.S)
*/ #define CPU_ID_NIAGARA1 ('1') #define CPU_ID_NIAGARA2 ('2') #define CPU_ID_NIAGARA3 ('3') #define CPU_ID_NIAGARA4 ('4') #define CPU_ID_NIAGARA5 ('5') #define CPU_ID_M6 ('6') #define CPU_ID_M7 ('7') #define CPU_ID_M8 ('8') #define CPU_ID_SONOMA1 ('N')
/* The data cache is write through, so this just invalidates the * specified line.
*/ staticinlinevoid spitfire_put_dcache_tag(unsignedlong addr, unsignedlong tag)
{
__asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync"
: /* No outputs */
: "r" (tag), "r" (addr), "i" (ASI_DCACHE_TAG));
}
/* The instruction cache lines are flushed with this, but note that * this does not flush the pipeline. It is possible for a line to * get flushed but stale instructions to still be in the pipeline, * a flush instruction (to any address) is sufficient to handle * this issue after the line is invalidated.
*/ staticinlinevoid spitfire_put_icache_tag(unsignedlong addr, unsignedlong tag)
{
__asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync"
: /* No outputs */
: "r" (tag), "r" (addr), "i" (ASI_IC_TAG));
}
/* Cheetah has a 4-tlb layout so direct access is a bit different. * The first two TLBs are fully assosciative, hold 16 entries, and are * used only for locked and >8K sized translations. One exists for * data accesses and one for instruction accesses. * * The third TLB is for data accesses to 8K non-locked translations, is * 2 way assosciative, and holds 512 entries. The fourth TLB is for * instruction accesses to 8K non-locked translations, is 2 way * assosciative, and holds 128 entries. * * Cheetah has some bug where bogus data can be returned from * ASI_{D,I}TLB_DATA_ACCESS loads, doing the load twice fixes * the problem for me. -DaveM
*/ staticinlineunsignedlong cheetah_get_ldtlb_data(int entry)
{ unsignedlong data;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.