Rev 3398 | Rev 3549 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3398 | Rev 3479 | ||
|---|---|---|---|
| Line 106... | Line 106... | ||
| 106 | * 2. Invalidate I-cache. |
106 | * 2. Invalidate I-cache. |
| 107 | * 3. Flush instruction pipeline. |
107 | * 3. Flush instruction pipeline. |
| 108 | */ |
108 | */ |
| 109 | 109 | ||
| 110 | /* |
110 | /* |
| 111 | * US-III processors have a write-invalidate cache, so flushing it is |
111 | * US3 processors have a write-invalidate cache, so explicitly |
| - | 112 | * invalidating it is not required. Whether to invalidate I-cache |
|
| 112 | * not required. We only use the FLUSH instruction to flush the |
113 | * or not is decided according to the value of the ver.impl bits |
| 113 | * pipeline. |
114 | * in the Version register. |
| 114 | */ |
115 | */ |
| - | 116 | sethi 0x40000, %g0 |
|
| - | 117 | ! the lowest/greatest value of ver.impl for US3 |
|
| - | 118 | #define FIRST_US3_CPU 0x14 |
|
| - | 119 | #define LAST_US3_CPU 0x19 |
|
| - | 120 | rdpr %ver, %g2 ! autodetect CPU using the Version register |
|
| - | 121 | sllx %g2, 16, %g2 ! extract ver.impl bits |
|
| - | 122 | srlx %g2, 48, %g2 |
|
| - | 123 | addcc %g2, -FIRST_US3_CPU, %g0 ! flush if ver.impl < FISRT_US3_CPU |
|
| - | 124 | bl 0f |
|
| - | 125 | nop |
|
| - | 126 | addcc %g2, -LAST_US3_CPU, %g0 ! flush if ver.impl > LAST_US3_CPU |
|
| - | 127 | bg 0f |
|
| - | 128 | nop |
|
| 115 | #ifdef US |
129 | ba 1f |
| - | 130 | nop |
|
| - | 131 | 0: |
|
| 116 | call icache_flush |
132 | call icache_flush |
| 117 | #endif |
133 | nop |
| - | 134 | 1: |
|
| 118 | 135 | ||
| 119 | membar #StoreStore |
136 | membar #StoreStore |
| - | 137 | ||
| - | 138 | /* |
|
| - | 139 | * Flush the instruction pipeline. |
|
| - | 140 | */ |
|
| 120 | flush %i7 |
141 | flush %i7 |
| 121 | 142 | ||
| 122 | mov %o0, %l1 |
143 | mov %o0, %l1 |
| 123 | mov %o1, %o0 |
144 | mov %o1, %o0 |
| 124 | mov %o2, %o1 |
145 | mov %o2, %o1 |
| Line 141... | Line 162... | ||
| 141 | stxa %g0, [%g1] ASI_ICACHE_TAG |
162 | stxa %g0, [%g1] ASI_ICACHE_TAG |
| 142 | membar #Sync |
163 | membar #Sync |
| 143 | retl |
164 | retl |
| 144 | ! SF Erratum #51 |
165 | ! SF Erratum #51 |
| 145 | nop |
166 | nop |
| 146 | - | ||
| 147 | .global ofw |
167 | .global ofw |
| 148 | ofw: |
168 | ofw: |
| 149 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
169 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
| 150 | set ofw_cif, %l0 |
170 | set ofw_cif, %l0 |
| 151 | ldx [%l0], %l0 |
171 | ldx [%l0], %l0 |