flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2

which has 16-bit well-known pointers.

Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8443
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tested-by: jenkins
This commit is contained in:
Luke Wren
2024-06-28 16:41:48 +01:00
committed by Tomas Vanek
parent eb4a634248
commit 2e8e1a3da3

View File

@@ -331,8 +331,8 @@ static int rp2xxx_lookup_rom_symbol(struct target *target, uint16_t tag, uint16_
/* Distinguish old-style RP2350 ROM table (A0, and earlier A1 builds)
based on position of table -- a high address means it is shared with
RISC-V, i.e. new-style. */
uint32_t table_ptr;
err = target_read_u32(target, BOOTROM_MAGIC_ADDR + 4, &table_ptr);
uint16_t table_ptr;
err = target_read_u16(target, BOOTROM_MAGIC_ADDR + 4, &table_ptr);
if (err != ERROR_OK)
return err;
if (table_ptr < 0x7c00)