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 <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
This commit is contained in:
Vic Yang
2012-07-05 11:16:22 +08:00
committed by Gerrit
parent 29332907d4
commit 142b0073bc

View File

@@ -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 {