diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-07-17 09:35:48 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-17 10:50:30 -0700 |
commit | c44c17890c2fbda1edc74361b0174fed405f9eee (patch) | |
tree | 5aef62d95ede8a41b26e763ef58d4dc045ed8842 | |
parent | dae19428a6124300dc91ad4167ed3093d3dc3e07 (diff) | |
download | chrome-ec-c44c17890c2fbda1edc74361b0174fed405f9eee.tar.gz |
Rename A and B images to RW and RW_B, part 1
All of our current EC configs have RO and a single RW image. Calling
that image 'A' is confusing, particularly when combined with EC
software sync (where the RW image is updated from either the A or B AP
RW firmware). So, rename it.
This changes all the build artifacts and constants. Internal EC
commands and host commands still refer to A/B; that will be fixed in
part 2.
BUG=none
TEST=build link, snow, bds
Change-Id: Icfed4914745f0799bb71befb6a6563cfd8bc90ab
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27649
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | Makefile.rules | 16 | ||||
-rw-r--r-- | chip/lm4/config.h | 25 | ||||
-rw-r--r-- | chip/lm4/openocd/lm4x_cmds.tcl | 8 | ||||
-rw-r--r-- | chip/stm32/config-stm32f100.h | 22 | ||||
-rw-r--r-- | chip/stm32/config-stm32l15x.h | 28 | ||||
-rw-r--r-- | common/firmware_image.S | 8 | ||||
-rw-r--r-- | common/firmware_image.lds.S | 8 | ||||
-rw-r--r-- | common/fmap.c | 30 | ||||
-rw-r--r-- | common/system_common.c | 24 | ||||
-rw-r--r-- | common/vboot_hash.c | 8 | ||||
-rw-r--r-- | common/vboot_sig.c | 8 | ||||
-rw-r--r-- | util/burn_my_ec.c | 8 |
12 files changed, 97 insertions, 96 deletions
diff --git a/Makefile.rules b/Makefile.rules index 7a06001237..0944daab79 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -50,18 +50,18 @@ cmd_sign = vbutil_ec --sign $@ \ cmd_mv = mv $^ $@ cmd_extractab-y = cd $(out) && \ dump_fmap -x $(PROJECT).bin.tmp RW_SECTION_A $(silent) && \ - mv RW_SECTION_A $(PROJECT).A.bin + mv RW_SECTION_A $(PROJECT).RW.bin cmd_extractab-$(CONFIG_RW_B) += && \ dump_fmap -x $(PROJECT).bin.tmp RW_SECTION_B $(silent) && \ - mv RW_SECTION_B $(PROJECT).B.bin -cmd_copyab-y = cd $(out) && cp $(PROJECT).A.flat $(PROJECT).A.bin -cmd_copyab-$(CONFIG_RW_B) += && cp $(PROJECT).B.flat $(PROJECT).B.bin + mv RW_SECTION_B $(PROJECT).RW_B.bin +cmd_copyab-y = cd $(out) && cp $(PROJECT).RW.flat $(PROJECT).RW.bin +cmd_copyab-$(CONFIG_RW_B) += && cp $(PROJECT).RW_B.flat $(PROJECT).RW_B.bin .PHONY: all tests utils all: $(out)/$(PROJECT).bin utils -dis-y = $(out)/$(PROJECT).RO.dis $(out)/$(PROJECT).A.dis -dis-$(CONFIG_RW_B) += $(out)/$(PROJECT).B.dis +dis-y = $(out)/$(PROJECT).RO.dis $(out)/$(PROJECT).RW.dis +dis-$(CONFIG_RW_B) += $(out)/$(PROJECT).RW_B.dis dis: $(dis-y) utils: $(build-utils) $(host-utils) @@ -96,8 +96,8 @@ $(out)/%.bin.tmp: $(out)/%.obj $(if $(sign-y),$(call quiet,extractab-y,EXTR_AB), \ $(call quiet,copyab-y,COPY_AB)) -flat-y = $(out)/$(PROJECT).RO.flat $(out)/$(PROJECT).A.flat -flat-$(CONFIG_RW_B) += $(out)/$(PROJECT).B.flat +flat-y = $(out)/$(PROJECT).RO.flat $(out)/$(PROJECT).RW.flat +flat-$(CONFIG_RW_B) += $(out)/$(PROJECT).RW_B.flat $(out)/%.obj: common/firmware_image.S $(out)/firmware_image.lds $(flat-y) $(call quiet,flat_to_obj,CAT ) diff --git a/chip/lm4/config.h b/chip/lm4/config.h index be2fefc36e..e90e590629 100644 --- a/chip/lm4/config.h +++ b/chip/lm4/config.h @@ -50,13 +50,13 @@ #define CONFIG_SECTION_RO_SIZE (40 * CONFIG_FLASH_BANK_SIZE) #define CONFIG_SECTION_RO_OFF CONFIG_FLASH_BASE -#define CONFIG_SECTION_A_SIZE (40 * CONFIG_FLASH_BANK_SIZE) -#define CONFIG_SECTION_A_OFF (CONFIG_SECTION_RO_OFF \ +#define CONFIG_SECTION_RW_SIZE (40 * CONFIG_FLASH_BANK_SIZE) +#define CONFIG_SECTION_RW_OFF (CONFIG_SECTION_RO_OFF \ + CONFIG_SECTION_RO_SIZE) -#define CONFIG_SECTION_B_SIZE (40 * CONFIG_FLASH_BANK_SIZE) -#define CONFIG_SECTION_B_OFF (CONFIG_SECTION_A_OFF \ - + CONFIG_SECTION_A_SIZE) +#define CONFIG_SECTION_RW_B_SIZE (40 * CONFIG_FLASH_BANK_SIZE) +#define CONFIG_SECTION_RW_B_OFF (CONFIG_SECTION_RW_OFF \ + + CONFIG_SECTION_RW_SIZE) /* The top of each section will hold the vboot stuff, since the firmware vector * table has to go at the start. The root key will fit in 2K, but the vblocks @@ -71,17 +71,18 @@ #define CONFIG_VBOOT_ROOTKEY_OFF (CONFIG_FW_RO_OFF + CONFIG_FW_RO_SIZE) /* A: firmware, vblock */ -#define CONFIG_FW_A_OFF CONFIG_SECTION_A_OFF -#define CONFIG_FW_A_SIZE (CONFIG_SECTION_A_SIZE \ +#define CONFIG_FW_RW_OFF CONFIG_SECTION_RW_OFF +#define CONFIG_FW_RW_SIZE (CONFIG_SECTION_RW_SIZE \ - CONFIG_VBLOCK_SIZE) -#define CONFIG_VBLOCK_A_OFF (CONFIG_FW_A_OFF + CONFIG_FW_A_SIZE) +#define CONFIG_VBLOCK_RW_OFF (CONFIG_FW_RW_OFF + CONFIG_FW_RW_SIZE) /* B: firmware, vblock */ -#define CONFIG_FW_B_SIZE (CONFIG_SECTION_B_SIZE \ +#define CONFIG_FW_RW_B_SIZE (CONFIG_SECTION_RW_B_SIZE \ - CONFIG_VBLOCK_SIZE) -#define CONFIG_FW_B_OFF (CONFIG_SECTION_A_OFF \ - + CONFIG_SECTION_A_SIZE) -#define CONFIG_VBLOCK_B_OFF (CONFIG_FW_B_OFF + CONFIG_FW_B_SIZE) +#define CONFIG_FW_RW_B_OFF (CONFIG_SECTION_RW_OFF \ + + CONFIG_SECTION_RW_SIZE) +#define CONFIG_VBLOCK_RW_B_OFF (CONFIG_FW_RW_B_OFF \ + + CONFIG_FW_RW_B_SIZE) /****************************************************************************/ diff --git a/chip/lm4/openocd/lm4x_cmds.tcl b/chip/lm4/openocd/lm4x_cmds.tcl index 3f1c93e29a..2bea25565d 100644 --- a/chip/lm4/openocd/lm4x_cmds.tcl +++ b/chip/lm4/openocd/lm4x_cmds.tcl @@ -23,12 +23,12 @@ proc flash_link_ro { } { flash_lm4 ../../../build/link/ec.RO.flat 0 81920 } -proc flash_link_a { } { - flash_lm4 ../../../build/link/ec.A.bin 81920 81920 +proc flash_link_rw { } { + flash_lm4 ../../../build/link/ec.RW.bin 81920 81920 } -proc flash_link_b { } { - flash_lm4 ../../../build/link/ec.B.bin 163840 81920 +proc flash_link_rw_b { } { + flash_lm4 ../../../build/link/ec.RW_B.bin 163840 81920 } proc flash_bds { } { diff --git a/chip/stm32/config-stm32f100.h b/chip/stm32/config-stm32f100.h index b9b67ebc15..ec538e36a4 100644 --- a/chip/stm32/config-stm32f100.h +++ b/chip/stm32/config-stm32f100.h @@ -15,26 +15,26 @@ #define CONFIG_FW_RO_OFF 0 #define CONFIG_FW_RO_SIZE CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_A_OFF CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_A_SIZE CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_B_OFF (2 * CONFIG_FW_IMAGE_SIZE) -#define CONFIG_FW_B_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_OFF CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_B_OFF (2 * CONFIG_FW_IMAGE_SIZE) +#define CONFIG_FW_RW_B_SIZE CONFIG_FW_IMAGE_SIZE #define CONFIG_SECTION_RO_OFF CONFIG_FW_RO_OFF #define CONFIG_SECTION_RO_SIZE CONFIG_FW_RO_SIZE -#define CONFIG_SECTION_A_OFF CONFIG_FW_A_OFF -#define CONFIG_SECTION_A_SIZE CONFIG_FW_A_SIZE -#define CONFIG_SECTION_B_OFF CONFIG_FW_B_OFF +#define CONFIG_SECTION_RW_OFF CONFIG_FW_RW_OFF +#define CONFIG_SECTION_RW_SIZE CONFIG_FW_RW_SIZE +#define CONFIG_SECTION_RW_B_OFF CONFIG_FW_RW_B_OFF #ifdef CONFIG_RW_B -#define CONFIG_SECTION_B_SIZE CONFIG_FW_B_SIZE +#define CONFIG_SECTION_RW_B_SIZE CONFIG_FW_RW_B_SIZE #else /* CONFIG_RW_B */ -#define CONFIG_SECTION_B_SIZE 0 +#define CONFIG_SECTION_RW_B_SIZE 0 #endif /* CONFIG_RW_B */ /* no keys for now */ #define CONFIG_VBOOT_ROOTKEY_OFF (CONFIG_FW_RO_OFF + CONFIG_FW_RO_SIZE) -#define CONFIG_VBLOCK_A_OFF (CONFIG_FW_A_OFF + CONFIG_FW_A_SIZE) -#define CONFIG_VBLOCK_B_OFF (CONFIG_FW_B_OFF + CONFIG_FW_B_SIZE) +#define CONFIG_VBLOCK_RW_OFF (CONFIG_FW_RW_OFF + CONFIG_FW_RW_SIZE) +#define CONFIG_VBLOCK_RW_B_OFF (CONFIG_FW_RW_B_OFF + CONFIG_FW_RW_B_SIZE) #define CONFIG_VBOOT_ROOTKEY_SIZE 0 #define CONFIG_VBLOCK_SIZE 0 diff --git a/chip/stm32/config-stm32l15x.h b/chip/stm32/config-stm32l15x.h index 8e40b9778f..c9482e7950 100644 --- a/chip/stm32/config-stm32l15x.h +++ b/chip/stm32/config-stm32l15x.h @@ -13,24 +13,24 @@ /* Size of one firmware image in flash */ #define CONFIG_FW_IMAGE_SIZE (64 * 1024) -#define CONFIG_FW_RO_OFF 0 -#define CONFIG_FW_RO_SIZE CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_A_OFF CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_A_SIZE CONFIG_FW_IMAGE_SIZE -#define CONFIG_FW_B_OFF (2 * CONFIG_FW_IMAGE_SIZE) -#define CONFIG_FW_B_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RO_OFF 0 +#define CONFIG_FW_RO_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_OFF CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_B_OFF (2 * CONFIG_FW_IMAGE_SIZE) +#define CONFIG_FW_RW_B_SIZE CONFIG_FW_IMAGE_SIZE -#define CONFIG_SECTION_RO_OFF CONFIG_FW_RO_OFF -#define CONFIG_SECTION_RO_SIZE CONFIG_FW_RO_SIZE -#define CONFIG_SECTION_A_OFF CONFIG_FW_A_OFF -#define CONFIG_SECTION_A_SIZE CONFIG_FW_A_SIZE -#define CONFIG_SECTION_B_OFF CONFIG_FW_B_OFF -#define CONFIG_SECTION_B_SIZE CONFIG_FW_B_SIZE +#define CONFIG_SECTION_RO_OFF CONFIG_FW_RO_OFF +#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_RW_B_OFF CONFIG_FW_RW_B_OFF +#define CONFIG_SECTION_RW_B_SIZE CONFIG_FW_RW_B_SIZE /* no keys for now */ #define CONFIG_VBOOT_ROOTKEY_OFF (CONFIG_FW_RO_OFF + CONFIG_FW_RO_SIZE) -#define CONFIG_VBLOCK_A_OFF (CONFIG_FW_A_OFF + CONFIG_FW_A_SIZE) -#define CONFIG_VBLOCK_B_OFF (CONFIG_FW_B_OFF + CONFIG_FW_B_SIZE) +#define CONFIG_VBLOCK_RW_OFF (CONFIG_FW_RW_OFF + CONFIG_FW_RW_SIZE) +#define CONFIG_VBLOCK_RW_B_OFF (CONFIG_FW_RW_B_OFF + CONFIG_FW_RW_B_SIZE) #define CONFIG_VBOOT_ROOTKEY_SIZE 0 #define CONFIG_VBLOCK_SIZE 0 diff --git a/common/firmware_image.S b/common/firmware_image.S index 0c086728aa..c3c00ab2f7 100644 --- a/common/firmware_image.S +++ b/common/firmware_image.S @@ -18,11 +18,11 @@ .incbin FW_IMAGE(RO) /* Read Write firmware copy A */ -.section .image.A, "ax" -.incbin FW_IMAGE(A) +.section .image.RW, "ax" +.incbin FW_IMAGE(RW) #ifdef CONFIG_RW_B /* Read Write firmware copy B */ -.section .image.B, "ax" -.incbin FW_IMAGE(B) +.section .image.RW_B, "ax" +.incbin FW_IMAGE(RW_B) #endif diff --git a/common/firmware_image.lds.S b/common/firmware_image.lds.S index cd095f9634..15e784f45d 100644 --- a/common/firmware_image.lds.S +++ b/common/firmware_image.lds.S @@ -19,14 +19,14 @@ SECTIONS *(.image.RO) } > FLASH =0xff . = ALIGN(CONFIG_FLASH_BANK_SIZE); - .image.A : AT(CONFIG_FLASH_BASE + CONFIG_SECTION_A_OFF) { - *(.image.A) + .image.RW : AT(CONFIG_FLASH_BASE + CONFIG_SECTION_RW_OFF) { + *(.image.RW) BYTE(0xEA) /* Mark end explicitly */ } > FLASH =0xff #ifdef CONFIG_RW_B . = ALIGN(CONFIG_FLASH_BANK_SIZE); - .image.B : AT(CONFIG_FLASH_BASE + CONFIG_SECTION_B_OFF) { - *(.image.B) + .image.RW_B : AT(CONFIG_FLASH_BASE + CONFIG_SECTION_RW_B_OFF) { + *(.image.RW_B) BYTE(0xEB) /* Mark end explicitly */ } > FLASH =0xff #endif diff --git a/common/fmap.c b/common/fmap.c index 5a06e29b4f..685e872aa3 100644 --- a/common/fmap.c +++ b/common/fmap.c @@ -110,9 +110,9 @@ const struct _ec_fmap { { /* The range for autoupdate to update A/B at once. */ .area_name = "EC_RW", - .area_offset = CONFIG_SECTION_A_OFF, - .area_size = CONFIG_SECTION_A_SIZE - + CONFIG_SECTION_B_SIZE, + .area_offset = CONFIG_SECTION_RW_OFF, + .area_size = CONFIG_SECTION_RW_SIZE + + CONFIG_SECTION_RW_B_SIZE, .area_flags = FMAP_AREA_STATIC | FMAP_AREA_RO, }, { @@ -127,19 +127,19 @@ const struct _ec_fmap { /* Firmware A */ { .area_name = "RW_SECTION_A", - .area_offset = CONFIG_SECTION_A_OFF, - .area_size = CONFIG_SECTION_A_SIZE, + .area_offset = CONFIG_SECTION_RW_OFF, + .area_size = CONFIG_SECTION_RW_SIZE, .area_flags = FMAP_AREA_STATIC, }, { .area_name = "FW_MAIN_A", - .area_offset = CONFIG_FW_A_OFF, - .area_size = CONFIG_FW_A_SIZE, + .area_offset = CONFIG_FW_RW_OFF, + .area_size = CONFIG_FW_RW_SIZE, .area_flags = FMAP_AREA_STATIC, }, { .area_name = "RW_FWID_A", /* FIXME: Where is it? */ - .area_offset = CONFIG_FW_A_OFF + + .area_offset = CONFIG_FW_RW_OFF + (uint32_t)__version_struct_offset + offsetof(struct version_struct, version), .area_size = sizeof(version_data.version), @@ -147,7 +147,7 @@ const struct _ec_fmap { }, { .area_name = "VBLOCK_A", - .area_offset = CONFIG_VBLOCK_A_OFF, + .area_offset = CONFIG_VBLOCK_RW_OFF, .area_size = CONFIG_VBLOCK_SIZE, .area_flags = FMAP_AREA_STATIC, }, @@ -156,19 +156,19 @@ const struct _ec_fmap { /* Firmware B */ { .area_name = "RW_SECTION_B", - .area_offset = CONFIG_SECTION_B_OFF, - .area_size = CONFIG_SECTION_B_SIZE, + .area_offset = CONFIG_SECTION_RW_B_OFF, + .area_size = CONFIG_SECTION_RW_B_SIZE, .area_flags = FMAP_AREA_STATIC, }, { .area_name = "FW_MAIN_B", - .area_offset = CONFIG_FW_B_OFF, - .area_size = CONFIG_FW_B_SIZE, + .area_offset = CONFIG_FW_RW_B_OFF, + .area_size = CONFIG_FW_RW_B_SIZE, .area_flags = FMAP_AREA_STATIC, }, { .area_name = "RW_FWID_B", /* FIXME: Where is it? */ - .area_offset = CONFIG_FW_B_OFF + + .area_offset = CONFIG_FW_RW_B_OFF + (uint32_t)__version_struct_offset + offsetof(struct version_struct, version), .area_size = sizeof(version_data.version), @@ -176,7 +176,7 @@ const struct _ec_fmap { }, { .area_name = "VBLOCK_B", - .area_offset = CONFIG_VBLOCK_B_OFF, + .area_offset = CONFIG_VBLOCK_RW_B_OFF, .area_size = CONFIG_VBLOCK_SIZE, .area_flags = FMAP_AREA_STATIC, }, diff --git a/common/system_common.c b/common/system_common.c index 680d0c90ed..cb909730cd 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -221,12 +221,12 @@ enum system_image_copy_t system_get_image_copy(void) my_addr < (CONFIG_SECTION_RO_OFF + CONFIG_SECTION_RO_SIZE)) return SYSTEM_IMAGE_RO; - if (my_addr >= CONFIG_SECTION_A_OFF && - my_addr < (CONFIG_SECTION_A_OFF + CONFIG_SECTION_A_SIZE)) + if (my_addr >= CONFIG_SECTION_RW_OFF && + my_addr < (CONFIG_SECTION_RW_OFF + CONFIG_SECTION_RW_SIZE)) return SYSTEM_IMAGE_RW_A; - if (my_addr >= CONFIG_SECTION_B_OFF && - my_addr < (CONFIG_SECTION_B_OFF + CONFIG_SECTION_B_SIZE)) + if (my_addr >= CONFIG_SECTION_RW_B_OFF && + my_addr < (CONFIG_SECTION_RW_B_OFF + CONFIG_SECTION_RW_B_SIZE)) return SYSTEM_IMAGE_RW_B; return SYSTEM_IMAGE_UNKNOWN; @@ -247,12 +247,12 @@ int system_unsafe_to_overwrite(uint32_t offset, uint32_t size) { r_size = CONFIG_FW_RO_SIZE; break; case SYSTEM_IMAGE_RW_A: - r_offset = CONFIG_FW_A_OFF; - r_size = CONFIG_FW_A_SIZE; + r_offset = CONFIG_FW_RW_OFF; + r_size = CONFIG_FW_RW_SIZE; break; case SYSTEM_IMAGE_RW_B: - r_offset = CONFIG_FW_B_OFF; - r_size = CONFIG_FW_B_SIZE; + r_offset = CONFIG_FW_RW_B_OFF; + r_size = CONFIG_FW_RW_B_SIZE; break; default: return 0; @@ -318,10 +318,10 @@ static uint32_t get_base(enum system_image_copy_t copy) case SYSTEM_IMAGE_RO: return CONFIG_FLASH_BASE + CONFIG_FW_RO_OFF; case SYSTEM_IMAGE_RW_A: - return CONFIG_FLASH_BASE + CONFIG_FW_A_OFF; + return CONFIG_FLASH_BASE + CONFIG_FW_RW_OFF; #ifdef CONFIG_RW_B case SYSTEM_IMAGE_RW_B: - return CONFIG_FLASH_BASE + CONFIG_FW_B_OFF; + return CONFIG_FLASH_BASE + CONFIG_FW_RW_B_OFF; #endif default: return 0xffffffff; @@ -335,10 +335,10 @@ static uint32_t get_size(enum system_image_copy_t copy) case SYSTEM_IMAGE_RO: return CONFIG_FW_RO_SIZE; case SYSTEM_IMAGE_RW_A: - return CONFIG_FW_A_SIZE; + return CONFIG_FW_RW_SIZE; #ifdef CONFIG_RW_B case SYSTEM_IMAGE_RW_B: - return CONFIG_FW_B_SIZE; + return CONFIG_FW_RW_B_SIZE; #endif default: return 0; diff --git a/common/vboot_hash.c b/common/vboot_hash.c index 6feba42229..d6b37fda28 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -113,8 +113,8 @@ static void vboot_hash_init(void) data_size = tag->size; } else { /* Start computing the hash of firmware A */ - vboot_hash_start(CONFIG_FW_A_OFF - CONFIG_FLASH_BASE, - CONFIG_FW_A_SIZE, NULL, 0); + vboot_hash_start(CONFIG_FW_RW_OFF - CONFIG_FLASH_BASE, + CONFIG_FW_RW_SIZE, NULL, 0); } } @@ -187,8 +187,8 @@ DECLARE_HOOK(HOOK_SYSJUMP, vboot_hash_preserve_state, HOOK_PRIO_DEFAULT); static int command_hash(int argc, char **argv) { - uint32_t offset = CONFIG_FW_A_OFF - CONFIG_FLASH_BASE; - uint32_t size = CONFIG_FW_A_SIZE; + uint32_t offset = CONFIG_FW_RW_OFF - CONFIG_FLASH_BASE; + uint32_t size = CONFIG_FW_RW_SIZE; char *e; if (argc == 2 && !strcasecmp(argv[1], "abort")) { diff --git a/common/vboot_sig.c b/common/vboot_sig.c index 6df42e7bf5..c0e2f2ab79 100644 --- a/common/vboot_sig.c +++ b/common/vboot_sig.c @@ -134,8 +134,8 @@ int vboot_check_signature(void) ts1 = get_time(); r = good_image((uint8_t *)CONFIG_VBOOT_ROOTKEY_OFF, - (uint8_t *)CONFIG_VBLOCK_A_OFF, CONFIG_VBLOCK_SIZE, - (uint8_t *)CONFIG_FW_A_OFF, CONFIG_FW_A_SIZE); + (uint8_t *)CONFIG_VBLOCK_RW_OFF, CONFIG_VBLOCK_SIZE, + (uint8_t *)CONFIG_FW_RW_OFF, CONFIG_FW_RW_SIZE); ts2 = get_time(); CPRINTF("[%T Vboot result=%d, elapsed time=%ld us]\n", @@ -160,8 +160,8 @@ int vboot_check_signature(void) ts1 = get_time(); r = good_image((uint8_t *)CONFIG_VBOOT_ROOTKEY_OFF, - (uint8_t *)CONFIG_VBLOCK_B_OFF, CONFIG_VBLOCK_SIZE, - (uint8_t *)CONFIG_FW_B_OFF, CONFIG_FW_B_SIZE); + (uint8_t *)CONFIG_VBLOCK_RW_B_OFF, CONFIG_VBLOCK_SIZE, + (uint8_t *)CONFIG_FW_RW_B_OFF, CONFIG_FW_RW_B_SIZE); ts2 = get_time(); CPRINTF("[%T Vboot result=%d, elapsed time=%ld us]\n", diff --git a/util/burn_my_ec.c b/util/burn_my_ec.c index afc14d3359..71fdfd740e 100644 --- a/util/burn_my_ec.c +++ b/util/burn_my_ec.c @@ -141,11 +141,11 @@ int main(int argc, char *argv[]) return -3; #ifdef CONFIG_RW_B - flash_partition(EC_IMAGE_RW_B, data + CONFIG_FW_B_OFF, - CONFIG_FW_B_OFF, CONFIG_FW_B_SIZE); + flash_partition(EC_IMAGE_RW_B, data + CONFIG_FW_RW_B_OFF, + CONFIG_FW_RW_B_OFF, CONFIG_FW_RW_B_SIZE); #endif /* CONFIG_RW_B */ - flash_partition(EC_IMAGE_RW_A, data + CONFIG_FW_A_OFF, - CONFIG_FW_A_OFF, CONFIG_FW_A_SIZE); + flash_partition(EC_IMAGE_RW_A, data + CONFIG_FW_RW_OFF, + CONFIG_FW_RW_OFF, CONFIG_FW_RW_SIZE); flash_partition(EC_IMAGE_RO, data + CONFIG_FW_RO_OFF, CONFIG_FW_RO_OFF, CONFIG_FW_RO_SIZE); |