From 142b0073bca43bd6d83b45cb6c9abdbcdf1c4f79 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Thu, 5 Jul 2012 11:16:22 +0800 Subject: Set proper value for BOOTCFG We choose PE2/USB1_CTL1 for BOOTCFG. If we somehow brick the EC, we can pull this signal to ground and boot EC into boot loader to recover it. BUG=chrome-os-partner:8769 TEST=On link: - Factory reset EC to clear BOOTCFG - Flash new EC binary and reboot - rw 0x400fe1d0 to check BOOTCFG value is correctly written - Boot normally and check EC is operating correctly - Pull the signal to ground and reset EC, check EC stays in boot loader. Check in this case we can program EC. - Attempt to write different value to BOOTCFG and check BOOTCFG doesn't change. Change-Id: Ia6705114d495b18bd7ee4afc1e61e84a21b51198 Reviewed-on: https://gerrit.chromium.org/gerrit/27000 Reviewed-by: Vic Yang Tested-by: Vic Yang Commit-Ready: Vic Yang --- board/link/board.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'board') diff --git a/board/link/board.h b/board/link/board.h index c720a68b6b..d6911f86bd 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -225,13 +225,10 @@ enum temp_sensor_id { /* The number of TMP006 sensor chips on the board. */ #define TMP006_COUNT 4 -/* Target value for BOOTCFG. This currently toggles the polarity bit without - * enabling the boot loader, simply to prove we can program it. */ -/* TODO: (crosbug.com/p/8769) set BOOTCFG to 0x7ffffffe, which will prevent - * subsequent writes to BOOTCFG. Alternately, we could set BOOTCFG to some - * signal which has a pullup/pulldown, and use that as a failsafe to get into - * the boot loader, if we somehow brick the RO firmware. */ -#define BOOTCFG_VALUE 0xfffffdfe +/* Target value for BOOTCFG. This is set to PE2/USB1_CTL1, which has an external + * pullup. If this signal is pulled to ground when the EC boots, the EC will get + * into the boot loader and we can recover bricked EC. */ +#define BOOTCFG_VALUE 0x7fff88fe /* Known board versions for system_get_board_version(). */ enum board_version { -- cgit v1.2.1