aboutsummaryrefslogtreecommitdiffstats
path: root/os
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
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')
-rw-r--r--os/kernel/templates/chcore.h4
-rw-r--r--os/ports/GCC/PPC/SPC56x/vectors.s2
-rw-r--r--os/ports/GCC/PPC/chcore.h35
-rw-r--r--os/various/shell.c21
4 files changed, 46 insertions, 16 deletions
diff --git a/os/kernel/templates/chcore.h b/os/kernel/templates/chcore.h
index 0e78dbcf5..e3fa8f0b9 100644
--- a/os/kernel/templates/chcore.h
+++ b/os/kernel/templates/chcore.h
@@ -46,9 +46,7 @@
#define CH_ARCHITECTURE_VARIANT_NAME ""
/**
- * @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 uint8_t stkalign_t;
diff --git a/os/ports/GCC/PPC/SPC56x/vectors.s b/os/ports/GCC/PPC/SPC56x/vectors.s
index 4b7e68ffe..3c8aed6a6 100644
--- a/os/ports/GCC/PPC/SPC56x/vectors.s
+++ b/os/ports/GCC/PPC/SPC56x/vectors.s
@@ -40,7 +40,7 @@
* override the weak symbol declared here.
*/
.section .vectors
- .align 2
+ .align 4
.globl _vectors
_vectors:
.long vector0
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.
diff --git a/os/various/shell.c b/os/various/shell.c
index 41c78b1d8..8a0fd4d45 100644
--- a/os/various/shell.c
+++ b/os/various/shell.c
@@ -28,6 +28,7 @@
#include <string.h>
#include "ch.h"
+#include "hal.h"
#include "shell.h"
#if SHELL_USE_IPRINTF
@@ -84,14 +85,26 @@ static void cmd_info(BaseChannel *chp, int argc, char *argv[]) {
return;
}
- shellPrint(chp, "Kernel version ");
+ shellPrint(chp, "Kernel version: ");
shellPrintLine(chp, CH_KERNEL_VERSION);
- shellPrint(chp, "Architecture ");
- shellPrintLine(chp, CH_ARCHITECTURE_NAME);
#ifdef __GNUC__
- shellPrint(chp, "GCC Version ");
+ shellPrint(chp, "GCC Version: ");
shellPrintLine(chp, __VERSION__);
#endif
+ shellPrint(chp, "Architecture: ");
+ shellPrintLine(chp, CH_ARCHITECTURE_NAME);
+#ifdef CH_CORE_VARIANT_NAME
+ shellPrint(chp, "Core Variant: ");
+ shellPrintLine(chp, CH_CORE_VARIANT_NAME);
+#endif
+#ifdef PLATFORM_NAME
+ shellPrint(chp, "Platform: ");
+ shellPrintLine(chp, PLATFORM_NAME);
+#endif
+#ifdef BOARD_NAME
+ shellPrint(chp, "Board: ");
+ shellPrintLine(chp, BOARD_NAME);
+#endif
}
static void cmd_systime(BaseChannel *chp, int argc, char *argv[]) {