diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2012-08-17 15:46:54 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-17 01:48:30 -0700 |
commit | 9d872b724f3e4e4d49cfb9d4040f8bab609415e5 (patch) | |
tree | 8bef9b860fbf01fb81957b2099d9e7cf84ee33f6 | |
parent | 76619f904df8ed519fac0d46d9c6c3a1956a88c2 (diff) | |
download | chrome-ec-9d872b724f3e4e4d49cfb9d4040f8bab609415e5.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>
-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 8433ee1637..b2ce40a4e8 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 dfb59c3cbe..21d91f6695 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 6e2587e652..e230ada49c 100644 --- a/common/flash_common.c +++ b/common/flash_common.c @@ -348,8 +348,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, }, |