mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 14:01:54 +00:00
Writing wrong key to FLASH_KEYR locks entire flash and effectively
performs RW_NOW. Therefore we can use this and remove RW_AT_BOOT to
prevent having to reboot for RW to be protected.
BUG=chrome-os-partner:12043
TEST=1. fakewp 1 -> wp_gpio_asserted
2. flashwp now -> nothing happens
2. flashwp enable -> wp_gpio_asserted ro_at_boot
3. reboot -> wp_gpio_asserted ro_at_boot ro_now
4. flasherase 0x10000 0x1000 -> success
5. flashwp now -> wp_gpio_asserted ro_at_boot ro_now rw_now
6. flasherase 0x10000 0x1000 -> error
7. reboot -> wp_gpio_asserted ro_at_boot ro_now
8. flasherase 0x10000 0x1000 -> success
Change-Id: I22df188e31404c190c5830c6d94c9646224eb9ab
Reviewed-on: https://gerrit.chromium.org/gerrit/29255
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2.6 KiB
2.6 KiB