[Cbe-oss-dev] [PATCH 1/9]MARS: Minor cleanup
Yuji Mano
yuji.mano at am.sony.com
Sat Oct 18 10:28:39 EST 2008
This includes minor moving around of code with no functional changes in
preparation for next patch.
Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
---
include/common/mars/task_types.h | 83 ++++++++++-----------------------------
1 file changed, 22 insertions(+), 61 deletions(-)
--- a/include/common/mars/task_types.h
+++ b/include/common/mars/task_types.h
@@ -48,64 +48,41 @@
/**
* \ingroup group_mars_task
- * \brief Arguments structure size
+ * \brief Virtual Address of task elf
*/
-#define MARS_TASK_ARGS_SIZE 32
+#define MARS_TASK_ELF_VADDR 0x10000
/**
* \ingroup group_mars_task
- * \brief Arguments structure alignment
+ * \brief Max length of task name
*/
-#define MARS_TASK_ARGS_ALIGN 16
+#define MARS_TASK_NAME_LEN_MAX 21
-/**
- * \ingroup group_mars_task
- * \brief ID structure alignment
- */
+/* internal task context defines */
#define MARS_TASK_ID_SIZE 32
-
-/**
- * \ingroup group_mars_task
- * \brief ID structure alignment
- */
#define MARS_TASK_ID_ALIGN 16
-
-/**
- * \ingroup group_mars_task
- * \brief Context structure size
- */
+#define MARS_TASK_ARGS_SIZE 32
+#define MARS_TASK_ARGS_ALIGN 16
#define MARS_TASK_CONTEXT_SIZE 128
-
-/**
- * \ingroup group_mars_task
- * \brief Context structure alignment
- */
#define MARS_TASK_CONTEXT_ALIGN 16
-
-/**
- * \ingroup group_mars_task
- * \brief Context save area alignment
- */
#define MARS_TASK_CONTEXT_SAVE_ALIGN 128
-
-/**
- * \ingroup group_mars_task
- * \brief Max context save area size
- * (LS size - task LS addr)
- */
#define MARS_TASK_CONTEXT_SAVE_SIZE_MAX 0x30000
/**
* \ingroup group_mars_task
- * \brief Max length of task name
- */
-#define MARS_TASK_NAME_LEN_MAX 21
-
-/**
- * \ingroup group_mars_task
- * \brief Virtual Address of task elf
+ * \brief MARS task id structure
+ *
+ * This structure is initialized during MARS task initialization and returned
+ * when calling \ref mars_task_initialize.
+ *
+ * An instance of this structure must be kept until the task is finalized by
+ * calling \ref mars_task_finalize.
*/
-#define MARS_TASK_ELF_VADDR 0x10000
+struct mars_task_id {
+ uint64_t mars_context_ea;
+ uint16_t workload_id;
+ uint8_t name[MARS_TASK_NAME_LEN_MAX + 1];
+} __attribute__((aligned(MARS_TASK_ID_ALIGN)));
/**
* \ingroup group_mars_task
@@ -121,7 +98,7 @@
struct mars_task_args {
union {
/** array of 32 8-bit unsigned ints */
- uint8_t u8[32];
+ uint8_t u8[32];
/** array of 16 16-bit unsigned ints */
uint16_t u16[16];
/** array of 8 32-bit unsigned ints */
@@ -131,22 +108,6 @@ struct mars_task_args {
} type;
} __attribute__((aligned(MARS_TASK_ARGS_ALIGN)));
-/**
- * \ingroup group_mars_task
- * \brief MARS task id structure
- *
- * This structure is initialized during MARS task initialization and returned
- * when calling \ref mars_task_initialize.
- *
- * An instance of this structure must be kept until the task is finalized by
- * calling \ref mars_task_finalize.
- */
-struct mars_task_id {
- uint64_t mars_context_ea;
- uint16_t workload_id;
- uint8_t name[MARS_TASK_NAME_LEN_MAX + 1];
-} __attribute__((aligned(MARS_TASK_ID_ALIGN)));
-
struct mars_task_context {
struct mars_task_id id; /* task id */
struct mars_task_args args; /* task args */
@@ -158,8 +119,8 @@ struct mars_task_context {
uint32_t stack; /* stack pointer of exec */
uint32_t context_save_size; /* context save size */
uint64_t context_save_ea; /* context save ea */
- int32_t exit_code; /* exit code */
- uint8_t pad[20]; /* padding */
+ int32_t exit_code; /* exit code */
+ uint8_t pad[20]; /* padding */
} __attribute__((aligned(MARS_TASK_CONTEXT_ALIGN)));
#endif
More information about the cbe-oss-dev
mailing list