Merge "stm32mp1: add asserts in get_cpu_package() and get_part_number()" into integration

This commit is contained in:
Alexei Fedorov 2020-10-13 14:42:55 +00:00 committed by TrustedFirmware Code Review
commit 113e8fdab4
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,8 @@ static int get_part_number(uint32_t *part_nb)
uint32_t part_number;
uint32_t dev_id;
assert(part_nb != NULL);
if (stm32mp1_dbgmcu_get_chip_dev_id(&dev_id) < 0) {
return -1;
}
@ -175,6 +177,8 @@ static int get_cpu_package(uint32_t *cpu_package)
{
uint32_t package;
assert(cpu_package != NULL);
if (bsec_shadow_read_otp(&package, PACKAGE_OTP) != BSEC_OK) {
ERROR("BSEC: PACKAGE_OTP Error\n");
return -1;