arm_coresight: add include file and use it
Several magic numbers related to ARM CoreSight specification IHI0029E are spread around OpenOCD code. Define through macros the ARM CoreSight magic numbers and collect them in a single include file. Use the new macros wherever possible. Change-Id: I9b0c1c651ce4ffbaf08d31791ef16e95983ee4cb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6446 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "armv7a_mmu.h"
|
||||
#include "target_request.h"
|
||||
#include "target_type.h"
|
||||
#include "arm_coresight.h"
|
||||
#include "arm_opcodes.h"
|
||||
#include "arm_semihosting.h"
|
||||
#include "jtag/interface.h"
|
||||
@@ -2921,8 +2922,8 @@ static int cortex_a_examine_first(struct target *target)
|
||||
retval = dap_get_debugbase(armv7a->debug_ap, &dbgbase, &apid);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
/* Lookup 0x15 -- Processor DAP */
|
||||
retval = dap_lookup_cs_component(armv7a->debug_ap, dbgbase, 0x15,
|
||||
/* Lookup Processor DAP */
|
||||
retval = dap_lookup_cs_component(armv7a->debug_ap, dbgbase, ARM_CS_C9_DEVTYPE_CORE_DEBUG,
|
||||
&armv7a->debug_base, &coreidx);
|
||||
if (retval != ERROR_OK) {
|
||||
LOG_ERROR("Can't detect %s's dbgbase from the ROM table; you need to specify it explicitly.",
|
||||
|
||||
Reference in New Issue
Block a user