From 0d1f23ae523124475b872f4637aa07d8e76e97ec Mon Sep 17 00:00:00 2001 From: Peifu Jiang Date: Tue, 4 Jul 2017 14:38:16 +0800 Subject: [PATCH] reboot: add rpmbp reboot mode PD#145456: Support RPMB shared secret provisioning [2/2] [Problem] RPMB requires a shared secret between host (AP) and device (eMMC flash) in order to perform HMAC authentication. [Solution] This commit provides a special reboot mode, reboot rpmbp, to securely provision the shared secret into eMMC flash device. [Test] Tested on GXL reference board P212. Passed. Change-Id: I81dd482215d0f0232fe10efbc60b6af4ba2d9641 Signed-off-by: Peifu Jiang --- drivers/amlogic/reboot/reboot.c | 2 ++ include/linux/amlogic/reboot.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/amlogic/reboot/reboot.c b/drivers/amlogic/reboot/reboot.c index 27173fe..ca6319d 100644 --- a/drivers/amlogic/reboot/reboot.c +++ b/drivers/amlogic/reboot/reboot.c @@ -50,6 +50,8 @@ static u32 parse_reason(const char *cmd) reboot_reason = MESON_FASTBOOT_REBOOT; else if (strcmp(cmd, "bootloader") == 0) reboot_reason = MESON_BOOTLOADER_REBOOT; + else if (strcmp(cmd, "rpmbp") == 0) + reboot_reason = MESON_RPMBP_REBOOT; else if (strcmp(cmd, "report_crash") == 0) reboot_reason = MESON_CRASH_REBOOT; else if (strcmp(cmd, "uboot_suspend") == 0) diff --git a/include/linux/amlogic/reboot.h b/include/linux/amlogic/reboot.h index f0f022a..de8c690 100644 --- a/include/linux/amlogic/reboot.h +++ b/include/linux/amlogic/reboot.h @@ -24,5 +24,6 @@ #define MESON_UBOOT_SUSPEND 5 #define MESON_HIBERNATE 6 #define MESON_BOOTLOADER_REBOOT 7 +#define MESON_RPMBP_REBOOT 9 #define MESON_CRASH_REBOOT 11 #define MESON_KERNEL_PANIC 12 -- 2.7.4