124 It ensures the content of cache is copied down to the main memory. It doesn't necessarily |
124 It ensures the content of cache is copied down to the main memory. It doesn't necessarily |
125 invalidates the content of cache(s). |
125 invalidates the content of cache(s). |
126 On SMP platforms, it only maintains internal cache of the CPU that executes the call. |
126 On SMP platforms, it only maintains internal cache of the CPU that executes the call. |
127 Cache memory common to the all cores (like external cache controllers) are also synchronised. |
127 Cache memory common to the all cores (like external cache controllers) are also synchronised. |
128 @pre Interrupts must be disabled. |
128 @pre Interrupts must be disabled. |
|
129 @deprecated in TB 10.1 Use Cache::CpuRetires and Cache::KernelRetires |
129 */ |
130 */ |
130 IMPORT_C static void AtomicSyncMemory(); |
131 IMPORT_C static void AtomicSyncMemory(); |
131 |
132 |
|
133 /** |
|
134 Synchronises cache(s) of the current CPU with the next memory level (which may also be cache) |
|
135 prior to power off or reboot. Caches in other CPUs and those that are shared among them are not affected. |
|
136 |
|
137 Shut down or reboot sequence should ensure that the context of cache memories is copied down to the main |
|
138 memory prior CPU/cache power off. In order to achieve this goal, the following should be obeyed: |
|
139 - On SMP H/W, any CPU that is about to shut down or reboot should call this method. The very last |
|
140 running CPU should call both this method and Cache::KernelRetires method. |
|
141 - On non-SMP H/W. CPU that is about to shut down or reboot should call this method. Call to |
|
142 Cache::KernelRetires is not required. |
|
143 |
|
144 Both Cache::CpuRetires and Cache::KernelRetires assume that Kernel may not be in stable state (as reboot may |
|
145 be caused by crash), so no attampt will be made to acquire spin lock or call any other Kernel interface. |
|
146 |
|
147 @see Cache::KernelRetires |
|
148 @pre Interrupts must be disabled. |
|
149 @pre Kernel may not be in stable state. |
|
150 */ |
|
151 IMPORT_C static void CpuRetires(); |
|
152 |
|
153 /* |
|
154 Synchronises cache(s) that are shared among CPUs with the main memory prior to power off or reboot. |
|
155 @see Cache::CpuRetires |
|
156 @pre Interrupts must be disabled. |
|
157 @pre Kernel may not be in stable state. |
|
158 @pre All CPUs other than the current CPU are powered down or their reboot sequence is completed. |
|
159 */ |
|
160 IMPORT_C static void KernelRetires(); |
|
161 |
132 /** |
162 /** |
133 Synchronises cache(s) prior to a DMA write (memory to HW DMA transfer) operation. |
163 Synchronises cache(s) prior to a DMA write (memory to HW DMA transfer) operation. |
134 |
164 |
135 The purpose of SyncMemoryBeforeDmaWrite is to make sure that the main memory is synchronised |
165 The purpose of SyncMemoryBeforeDmaWrite is to make sure that the main memory is synchronised |
136 with the content of cache memory before DMA transfer from main memory starts. |
166 with the content of cache memory before DMA transfer from main memory starts. |