diff options
author | Liviu Ionescu <ilg@livius.net> | 2018-05-13 18:39:06 +0300 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-06-04 09:16:08 +0100 |
commit | 2517bae6c1438350255dca63e7d1c1e06c64b6bb (patch) | |
tree | 707cce397bf68d1fd040f7f2a4c17e722257fdcd /src/target/armv8.c | |
parent | cdf1e826eb23c29de1019ce64125f644f01b0afe (diff) | |
download | riscv-openocd-2517bae6c1438350255dca63e7d1c1e06c64b6bb.zip riscv-openocd-2517bae6c1438350255dca63e7d1c1e06c64b6bb.tar.gz riscv-openocd-2517bae6c1438350255dca63e7d1c1e06c64b6bb.tar.bz2 |
Rework/update ARM semihosting
In 2016, ARM released the second edition of the semihosting specs
("Semihosting for AArch32 and AArch64"), adding support for 64-bits.
To ease the reuse of the semihosting logic for other platforms
(like RISC-V), the semihosting code was isolated from the ARM
target and updated to the latest specs.
The new code is already in use since January (in GNU MCU Eclipse
OpenOCD) and no problems were reported, neither for ARM nor for
RISC-V targets, after more than 7K downloads.
The 2 new files were formatted with uncrustify.
Change-Id: Ie84dbd86a547323bb8a5d24eab68fc7dad013d96
Signed-off-by: Liviu Ionescu <ilg@livius.net>
Reviewed-on: http://openocd.zylin.com/4518
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/target/armv8.c')
-rw-r--r-- | src/target/armv8.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/target/armv8.c b/src/target/armv8.c index 82b2b24..20f2b67 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -1,6 +1,9 @@ /*************************************************************************** * Copyright (C) 2015 by David Ung * * * + * Copyright (C) 2018 by Liviu Ionescu * + * <ilg@livius.net> * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -36,6 +39,7 @@ #include "armv8_opcodes.h" #include "target.h" #include "target_type.h" +#include "semihosting_common.h" static const char * const armv8_state_strings[] = { "AArch32", "Thumb", "Jazelle", "ThumbEE", "AArch64", @@ -1046,7 +1050,7 @@ int armv8_aarch64_state(struct target *target) armv8_mode_name(arm->core_mode), buf_get_u32(arm->cpsr->value, 0, 32), buf_get_u64(arm->pc->value, 0, 64), - arm->is_semihosting ? ", semihosting" : ""); + target->semihosting->is_active ? ", semihosting" : ""); return ERROR_OK; } |