Files
OpenCellular/include
Vic Yang 82915c2502 Write protect support for STM32F0
On STM32F0, we cannot work around the hard fault triggered when trying
to protect the whole flash. Therefore, we need to go with the
ALL_AT_BOOT approach. When write protect is enabled, instead of setting
ALL_NOW flag to immediately lock down the entire flash, we need to set
ALL_AT_BOOT and then reboot to have the protection take effect.

BUG=chrome-os-partner:32745
TEST=Along with the next CL. On Ryu:
  1. Enable HW WP. Check the output of 'ectool flashprotect' and see
     correct flags.
  2. 'flashrom -p ec --wp-range 0 0x10000'. Check RO_AT_BOOT is set.
  3. Reboot EC and check RO_NOW is enabled.
  4. Boot the system and check ALL_NOW is set.
  5. Update BIOS and reboot. Check software sync updates EC-RW.
  6. 'flashrom -p ec --wp-disable' and check it fails.
  7. Disable HW WP and reboot EC. Check RO_NOW and ALL_NOW are cleared.
  8. 'flashrom -p ec --wp-disable' and check RO_AT_BOOT is cleared.
TEST=Enable/disable WP on Spring. Check RO_AT_BOOT/ALL_NOW can be set
properly.
BRANCH=samus

Change-Id: I1c7c4f98f2535f1c8a1c7daaa88d47412d015977
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222622
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2014-10-15 23:55:55 +00:00
..
2013-12-17 21:27:53 +00:00
2013-04-05 14:28:42 -07:00
2014-06-23 21:48:33 +00:00
2014-02-08 00:14:48 +00:00
2013-10-25 20:12:49 +00:00
2012-10-26 09:49:38 -07:00
2014-10-15 23:55:55 +00:00
2013-06-26 09:08:23 -07:00
2013-10-21 23:59:38 +00:00
2013-06-18 10:31:09 -07:00
2013-10-30 23:10:13 +00:00
2013-08-07 12:43:48 -07:00
2014-06-18 06:08:45 +00:00
2011-12-07 19:10:02 +00:00
2012-10-25 14:12:11 -07:00
2014-03-06 23:14:07 +00:00
2012-10-25 14:12:10 -07:00
2013-10-30 23:10:10 +00:00
2014-09-30 05:42:15 +00:00
2012-10-25 17:03:44 -07:00
2012-08-09 17:40:37 -07:00
2014-07-15 09:07:40 +00:00
2014-06-26 06:48:37 +00:00
2014-10-01 22:42:25 +00:00
2014-01-06 12:40:45 +00:00
2014-03-01 20:15:59 +00:00
2013-11-21 00:09:09 +00:00
2013-10-21 23:59:38 +00:00
2014-07-17 00:40:23 +00:00
2014-06-19 03:28:43 +00:00
2014-10-11 02:22:36 +00:00
2014-10-11 07:29:15 +00:00