• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Révision4e9090810a8b6f08dc600d31149aa3c4bb95fb1e (tree)
l'heure2018-03-11 16:51:09
Auteurtakemasa <suikan@user...>
Commitertakemasa

Message de Log

Cache coherency funciton is now architecture dependent.

Change Summary

Modification

--- a/stm32_development/murasaki/murasaki/murasaki_defs.hpp
+++ b/stm32_development/murasaki/murasaki/murasaki_defs.hpp
@@ -103,9 +103,21 @@ static inline bool IsTaskContext()
103103
104104 }
105105
106-
106+/**
107+ * @brief Clean and Flush the specific region of data cache.
108+ * @param address Start address of region
109+ * @param size Size of region
110+ * @details
111+ * Keep coherency between the L2 memory and d-cache, between specific region.
112+ *
113+ * The region is specified by address and size. If address si not 32byte aligned,
114+ * it is truncated to the 32byte alighment, and size is adjusted to follow this alighment.
115+ *
116+ * Once this funciton is returned, the specific region is coherent.
117+ */
107118 static inline void InvalidateDataCacheByAddress(void * address, size_t size)
108119 {
120+#ifdef __CORE_CM7_H_GENERIC
109121 unsigned int aligned_address = reinterpret_cast<unsigned int>(address);
110122
111123 // extract modulo 32. The address have to be aligned to 32byte.
@@ -115,6 +127,11 @@ static inline void InvalidateDataCacheByAddress(void * address, size_t size)
115127 size += adjustment; // Because the start address is lower, the size is bigger.
116128
117129 ::SCB_InvalidateDCache_by_Addr(reinterpret_cast<long unsigned int *>(aligned_address), size);
130+#elif defined ( __CORE_CM0_H_GENERIC ) ||defined ( __CORE_CM0PLUS_H_GENERIC ) ||defined ( __CORE_CM3_H_GENERIC ) ||defined ( __CORE_CM4_H_GENERIC ) ||
131+ // Do nothing. These core doesn't have d-cache.
132+#else
133+#error "Unknown core"
134+#endif
118135 }
119136
120137 /**