Changeset 7910cff in mainline
- Timestamp:
- 2005-12-11T13:31:33Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a98d2ec
- Parents:
- 442d0ae
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/asm.h
r442d0ae r7910cff 33 33 #include <config.h> 34 34 35 36 void asm_delay_loop(__u32 t); 37 void asm_fake_loop(__u32 t); 35 extern void asm_delay_loop(__u32 t); 36 extern void asm_fake_loop(__u32 t); 38 37 39 38 /** Return base address of current stack. … … 229 228 } 230 229 230 /** Invalidate TLB Entry. 231 * 232 * @param addr Address on a page whose TLB entry is to be invalidated. 233 */ 234 static inline void invlpg(__address addr) 235 { 236 __asm__ volatile ("invlpg %0\n" :: "m" (addr)); 237 } 231 238 232 239 extern size_t interrupt_handler_size; -
arch/ia32/include/asm.h
r442d0ae r7910cff 43 43 44 44 45 void asm_delay_loop(__u32 t);46 void asm_fake_loop(__u32 t);45 extern void asm_delay_loop(__u32 t); 46 extern void asm_fake_loop(__u32 t); 47 47 48 48 … … 236 236 } 237 237 238 /** Invalidate TLB Entry. 239 * 240 * @param addr Address on a page whose TLB entry is to be invalidated. 241 */ 242 static inline void invlpg(__address addr) 243 { 244 __asm__ volatile ("invlpg %0\n" :: "m" (addr)); 245 } 246 238 247 #endif -
arch/ia32/src/mm/tlb.c
r442d0ae r7910cff 30 30 #include <arch/mm/asid.h> 31 31 #include <arch/asm.h> 32 #include <arch/types.h> 32 33 33 34 /** Invalidate all TLB entries … … 41 42 write_cr3(read_cr3()); 42 43 } 44 45 /** Invalidate all entries in TLB. */ 46 void tlb_invalidate_all(void) 47 { 48 write_cr3(read_cr3()); 49 } 50 51 /** Invalidate all entries in TLB that belong to specified address space. 52 * 53 * @param asid This parameter is ignored as the architecture doesn't support it. 54 */ 55 void tlb_invalidate_asid(asid_t asid) 56 { 57 tlb_invalidate_all(); 58 } 59 60 /** Invalidate TLB entry for specified page belongs to specified address space. 61 * 62 * @param asid This parameter is ignored as the architecture doesn't support it. 63 * @param page Address of the page whose entry is to be invalidated. 64 */ 65 void tlb_invalidate_page(asid_t asid, __address page) 66 { 67 invlpg(page); 68 } -
generic/include/mm/tlb.h
r442d0ae r7910cff 31 31 32 32 #include <arch/mm/asid.h> 33 #include <arch/types.h> 33 34 34 35 extern void tlb_init(void); … … 44 45 #endif /* CONFIG_SMP */ 45 46 47 /** Type of TLB shootdown message. */ 48 enum tlb_invalidate_type { 49 TLB_INVL_INVALID = 0, /**< Invalid type. */ 50 TLB_INVL_ALL, /**< Invalidate all entries in TLB. */ 51 TLB_INVL_ASID, /**< Invalidate all entries belonging to one address space. */ 52 TLB_INVL_PAGE /**< Invalidate one entry for specified page. */ 53 }; 54 55 typedef enum tlb_invalidate_type tlb_invalidate_type_t; 56 57 /** TLB shootdown message. */ 58 struct tlb_shootdown_msg { 59 tlb_invalidate_type_t type; /**< Message type. */ 60 asid_t asid; /**< Address space identifier. */ 61 __address page; /**< Page address. */ 62 }; 63 64 typedef struct tlb_shootdown_msg tlb_shootdown_msg_t; 65 46 66 /* Export TLB interface that each architecture must implement. */ 47 67 extern void tlb_arch_init(void); … … 50 70 extern void tlb_shootdown_ipi_send(void); 51 71 72 extern void tlb_invalidate_all(void); 73 extern void tlb_invalidate_asid(asid_t asid); 74 extern void tlb_invalidate_page(asid_t asid, __address page); 75 52 76 #endif
Note:
See TracChangeset
for help on using the changeset viewer.