mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
Fix regression on linking address
On platform where the flash base address is non null (e.g. stm32), we need to take it into account. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=On Daisy, type "sysjump A" and "version" into the EC console and observe that the commands succeed. Change-Id: I95596d45f6970259d19d7063f6794fae0c400ab7
This commit is contained in:
@@ -164,7 +164,7 @@ const char *system_get_reset_cause_string(void)
|
||||
|
||||
enum system_image_copy_t system_get_image_copy(void)
|
||||
{
|
||||
uint32_t my_addr = (uint32_t)system_get_image_copy;
|
||||
uint32_t my_addr = (uint32_t)system_get_image_copy - CONFIG_FLASH_BASE;
|
||||
|
||||
if (my_addr >= CONFIG_SECTION_RO_OFF &&
|
||||
my_addr < (CONFIG_SECTION_RO_OFF + CONFIG_SECTION_RO_SIZE))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#define FW_OFF_(section) CONFIG_FW_##section##_OFF
|
||||
#define FW_OFF(section) FW_OFF_(section)
|
||||
#define FW_OFF(section) (CONFIG_FLASH_BASE + FW_OFF_(section))
|
||||
|
||||
#define FW_SIZE_(section) CONFIG_FW_##section##_SIZE
|
||||
#define FW_SIZE(section) FW_SIZE_(section)
|
||||
|
||||
Reference in New Issue
Block a user