cr50: upgrade: fix debug messages to show address instead of offset

Debug messages generated by the firmware upgrade extension command
show flash offsets (the values used when calling flash API), but the
user is more interested in absolute addresses, as they are reported by
some other debug printouts.

Change fw_upgrade_command_handler() debug output to report absolute
flash addresses.

BRANCH=none
BUG=chrome-os-partner:37754
TEST=ran upgrade test, observed proper addresses reported:
  fw_upgrade_command_handler: programming at address 0x84000
  fw_upgrade_command_handler: programming at address 0x84400
  ...

Change-Id: I8a6cd6020e5ddcbf41f5931cf7632fc598d4745e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/328810
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Vadim Bendebury
2016-02-19 16:34:56 -08:00
committed by chrome-bot
parent 9f5782ba05
commit 024a2447e9

View File

@@ -161,7 +161,8 @@ static void fw_upgrade_command_handler(void *body,
return;
}
CPRINTF("%s: programming at offset 0x%x\n", __func__, block_offset);
CPRINTF("%s: programming at address 0x%x\n", __func__,
block_offset + CONFIG_PROGRAM_MEMORY_BASE);
if (flash_physical_write(block_offset, body_size,
cmd_body->block_body) != EC_SUCCESS) {
*rv = UPGRADE_WRITE_FAILURE;