/* The following register addresses are accessible via ASI_DMMU *andASI_IMMU,thatisthereisadistinctanduniquecopyof *eachtheseregistersforeachTLB.
*/ #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 *viaASI_DMMUonly.
*/ #define PRIMARY_CONTEXT 0x0000000000000008 #define SECONDARY_CONTEXT 0x0000000000000010 #define DMMU_SFAR 0x0000000000000020 #define VIRT_WATCHPOINT 0x0000000000000038 #define PHYS_WATCHPOINT 0x0000000000000040
/* The data cache is write through, so this just invalidates the *specifiedline.
*/ 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 *thisdoesnotflushthepipeline.Itispossibleforalineto *getflushedbutstaleinstructionstostillbeinthepipeline, *aflushinstruction(toanyaddress)issufficienttohandle *thisissueafterthelineisinvalidated.
*/ 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. *ThefirsttwoTLBsarefullyassosciative,hold16entries,andare *usedonlyforlockedand>8Ksizedtranslations.Oneexistsfor *dataaccessesandoneforinstructionaccesses. * *ThethirdTLBisfordataaccessesto8Knon-lockedtranslations,is *2wayassosciative,andholds512entries.ThefourthTLBisfor *instructionaccessesto8Knon-lockedtranslations,is2way *assosciative,andholds128entries. * *Cheetahhassomebugwherebogusdatacanbereturnedfrom *ASI_{D,I}TLB_DATA_ACCESSloads,doingtheloadtwicefixes *theproblemforme.-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.