mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 23:35:10 +00:00
refactor(measured-boot): 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: I8c2fcbdf1de1c75f9969d28bc15e0b3500071404
This commit is contained in:
parent
e249e56954
commit
b8245368cc
5 changed files with 26 additions and 26 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/auth/crypto_mod.h>
|
||||
#include <drivers/measured_boot/rss/dice_prot_env.h>
|
||||
#include <drivers/measured_boot/rse/dice_prot_env.h>
|
||||
#include <lib/cassert.h>
|
||||
#include <lib/psa/dice_protection_environment.h>
|
||||
|
||||
|
|
|
@ -26,4 +26,4 @@ $(eval $(call add_defines,\
|
|||
DPE_DIGEST_SIZE \
|
||||
)))
|
||||
|
||||
DPE_SOURCES += drivers/measured_boot/rss/dice_prot_env.c
|
||||
DPE_SOURCES += drivers/measured_boot/rse/dice_prot_env.c
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/auth/crypto_mod.h>
|
||||
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
||||
#include <drivers/measured_boot/rse/rse_measured_boot.h>
|
||||
#include <lib/psa/measured_boot.h>
|
||||
#include <psa/crypto_types.h>
|
||||
#include <psa/crypto_values.h>
|
||||
|
@ -46,12 +46,12 @@ static bool null_arr(const uint8_t *signer_id, size_t signer_id_size)
|
|||
#endif /* ENABLE_ASSERTIONS */
|
||||
|
||||
/* Functions' declarations */
|
||||
void rss_measured_boot_init(struct rss_mboot_metadata *metadata_ptr)
|
||||
void rse_measured_boot_init(struct rse_mboot_metadata *metadata_ptr)
|
||||
{
|
||||
assert(metadata_ptr != NULL);
|
||||
|
||||
/* Init the non-const members of the metadata structure */
|
||||
while (metadata_ptr->id != RSS_MBOOT_INVALID_ID) {
|
||||
while (metadata_ptr->id != RSE_MBOOT_INVALID_ID) {
|
||||
assert(null_arr(metadata_ptr->signer_id, MBOOT_DIGEST_SIZE));
|
||||
metadata_ptr->sw_type_size =
|
||||
strlen((const char *)&metadata_ptr->sw_type) + 1;
|
||||
|
@ -59,7 +59,7 @@ void rss_measured_boot_init(struct rss_mboot_metadata *metadata_ptr)
|
|||
}
|
||||
}
|
||||
|
||||
int rss_mboot_measure_and_record(struct rss_mboot_metadata *metadata_ptr,
|
||||
int rse_mboot_measure_and_record(struct rse_mboot_metadata *metadata_ptr,
|
||||
uintptr_t data_base, uint32_t data_size,
|
||||
uint32_t data_id)
|
||||
{
|
||||
|
@ -70,13 +70,13 @@ int rss_mboot_measure_and_record(struct rss_mboot_metadata *metadata_ptr,
|
|||
assert(metadata_ptr != NULL);
|
||||
|
||||
/* Get the metadata associated with this image. */
|
||||
while ((metadata_ptr->id != RSS_MBOOT_INVALID_ID) &&
|
||||
while ((metadata_ptr->id != RSE_MBOOT_INVALID_ID) &&
|
||||
(metadata_ptr->id != data_id)) {
|
||||
metadata_ptr++;
|
||||
}
|
||||
|
||||
/* If image is not present in metadata array then skip */
|
||||
if (metadata_ptr->id == RSS_MBOOT_INVALID_ID) {
|
||||
if (metadata_ptr->id == RSE_MBOOT_INVALID_ID) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ int rss_mboot_measure_and_record(struct rss_mboot_metadata *metadata_ptr,
|
|||
return rc;
|
||||
}
|
||||
|
||||
ret = rss_measured_boot_extend_measurement(
|
||||
ret = rse_measured_boot_extend_measurement(
|
||||
metadata_ptr->slot,
|
||||
metadata_ptr->signer_id,
|
||||
metadata_ptr->signer_id_size,
|
||||
|
@ -106,7 +106,7 @@ int rss_mboot_measure_and_record(struct rss_mboot_metadata *metadata_ptr,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int rss_mboot_set_signer_id(struct rss_mboot_metadata *metadata_ptr,
|
||||
int rse_mboot_set_signer_id(struct rse_mboot_metadata *metadata_ptr,
|
||||
const void *pk_oid,
|
||||
const void *pk_ptr,
|
||||
size_t pk_len)
|
||||
|
@ -125,7 +125,7 @@ int rss_mboot_set_signer_id(struct rss_mboot_metadata *metadata_ptr,
|
|||
* The platform may decide not to measure all of the images
|
||||
* in the system.
|
||||
*/
|
||||
while (metadata_ptr->id != RSS_MBOOT_INVALID_ID) {
|
||||
while (metadata_ptr->id != RSE_MBOOT_INVALID_ID) {
|
||||
/* Get the metadata associated with this key-oid */
|
||||
if (metadata_ptr->pk_oid == pk_oid) {
|
||||
if (hash_calc_done == false) {
|
||||
|
|
|
@ -6,27 +6,27 @@
|
|||
|
||||
# Hash algorithm for measured boot
|
||||
# SHA-256 (or stronger) is required.
|
||||
MBOOT_RSS_HASH_ALG := sha256
|
||||
MBOOT_RSE_HASH_ALG := sha256
|
||||
|
||||
ifeq (${MBOOT_RSS_HASH_ALG}, sha512)
|
||||
ifeq (${MBOOT_RSE_HASH_ALG}, sha512)
|
||||
MBOOT_ALG_ID := MBOOT_ALG_SHA512
|
||||
MBOOT_DIGEST_SIZE := 64U
|
||||
else ifeq (${MBOOT_RSS_HASH_ALG}, sha384)
|
||||
else ifeq (${MBOOT_RSE_HASH_ALG}, sha384)
|
||||
MBOOT_ALG_ID := MBOOT_ALG_SHA384
|
||||
MBOOT_DIGEST_SIZE := 48U
|
||||
else
|
||||
MBOOT_ALG_ID := MBOOT_ALG_SHA256
|
||||
MBOOT_DIGEST_SIZE := 32U
|
||||
endif #MBOOT_RSS_HASH_ALG
|
||||
endif #MBOOT_RSE_HASH_ALG
|
||||
|
||||
# Set definitions for Measured Boot driver.
|
||||
$(eval $(call add_defines,\
|
||||
$(sort \
|
||||
MBOOT_ALG_ID \
|
||||
MBOOT_DIGEST_SIZE \
|
||||
MBOOT_RSS_BACKEND \
|
||||
MBOOT_RSE_BACKEND \
|
||||
)))
|
||||
|
||||
MEASURED_BOOT_SRC_DIR := drivers/measured_boot/rss/
|
||||
MEASURED_BOOT_SRC_DIR := drivers/measured_boot/rse/
|
||||
|
||||
MEASURED_BOOT_SOURCES += ${MEASURED_BOOT_SRC_DIR}rss_measured_boot.c
|
||||
MEASURED_BOOT_SOURCES += ${MEASURED_BOOT_SRC_DIR}rse_measured_boot.c
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef RSS_MEASURED_BOOT_H
|
||||
#define RSS_MEASURED_BOOT_H
|
||||
#ifndef RSE_MEASURED_BOOT_H
|
||||
#define RSE_MEASURED_BOOT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/measured_boot/metadata.h>
|
||||
|
||||
#define RSS_MBOOT_INVALID_ID UINT32_MAX
|
||||
#define RSE_MBOOT_INVALID_ID UINT32_MAX
|
||||
|
||||
struct rss_mboot_metadata {
|
||||
struct rse_mboot_metadata {
|
||||
unsigned int id;
|
||||
uint8_t slot;
|
||||
uint8_t signer_id[SIGNER_ID_MAX_SIZE];
|
||||
|
@ -28,13 +28,13 @@ struct rss_mboot_metadata {
|
|||
};
|
||||
|
||||
/* Functions' declarations */
|
||||
void rss_measured_boot_init(struct rss_mboot_metadata *metadata_ptr);
|
||||
int rss_mboot_measure_and_record(struct rss_mboot_metadata *metadata_ptr,
|
||||
void rse_measured_boot_init(struct rse_mboot_metadata *metadata_ptr);
|
||||
int rse_mboot_measure_and_record(struct rse_mboot_metadata *metadata_ptr,
|
||||
uintptr_t data_base, uint32_t data_size,
|
||||
uint32_t data_id);
|
||||
|
||||
int rss_mboot_set_signer_id(struct rss_mboot_metadata *metadata_ptr,
|
||||
int rse_mboot_set_signer_id(struct rse_mboot_metadata *metadata_ptr,
|
||||
const void *pk_oid, const void *pk_ptr,
|
||||
size_t pk_len);
|
||||
|
||||
#endif /* RSS_MEASURED_BOOT_H */
|
||||
#endif /* RSE_MEASURED_BOOT_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue