mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 11:34:20 +00:00
refactor(tc): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files to "RSE" and "rse". Signed-off-by: Tamas Ban <tamas.ban@arm.com> Change-Id: Idec0bf7a90ae381f5bc968e1bb167daace24a11f
This commit is contained in:
parent
624c9a0b38
commit
7f8589cdba
19 changed files with 119 additions and 119 deletions
|
@ -193,11 +193,11 @@
|
|||
|
||||
/*
|
||||
* In the current implementation the RoT Service request that requires the
|
||||
* biggest message buffer is the RSS_DELEGATED_ATTEST_GET_PLATFORM_TOKEN. The
|
||||
* biggest message buffer is the RSE_DELEGATED_ATTEST_GET_PLATFORM_TOKEN. The
|
||||
* maximum required buffer size is calculated based on the platform-specific
|
||||
* needs of this request.
|
||||
*/
|
||||
#define PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE 0x500
|
||||
#define PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE 0x500
|
||||
|
||||
#define TC_DEVICE_BASE 0x21000000
|
||||
#define TC_DEVICE_SIZE 0x5f000000
|
||||
|
@ -279,13 +279,13 @@
|
|||
|
||||
/* Index of SDS region used in the communication with SCP */
|
||||
#define SDS_SCP_AP_REGION_ID U(0)
|
||||
/* Index of SDS region used in the communication with RSS */
|
||||
#define SDS_RSS_AP_REGION_ID U(1)
|
||||
/* Index of SDS region used in the communication with RSE */
|
||||
#define SDS_RSE_AP_REGION_ID U(1)
|
||||
/*
|
||||
* Memory region for RSS's shared data storage (SDS)
|
||||
* Memory region for RSE's shared data storage (SDS)
|
||||
* It is placed right after the SCMI payload area.
|
||||
*/
|
||||
#define PLAT_ARM_RSS_AP_SDS_MEM_BASE (CSS_SCMI_PAYLOAD_BASE + \
|
||||
#define PLAT_ARM_RSE_AP_SDS_MEM_BASE (CSS_SCMI_PAYLOAD_BASE + \
|
||||
CSS_SCMI_PAYLOAD_SIZE_MAX)
|
||||
|
||||
#define PLAT_ARM_CLUSTER_COUNT U(1)
|
||||
|
@ -306,9 +306,9 @@
|
|||
#endif /* TARGET_PLATFORM == 3 */
|
||||
#define PLAT_MHUV2_BASE PLAT_CSS_MHU_BASE
|
||||
|
||||
/* TC2: AP<->RSS MHUs */
|
||||
#define PLAT_RSS_AP_SND_MHU_BASE UL(0x2A840000)
|
||||
#define PLAT_RSS_AP_RCV_MHU_BASE UL(0x2A850000)
|
||||
/* TC2: AP<->RSE MHUs */
|
||||
#define PLAT_RSE_AP_SND_MHU_BASE UL(0x2A840000)
|
||||
#define PLAT_RSE_AP_RCV_MHU_BASE UL(0x2A850000)
|
||||
|
||||
#define CSS_SYSTEM_PWR_DMN_LVL ARM_PWR_LVL2
|
||||
#define PLAT_MAX_PWR_LVL ARM_PWR_LVL1
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define TC_PLAT_H
|
||||
|
||||
#ifdef PLATFORM_TEST_ROTPK
|
||||
#include <rss_crypto_defs.h>
|
||||
#include <rse_crypto_defs.h>
|
||||
#endif
|
||||
|
||||
void tc_bl31_common_platform_setup(void);
|
||||
|
@ -23,7 +23,7 @@ int nv_counter_test(void);
|
|||
|
||||
#ifdef PLATFORM_TEST_ROTPK
|
||||
struct key_id_info {
|
||||
enum rss_key_id_builtin_t key_id;
|
||||
enum rse_key_id_builtin_t key_id;
|
||||
const char *key_id_name;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include "rss_platform_api.h"
|
||||
#include "rse_platform_api.h"
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
|
@ -20,30 +20,30 @@ int nv_counter_test(void)
|
|||
uint32_t new_val;
|
||||
uint32_t id;
|
||||
|
||||
status = rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE, PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
status = rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE, PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed to initialize RSS communication channel - psa_status = %d\n", status);
|
||||
printf("Failed to initialize RSE communication channel - psa_status = %d\n", status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (id = 0; id < 3; id++) {
|
||||
status = rss_platform_nv_counter_read(id, sizeof(old_val), (uint8_t *)&old_val);
|
||||
status = rse_platform_nv_counter_read(id, sizeof(old_val), (uint8_t *)&old_val);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed during first id=(%d) rss_platform_nv_counter_read - psa_status = %d\n",
|
||||
printf("Failed during first id=(%d) rse_platform_nv_counter_read - psa_status = %d\n",
|
||||
id, status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = rss_platform_nv_counter_increment(id);
|
||||
status = rse_platform_nv_counter_increment(id);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed during id=(%d) rss_platform_nv_counter_increment - psa_status = %d\n",
|
||||
printf("Failed during id=(%d) rse_platform_nv_counter_increment - psa_status = %d\n",
|
||||
id, status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
status = rss_platform_nv_counter_read(id, sizeof(new_val), (uint8_t *)&new_val);
|
||||
status = rse_platform_nv_counter_read(id, sizeof(new_val), (uint8_t *)&new_val);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed during second id=(%d) rss_platform_nv_counter_read - psa_status = %d\n",
|
||||
printf("Failed during second id=(%d) rse_platform_nv_counter_read - psa_status = %d\n",
|
||||
id, status);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -10,28 +10,28 @@
|
|||
|
||||
#include "uuid.h"
|
||||
|
||||
#define UUID_RSS_FIRMWARE_BL1_2 \
|
||||
#define UUID_RSE_FIRMWARE_BL1_2 \
|
||||
{{0x0a, 0xa5, 0xb1, 0xbe}, {0xe7, 0x84}, {0x41, 0xc5}, 0x81, 0xb8, {0x4a, 0x41, 0xcb, 0x4a, 0xd2, 0xdf}}
|
||||
|
||||
#define UUID_RSS_FIRMWARE_BL2 \
|
||||
#define UUID_RSE_FIRMWARE_BL2 \
|
||||
{{0xa3, 0xb3, 0xb3, 0x0d}, {0xeb, 0xc9}, {0x40, 0x48}, 0xb4, 0x80, {0x15, 0x53, 0x61, 0xc1, 0x70, 0x48}}
|
||||
|
||||
#define UUID_RSS_FIRMWARE_SCP_BL1 \
|
||||
#define UUID_RSE_FIRMWARE_SCP_BL1 \
|
||||
{{0xbf, 0xd5, 0x09, 0x8d}, {0xa7, 0x07}, {0x4f, 0x15}, 0x89, 0x1c, {0x37, 0x22, 0x10, 0xcb, 0x51, 0xe2}}
|
||||
|
||||
#define UUID_RSS_FIRMWARE_AP_BL1 \
|
||||
#define UUID_RSE_FIRMWARE_AP_BL1 \
|
||||
{{0x12, 0x4c, 0x50, 0xe0}, {0xf2, 0xda}, {0x45, 0xe9}, 0x85, 0xc8, {0xda, 0xd9, 0x60, 0x9b, 0x7a, 0x11}}
|
||||
|
||||
#define UUID_RSS_FIRMWARE_NS \
|
||||
#define UUID_RSE_FIRMWARE_NS \
|
||||
{{0x8d, 0x95, 0x9f, 0x72}, {0xb8, 0xb1}, {0x42, 0x11}, 0x9a, 0xe6, {0x4b, 0x80, 0x97, 0x47, 0x5a, 0xd9}}
|
||||
|
||||
#define UUID_RSS_FIRMWARE_S \
|
||||
#define UUID_RSE_FIRMWARE_S \
|
||||
{{0x22, 0xea, 0x33, 0x85}, {0xf8, 0x6e}, {0x47, 0x93}, 0x96, 0x8a, {0x2f, 0xe3, 0xdd, 0x50, 0x33, 0xcc}}
|
||||
|
||||
#define UUID_RSS_SIC_TABLES_NS \
|
||||
#define UUID_RSE_SIC_TABLES_NS \
|
||||
{{0xd9, 0x10, 0x00, 0x72}, {0x6a, 0x28}, {0x4b, 0xec}, 0xb0, 0xd6, {0x8c, 0xed, 0xc4, 0x15, 0x7c, 0xe0}}
|
||||
|
||||
#define UUID_RSS_SIC_TABLES_S \
|
||||
#define UUID_RSE_SIC_TABLES_S \
|
||||
{{0xc7, 0x38, 0xd0, 0xde}, {0x8c, 0x26}, {0x48, 0x51}, 0x93, 0x36, {0xf3, 0xdb, 0xe2, 0x96, 0x65, 0x18}}
|
||||
|
||||
#endif /* __PLAT_DEF_FIP_UUID__ */
|
||||
|
|
|
@ -173,20 +173,20 @@ $(eval $(call TOOL_ADD_PAYLOAD,${TC_HW_CONFIG},--hw-config,${TC_HW_CONFIG}))
|
|||
# Include Measured Boot makefile before any Crypto library makefile.
|
||||
# Crypto library makefile may need default definitions of Measured Boot build
|
||||
# flags present in Measured Boot makefile.
|
||||
$(info Including rss_comms.mk)
|
||||
$(info Including rse_comms.mk)
|
||||
ifeq (${MEASURED_BOOT},1)
|
||||
$(info Including rss_comms.mk)
|
||||
include drivers/arm/rss/rss_comms.mk
|
||||
$(info Including rse_comms.mk)
|
||||
include drivers/arm/rse/rse_comms.mk
|
||||
|
||||
BL1_SOURCES += ${RSS_COMMS_SOURCES}
|
||||
BL2_SOURCES += ${RSS_COMMS_SOURCES}
|
||||
BL1_SOURCES += ${RSE_COMMS_SOURCES}
|
||||
BL2_SOURCES += ${RSE_COMMS_SOURCES}
|
||||
PLAT_INCLUDES += -Iinclude/lib/psa
|
||||
|
||||
ifeq (${DICE_PROTECTION_ENVIRONMENT},1)
|
||||
$(info Including qcbor.mk)
|
||||
include drivers/measured_boot/rss/qcbor.mk
|
||||
include drivers/measured_boot/rse/qcbor.mk
|
||||
$(info Including dice_prot_env.mk)
|
||||
include drivers/measured_boot/rss/dice_prot_env.mk
|
||||
include drivers/measured_boot/rse/dice_prot_env.mk
|
||||
|
||||
BL1_SOURCES += ${QCBOR_SOURCES} \
|
||||
${DPE_SOURCES} \
|
||||
|
@ -206,8 +206,8 @@ ifeq (${MEASURED_BOOT},1)
|
|||
PLAT_INCLUDES += -I${QCBOR_INCLUDES} \
|
||||
-Iinclude/lib/dice
|
||||
else
|
||||
$(info Including rss_measured_boot.mk)
|
||||
include drivers/measured_boot/rss/rss_measured_boot.mk
|
||||
$(info Including rse_measured_boot.mk)
|
||||
include drivers/measured_boot/rse/rse_measured_boot.mk
|
||||
|
||||
BL1_SOURCES += ${MEASURED_BOOT_SOURCES} \
|
||||
plat/arm/board/tc/tc_common_measured_boot.c \
|
||||
|
|
|
@ -5,42 +5,42 @@
|
|||
|
||||
$(eval $(call add_define,PLATFORM_TESTS))
|
||||
|
||||
ifeq (${PLATFORM_TEST},rss-nv-counters)
|
||||
include drivers/arm/rss/rss_comms.mk
|
||||
ifeq (${PLATFORM_TEST},rse-nv-counters)
|
||||
include drivers/arm/rse/rse_comms.mk
|
||||
|
||||
# Test code.
|
||||
BL31_SOURCES += plat/arm/board/tc/nv_counter_test.c
|
||||
|
||||
# Code under testing.
|
||||
BL31_SOURCES += lib/psa/rss_platform.c \
|
||||
${RSS_COMMS_SOURCES}
|
||||
BL31_SOURCES += lib/psa/rse_platform.c \
|
||||
${RSE_COMMS_SOURCES}
|
||||
|
||||
PLAT_INCLUDES += -Iinclude/lib/psa
|
||||
|
||||
$(eval $(call add_define,PLATFORM_TEST_NV_COUNTERS))
|
||||
else ifeq (${PLATFORM_TEST},rss-rotpk)
|
||||
include drivers/arm/rss/rss_comms.mk
|
||||
else ifeq (${PLATFORM_TEST},rse-rotpk)
|
||||
include drivers/arm/rse/rse_comms.mk
|
||||
|
||||
# Test code.
|
||||
BL31_SOURCES += plat/arm/board/tc/rotpk_test.c
|
||||
|
||||
# Code under testing.
|
||||
BL31_SOURCES += lib/psa/rss_platform.c \
|
||||
${RSS_COMMS_SOURCES}
|
||||
BL31_SOURCES += lib/psa/rse_platform.c \
|
||||
${RSE_COMMS_SOURCES}
|
||||
|
||||
PLAT_INCLUDES += -Iinclude/lib/psa
|
||||
|
||||
$(eval $(call add_define,PLATFORM_TEST_ROTPK))
|
||||
else ifeq (${PLATFORM_TEST},tfm-testsuite)
|
||||
include drivers/arm/rss/rss_comms.mk
|
||||
include drivers/arm/rse/rse_comms.mk
|
||||
|
||||
# The variables need to be set to compile the platform test:
|
||||
ifeq (${TF_M_TESTS_PATH},)
|
||||
# Example: ../rss/tf-m-tests
|
||||
# Example: ../rse/tf-m-tests
|
||||
$(error Error: TF_M_TESTS_PATH not set)
|
||||
endif
|
||||
ifeq (${TF_M_EXTRAS_PATH},)
|
||||
# Example: ../rss/tf-m-extras
|
||||
# Example: ../rse/tf-m-extras
|
||||
$(error Error: TF_M_EXTRAS_PATH not set)
|
||||
endif
|
||||
ifeq (${MEASUREMENT_VALUE_SIZE},)
|
||||
|
@ -68,11 +68,11 @@ else ifeq (${PLATFORM_TEST},tfm-testsuite)
|
|||
psa_crypto_slot_management.c \
|
||||
)
|
||||
|
||||
BL31_SOURCES += ${RSS_COMMS_SOURCES} \
|
||||
BL31_SOURCES += ${RSE_COMMS_SOURCES} \
|
||||
plat/arm/common/arm_dyn_cfg.c \
|
||||
${TC_BASE}/rss_ap_tests.c \
|
||||
${TC_BASE}/rss_ap_testsuites.c \
|
||||
${TC_BASE}/rss_ap_test_stubs.c \
|
||||
${TC_BASE}/rse_ap_tests.c \
|
||||
${TC_BASE}/rse_ap_testsuites.c \
|
||||
${TC_BASE}/rse_ap_test_stubs.c \
|
||||
$(TF_M_TESTS_PATH)/tests_reg/test/framework/test_framework.c \
|
||||
$(MEASURED_BOOT_TESTS_PATH)/measured_boot_common.c \
|
||||
$(MEASURED_BOOT_TESTS_PATH)/measured_boot_tests_common.c \
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <rss_platform_api.h>
|
||||
#include <rse_platform_api.h>
|
||||
#include <tc_plat.h>
|
||||
|
||||
static void print_hex(const char *key_id_name, size_t key_size, const uint8_t *key_buf)
|
||||
|
@ -28,19 +28,19 @@ int rotpk_test(void)
|
|||
size_t key_size;
|
||||
|
||||
struct key_id_info key_ids[3] = {
|
||||
{.key_id = RSS_BUILTIN_KEY_ID_HOST_S_ROTPK, .key_id_name = "Secure-ROTPK"},
|
||||
{.key_id = RSS_BUILTIN_KEY_ID_HOST_NS_ROTPK, .key_id_name = "NS-ROTPK"},
|
||||
{.key_id = RSS_BUILTIN_KEY_ID_HOST_CCA_ROTPK, .key_id_name = "CCA-ROTPK"}
|
||||
{.key_id = RSE_BUILTIN_KEY_ID_HOST_S_ROTPK, .key_id_name = "Secure-ROTPK"},
|
||||
{.key_id = RSE_BUILTIN_KEY_ID_HOST_NS_ROTPK, .key_id_name = "NS-ROTPK"},
|
||||
{.key_id = RSE_BUILTIN_KEY_ID_HOST_CCA_ROTPK, .key_id_name = "CCA-ROTPK"}
|
||||
};
|
||||
|
||||
status = rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE, PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
status = rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE, PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed to initialize RSS communication channel - psa_status = %d\n", status);
|
||||
printf("Failed to initialize RSE communication channel - psa_status = %d\n", status);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(key_ids); i++) {
|
||||
status = rss_platform_key_read(key_ids[i].key_id, key_buf,
|
||||
status = rse_platform_key_read(key_ids[i].key_id, key_buf,
|
||||
sizeof(key_buf), &key_size);
|
||||
if (status != PSA_SUCCESS) {
|
||||
printf("Failed to retrieve %s - psa_status = %d\n", key_ids[i].key_id_name, status);
|
||||
|
|
|
@ -26,7 +26,7 @@ tfm_measured_boot_extend_measurement(uint8_t index,
|
|||
size_t measurement_value_size,
|
||||
bool lock_measurement)
|
||||
{
|
||||
return rss_measured_boot_extend_measurement(index,
|
||||
return rse_measured_boot_extend_measurement(index,
|
||||
signer_id,
|
||||
signer_id_size,
|
||||
version,
|
||||
|
@ -56,7 +56,7 @@ tfm_measured_boot_read_measurement(uint8_t index,
|
|||
size_t *measurement_value_len,
|
||||
bool *is_locked)
|
||||
{
|
||||
return rss_measured_boot_read_measurement(index,
|
||||
return rse_measured_boot_read_measurement(index,
|
||||
signer_id,
|
||||
signer_id_size,
|
||||
signer_id_len,
|
||||
|
@ -80,7 +80,7 @@ tfm_delegated_attest_get_token(const uint8_t *dak_pub_hash,
|
|||
size_t token_buf_size,
|
||||
size_t *token_size)
|
||||
{
|
||||
return rss_delegated_attest_get_token(dak_pub_hash,
|
||||
return rse_delegated_attest_get_token(dak_pub_hash,
|
||||
dak_pub_hash_size,
|
||||
token_buf,
|
||||
token_buf_size,
|
||||
|
@ -95,7 +95,7 @@ tfm_delegated_attest_get_delegated_key(uint8_t ecc_curve,
|
|||
size_t *key_size,
|
||||
uint32_t hash_algo)
|
||||
{
|
||||
return rss_delegated_attest_get_delegated_key(ecc_curve,
|
||||
return rse_delegated_attest_get_delegated_key(ecc_curve,
|
||||
key_bits,
|
||||
key_buf,
|
||||
key_buf_size,
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <mbedtls_common.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <psa/crypto.h>
|
||||
#include <rss_comms.h>
|
||||
#include <rse_comms.h>
|
||||
|
||||
#include "rss_ap_testsuites.h"
|
||||
#include "rse_ap_testsuites.h"
|
||||
|
||||
static struct test_suite_t test_suites[] = {
|
||||
{.freg = register_testsuite_delegated_attest},
|
||||
|
@ -32,7 +32,7 @@ static int run_tests(void)
|
|||
size_t i;
|
||||
|
||||
/* Initialize test environment. */
|
||||
rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE, PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE, PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
mbedtls_init();
|
||||
status = psa_crypto_init();
|
||||
if (status != PSA_SUCCESS) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* necessary because both files define the function `extra_tests_init`, so a
|
||||
* linker error occurs when both are linked to BL31. This file defines a macro
|
||||
* that renames the colliding function names to something unique.
|
||||
* `plat/arm/board/tc/rss_ap_tests.c` can call the test init functions with
|
||||
* `plat/arm/board/tc/rse_ap_tests.c` can call the test init functions with
|
||||
* their new name.
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef RSS_AP_TESTSUITES_H
|
||||
#define RSS_AP_TESTSUITES_H
|
||||
#ifndef RSE_AP_TESTSUITES_H
|
||||
#define RSE_AP_TESTSUITES_H
|
||||
|
||||
#include <test_framework.h>
|
||||
|
||||
void register_testsuite_measured_boot(struct test_suite_t *p_test_suite);
|
||||
void register_testsuite_delegated_attest(struct test_suite_t *p_test_suite);
|
||||
|
||||
#endif /* RSS_AP_TESTSUITES_H */
|
||||
#endif /* RSE_AP_TESTSUITES_H */
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/arm/css/sds.h>
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <drivers/delay_timer.h>
|
||||
#include <drivers/generic_delay_timer.h>
|
||||
#include <drivers/measured_boot/metadata.h>
|
||||
#include <drivers/measured_boot/rss/dice_prot_env.h>
|
||||
#include <drivers/measured_boot/rse/dice_prot_env.h>
|
||||
#include <plat/arm/common/plat_arm.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <platform_def.h>
|
||||
|
@ -53,7 +53,7 @@ struct dpe_metadata tc_dpe_metadata[] = {
|
|||
};
|
||||
|
||||
/* Effective timeout of 10000 ms */
|
||||
#define RSS_DPE_BOOT_10US_RETRIES 1000000
|
||||
#define RSE_DPE_BOOT_10US_RETRIES 1000000
|
||||
#define TC2_SDS_DPE_CTX_HANDLE_STRUCT_ID 0x0000000A
|
||||
|
||||
/* Context handle is meant to be used by BL2. Sharing it via TB_FW_CONFIG */
|
||||
|
@ -66,20 +66,20 @@ void plat_dpe_share_context_handle(int *ctx_handle)
|
|||
|
||||
void plat_dpe_get_context_handle(int *ctx_handle)
|
||||
{
|
||||
int retry = RSS_DPE_BOOT_10US_RETRIES;
|
||||
int retry = RSE_DPE_BOOT_10US_RETRIES;
|
||||
int ret;
|
||||
|
||||
/* Initialize System level generic or SP804 timer */
|
||||
generic_delay_timer_init();
|
||||
|
||||
/* Check the initialization of the Shared Data Storage area between RSS
|
||||
* and AP. Since AP_BL1 is executed first then a bit later the RSS
|
||||
/* Check the initialization of the Shared Data Storage area between RSE
|
||||
* and AP. Since AP_BL1 is executed first then a bit later the RSE
|
||||
* runtime, which initialize this area, therefore AP needs to check it
|
||||
* in a loop until it gets written by RSS Secure Runtime.
|
||||
* in a loop until it gets written by RSE Secure Runtime.
|
||||
*/
|
||||
VERBOSE("Waiting for DPE service initialization in RSS Secure Runtime\n");
|
||||
VERBOSE("Waiting for DPE service initialization in RSE Secure Runtime\n");
|
||||
while (retry > 0) {
|
||||
ret = sds_init(SDS_RSS_AP_REGION_ID);
|
||||
ret = sds_init(SDS_RSE_AP_REGION_ID);
|
||||
if (ret != SDS_OK) {
|
||||
udelay(10);
|
||||
retry--;
|
||||
|
@ -93,11 +93,11 @@ void plat_dpe_get_context_handle(int *ctx_handle)
|
|||
plat_panic_handler();
|
||||
} else {
|
||||
VERBOSE("DPE init succeeded in %dms.\n",
|
||||
(RSS_DPE_BOOT_10US_RETRIES - retry) / 100);
|
||||
(RSE_DPE_BOOT_10US_RETRIES - retry) / 100);
|
||||
}
|
||||
|
||||
/* TODO: call this in a loop to avoid reading unfinished data */
|
||||
ret = sds_struct_read(SDS_RSS_AP_REGION_ID,
|
||||
ret = sds_struct_read(SDS_RSE_AP_REGION_ID,
|
||||
TC2_SDS_DPE_CTX_HANDLE_STRUCT_ID,
|
||||
0,
|
||||
ctx_handle,
|
||||
|
@ -113,9 +113,9 @@ void plat_dpe_get_context_handle(int *ctx_handle)
|
|||
|
||||
void bl1_plat_mboot_init(void)
|
||||
{
|
||||
/* Initialize the communication channel between AP and RSS */
|
||||
(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
|
||||
PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
/* Initialize the communication channel between AP and RSE */
|
||||
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
||||
PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
|
||||
dpe_init(tc_dpe_metadata);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <drivers/measured_boot/metadata.h>
|
||||
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
||||
#include <drivers/measured_boot/rse/rse_measured_boot.h>
|
||||
#include <tools_share/zero_oid.h>
|
||||
|
||||
#include <plat/arm/common/plat_arm.h>
|
||||
|
@ -17,7 +17,7 @@
|
|||
/* Table with platform specific image IDs and metadata. Intentionally not a
|
||||
* const struct, some members might set by bootloaders during trusted boot.
|
||||
*/
|
||||
struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
|
||||
struct rse_mboot_metadata tc_rse_mboot_metadata[] = {
|
||||
{
|
||||
.id = FW_CONFIG_ID,
|
||||
.slot = U(6),
|
||||
|
@ -41,16 +41,16 @@ struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
|
|||
.lock_measurement = true },
|
||||
|
||||
{
|
||||
.id = RSS_MBOOT_INVALID_ID }
|
||||
.id = RSE_MBOOT_INVALID_ID }
|
||||
};
|
||||
|
||||
void bl1_plat_mboot_init(void)
|
||||
{
|
||||
/* Initialize the communication channel between AP and RSS */
|
||||
(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
|
||||
PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
/* Initialize the communication channel between AP and RSE */
|
||||
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
||||
PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
|
||||
rss_measured_boot_init(tc_rss_mboot_metadata);
|
||||
rse_measured_boot_init(tc_rse_mboot_metadata);
|
||||
}
|
||||
|
||||
void bl1_plat_mboot_finish(void)
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <drivers/measured_boot/metadata.h>
|
||||
#include <drivers/measured_boot/rss/dice_prot_env.h>
|
||||
#include <drivers/measured_boot/rse/dice_prot_env.h>
|
||||
#include <plat/arm/common/plat_arm.h>
|
||||
#include <plat/common/platform.h>
|
||||
#include <platform_def.h>
|
||||
|
@ -211,9 +211,9 @@ void plat_dpe_get_context_handle(int *ctx_handle)
|
|||
|
||||
void bl2_plat_mboot_init(void)
|
||||
{
|
||||
/* Initialize the communication channel between AP and RSS */
|
||||
(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
|
||||
PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
/* Initialize the communication channel between AP and RSE */
|
||||
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
||||
PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
|
||||
dpe_init(tc_dpe_metadata);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <drivers/arm/rss_comms.h>
|
||||
#include <drivers/arm/rse_comms.h>
|
||||
#include <drivers/measured_boot/metadata.h>
|
||||
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
||||
#include <drivers/measured_boot/rse/rse_measured_boot.h>
|
||||
#include <tools_share/tbbr_oid.h>
|
||||
|
||||
#include <plat/common/common_def.h>
|
||||
|
@ -17,7 +17,7 @@
|
|||
/* TC specific table with image IDs and metadata. Intentionally not a
|
||||
* const struct, some members might set by bootloaders during trusted boot.
|
||||
*/
|
||||
struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
|
||||
struct rse_mboot_metadata tc_rse_mboot_metadata[] = {
|
||||
{
|
||||
.id = BL31_IMAGE_ID,
|
||||
.slot = U(9),
|
||||
|
@ -40,16 +40,16 @@ struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
|
|||
.pk_oid = SOC_FW_CONFIG_KEY_OID,
|
||||
.lock_measurement = true },
|
||||
{
|
||||
.id = RSS_MBOOT_INVALID_ID }
|
||||
.id = RSE_MBOOT_INVALID_ID }
|
||||
};
|
||||
|
||||
void bl2_plat_mboot_init(void)
|
||||
{
|
||||
/* Initialize the communication channel between AP and RSS */
|
||||
(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
|
||||
PLAT_RSS_AP_RCV_MHU_BASE);
|
||||
/* Initialize the communication channel between AP and RSE */
|
||||
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
||||
PLAT_RSE_AP_RCV_MHU_BASE);
|
||||
|
||||
rss_measured_boot_init(tc_rss_mboot_metadata);
|
||||
rse_measured_boot_init(tc_rse_mboot_metadata);
|
||||
}
|
||||
|
||||
void bl2_plat_mboot_finish(void)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <common/desc_image_load.h>
|
||||
#include <drivers/measured_boot/rss/dice_prot_env.h>
|
||||
#include <drivers/measured_boot/rse/dice_prot_env.h>
|
||||
|
||||
extern struct dpe_metadata tc_dpe_metadata[];
|
||||
|
||||
|
@ -17,7 +17,7 @@ int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
|||
{
|
||||
int err;
|
||||
|
||||
/* Calculate image hash and record it in the DPE service in RSS. */
|
||||
/* Calculate image hash and record it in the DPE service in RSE. */
|
||||
err = dpe_measure_and_record(tc_dpe_metadata,
|
||||
image_data->image_base,
|
||||
image_data->image_size,
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <common/desc_image_load.h>
|
||||
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
||||
#include <drivers/measured_boot/rse/rse_measured_boot.h>
|
||||
|
||||
extern struct rss_mboot_metadata tc_rss_mboot_metadata[];
|
||||
extern struct rse_mboot_metadata tc_rse_mboot_metadata[];
|
||||
|
||||
int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Calculate image hash and record data in RSS */
|
||||
err = rss_mboot_measure_and_record(tc_rss_mboot_metadata,
|
||||
/* Calculate image hash and record data in RSE */
|
||||
err = rse_mboot_measure_and_record(tc_rse_mboot_metadata,
|
||||
image_data->image_base,
|
||||
image_data->image_size,
|
||||
image_id);
|
||||
if (err != 0) {
|
||||
ERROR("%s%s image id %u (%i)\n",
|
||||
"Failed to ", "record in RSS", image_id, err);
|
||||
"Failed to ", "record in RSE", image_id, err);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -31,6 +31,6 @@ int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
|||
|
||||
int plat_mboot_measure_key(void *pk_oid, void *pk_ptr, unsigned int pk_len)
|
||||
{
|
||||
return rss_mboot_set_signer_id(tc_rss_mboot_metadata, pk_oid, pk_ptr,
|
||||
return rse_mboot_set_signer_id(tc_rse_mboot_metadata, pk_oid, pk_ptr,
|
||||
pk_len);
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
* RoT Cert. | | | +->TOS_FW_CONF | | |
|
||||
* +------------+ | +->SCP_BL1 +-----+-----+-->FW_CONF +->AP_BL32 | | +->PVMFW |
|
||||
* | | | | | | | | | | | |
|
||||
* | RSS_BL1_2--+-----+-->RSS_BL2------->AP_BL1--+-----+------------->AP_BL2------------+-----+-->AP_BL33 |
|
||||
* | RSE_BL1_2--+-----+-->RSE_BL2------->AP_BL1--+-----+------------->AP_BL2------------+-----+-->AP_BL33 |
|
||||
* | | | | | | | | | | | |
|
||||
* +------------+ | +->RSS_S +-----+-----+-->TB_FW_CONF +->AP_BL31 | | +->HYPERVISOR |
|
||||
* | +->RSS_NS | | +->SCP_BL2 | | |
|
||||
* +------------+ | +->RSE_S +-----+-----+-->TB_FW_CONF +->AP_BL31 | | +->HYPERVISOR |
|
||||
* | +->RSE_NS | | +->SCP_BL2 | | |
|
||||
* | | | +->HW_CONF | | |
|
||||
* +--------------------------+ | +---------------+-----+-->NT_FW_CONF |
|
||||
* | | | |
|
||||
|
|
|
@ -165,7 +165,7 @@ void plat_arm_secure_wdt_refresh(void)
|
|||
|
||||
static sds_region_desc_t tc_sds_regions[] = {
|
||||
{ .base = PLAT_ARM_SDS_MEM_BASE },
|
||||
{ .base = PLAT_ARM_RSS_AP_SDS_MEM_BASE },
|
||||
{ .base = PLAT_ARM_RSE_AP_SDS_MEM_BASE },
|
||||
};
|
||||
|
||||
sds_region_desc_t *plat_sds_get_regions(unsigned int *region_count)
|
||||
|
|
Loading…
Add table
Reference in a new issue