diff options
author | jake <jake@FreeBSD.org> | 2001-08-06 02:21:53 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-08-06 02:21:53 +0000 |
commit | 8117bcdd300249d1006fc4225d397ce1d278d3b8 (patch) | |
tree | 8634940ee04f5dd232a1e25d54709ed5d1e9513e /sys | |
parent | 9059da7a9fae11abe8839e73926f1ed6426d3615 (diff) | |
download | FreeBSD-src-8117bcdd300249d1006fc4225d397ce1d278d3b8.zip FreeBSD-src-8117bcdd300249d1006fc4225d397ce1d278d3b8.tar.gz |
Oops. Last commit to tsb.h should have gone here.
Fix macros for eadling with tte contexts and add macros for sfsr fields.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sparc64/include/tlb.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/sparc64/include/tlb.h b/sys/sparc64/include/tlb.h index d723032..e883bdd 100644 --- a/sys/sparc64/include/tlb.h +++ b/sys/sparc64/include/tlb.h @@ -40,7 +40,7 @@ #define TLB_DAR_SLOT(slot) ((slot) << TLB_DAR_SLOT_SHIFT) #define TLB_TAR_VA(va) ((va) & ~PAGE_MASK) -#define TLB_TAR_CTX(ctx) (ctx) +#define TLB_TAR_CTX(ctx) ((ctx) & PAGE_MASK) #define TLB_DEMAP_ID_SHIFT (4) #define TLB_DEMAP_ID_PRIMARY (0) @@ -67,6 +67,21 @@ #define TLB_DTLB (1 << 0) #define TLB_ITLB (1 << 1) +#define MMU_SFSR_ASI_SHIFT (16) +#define MMU_SFSR_FT_SHIFT (7) +#define MMU_SFSR_E_SHIFT (6) +#define MMU_SFSR_CT_SHIFT (4) +#define MMU_SFSR_PR_SHIFT (3) +#define MMU_SFSR_W_SHIFT (2) +#define MMU_SFSR_OW_SHIFT (1) +#define MMU_SFSR_FV_SHIFT (0) + +#define MMU_SFSR_ASI_SIZE (8) +#define MMU_SFSR_FT_SIZE (6) +#define MMU_SFSR_CT_SIZE (2) + +#define MMU_SFSR_W (1L << MMU_SFSR_W_SHIFT) + static __inline void tlb_dtlb_page_demap(u_int ctx, vm_offset_t va) { @@ -81,7 +96,8 @@ tlb_dtlb_page_demap(u_int ctx, vm_offset_t va) static __inline void tlb_dtlb_store(vm_offset_t va, struct tte tte) { - stxa(AA_DMMU_TAR, ASI_DMMU, TLB_TAR_VA(va) | TLB_TAR_CTX(0)); + stxa(AA_DMMU_TAR, ASI_DMMU, + TLB_TAR_VA(va) | TLB_TAR_CTX(tte_get_ctx(tte))); stxa(0, ASI_DTLB_DATA_IN_REG, tte.tte_data); membar(Sync); } |