mirror of
https://github.com/openocd-org/openocd.git
synced 2025-10-14 02:58:23 +08:00
Compare commits
8 Commits
1ebff3ab33
...
a9015ba79d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a9015ba79d | ||
![]() |
1040bdec79 | ||
![]() |
99d642ca5b | ||
![]() |
06a0b8451f | ||
![]() |
1afa12005c | ||
![]() |
82dc399e5e | ||
![]() |
9e4b6b90c9 | ||
![]() |
33ebae9abd |
118
configure.ac
118
configure.ac
@@ -197,6 +197,15 @@ m4_define([RSHIM_ADAPTER],
|
||||
m4_define([AMTJTAGACCEL_ADAPTER],
|
||||
[[[amtjtagaccel], [Amontec JTAG-Accelerator driver], [AMTJTAGACCEL]]])
|
||||
|
||||
m4_define([HOST_ARM_BITBANG_ADAPTERS],
|
||||
[[[ep93xx], [Bitbanging on EP93xx-based SBCs], [EP93XX]],
|
||||
[[at91rm9200], [Bitbanging on AT91RM9200-based SBCs], [AT91RM9200]]])
|
||||
|
||||
m4_define([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS],
|
||||
[[[bcm2835gpio], [Bitbanging on BCM2835 (as found in Raspberry Pi)], [BCM2835GPIO]],
|
||||
[[imx_gpio], [Bitbanging on NXP IMX processors], [IMX_GPIO]],
|
||||
[[am335xgpio], [Bitbanging on AM335x (as found in Beaglebones)], [AM335XGPIO]]])
|
||||
|
||||
# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter
|
||||
# because there is an M4 macro called 'adapter'.
|
||||
m4_define([DUMMY_ADAPTER],
|
||||
@@ -336,6 +345,16 @@ AC_ARG_ADAPTERS([
|
||||
AMTJTAGACCEL_ADAPTER
|
||||
],[no])
|
||||
|
||||
# The following adapters use bitbanging and can actually be built on all architectures,
|
||||
# which is useful to verify that they still build fine.
|
||||
# We could enable them automatically only on the architectures where they actually occur:
|
||||
# HOST_ARM_BITBANG_ADAPTERS: when ${host_cpu} matches arm*
|
||||
# HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS: when ${host_cpu} matches arm*|aarch64
|
||||
# However, conditionally changing the meaning of 'auto' requires
|
||||
# a more flexible logic around.
|
||||
AC_ARG_ADAPTERS([HOST_ARM_BITBANG_ADAPTERS],[no])
|
||||
AC_ARG_ADAPTERS([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS],[no])
|
||||
|
||||
AC_ARG_ENABLE([parport],
|
||||
AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
|
||||
[build_parport=$enableval], [build_parport=no])
|
||||
@@ -350,39 +369,6 @@ AC_ARG_ENABLE([parport_giveio],
|
||||
[Enable use of giveio for parport (for CygWin only)]),
|
||||
[parport_use_giveio=$enableval], [parport_use_giveio=])
|
||||
|
||||
AS_CASE(["${host_cpu}"],
|
||||
[arm*|aarch64], [
|
||||
AC_ARG_ENABLE([bcm2835gpio],
|
||||
AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]),
|
||||
[build_bcm2835gpio=$enableval], [build_bcm2835gpio=no])
|
||||
AC_ARG_ENABLE([imx_gpio],
|
||||
AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]),
|
||||
[build_imx_gpio=$enableval], [build_imx_gpio=no])
|
||||
AC_ARG_ENABLE([am335xgpio],
|
||||
AS_HELP_STRING([--enable-am335xgpio], [Enable building support for bitbanging on AM335x (as found in Beaglebones)]),
|
||||
[build_am335xgpio=$enableval], [build_am335xgpio=no])
|
||||
],
|
||||
[
|
||||
build_bcm2835gpio=no
|
||||
build_imx_gpio=no
|
||||
build_am335xgpio=no
|
||||
])
|
||||
|
||||
AS_CASE(["${host_cpu}"],
|
||||
[arm*], [
|
||||
AC_ARG_ENABLE([ep93xx],
|
||||
AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]),
|
||||
[build_ep93xx=$enableval], [build_ep93xx=no])
|
||||
|
||||
AC_ARG_ENABLE([at91rm9200],
|
||||
AS_HELP_STRING([--enable-at91rm9200], [Enable building support for AT91RM9200 based SBCs]),
|
||||
[build_at91rm9200=$enableval], [build_at91rm9200=no])
|
||||
],
|
||||
[
|
||||
build_ep93xx=no
|
||||
build_at91rm9200=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([gw16012],
|
||||
AS_HELP_STRING([--enable-gw16012], [Enable building support for the Gateworks GW16012 JTAG Programmer]),
|
||||
[build_gw16012=$enableval], [build_gw16012=no])
|
||||
@@ -529,41 +515,6 @@ AS_IF([test "x$ADAPTER_VAR([dummy])" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_ep93xx" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_EP93XX], [1], [1 if you want ep93xx.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_EP93XX], [0], [0 if you don't want ep93xx.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_at91rm9200" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_AT91RM9200], [1], [1 if you want at91rm9200.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_AT91RM9200], [0], [0 if you don't want at91rm9200.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_bcm2835gpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_BCM2835GPIO], [1], [1 if you want bcm2835gpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_BCM2835GPIO], [0], [0 if you don't want bcm2835gpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_imx_gpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_IMX_GPIO], [1], [1 if you want imx_gpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_IMX_GPIO], [0], [0 if you don't want imx_gpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_am335xgpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_AM335XGPIO], [1], [1 if you want am335xgpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_AM335XGPIO], [0], [0 if you don't want am335xgpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$parport_use_ppdev" = "xyes"], [
|
||||
AC_DEFINE([PARPORT_USE_PPDEV], [1], [1 if you want parport to use ppdev.])
|
||||
], [
|
||||
@@ -709,6 +660,8 @@ PROCESS_ADAPTERS([JTAG_VPI_ADAPTER], [true], [unused])
|
||||
PROCESS_ADAPTERS([RSHIM_ADAPTER], ["x$can_build_rshim" = "xyes"],
|
||||
[internal error: validation should happen beforehand])
|
||||
PROCESS_ADAPTERS([AMTJTAGACCEL_ADAPTER], [true], [unused])
|
||||
PROCESS_ADAPTERS([HOST_ARM_BITBANG_ADAPTERS], [true], [unused])
|
||||
PROCESS_ADAPTERS([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS], [true], [unused])
|
||||
PROCESS_ADAPTERS([DUMMY_ADAPTER], [true], [unused])
|
||||
|
||||
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
|
||||
@@ -723,6 +676,26 @@ AS_IF([test "x$enable_remote_bitbang" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_bcm2835gpio" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_imx_gpio" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_am335xgpio" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_ep93xx" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_at91rm9200" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_stlink" != "xno" -o "x$enable_ti_icdi" != "xno" -o "x$enable_nulink" != "xno"], [
|
||||
AC_DEFINE([BUILD_HLADAPTER], [1], [1 if you want the High Level JTAG driver.])
|
||||
AM_CONDITIONAL([HLADAPTER], [true])
|
||||
@@ -758,11 +731,6 @@ AS_IF([test "x$enable_esp_usb_jtag" != "xno"], [
|
||||
AM_CONDITIONAL([RELEASE], [test "x$build_release" = "xyes"])
|
||||
AM_CONDITIONAL([PARPORT], [test "x$build_parport" = "xyes"])
|
||||
AM_CONDITIONAL([GIVEIO], [test "x$parport_use_giveio" = "xyes"])
|
||||
AM_CONDITIONAL([EP93XX], [test "x$build_ep93xx" = "xyes"])
|
||||
AM_CONDITIONAL([AT91RM9200], [test "x$build_at91rm9200" = "xyes"])
|
||||
AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
|
||||
AM_CONDITIONAL([IMX_GPIO], [test "x$build_imx_gpio" = "xyes"])
|
||||
AM_CONDITIONAL([AM335XGPIO], [test "x$build_am335xgpio" = "xyes"])
|
||||
AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"])
|
||||
AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"])
|
||||
AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
|
||||
@@ -884,10 +852,12 @@ m4_foreach([adapter], [USB1_ADAPTERS,
|
||||
JTAG_VPI_ADAPTER,
|
||||
RSHIM_ADAPTER,
|
||||
AMTJTAGACCEL_ADAPTER,
|
||||
HOST_ARM_BITBANG_ADAPTERS,
|
||||
HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS,
|
||||
DUMMY_ADAPTER,
|
||||
OPTIONAL_LIBRARIES,
|
||||
COVERAGE],
|
||||
[s=m4_format(["%-41s"], ADAPTER_DESC([adapter]))
|
||||
[s=m4_format(["%-49s"], ADAPTER_DESC([adapter]))
|
||||
AS_CASE([$ADAPTER_VAR([adapter])],
|
||||
[auto], [
|
||||
echo "$s"yes '(auto)'
|
||||
|
@@ -1382,11 +1382,11 @@ Read the OpenOCD source code (and Developer's Guide)
|
||||
if you have a new kind of hardware interface
|
||||
and need to provide a driver for it.
|
||||
|
||||
@deffn {Command} {find} 'filename'
|
||||
@deffn {Command} {find} filename
|
||||
Prints full path to @var{filename} according to OpenOCD search rules.
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {ocd_find} 'filename'
|
||||
@deffn {Command} {ocd_find} filename
|
||||
Prints full path to @var{filename} according to OpenOCD search rules. This
|
||||
is a low level function used by the @command{find}. Usually you want
|
||||
to use @command{find}, instead.
|
||||
@@ -2499,6 +2499,9 @@ If this command is not specified, serial strings are not checked.
|
||||
Only the following adapter drivers use the serial string from this command:
|
||||
arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (stlink, ti-icdi), jlink, kitprog, opendus,
|
||||
openjtag, osbdm, presto, rlink, st-link, usb_blaster (ublast2), usbprog, vsllink, xds110.
|
||||
|
||||
For jlink adapters, the @var{serial_string} is also compared
|
||||
against the adapter's nickname.
|
||||
@end deffn
|
||||
|
||||
@section Interface Drivers
|
||||
@@ -9335,7 +9338,7 @@ Redirect logging to @var{filename}. If used without an argument or
|
||||
stderr.
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {add_script_search_dir} [directory]
|
||||
@deffn {Command} {add_script_search_dir} directory
|
||||
Add @var{directory} to the file/script search path.
|
||||
@end deffn
|
||||
|
||||
@@ -9870,11 +9873,11 @@ Requests the current target to map the specified @var{virtual_address}
|
||||
to its corresponding physical address, and displays the result.
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {add_help_text} 'command_name' 'help-string'
|
||||
@deffn {Command} {add_help_text} command_name help_string
|
||||
Add or replace help text on the given @var{command_name}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {add_usage_text} 'command_name' 'help-string'
|
||||
@deffn {Command} {add_usage_text} command_name help_string
|
||||
Add or replace usage text on the given @var{command_name}.
|
||||
@end deffn
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <jtag/interface.h>
|
||||
#include <jtag/swd.h>
|
||||
@@ -40,8 +41,6 @@ static struct jaylink_connection connlist[JAYLINK_MAX_CONNECTIONS];
|
||||
static enum jaylink_jtag_version jtag_command_version;
|
||||
static uint8_t caps[JAYLINK_DEV_EXT_CAPS_SIZE];
|
||||
|
||||
static uint32_t serial_number;
|
||||
static bool use_serial_number;
|
||||
static bool use_usb_location;
|
||||
static enum jaylink_usb_address usb_address;
|
||||
static bool use_usb_address;
|
||||
@@ -561,8 +560,9 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device)
|
||||
}
|
||||
|
||||
use_usb_location = !!adapter_usb_get_location();
|
||||
const char *adapter_serial = adapter_get_required_serial();
|
||||
|
||||
if (!use_serial_number && !use_usb_address && !use_usb_location && num_devices > 1) {
|
||||
if (!adapter_serial && !use_usb_address && !use_usb_location && num_devices > 1) {
|
||||
LOG_ERROR("Multiple devices found, specify the desired device");
|
||||
LOG_INFO("Found devices:");
|
||||
for (size_t i = 0; devs[i]; i++) {
|
||||
@@ -575,7 +575,12 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device)
|
||||
jaylink_strerror(ret));
|
||||
continue;
|
||||
}
|
||||
LOG_INFO("Device %zu serial: %" PRIu32, i, serial);
|
||||
char name[JAYLINK_NICKNAME_MAX_LENGTH];
|
||||
int name_ret = jaylink_device_get_nickname(devs[i], name);
|
||||
if (name_ret == JAYLINK_OK)
|
||||
LOG_INFO("Device %zu serial: %" PRIu32 ", nickname %s", i, serial, name);
|
||||
else
|
||||
LOG_INFO("Device %zu serial: %" PRIu32, i, serial);
|
||||
}
|
||||
|
||||
jaylink_free_devices(devs, true);
|
||||
@@ -585,23 +590,39 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device)
|
||||
|
||||
*found_device = false;
|
||||
|
||||
uint32_t serial_number;
|
||||
ret = jaylink_parse_serial_number(adapter_serial, &serial_number);
|
||||
if (ret != JAYLINK_OK)
|
||||
serial_number = 0;
|
||||
|
||||
for (size_t i = 0; devs[i]; i++) {
|
||||
struct jaylink_device *dev = devs[i];
|
||||
|
||||
if (use_serial_number) {
|
||||
uint32_t tmp;
|
||||
ret = jaylink_device_get_serial_number(dev, &tmp);
|
||||
if (adapter_serial) {
|
||||
/*
|
||||
* Treat adapter serial as a nickname first as it can also be numeric.
|
||||
* If it fails to match (optional) device nickname try to compare
|
||||
* adapter serial with the actual device serial number.
|
||||
*/
|
||||
char nickname[JAYLINK_NICKNAME_MAX_LENGTH];
|
||||
ret = jaylink_device_get_nickname(dev, nickname);
|
||||
if (ret != JAYLINK_OK || strcmp(nickname, adapter_serial) != 0) {
|
||||
if (!serial_number)
|
||||
continue;
|
||||
|
||||
if (ret == JAYLINK_ERR_NOT_AVAILABLE) {
|
||||
continue;
|
||||
} else if (ret != JAYLINK_OK) {
|
||||
LOG_WARNING("jaylink_device_get_serial_number() failed: %s",
|
||||
jaylink_strerror(ret));
|
||||
continue;
|
||||
uint32_t tmp;
|
||||
ret = jaylink_device_get_serial_number(dev, &tmp);
|
||||
if (ret == JAYLINK_ERR_NOT_AVAILABLE) {
|
||||
continue;
|
||||
} else if (ret != JAYLINK_OK) {
|
||||
LOG_WARNING("jaylink_device_get_serial_number() failed: %s",
|
||||
jaylink_strerror(ret));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (serial_number != tmp)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (serial_number != tmp)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (use_usb_address) {
|
||||
@@ -670,29 +691,15 @@ static int jlink_init(void)
|
||||
return ERROR_JTAG_INIT_FAILED;
|
||||
}
|
||||
|
||||
const char *serial = adapter_get_required_serial();
|
||||
if (serial) {
|
||||
ret = jaylink_parse_serial_number(serial, &serial_number);
|
||||
if (ret == JAYLINK_ERR) {
|
||||
LOG_ERROR("Invalid serial number: %s", serial);
|
||||
jaylink_exit(jayctx);
|
||||
return ERROR_JTAG_INIT_FAILED;
|
||||
}
|
||||
if (ret != JAYLINK_OK) {
|
||||
LOG_ERROR("jaylink_parse_serial_number() failed: %s", jaylink_strerror(ret));
|
||||
jaylink_exit(jayctx);
|
||||
return ERROR_JTAG_INIT_FAILED;
|
||||
}
|
||||
use_serial_number = true;
|
||||
if (adapter_get_required_serial())
|
||||
use_usb_address = false;
|
||||
}
|
||||
|
||||
bool found_device;
|
||||
ret = jlink_open_device(JAYLINK_HIF_USB, &found_device);
|
||||
if (ret != ERROR_OK)
|
||||
return ret;
|
||||
|
||||
if (!found_device && use_serial_number) {
|
||||
if (!found_device && adapter_get_required_serial()) {
|
||||
ret = jlink_open_device(JAYLINK_HIF_TCP, &found_device);
|
||||
if (ret != ERROR_OK)
|
||||
return ret;
|
||||
|
@@ -883,12 +883,27 @@ int armv8_read_mpidr(struct armv8_common *armv8)
|
||||
int retval = ERROR_FAIL;
|
||||
struct arm *arm = &armv8->arm;
|
||||
struct arm_dpm *dpm = armv8->arm.dpm;
|
||||
uint32_t mpidr;
|
||||
uint64_t mpidr;
|
||||
uint8_t multi_processor_system;
|
||||
uint8_t aff3;
|
||||
uint8_t aff2;
|
||||
uint8_t aff1;
|
||||
uint8_t aff0;
|
||||
uint8_t mt;
|
||||
|
||||
retval = dpm->prepare(dpm);
|
||||
if (retval != ERROR_OK)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* TODO: BUG - routine armv8_dpm_modeswitch() doesn't re-evaluate 'arm->dpm->core_state'.
|
||||
* If the core is halted in EL0 AArch32 while EL1 is in AArch64, the modeswitch moves the core
|
||||
* to EL1, but there is no re-evaluation of dpm->arm->core_state. As a result, while the core
|
||||
* is in AArch64, the code considers the system still in AArch32. The read of MPIDR would
|
||||
* select the instruction based on the old core_state. The call to 'armv8_dpm_get_core_state()'
|
||||
* below could also potentially return the incorrect execution state for the current EL.
|
||||
*/
|
||||
|
||||
/* check if we're in an unprivileged mode */
|
||||
if (armv8_curel_from_core_mode(arm->core_mode) < SYSTEM_CUREL_EL1) {
|
||||
retval = armv8_dpm_modeswitch(dpm, ARMV8_64_EL1H);
|
||||
@@ -896,17 +911,39 @@ int armv8_read_mpidr(struct armv8_common *armv8)
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = dpm->instr_read_data_r0(dpm, armv8_opcode(armv8, READ_REG_MPIDR), &mpidr);
|
||||
retval = dpm->instr_read_data_r0_64(dpm, armv8_opcode(armv8, READ_REG_MPIDR), &mpidr);
|
||||
if (retval != ERROR_OK)
|
||||
goto done;
|
||||
if (mpidr & 1U<<31) {
|
||||
armv8->multi_processor_system = (mpidr >> 30) & 1;
|
||||
armv8->cluster_id = (mpidr >> 8) & 0xf;
|
||||
armv8->cpu_id = mpidr & 0x3;
|
||||
LOG_INFO("%s cluster %x core %x %s", target_name(armv8->arm.target),
|
||||
armv8->cluster_id,
|
||||
armv8->cpu_id,
|
||||
armv8->multi_processor_system == 0 ? "multi core" : "single core");
|
||||
multi_processor_system = (mpidr >> 30) & 1;
|
||||
aff3 = (mpidr >> 32) & 0xff;
|
||||
aff2 = (mpidr >> 16) & 0xff;
|
||||
aff1 = (mpidr >> 8) & 0xff;
|
||||
aff0 = mpidr & 0xff;
|
||||
mt = (mpidr >> 24) & 0x1;
|
||||
if (armv8_dpm_get_core_state(&armv8->dpm) == ARM_STATE_AARCH64) {
|
||||
if (mt)
|
||||
LOG_INFO("%s socket %" PRIu32 " cluster %" PRIu32 " core %" PRIu32 " thread %" PRIu32 " %s",
|
||||
target_name(armv8->arm.target),
|
||||
aff3, aff2, aff1, aff0,
|
||||
multi_processor_system == 0 ? "multi core" : "single core");
|
||||
else
|
||||
LOG_INFO("%s socket %" PRIu32 " cluster %" PRIu32 " core %" PRIu32 " %s",
|
||||
target_name(armv8->arm.target),
|
||||
aff3, aff1, aff0,
|
||||
multi_processor_system == 0 ? "multi core" : "single core");
|
||||
} else {
|
||||
if (mt)
|
||||
LOG_INFO("%s cluster %" PRIu32 " core %" PRIu32 " thread %" PRIu32 " %s",
|
||||
target_name(armv8->arm.target),
|
||||
aff2, aff1, aff0,
|
||||
multi_processor_system == 0 ? "multi core" : "single core");
|
||||
else
|
||||
LOG_INFO("%s cluster %" PRIu32 " core %" PRIu32 " %s",
|
||||
target_name(armv8->arm.target),
|
||||
aff1, aff0,
|
||||
multi_processor_system == 0 ? "multi core" : "single core");
|
||||
}
|
||||
} else
|
||||
LOG_ERROR("mpidr not in multiprocessor format");
|
||||
|
||||
|
@@ -195,11 +195,6 @@ struct armv8_common {
|
||||
|
||||
const uint32_t *opcodes;
|
||||
|
||||
/* mdir */
|
||||
uint8_t multi_processor_system;
|
||||
uint8_t cluster_id;
|
||||
uint8_t cpu_id;
|
||||
|
||||
/* armv8 aarch64 need below information for page translation */
|
||||
uint8_t va_size;
|
||||
uint8_t pa_size;
|
||||
|
@@ -1779,6 +1779,7 @@ static int cortex_m_assert_reset(struct target *target)
|
||||
int retval2;
|
||||
retval2 = mem_ap_write_atomic_u32(armv7m->debug_ap, DCB_DEMCR,
|
||||
TRCENA | VC_HARDERR | VC_BUSERR | VC_CORERESET);
|
||||
target->debug_reason = DBG_REASON_DBGRQ;
|
||||
if (retval != ERROR_OK || retval2 != ERROR_OK)
|
||||
LOG_TARGET_INFO(target, "AP write error, reset will not halt");
|
||||
}
|
||||
|
@@ -51,8 +51,8 @@ proc release_cpu {cpu} {
|
||||
}
|
||||
|
||||
# Release the cpu; it will start executing something bogus
|
||||
mem2array regs 32 $RST_BRRL 1
|
||||
mww $RST_BRRL [expr {$regs(0) | 1 << $cpu}]
|
||||
set reg [read_memory $RST_BRRL 32 1]
|
||||
mww $RST_BRRL [expr {$reg | 1 << $cpu}]
|
||||
|
||||
if {$not_halted} {
|
||||
resume
|
||||
|
Reference in New Issue
Block a user