12 #include "rom_ctrl_regs.h"
14 static_assert(ROM_CTRL_DIGEST_DIGEST_FIELD_WIDTH == 32,
15 "ROM Controller digest register width changed.");
16 static_assert(ROM_CTRL_EXP_DIGEST_DIGEST_FIELD_WIDTH == 32,
17 "ROM Controller expected digest register width changed.");
18 static_assert(ROM_CTRL_DIGEST_7_REG_OFFSET == ROM_CTRL_DIGEST_0_REG_OFFSET + 28,
19 "ROM Controller digest register layout is not consecutive.");
21 ROM_CTRL_EXP_DIGEST_7_REG_OFFSET == ROM_CTRL_EXP_DIGEST_0_REG_OFFSET + 28,
22 "ROM Controller expected digest register layout is not consecutive.");
27 if (rom_ctrl == NULL || alert_causes == NULL) {
31 *alert_causes = mmio_region_read32(rom_ctrl->
base_addr,
32 ROM_CTRL_FATAL_ALERT_CAUSE_REG_OFFSET);
39 if (rom_ctrl == NULL || digest == NULL) {
44 rom_ctrl->
base_addr, ROM_CTRL_DIGEST_0_REG_OFFSET, digest->digest,
45 ROM_CTRL_DIGEST_MULTIREG_COUNT *
sizeof(uint32_t));
52 if (rom_ctrl == NULL || expected_digest == NULL) {
57 rom_ctrl->
base_addr, ROM_CTRL_EXP_DIGEST_0_REG_OFFSET,
58 expected_digest->digest,
59 ROM_CTRL_EXP_DIGEST_MULTIREG_COUNT *
sizeof(uint32_t));