diff options
author | Luo Ji <ji.luo@nxp.com> | 2019-07-03 14:38:16 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2020-05-15 17:34:16 +0800 |
commit | b5ac342e91f2e70d1896bf89d681ec21a402b6c7 (patch) | |
tree | 35d931d6bf351434e0e14d64e2e925376158de49 | |
parent | b93bc4a358a0a053fa9ec6ef959d4b3d7dc14650 (diff) |
MA-14916-8 [iot] Set power-on write protection for boot1 partition
The RPMB keyslot is stored in last block of boot1 partition which
is easily erased or tampered, set power-on write protection for this
partition to prevent corruption.
Test: Power-on write protection works as expected on imx8m.
Change-Id: Ib7e1094b979f7d94c0a2817391c5b3b5f3205d76
Signed-off-by: Luo Ji <ji.luo@nxp.com>
(cherry picked from commit c7e207fbbcd8618d29b1192829c630777fea5220)
-rw-r--r-- | include/mmc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h index 8f8149c7a3e..d0d0d1b9846 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -223,6 +223,7 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx) #define EXT_CSD_WR_REL_PARAM 166 /* R */ #define EXT_CSD_WR_REL_SET 167 /* R/W */ #define EXT_CSD_RPMB_MULT 168 /* RO */ +#define EXT_CSD_BOOT_WP 173 /* R/W & R/W/C_P */ #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ #define EXT_CSD_BOOT_BUS_WIDTH 177 #define EXT_CSD_PART_CONF 179 /* R/W */ @@ -336,6 +337,8 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx) #define MMC_QUIRK_RETRY_SET_BLOCKLEN BIT(1) #define MMC_QUIRK_RETRY_APP_CMD BIT(2) +#define BOOT1_PWR_WP (0x83) + enum mmc_voltage { MMC_SIGNAL_VOLTAGE_000 = 0, MMC_SIGNAL_VOLTAGE_120 = 1, |