Changeset 1eb154f in mainline for boot/arch/sparc64/loader/asm.S
- Timestamp:
- 2008-06-15T11:07:37Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3527a93
- Parents:
- c711efe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc64/loader/asm.S
rc711efe r1eb154f 100 100 jump_to_kernel: 101 101 /* 102 * Make sure that the code we have moved has drained to main memory.103 * We have a reason to assume that the I-cache does not include the104 * code to which we are going to pass control. Hence no I-cache105 * invalidation.102 * We have copied code and now we need to guarantee cache coherence. 103 * 1. Make sure that the code we have moved has drained to main memory. 104 * 2. Invalidate I-cache. 105 * 3. Flush instruction pipeline. 106 106 */ 107 membar #StoreStore 107 call icache_flush 108 membar #StoreStore 109 flush %i7 108 110 109 111 mov %o0, %l1 … … 112 114 mov %o3, %o2 113 115 jmp %l1 ! jump to kernel 116 nop 117 118 #define ICACHE_SIZE 8192 119 #define ICACHE_LINE_SIZE 32 120 #define ICACHE_SET_BIT (1 << 13) 121 #define ASI_ICACHE_TAG 0x67 122 123 # Flush I-cache 124 icache_flush: 125 set ((ICACHE_SIZE - ICACHE_LINE_SIZE) | ICACHE_SET_BIT), %g1 126 stxa %g0, [%g1] ASI_ICACHE_TAG 127 0: membar #Sync 128 subcc %g1, ICACHE_LINE_SIZE, %g1 129 bnz,pt %xcc, 0b 130 stxa %g0, [%g1] ASI_ICACHE_TAG 131 membar #Sync 132 retl 133 ! SF Erratum #51 114 134 nop 115 135
Note:
See TracChangeset
for help on using the changeset viewer.