diff options
author | Philipp Deppenwiese <zaolin@das-labor.org> | 2017-10-18 15:29:26 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-17 17:24:12 +0000 |
commit | 7410f8be8fc3c5f9bceb61c0c61e02c697968cbd (patch) | |
tree | 5e60dfd9101a0dced968c42058d8f16ee78f5204 /src/security/vboot/bootmode.c | |
parent | 6522bf1a81735d8f0fa6f4b8f5285e0b7e60be01 (diff) |
security/vboot: Add two weak methods for vboot2
In order to make VBOOT2 independent from the CHROMEOS
kconfig option a weak method for get_write_protect_state
and get_recovery_mode_switch() is required.
Introduce a kconfig option for controlling this
behaviour.
This is a temporary fix and will be removed afterwards.
Change-Id: I3b1555bd93e1605e04d5c3ea6a752eb1459e426e
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/22102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/security/vboot/bootmode.c')
-rw-r--r-- | src/security/vboot/bootmode.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c index 834bc481e1..05098b4304 100644 --- a/src/security/vboot/bootmode.c +++ b/src/security/vboot/bootmode.c @@ -169,3 +169,20 @@ int vboot_developer_mode_enabled(void) return 0; } + +#if IS_ENABLED(CONFIG_VBOOT_NO_BOARD_SUPPORT) +/** + * TODO: Create flash protection interface which implements get_write_protect_state. + * get_recovery_mode_switch should be implemented as default function. + */ +int __attribute__((weak)) get_write_protect_state(void) +{ + return 0; +} + +int __attribute__((weak)) get_recovery_mode_switch(void) +{ + return 0; +} + +#endif |