mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
Merge changes from topic "mb/deprecate-rss-for-fvp" into integration
* changes: refactor(fvp): remove RSS usage refactor(rss)!: remove PLAT_RSS_NOT_SUPPORTED build option
This commit is contained in:
commit
5fddf53c16
7 changed files with 5 additions and 94 deletions
2
Makefile
2
Makefile
|
@ -1191,7 +1191,6 @@ $(eval $(call assert_booleans,\
|
|||
NS_TIMER_SWITCH \
|
||||
OVERRIDE_LIBC \
|
||||
PL011_GENERIC_UART \
|
||||
PLAT_RSS_NOT_SUPPORTED \
|
||||
PROGRAMMABLE_RESET_ADDRESS \
|
||||
PSCI_EXTENDED_STATE_ID \
|
||||
PSCI_OS_INIT_MODE \
|
||||
|
@ -1354,7 +1353,6 @@ $(eval $(call add_defines,\
|
|||
NS_TIMER_SWITCH \
|
||||
PL011_GENERIC_UART \
|
||||
PLAT_${PLAT} \
|
||||
PLAT_RSS_NOT_SUPPORTED \
|
||||
PROGRAMMABLE_RESET_ADDRESS \
|
||||
PSCI_EXTENDED_STATE_ID \
|
||||
PSCI_OS_INIT_MODE \
|
||||
|
|
|
@ -222,7 +222,7 @@ Responsibilities of these platform interfaces are -
|
|||
- Public key data size is passed as the third argument to this function.
|
||||
- This function must return 0 on success, a signed integer error code
|
||||
otherwise.
|
||||
- In FVP platform, this function is used to calculate the hash of the given
|
||||
- In TC2 platform, this function is used to calculate the hash of the given
|
||||
key and forward this hash to RSS alongside the measurement of the image
|
||||
which the key signs.
|
||||
|
||||
|
|
|
@ -1077,11 +1077,6 @@ Common build options
|
|||
if FEAT_TRF is implemented. This flag can take the values 0 to 2, to align
|
||||
with the ``FEATURE_DETECTION`` mechanism. This flag is disabled by default.
|
||||
|
||||
- ``PLAT_RSS_NOT_SUPPORTED``: Boolean option to enable the usage of the PSA
|
||||
APIs on platforms that doesn't support RSS (providing Arm CCA HES
|
||||
functionalities). When enabled (``1``), a mocked version of the APIs are used.
|
||||
The default value is 0.
|
||||
|
||||
- ``CONDITIONAL_CMO``: Boolean option to enable call to platform-defined routine
|
||||
``plat_can_cmo`` which will return zero if cache management operations should
|
||||
be skipped and non-zero otherwise. By default, this option is disabled which
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Arm Limited. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
|
@ -61,7 +61,6 @@ static void log_measurement(uint8_t index,
|
|||
INFO(" - locking : %s\n", lock_measurement ? "true" : "false");
|
||||
}
|
||||
|
||||
#if !PLAT_RSS_NOT_SUPPORTED
|
||||
psa_status_t
|
||||
rss_measured_boot_extend_measurement(uint8_t index,
|
||||
const uint8_t *signer_id,
|
||||
|
@ -175,47 +174,3 @@ psa_status_t rss_measured_boot_read_measurement(uint8_t index,
|
|||
|
||||
return status;
|
||||
}
|
||||
|
||||
#else /* !PLAT_RSS_NOT_SUPPORTED */
|
||||
|
||||
psa_status_t
|
||||
rss_measured_boot_extend_measurement(uint8_t index,
|
||||
const uint8_t *signer_id,
|
||||
size_t signer_id_size,
|
||||
const uint8_t *version,
|
||||
size_t version_size,
|
||||
uint32_t measurement_algo,
|
||||
const uint8_t *sw_type,
|
||||
size_t sw_type_size,
|
||||
const uint8_t *measurement_value,
|
||||
size_t measurement_value_size,
|
||||
bool lock_measurement)
|
||||
{
|
||||
log_measurement(index, signer_id, signer_id_size,
|
||||
version, version_size, sw_type, sw_type_size,
|
||||
measurement_algo, measurement_value,
|
||||
measurement_value_size, lock_measurement);
|
||||
|
||||
return PSA_SUCCESS;
|
||||
}
|
||||
|
||||
psa_status_t rss_measured_boot_read_measurement(uint8_t index,
|
||||
uint8_t *signer_id,
|
||||
size_t signer_id_size,
|
||||
size_t *signer_id_len,
|
||||
uint8_t *version,
|
||||
size_t version_size,
|
||||
size_t *version_len,
|
||||
uint32_t *measurement_algo,
|
||||
uint8_t *sw_type,
|
||||
size_t sw_type_size,
|
||||
size_t *sw_type_len,
|
||||
uint8_t *measurement_value,
|
||||
size_t measurement_value_size,
|
||||
size_t *measurement_value_len,
|
||||
bool *is_locked)
|
||||
{
|
||||
return PSA_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* !PLAT_RSS_NOT_SUPPORTED */
|
||||
|
|
|
@ -347,9 +347,6 @@ NR_OF_IMAGES_IN_FW_BANK := 1
|
|||
# Disable Firmware update support by default
|
||||
PSA_FWU_SUPPORT := 0
|
||||
|
||||
# By default, disable the mocking of RSS provided services
|
||||
PLAT_RSS_NOT_SUPPORTED := 0
|
||||
|
||||
# Dynamic Root of Trust for Measurement support
|
||||
DRTM_SUPPORT := 0
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ extern struct rss_mboot_metadata fvp_rss_mboot_metadata[];
|
|||
int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
||||
{
|
||||
int err;
|
||||
int rc = 0;
|
||||
|
||||
/* Calculate image hash and record data in Event Log */
|
||||
err = event_log_measure_and_record(image_data->image_base,
|
||||
|
@ -29,26 +28,14 @@ int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
|||
if (err != 0) {
|
||||
ERROR("%s%s image id %u (%i)\n",
|
||||
"Failed to ", "record in event log", image_id, err);
|
||||
rc = err;
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Calculate image hash and record data in RSS */
|
||||
err = rss_mboot_measure_and_record(fvp_rss_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);
|
||||
rc = (rc == 0) ? err : -1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int plat_mboot_measure_key(const void *pk_oid, const void *pk_ptr,
|
||||
size_t pk_len)
|
||||
{
|
||||
return rss_mboot_set_signer_id(fvp_rss_mboot_metadata, pk_oid, pk_ptr,
|
||||
pk_len);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -440,10 +440,6 @@ ifneq (${RESET_TO_BL2}, 0)
|
|||
override BL1_SOURCES =
|
||||
endif
|
||||
|
||||
# RSS is not supported on FVP right now. Thus, we use the mocked version
|
||||
# of the provided PSA APIs. They return with success and hard-coded token/key.
|
||||
PLAT_RSS_NOT_SUPPORTED := 1
|
||||
|
||||
# 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.
|
||||
|
@ -471,23 +467,6 @@ BL1_SOURCES += plat/arm/board/fvp/fvp_common_measured_boot.c \
|
|||
BL2_SOURCES += plat/arm/board/fvp/fvp_common_measured_boot.c \
|
||||
plat/arm/board/fvp/fvp_bl2_measured_boot.c \
|
||||
lib/psa/measured_boot.c
|
||||
|
||||
# Even though RSS is not supported on FVP (see above), we support overriding
|
||||
# PLAT_RSS_NOT_SUPPORTED from the command line, just for the purpose of building
|
||||
# the code to detect any build regressions. The resulting firmware will not be
|
||||
# functional.
|
||||
ifneq (${PLAT_RSS_NOT_SUPPORTED},1)
|
||||
$(warning "RSS is not supported on FVP. The firmware will not be functional.")
|
||||
include drivers/arm/rss/rss_comms.mk
|
||||
BL1_SOURCES += ${RSS_COMMS_SOURCES}
|
||||
BL2_SOURCES += ${RSS_COMMS_SOURCES}
|
||||
BL31_SOURCES += ${RSS_COMMS_SOURCES}
|
||||
|
||||
BL1_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0
|
||||
BL2_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0
|
||||
BL31_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq (${DRTM_SUPPORT}, 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue