Changeset 8c2214e in mainline for kernel/arch/sparc64/include/mm/sun4v
- Timestamp:
- 2010-02-20T20:29:27Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f516bc2
- Parents:
- e0cb57b
- Location:
- kernel/arch/sparc64/include/mm/sun4v
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/mm/sun4v/frame.h
re0cb57b r8c2214e 33 33 */ 34 34 35 #ifndef KERN_sparc64_ SUN4V_FRAME_H_36 #define KERN_sparc64_ SUN4V_FRAME_H_35 #ifndef KERN_sparc64_sun4v_FRAME_H_ 36 #define KERN_sparc64_sun4v_FRAME_H_ 37 37 38 /*39 * Page size supported by the MMU.40 * For 8K there is the nasty illegal virtual aliasing problem.41 * Therefore, the kernel uses 8K only internally on the TLB and TSB levels.42 */43 38 #define MMU_FRAME_WIDTH 13 /* 8K */ 44 39 #define MMU_FRAME_SIZE (1 << MMU_FRAME_WIDTH) … … 52 47 #include <arch/types.h> 53 48 54 union frame_address { 55 uintptr_t address; 56 struct { 57 #if defined (US) 58 unsigned : 23; 59 uint64_t pfn : 28; /**< Physical Frame Number. */ 60 #elif defined (US3) 61 unsigned : 21; 62 uint64_t pfn : 30; /**< Physical Frame Number. */ 63 #endif 64 unsigned offset : 13; /**< Offset. */ 65 } __attribute__ ((packed)); 66 }; 67 68 typedef union frame_address frame_address_t; 69 49 extern uintptr_t last_frame; 70 50 extern void frame_arch_init(void); 71 51 #define physmem_print() -
kernel/arch/sparc64/include/mm/sun4v/mmu.h
re0cb57b r8c2214e 45 45 #define ASI_SECONDARY_CONTEXT_REG 0x21 /**< secondary context register ASI. */ 46 46 47 48 49 50 51 52 53 54 55 56 57 /* I-MMU ASIs. */58 #define ASI_IMMU 0x5059 #define ASI_IMMU_TSB_8KB_PTR_REG 0x5160 #define ASI_IMMU_TSB_64KB_PTR_REG 0x5261 #define ASI_ITLB_DATA_IN_REG 0x5462 #define ASI_ITLB_DATA_ACCESS_REG 0x5563 #define ASI_ITLB_TAG_READ_REG 0x5664 #define ASI_IMMU_DEMAP 0x5765 66 /* Virtual Addresses within ASI_IMMU. */67 #define VA_IMMU_TSB_TAG_TARGET 0x0 /**< IMMU TSB tag target register. */68 #define VA_IMMU_SFSR 0x18 /**< IMMU sync fault status register. */69 #define VA_IMMU_TSB_BASE 0x28 /**< IMMU TSB base register. */70 #define VA_IMMU_TAG_ACCESS 0x30 /**< IMMU TLB tag access register. */71 #if defined (US3)72 #define VA_IMMU_PRIMARY_EXTENSION 0x48 /**< IMMU TSB primary extension register */73 #define VA_IMMU_NUCLEUS_EXTENSION 0x58 /**< IMMU TSB nucleus extension register */74 #endif75 76 77 /* D-MMU ASIs. */78 #define ASI_DMMU 0x5879 #define ASI_DMMU_TSB_8KB_PTR_REG 0x5980 #define ASI_DMMU_TSB_64KB_PTR_REG 0x5a81 #define ASI_DMMU_TSB_DIRECT_PTR_REG 0x5b82 #define ASI_DTLB_DATA_IN_REG 0x5c83 #define ASI_DTLB_DATA_ACCESS_REG 0x5d84 #define ASI_DTLB_TAG_READ_REG 0x5e85 #define ASI_DMMU_DEMAP 0x5f86 87 /* Virtual Addresses within ASI_DMMU. */88 #define VA_DMMU_TSB_TAG_TARGET 0x0 /**< DMMU TSB tag target register. */89 #define VA_PRIMARY_CONTEXT_REG 0x8 /**< DMMU primary context register. */90 #define VA_SECONDARY_CONTEXT_REG 0x10 /**< DMMU secondary context register. */91 #define VA_DMMU_SFSR 0x18 /**< DMMU sync fault status register. */92 #define VA_DMMU_SFAR 0x20 /**< DMMU sync fault address register. */93 #define VA_DMMU_TSB_BASE 0x28 /**< DMMU TSB base register. */94 #define VA_DMMU_TAG_ACCESS 0x30 /**< DMMU TLB tag access register. */95 #define VA_DMMU_VA_WATCHPOINT_REG 0x38 /**< DMMU VA data watchpoint register. */96 #define VA_DMMU_PA_WATCHPOINT_REG 0x40 /**< DMMU PA data watchpoint register. */97 #if defined (US3)98 #define VA_DMMU_PRIMARY_EXTENSION 0x48 /**< DMMU TSB primary extension register */99 #define VA_DMMU_SECONDARY_EXTENSION 0x50 /**< DMMU TSB secondary extension register */100 #define VA_DMMU_NUCLEUS_EXTENSION 0x58 /**< DMMU TSB nucleus extension register */101 #endif102 103 #ifndef __ASM__104 105 #include <arch/asm.h>106 #include <arch/barrier.h>107 #include <arch/types.h>108 109 #if defined(US)110 /** LSU Control Register. */111 typedef union {112 uint64_t value;113 struct {114 unsigned : 23;115 unsigned pm : 8;116 unsigned vm : 8;117 unsigned pr : 1;118 unsigned pw : 1;119 unsigned vr : 1;120 unsigned vw : 1;121 unsigned : 1;122 unsigned fm : 16;123 unsigned dm : 1; /**< D-MMU enable. */124 unsigned im : 1; /**< I-MMU enable. */125 unsigned dc : 1; /**< D-Cache enable. */126 unsigned ic : 1; /**< I-Cache enable. */127 128 } __attribute__ ((packed));129 } lsu_cr_reg_t;130 #endif /* US */131 132 #endif /* !def __ASM__ */133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 47 #endif 150 48 -
kernel/arch/sparc64/include/mm/sun4v/tsb.h
re0cb57b r8c2214e 71 71 struct pte; 72 72 73 extern void tsb_invalidate(struct as *as, uintptr_t page, count_t pages);73 extern void tsb_invalidate(struct as *as, uintptr_t page, uint64_t pages); 74 74 extern void itsb_pte_copy(struct pte *t); 75 75 extern void dtsb_pte_copy(struct pte *t, bool ro);
Note:
See TracChangeset
for help on using the changeset viewer.
