summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ff0c4f)
raw | patch | inline | side by side (parent: 1ff0c4f)
author | Lokesh Vutla <lokeshvutla@ti.com> | |
Sun, 22 Nov 2020 06:15:37 +0000 (11:45 +0530) | ||
committer | Lokesh Vutla <lokeshvutla@ti.com> | |
Fri, 11 Dec 2020 12:35:14 +0000 (18:05 +0530) |
Current implementation assumes that HOST_ID 14 is the default host_id
that is used for communicating with sysfw. HOST_ID 14 corresponds to 3rd
instance of non-secure Cortex-A context. It is not guaranteed that host
id 14 is available on all devices. So assign a per device default host
id.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
that is used for communicating with sysfw. HOST_ID 14 corresponds to 3rd
instance of non-secure Cortex-A context. It is not guaranteed that host
id 14 is available on all devices. So assign a per device default host
id.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
common/k3conf.c | patch | blob | history | |
common/socinfo.c | patch | blob | history | |
include/sec_proxy.h | patch | blob | history |
diff --git a/common/k3conf.c b/common/k3conf.c
index b40657d378e21cfc3801a526cb432b86f08127c6..283894e6e3fe5202a45525a56560e7b514a2f2f8 100644 (file)
--- a/common/k3conf.c
+++ b/common/k3conf.c
goto main_exit;
}
- host_id = DEFAULT_HOST_ID;
+ host_id = INVALID_HOST_ID;
if (!strcmp(argv[0], "--host")) {
argc--; argv++;
ret = sscanf(argv[0], "%u", &host_id);
diff --git a/common/socinfo.c b/common/socinfo.c
index 990bbc79b742069327ea738f20818ff0d5773b58..a69aef933d202f000ac69d62a3140c73de81a5a8 100644 (file)
--- a/common/socinfo.c
+++ b/common/socinfo.c
sci_info->num_clocks = AM65X_MAX_CLOCKS;
sci_info->rm_info = am65x_rm_info;
sci_info->num_res = AM65X_MAX_RES;
+ soc_info.host_id = DEFAULT_HOST_ID;
}
static void am654_sr2_init(void)
sci_info->num_clocks = AM65X_SR2_MAX_CLOCKS;
sci_info->rm_info = am65x_sr2_rm_info;
sci_info->num_res = AM65X_SR2_MAX_RES;
+ soc_info.host_id = DEFAULT_HOST_ID;
}
static void j721e_init(void)
sci_info->num_clocks = J721E_MAX_CLOCKS;
sci_info->rm_info = j721e_rm_info;
sci_info->num_res = J721E_MAX_RES;
+ soc_info.host_id = DEFAULT_HOST_ID;
}
static void j7200_init(void)
sci_info->num_clocks = J7200_MAX_CLOCKS;
sci_info->rm_info = j7200_rm_info;
sci_info->num_res = J7200_MAX_RES;
+ soc_info.host_id = DEFAULT_HOST_ID;
}
int soc_init(uint32_t host_id)
strcat(soc_info.soc_full_name, " SR");
strcat(soc_info.soc_full_name, soc_revision[soc_info.rev]);
- soc_info.host_id = host_id;
-
if (soc_info.soc == AM65X && soc_info.rev == REV_SR1_0)
am654_init();
else if (soc_info.soc == AM65X && soc_info.rev == REV_SR2_0)
else if (soc_info.soc == J7200)
j7200_init();
+ if (host_id != INVALID_HOST_ID)
+ soc_info.host_id = host_id;
+
/* ToDo: Add error if sec_proxy_init/sci_init is failed */
if(!k3_sec_proxy_init())
if (!ti_sci_init())
diff --git a/include/sec_proxy.h b/include/sec_proxy.h
index bdc31d9e46856f0b17560173831f754cc3eaae7e..698405b02bf354590b3390597526b274b3a777f6 100644 (file)
--- a/include/sec_proxy.h
+++ b/include/sec_proxy.h
#define __SEC_PROXY_H
#define DEFAULT_HOST_ID 14
+#define INVALID_HOST_ID 0xff
#define DEFAULT_SEC_PROXY_RX_THREAD 21
#define DEFAULT_SEC_PROXY_TX_THREAD 23