From 057e566097b41f9bfeee50e97ba6ef624189ae6a Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Mon, 27 Jun 2022 01:24:07 +0200 Subject: openocd: src/target: replace the GPL-2.0-or-later license tag Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I255ad17235ff1e01bf0aa4deed4d944e1d693ddb Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/7071 Tested-by: jenkins --- src/target/aarch64.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/target/aarch64.h') diff --git a/src/target/aarch64.h b/src/target/aarch64.h index b57361f..902a508 100644 --- a/src/target/aarch64.h +++ b/src/target/aarch64.h @@ -1,19 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + /*************************************************************************** * Copyright (C) 2015 by David Ung * - * * - * 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 * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * ***************************************************************************/ #ifndef OPENOCD_TARGET_AARCH64_H -- cgit v1.1 From 8f299c6aec299f7231005a1ba7526ed2758414c3 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Thu, 26 May 2022 10:01:45 +0200 Subject: target: consolidate existing target/algo common_magic Unify common_magic type to unsigned int Move common_magic to be the first member of the struct Add unsigned specifier to xxx_COMMON_MAGIC #defines Change-Id: If961d33232698529514ba3720e04418baf6dc6fe Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/6996 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/target/aarch64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/target/aarch64.h') diff --git a/src/target/aarch64.h b/src/target/aarch64.h index 902a508..52b3baf 100644 --- a/src/target/aarch64.h +++ b/src/target/aarch64.h @@ -9,7 +9,7 @@ #include "armv8.h" -#define AARCH64_COMMON_MAGIC 0x411fc082 +#define AARCH64_COMMON_MAGIC 0x411fc082U #define CPUDBG_CPUID 0xD00 #define CPUDBG_CTYPR 0xD04 @@ -38,7 +38,7 @@ struct aarch64_brp { }; struct aarch64_common { - int common_magic; + unsigned int common_magic; /* Context information */ uint32_t system_control_reg; -- cgit v1.1 From ea49b2b2a21edf474236e3bdf0c681215c390787 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Thu, 26 May 2022 10:18:43 +0200 Subject: target/aarch64: fix duplicate common magic AARCH64_COMMON_MAGIC was same as CORTEX_A_COMMON_MAGIC, probably copy pasta. Define unique AARCH64_COMMON_MAGIC Change-Id: Ie30e0028453a1fce5624ecad9bf73d5ac3791281 Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/6997 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/target/aarch64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/aarch64.h') diff --git a/src/target/aarch64.h b/src/target/aarch64.h index 52b3baf..be7f246 100644 --- a/src/target/aarch64.h +++ b/src/target/aarch64.h @@ -9,7 +9,7 @@ #include "armv8.h" -#define AARCH64_COMMON_MAGIC 0x411fc082U +#define AARCH64_COMMON_MAGIC 0x41413634U #define CPUDBG_CPUID 0xD00 #define CPUDBG_CTYPR 0xD04 -- cgit v1.1 From cae0c8b32b32202f3552860f12f6579e8ad8ce4a Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Thu, 26 May 2022 16:25:34 +0200 Subject: target: move parent target structs just after common_magic Just a cosmetic refactoring. Change-Id: I7fbc05324e346fafc98d1b42691d33d3d8fbd04e Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/7003 Reviewed-by: Antonio Borneo Tested-by: jenkins --- src/target/aarch64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/target/aarch64.h') diff --git a/src/target/aarch64.h b/src/target/aarch64.h index be7f246..2721fe7 100644 --- a/src/target/aarch64.h +++ b/src/target/aarch64.h @@ -40,6 +40,8 @@ struct aarch64_brp { struct aarch64_common { unsigned int common_magic; + struct armv8_common armv8_common; + /* Context information */ uint32_t system_control_reg; uint32_t system_control_reg_curr; @@ -55,8 +57,6 @@ struct aarch64_common { int wp_num_available; struct aarch64_brp *wp_list; - struct armv8_common armv8_common; - enum aarch64_isrmasking_mode isrmasking_mode; }; -- cgit v1.1