From 024a2447e9cc3897f567ef222e5613115cd0d720 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 19 Feb 2016 16:34:56 -0800 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/328810 Reviewed-by: Bill Richardson --- board/cr50/tpm2/upgrade.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/cr50/tpm2/upgrade.c b/board/cr50/tpm2/upgrade.c index 634c7fa9e4..dcc7acf631 100644 --- a/board/cr50/tpm2/upgrade.c +++ b/board/cr50/tpm2/upgrade.c @@ -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;