bootmode: Get rid of CONFIG_BOOTMODE_STRAPS
With VBOOT_VERIFY_FIRMWARE separated from CHROMEOS, move recovery and developer mode check functions to vboot. Thus, get rid of the BOOTMODE_STRAPS option which controlled these functions under src/lib. BUG=chrome-os-partner:55639 Change-Id: Ia2571026ce8976856add01095cc6be415d2be22e Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15868 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <console/console.h>
|
||||
#include <bootmode.h>
|
||||
#include <arch/io.h>
|
||||
#include <delay.h>
|
||||
#include <halt.h>
|
||||
@@ -24,6 +23,7 @@
|
||||
#include <elog.h>
|
||||
#include <rtc.h>
|
||||
#include <stdlib.h>
|
||||
#include <vboot/vboot_common.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "ec.h"
|
||||
@@ -198,18 +198,18 @@ void google_chromeec_check_ec_image(int expected_type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for recovery mode and ensure EC is in RO */
|
||||
/* Check for recovery mode and ensure PD/EC is in RO */
|
||||
void google_chromeec_early_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_CHROMEOS)) {
|
||||
/* Check USB PD chip state first */
|
||||
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_PD))
|
||||
google_chromeec_early_pd_init();
|
||||
if (!IS_ENABLED(CONFIG_CHROMEOS) || !vboot_recovery_mode_enabled())
|
||||
return;
|
||||
|
||||
/* If in recovery ensure EC is running RO firmware. */
|
||||
if (recovery_mode_enabled())
|
||||
google_chromeec_check_ec_image(EC_IMAGE_RO);
|
||||
}
|
||||
/* Check USB PD chip state first */
|
||||
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_PD))
|
||||
google_chromeec_check_pd_image(EC_IMAGE_RO);
|
||||
|
||||
/* If in recovery ensure EC is running RO firmware. */
|
||||
google_chromeec_check_ec_image(EC_IMAGE_RO);
|
||||
}
|
||||
|
||||
void google_chromeec_check_pd_image(int expected_type)
|
||||
@@ -241,15 +241,6 @@ void google_chromeec_check_pd_image(int expected_type)
|
||||
udelay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for recovery mode and ensure PD is in RO */
|
||||
void google_chromeec_early_pd_init(void)
|
||||
{
|
||||
/* If in recovery ensure PD is running RO firmware. */
|
||||
if (recovery_mode_enabled()) {
|
||||
google_chromeec_check_pd_image(EC_IMAGE_RO);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
u16 google_chromeec_get_board_version(void)
|
||||
@@ -521,7 +512,7 @@ void google_chromeec_init(void)
|
||||
}
|
||||
|
||||
if (cec_cmd.cmd_code ||
|
||||
(recovery_mode_enabled() &&
|
||||
(vboot_recovery_mode_enabled() &&
|
||||
(cec_resp.current_image != EC_IMAGE_RO))) {
|
||||
struct ec_params_reboot_ec reboot_ec;
|
||||
/* Reboot the EC and make it come back in RO mode */
|
||||
|
||||
@@ -36,7 +36,6 @@ void google_chromeec_init(void);
|
||||
|
||||
/* If recovery mode is enabled and EC is not running RO firmware reboot. */
|
||||
void google_chromeec_early_init(void);
|
||||
void google_chromeec_early_pd_init(void);
|
||||
/* Reboot if EC firmware is not expected type. */
|
||||
void google_chromeec_check_ec_image(int expected_type);
|
||||
void google_chromeec_check_pd_image(int expected_type);
|
||||
|
||||
Reference in New Issue
Block a user