aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/PPC/chcore.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-22 16:29:48 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-22 16:29:48 +0000
commit582ace5597d3bdefcd06b8b4ab673f48c81b969c (patch)
tree6266500832e40257d63c4133bcf15bd9de6d83bf /os/ports/GCC/PPC/chcore.h
parent7d197456418a1cfef07417a827489a4d45d27594 (diff)
downloadChibiOS-582ace5597d3bdefcd06b8b4ab673f48c81b969c.tar.gz
ChibiOS-582ace5597d3bdefcd06b8b4ab673f48c81b969c.tar.bz2
ChibiOS-582ace5597d3bdefcd06b8b4ab673f48c81b969c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1660 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/PPC/chcore.h')
-rw-r--r--os/ports/GCC/PPC/chcore.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/os/ports/GCC/PPC/chcore.h b/os/ports/GCC/PPC/chcore.h
index 1351531f5..477b51f59 100644
--- a/os/ports/GCC/PPC/chcore.h
+++ b/os/ports/GCC/PPC/chcore.h
@@ -39,27 +39,46 @@
#define ENABLE_WFI_IDLE 0
#endif
+/* Core variants identifiers.*/
+#define PPC_VARIANT_e200z3 3 /**< e200z3 core identifier. */
+#define PPC_VARIANT_e200z4 4 /**< e200z4 core identifier. */
+
+/**
+ * @brief Core variant selector.
+ * @details This setting affects the predefined architecture strings and
+ * possibly code paths and structures into the port layer.
+ */
+#if !defined(PPC_VARIANT) || defined(__DOXYGEN__)
+#define PPC_VARIANT PPC_VARIANT_e200z3
+#endif
+
/**
* @brief Unique macro for the implemented architecture.
*/
-#define CH_ARCHITECTURE_PPCE200Z
+#define CH_ARCHITECTURE_PPC
/**
* @brief Name of the implemented architecture.
*/
-#define CH_ARCHITECTURE_NAME "PowerPC"
+#define CH_ARCHITECTURE_NAME "PowerPC"
/**
- * @brief Name of the architecture variant (optional).
+ * @brief Name of the architecture variant.
*/
-#define CH_CORE_VARIANT_NAME "e200zX"
+#if (PPC_VARIANT == PPC_VARIANT_e200z3) || defined(__DOXYGEN__)
+#define CH_CORE_VARIANT_NAME "e200z3"
+#elif PPC_VARIANT == PPC_VARIANT_e200z4
+#define CH_CORE_VARIANT_NAME "e200z4"
+#else
+#error "unknown PowerPC variant specified"
+#endif
/**
- * @brief Base type for stack alignment.
- * @details This type is used only for stack alignment reasons thus can be
- * anything from a char to a double.
+ * @brief Base type for stack and memory alignment.
*/
-typedef uint64_t stkalign_t;
+typedef struct {
+ uint8_t a[8];
+} stkalign_t __attribute__((aligned(8)));
/**
* @brief Generic PPC register.