From 10b4e90a04d13dbc9bceb35c291aebf584050b44 Mon Sep 17 00:00:00 2001 From: Luiz Souza Date: Thu, 11 May 2017 22:48:37 -0500 Subject: Export more information about ARM CPUs and SoCs. (cherry picked from commit 98135cfa4ef6f8bed339d3994e69b2cc6fb7a343) --- sys/arm/mv/mv_common.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/arm/mv') diff --git a/sys/arm/mv/mv_common.c b/sys/arm/mv/mv_common.c index 497860f..cf54a2a 100644 --- a/sys/arm/mv/mv_common.c +++ b/sys/arm/mv/mv_common.c @@ -391,6 +391,7 @@ static void soc_identify(void) { uint32_t d, r, size, mode; + char tmp[128]; const char *dev; const char *rev; @@ -480,10 +481,19 @@ soc_identify(void) break; } + memset(tmp, 0, sizeof(tmp)); + memset(mv_soc_model, 0, sizeof(mv_soc_model)); + snprintf(mv_soc_model, sizoef(mv_soc_model) - 1, "%s", dev); printf("%s", dev); - if (*rev != '\0') + if (*rev != '\0') { printf(" rev %s", rev); + snprintf(tmp, sizeof(tmp) - 1, " rev %s", rev); + strlcat(mv_soc_model, tmp, sizeof(mv_soc_model)); + } printf(", TClock %dMHz\n", get_tclk() / 1000 / 1000); + snprintf(tmp, sizeof(tmp) - 1, ", TClock %dMHz\n", + get_tclk() / 1000 / 1000); + strlcat(mv_soc_model, tmp, sizeof(mv_soc_model)); mode = read_cpu_ctrl(CPU_CONFIG); printf(" Instruction cache prefetch %s, data cache prefetch %s\n", -- cgit v1.1