diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2012-08-17 15:46:54 +0800 |
---|---|---|
committer | Yung-Chieh Lo <yjlou@chromium.org> | 2012-09-05 01:19:15 -0700 |
commit | a55ea2ec5fb744633cab710d9e88f890ab6dc709 (patch) | |
tree | d5920d8129ced035902a4c5878131a6947642276 | |
parent | 0766b23f71afd2152751cf298b6ed754f02f0606 (diff) | |
download | chrome-ec-a55ea2ec5fb744633cab710d9e88f890ab6dc709.tar.gz |
Snow: WP_RO should be 0x10000 (including pstate).
To reflect the CL 00799d5 that moves the pstate to 0xf000.
BUG=chrome-os-partner:12799
TEST=Build in chroot.
snow: WP_RO is changed from 0:0xf000 --> 0:0x10000.
daisy: WP_RO is unchanged.
link: WP_RO is unchanged.
Change-Id: I572bae3f624744e60d13a762875211beffc6c516
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30670
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31448
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | chip/lm4/config.h | 3 | ||||
-rw-r--r-- | chip/stm32/config-stm32f100.h | 2 | ||||
-rw-r--r-- | chip/stm32/config-stm32l15x.h | 2 | ||||
-rw-r--r-- | common/flash_common.c | 4 | ||||
-rw-r--r-- | common/fmap.c | 6 |
5 files changed, 12 insertions, 5 deletions
diff --git a/chip/lm4/config.h b/chip/lm4/config.h index b02a229218..4920fab103 100644 --- a/chip/lm4/config.h +++ b/chip/lm4/config.h @@ -59,6 +59,9 @@ #define CONFIG_SECTION_RW_OFF (CONFIG_SECTION_RO_OFF \ + CONFIG_SECTION_RO_SIZE) +#define CONFIG_SECTION_WP_RO_SIZE (40 * CONFIG_FLASH_BANK_SIZE) +#define CONFIG_SECTION_WP_RO_OFF CONFIG_FLASH_BASE + #define CONFIG_FW_RO_OFF CONFIG_SECTION_RO_OFF #define CONFIG_FW_RO_SIZE CONFIG_SECTION_RO_SIZE #define CONFIG_FW_RW_OFF CONFIG_SECTION_RW_OFF diff --git a/chip/stm32/config-stm32f100.h b/chip/stm32/config-stm32f100.h index 787d3331cf..ac9c12197d 100644 --- a/chip/stm32/config-stm32f100.h +++ b/chip/stm32/config-stm32f100.h @@ -26,6 +26,8 @@ #define CONFIG_SECTION_RO_SIZE CONFIG_FW_RO_SIZE #define CONFIG_SECTION_RW_OFF CONFIG_FW_RW_OFF #define CONFIG_SECTION_RW_SIZE CONFIG_FW_RW_SIZE +#define CONFIG_SECTION_WP_RO_OFF CONFIG_FW_RO_OFF +#define CONFIG_SECTION_WP_RO_SIZE CONFIG_FW_IMAGE_SIZE /* * Put this after RO to give RW more space. This also makes RO write protect diff --git a/chip/stm32/config-stm32l15x.h b/chip/stm32/config-stm32l15x.h index 5a3fef59a8..ef913bbc0c 100644 --- a/chip/stm32/config-stm32l15x.h +++ b/chip/stm32/config-stm32l15x.h @@ -35,6 +35,8 @@ #define CONFIG_SECTION_RO_SIZE CONFIG_FW_RO_SIZE #define CONFIG_SECTION_RW_OFF CONFIG_FW_RW_OFF #define CONFIG_SECTION_RW_SIZE CONFIG_FW_RW_SIZE +#define CONFIG_SECTION_WP_RO_OFF CONFIG_FW_RO_OFF +#define CONFIG_SECTION_WP_RO_SIZE CONFIG_FW_RO_SIZE /* * The EC uses the top bank of flash to emulate a SPI-like write protect diff --git a/common/flash_common.c b/common/flash_common.c index 81e6291641..f13a978ebf 100644 --- a/common/flash_common.c +++ b/common/flash_common.c @@ -369,8 +369,8 @@ static int flash_command_region_info(struct host_cmd_handler_args *args) r->size = CONFIG_SECTION_RW_SIZE; break; case EC_FLASH_REGION_WP_RO: - r->offset = CONFIG_SECTION_RO_OFF; - r->size = CONFIG_SECTION_RO_SIZE; + r->offset = CONFIG_SECTION_WP_RO_OFF; + r->size = CONFIG_SECTION_WP_RO_SIZE; break; default: return EC_RES_INVALID_PARAM; diff --git a/common/fmap.c b/common/fmap.c index 8035653128..d36cdc1d5b 100644 --- a/common/fmap.c +++ b/common/fmap.c @@ -101,11 +101,11 @@ const struct _ec_fmap { }, { /* The range for write protection, for factory - * finalization. Should include (or identical to) + * finalization. Should include (may be identical to) * EC_RO and aligned to hardware specification. */ .area_name = "WP_RO", - .area_offset = CONFIG_SECTION_RO_OFF, - .area_size = CONFIG_SECTION_RO_SIZE, + .area_offset = CONFIG_SECTION_WP_RO_OFF, + .area_size = CONFIG_SECTION_WP_RO_SIZE, .area_flags = FMAP_AREA_STATIC | FMAP_AREA_RO, }, |