From eeb90a6bef79d769f5069759679eb15d2d4dd7d2 Mon Sep 17 00:00:00 2001 From: Tsutomu Muroya Date: Tue, 16 May 2023 09:34:29 +0900 Subject: [PATCH 17/20] iccom: Add get OS mode Signed-off-by: Tsutomu Muroya --- examples/cortex-a/armv8/spider/iccom/iccom.c | 9 +++++++++ examples/cortex-a/armv8/spider/iccom/iccom_commands.h | 1 + 2 files changed, 10 insertions(+) diff --git a/examples/cortex-a/armv8/spider/iccom/iccom.c b/examples/cortex-a/armv8/spider/iccom/iccom.c index 557b8ebb..1d69d876 100644 --- a/examples/cortex-a/armv8/spider/iccom/iccom.c +++ b/examples/cortex-a/armv8/spider/iccom/iccom.c @@ -23,6 +23,8 @@ enum ICCOM_MSG { #define TIMER_TICK_INTERVAL_NS (125U) #define TIMER_TICKS_PER_MS (1000000U/TIMER_TICK_INTERVAL_NS) #define HOST_INT_CLEAR_TIMEOUT_MS (500U*TIMER_TICKS_PER_MS) +#define OS_NAME "Trampoline" +#define OS_NAME_SIZE 10 uint8 iccom_initalized = 0; struct echo_command recv_pkt; @@ -110,6 +112,13 @@ static void iccom_handle_rx_msg(size_t size) break; } + case OS: { + struct echo_reply* reply_pkt = iccom_cta_write_cta_ptr(); + memcpy(reply_pkt, OS_NAME, OS_NAME_SIZE); + iccom_send((uint8*)reply_pkt, OS_NAME_SIZE, 0); + break; + } + default: break; } diff --git a/examples/cortex-a/armv8/spider/iccom/iccom_commands.h b/examples/cortex-a/armv8/spider/iccom/iccom_commands.h index a443ecce..a7f387eb 100644 --- a/examples/cortex-a/armv8/spider/iccom/iccom_commands.h +++ b/examples/cortex-a/armv8/spider/iccom/iccom_commands.h @@ -22,6 +22,7 @@ enum iccom_command { NONE = 0, ECHO, + OS, }; #define TOTAL_CTA_SIZE 0x2000 -- 2.34.1