Re: [PATCH v2 08/13] target/hexagon: Include missing 'accel/tcg/getpc.h'

2025-04-24 Thread Brian Cain
On 4/24/2025 4:46 AM, Philippe Mathieu-Daudé wrote: Since the macros.h headers call GETPC(), they need to include "accel/tcg/getpc.h", which defines it. Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Brian Cain target/hexagon/macros.h | 1 + target/hex

Re: [PATCH v2] Hexagon (target/hexagon) Remove gen_tcg_func_table.py

2025-04-18 Thread Brian Cain
fe to base the table on the complete opcodes table. Signed-off-by: Taylor Simpson --- Reviewed-by: Brian Cain Tested-by: Brian Cain target/hexagon/genptr.c | 6 ++- target/hexagon/README| 1 - target/hexagon/gen_tcg_func_table.py

Re: [PATCH] mailmap: update email address for Matheus Tavares (me)

2025-04-17 Thread Brian Cain
On 4/17/2025 11:33 AM, Matheus Tavares Bernardino wrote: This is the new email I'll be using from now on. Signed-off-by: Matheus Tavares Bernardino --- Reviewed-by: Brian Cain Tested-by: Brian Cain .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.ma

Re: [PATCH] Hexagon (target/hexagon) Remove gen_tcg_func_table.py

2025-04-17 Thread Brian Cain
Adding Matheus, Marco -- their "quic_" email addresses might be deactivated soon if not already. On 4/16/2025 9:45 AM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Philippe Mathieu-Daudé Sent: Wednesday, April 16, 2025 12:18 AM To: Taylor Simpson ; qemu-devel@nongnu.org C

Re: [PATCH v3 5/5] target/hexagon: Remove unreachable

2025-04-16 Thread Brian Cain
: Brian Cain Sent: Monday, April 7, 2025 1:27 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; matheus.bernard...@oss.qualcomm.com; a...@rev.ng; a...@rev.ng; marco.lie...@oss.qualcomm.com; ltaylorsimp...@gmail.com; alex.ben...@linaro.org

Re: [PATCH 03/38] target/hexagon: Add System/Guest register definitions

2025-04-16 Thread Brian Cain
On 4/16/2025 12:54 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Friday, February 28, 2025 10:26 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [PATCH v3 3/5] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof

2025-04-15 Thread Brian Cain
On 4/14/2025 12:04 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Monday, April 7, 2025 1:27 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; matheus.bernard...@oss.qualcomm.com; a...@rev.ng

[PATCH v3 3/5] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof

2025-04-10 Thread Brian Cain
Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 6803908718..a2dcb0aa2e 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon

[PATCH v3 4/5] target/hexagon: s/pkt_has_store/pkt_has_scalar_store

2025-04-10 Thread Brian Cain
To remove any confusion with HVX or other potential store instructions, we'll qualify this context var with "scalar". Signed-off-by: Brian Cain --- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/insn.h | 4 ++-- target/h

[PATCH v3 5/5] target/hexagon: Remove unreachable

2025-04-10 Thread Brian Cain
We should raise an exception in the event that we encounter a packet that can't be correctly decoded, not fault. Signed-off-by: Brian Cain --- target/hexagon/decode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c

[PATCH v3 2/5] target/hexagon: Fix badva reference, delete CAUSE

2025-04-09 Thread Brian Cain
The BADVA reg is referred to with the wrong identifier. The CAUSE reg field of SSR is not yet modeled. Signed-off-by: Brian Cain --- target/hexagon/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 766b678651

[PATCH v3 0/5] misc hexagon patches

2025-04-09 Thread Brian Cain
Changes since previous "misc hexagon patches" series (v2): - changed author to match MAINTAINERS (I was fooled by the mailmap before -- so, for real this time). Brian Cain (5): target/hexagon: handle .new values target/hexagon: Fix badva reference, delete CAUSE target/hexagon: A

[PATCH v3 1/5] target/hexagon: handle .new values

2025-04-07 Thread Brian Cain
Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 758e5fd12d..6803908718 100755 --- a/target/hexagon/hex_common.py +++ b/target

[PATCH v2 2/5] target/hexagon: Fix badva reference, delete CAUSE

2025-04-07 Thread Brian Cain
From: Brian Cain The BADVA reg is referred to with the wrong identifier. The CAUSE reg field of SSR is not yet modeled. Signed-off-by: Brian Cain --- target/hexagon/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index

[PATCH v2 0/5] misc hexagon patches

2025-04-07 Thread Brian Cain
76854-1-phi...@linaro.org/ Brian Cain (5): target/hexagon: handle .new values target/hexagon: Fix badva reference, delete CAUSE target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof target/hexagon: s/pkt_has_store/pkt_has_scalar_store target/hexagon: Remove unreachable target/hexag

[PATCH v2 3/5] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof

2025-04-07 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 6803908718..a2dcb0aa2e 100755 --- a/target/hexagon/hex_common.py +++ b/target

[PATCH v2 1/5] target/hexagon: handle .new values

2025-04-07 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 758e5fd12d..6803908718 100755 --- a/target/hexagon

[PATCH v2 4/5] target/hexagon: s/pkt_has_store/pkt_has_scalar_store

2025-04-07 Thread Brian Cain
From: Brian Cain To remove any confusion with HVX or other potential store instructions, we'll qualify this context var with "scalar". Signed-off-by: Brian Cain --- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/insn.h | 4 ++--

[PATCH v2 5/5] target/hexagon: Remove unreachable

2025-04-07 Thread Brian Cain
From: Brian Cain We should raise an exception in the event that we encounter a packet that can't be correctly decoded, not fault. Signed-off-by: Brian Cain --- target/hexagon/decode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/hexagon/decode.c b/t

Re: [PATCH 1/8] hw/intc: Add l2vic interrupt controller

2025-04-05 Thread Brian Cain
On 3/3/2025 6:26 AM, Philippe Mathieu-Daudé wrote: Hi Brian and Sid, On 1/3/25 18:20, Brian Cain wrote: From: Sid Manning Co-authored-by: Matheus Tavares Bernardino Co-authored-by: Damien Hedde Signed-off-by: Brian Cain ---   MAINTAINERS    |   2 +   docs/devel/hexagon

Re: [PATCH 6/6] target/hexagon: Add memory order definition

2025-04-05 Thread Brian Cain
On 4/4/2025 9:33 AM, Richard Henderson wrote: On 4/3/25 19:52, Brian Cain wrote: From: Brian Cain Signed-off-by: Brian Cain ---   target/hexagon/cpu-param.h | 5 +   1 file changed, 5 insertions(+) diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 45ee7b4640

Re: [PATCH 2/2] target/hexagon: Drop `ident` postprocess step

2025-04-04 Thread Brian Cain
On 3/26/2025 7:42 AM, 'Anton Johansson' wrote: On 25/03/25, Brian Cain wrote: On 3/24/2025 8:53 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Anton Johansson Sent: Wednesday, March 12, 2025 2:46 PM To: qemu-devel@nongnu.org Cc: a...@rev.ng; ltaylorsimp...

Re: [PATCH 1/6] target/hexagon: handle .new values

2025-04-04 Thread Brian Cain
On 4/4/2025 8:25 AM, Matheus Tavares Bernardino wrote: On Thu, 3 Apr 2025 19:51:58 -0700 Brian Cain wrote: From: Brian Cain Perhaps it would be best to reset the autorship here to brian.c...@oss.qualcomm.com? Good catch -- will do. Signed-off-by: Brian Cain --- target/hexagon

[PATCH 3/6] target/hexagon: Add missing A_CALL attr, hintjumpr to multi_cof

2025-04-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 242dee3731..85eabc9876 100755 --- a/target/hexagon/hex_common.py +++ b/target

[PATCH 0/6] misc hexagon patches

2025-04-03 Thread Brian Cain
While preparing the system emulation patches, these ones stuck out as not-strictly-related to sysemu. We can review and apply them independently of those. Brian Cain (6): target/hexagon: handle .new values target/hexagon: Fix badva reference, delete CAUSE target/hexagon: Add missing A_CALL

Re: [RFC PATCH] Hexagon (target/hexagon) analyze all reads before writes

2025-04-03 Thread Brian Cain
On 3/24/2025 9:14 PM, Taylor Simpson wrote: I noticed that analyze_packet is marking the implicit pred reads after marking all the writes. However, the semantics of the instrucion and packet are to do all the reads, then do the operation, then do all the writes. Here is the old code static vo

Re: [PATCH v2 0/2] target/hexagon: Fix macOS build

2025-04-03 Thread Brian Cain
On 4/2/2025 6:42 AM, Anton Johansson wrote: A default macOS build with xcode cli tools installed lacks the `indent` program needed by the idef-parser postprocess step. If `indent` is installed through homebrew it doesn't support the `-linux` flag. Conditionally run `indent` only on linux hosts.

[PATCH 1/6] target/hexagon: handle .new values

2025-04-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 758e5fd12d..242dee3731 100755 --- a/target/hexagon

[PATCH 5/6] target/hexagon: Remove unreachable

2025-04-03 Thread Brian Cain
From: Brian Cain We should raise an exception in the event that we encounter a packet that can't be correctly decoded, not fault. Signed-off-by: Brian Cain --- target/hexagon/decode.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/hexagon/decode.c b/t

[PATCH 2/6] target/hexagon: Fix badva reference, delete CAUSE

2025-04-03 Thread Brian Cain
From: Brian Cain The BADVA reg is referred to with the wrong identifier. The CAUSE reg field of SSR is not yet modeled. Signed-off-by: Brian Cain --- target/hexagon/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index

[PATCH 6/6] target/hexagon: Add memory order definition

2025-04-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu-param.h | 5 + 1 file changed, 5 insertions(+) diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 45ee7b4640..ccaf6a9d28 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h

[PATCH 4/6] target/hexagon: s/pkt_has_store/pkt_has_scalar_store

2025-04-03 Thread Brian Cain
From: Brian Cain To remove any confusion with HVX or other potential store instructions, we'll qualify this context var with "scalar". Signed-off-by: Brian Cain --- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/insn.h | 4 ++--

Re: [PATCH] target/hexagon: Implement CPUState.mmu_index

2025-04-03 Thread Brian Cain
On 4/3/2025 10:49 AM, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Brian Cain target/hexagon/cpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 766b678651..59fc9ed698 100644 --- a/target

Re: [PATCH v2 1/2] target/hexagon: Replace `prepare` script with meson target

2025-04-02 Thread Brian Cain
` and replace the script with a meson custom_target. Signed-off-by: Anton Johansson --- Reviewed-by: Brian Cain target/hexagon/idef-parser/prepare | 24 target/hexagon/meson.build | 3 ++- 2 files changed, 2 insertions(+), 25 deletions(-) delete mode

Re: [PATCH v2 2/2] target/hexagon: Only indent on linux

2025-04-02 Thread Brian Cain
On 4/2/2025 6:42 AM, Anton Johansson wrote: indent on macOS, installed via homebrew, doesn't support -linux. Only run indent on linux hosts. Signed-off-by: Anton Johansson --- Reviewed-by: Brian Cain target/hexagon/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH 12/39] target/hexagon: Add implementation of cycle counters

2025-04-01 Thread Brian Cain
On 3/19/2025 2:50 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Friday, February 28, 2025 11:28 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [PATCH 08/39] target/hexagon: Implement get_exe_mode()

2025-04-01 Thread Brian Cain
On 3/17/2025 1:43 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Friday, February 28, 2025 11:28 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [PATCH 1/8] hw/intc: Add l2vic interrupt controller

2025-04-01 Thread Brian Cain
On 3/3/2025 6:26 AM, Philippe Mathieu-Daudé wrote: Hi Brian and Sid, On 1/3/25 18:20, Brian Cain wrote: From: Sid Manning Co-authored-by: Matheus Tavares Bernardino Co-authored-by: Damien Hedde Signed-off-by: Brian Cain ---   MAINTAINERS    |   2 +   docs/devel/hexagon

Re: [PATCH 1/8] hw/intc: Add l2vic interrupt controller

2025-03-28 Thread Brian Cain
On 3/24/2025 2:40 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Saturday, March 1, 2025 11:21 AM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [RFC PATCH] Hexagon (target/hexagon) analyze all reads before writes

2025-03-25 Thread Brian Cain
. Signed-off-by: Taylor Simpson --- I found no regressions when testing this patch downstream.  I agree that this reordering makes sense regardless of whether we can find a test that fails now. Reviewed-by: Brian Cain Tested-by: Brian Cain target/hexagon/translate.c | 18 +++

Re: [PATCH 2/2] target/hexagon: Drop `ident` postprocess step

2025-03-24 Thread Brian Cain
On 3/24/2025 8:53 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Anton Johansson Sent: Wednesday, March 12, 2025 2:46 PM To: qemu-devel@nongnu.org Cc: a...@rev.ng; ltaylorsimp...@gmail.com; brian.c...@oss.qualcomm.com; phi...@linaro.org Subject: [PATCH 2/2] target/hexag

Re: [PATCH 05/39] target/hexagon: Implement modify SSR

2025-03-18 Thread Brian Cain
On 3/18/2025 2:14 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Sid Manning Sent: Tuesday, March 18, 2025 1:34 PM To: ltaylorsimp...@gmail.com; 'Brian Cain' ; qemu-devel@nongnu.org Cc: richard.hender...@linaro.org; phi...@linaro.org; Matheus Bernardino

Re: [PATCH 28/38] target/hexagon: Initialize htid, modectl regs

2025-03-12 Thread Brian Cain
On 3/12/2025 2:19 PM, Philippe Mathieu-Daudé wrote: On 1/3/25 06:26, Brian Cain wrote: From: Brian Cain Signed-off-by: Brian Cain ---   target/hexagon/cpu.c | 8   1 file changed, 8 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 36a93cc22f..2b6a707fca

Re: [PATCH 02/38] docs/system: Add hexagon CPU emulation

2025-03-05 Thread Brian Cain
On 3/5/2025 3:21 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Wednesday, March 5, 2025 2:13 PM To: ltaylorsimp...@gmail.com; qemu-devel@nongnu.org Cc: richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [PATCH 02/38] docs/system: Add hexagon CPU emulation

2025-03-05 Thread Brian Cain
On 3/5/2025 1:36 PM, ltaylorsimp...@gmail.com wrote: -Original Message- From: Brian Cain Sent: Friday, February 28, 2025 11:26 PM To: qemu-devel@nongnu.org Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a

Re: [PATCH] tests/tcg: Suppress compiler false-positive warning on sha1.c

2025-03-05 Thread Brian Cain
On 3/4/2025 6:51 AM, Peter Maydell wrote: On Tue, 4 Mar 2025 at 11:56, Alex Bennée wrote: Peter Maydell writes: +# GCC versions 12/13/14/15 at least incorrectly complain about +# "'SHA1Transform' reading 64 bytes from a region of size 0"; see the gcc bug +# https://gcc.gnu.org/bugzilla/show

Re: QEMU and ia64

2025-03-05 Thread Brian Cain
On 3/5/2025 2:37 AM, Benjamin Charlton wrote: Hello. Sorry to bother you, I am very new to all of this and but I am looking for a ia64 emulator, sadly it has to be this to run a piece of old software. GPT suggested I clone your project and emulate this processor. However I am receiving an e

Re: [PATCH 8/8] tests/functional: Add a hexagon minivm test

2025-03-05 Thread Brian Cain
On 3/5/2025 2:05 AM, Thomas Huth wrote: On 04/03/2025 16.46, Philippe Mathieu-Daudé wrote: Hi Brian, On 1/3/25 18:20, Brian Cain wrote: From: Brian Cain A bit opaque... Signed-off-by: Brian Cain ---   MAINTAINERS |  1 +   tests/functional/meson.build

Re: [PATCH 8/8] tests/functional: Add a hexagon minivm test

2025-03-04 Thread Brian Cain
On 3/4/2025 10:15 AM, Brian Cain wrote: On 3/4/2025 9:46 AM, Philippe Mathieu-Daudé wrote: Hi Brian, On 1/3/25 18:20, Brian Cain wrote: From: Brian Cain A bit opaque... Whoops -- will fix it. Signed-off-by: Brian Cain ---   MAINTAINERS |  1 +   tests

Re: [PATCH 8/8] tests/functional: Add a hexagon minivm test

2025-03-04 Thread Brian Cain
On 3/4/2025 9:46 AM, Philippe Mathieu-Daudé wrote: Hi Brian, On 1/3/25 18:20, Brian Cain wrote: From: Brian Cain A bit opaque... Whoops -- will fix it. Signed-off-by: Brian Cain ---   MAINTAINERS |  1 +   tests/functional/meson.build    |  8

Re: [PATCH 8/8] tests/functional: Add a hexagon minivm test

2025-03-04 Thread Brian Cain
On 3/4/2025 9:46 AM, Philippe Mathieu-Daudé wrote: Hi Brian, On 1/3/25 18:20, Brian Cain wrote: From: Brian Cain A bit opaque... Whoops -- will fix it. Signed-off-by: Brian Cain ---   MAINTAINERS |  1 +   tests/functional/meson.build    |  8

Re: [PATCH 2/8] hw/hexagon: Add machine configs for sysemu

2025-03-04 Thread Brian Cain
On 3/4/2025 12:27 AM, Markus Armbruster wrote: Brian Cain writes: From: Brian Cain Co-authored-by: Mike Lambert Co-authored-by: Sid Manning Signed-off-by: Brian Cain [...] diff --git a/qapi/machine.json b/qapi/machine.json index a6b8795b09..a7070bad4d 100644 --- a/qapi/machine.json

Re: [PATCH 34/39] target/hexagon: Add TLB, k0 {un,}lock

2025-03-03 Thread Brian Cain
On 2/28/2025 11:28 PM, Brian Cain wrote: From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/sys_macros.h | 8 +-- target/hexagon/op_helper.c | 104 2 files changed, 108 insertions(+), 4 deletions(-) diff --git a/target/hexagon

[PATCH 33/38] target/hexagon: Add gdb support for sys regs

2025-03-03 Thread Brian Cain
From: Brian Cain Co-authored-by: Matheus Tavares Bernardino Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 6 ++ target/hexagon/internal.h | 4 ++ target/hexagon/cpu.c | 17 ++ target/hexagon/gdbstub.c | 45 ++ target/hexagon/op_helper.c | 16

[PATCH 14/38] target/hexagon: Add new macro definitions for sysemu

2025-03-03 Thread Brian Cain
From: Brian Cain Also: add nop TCG overrides for break,unpause,fetchbo,dczeroa break: this hardware breakpoint instruction is used with the in-silicon debugger feature, this is not modeled. unpause: this instruction is used to resume hardware threads that are stalled by pause instructions

[PATCH 12/38] target/hexagon: Add imported macro, attr defs for sysemu

2025-03-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/attribs_def.h.inc | 414 +++-- target/hexagon/imported/macros.def | 558 + 2 files changed, 942 insertions(+), 30 deletions(-) mode change 100755 => 100644 target/hexagon/impor

[PATCH 20/39] target/hexagon: Implement siad inst

2025-03-03 Thread Brian Cain
From: Brian Cain siad is the 'Set interrupt auto disable' instruction. Signed-off-by: Brian Cain --- target/hexagon/op_helper.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 687e7f45c2..

[PATCH 06/38] target/hexagon: Add privilege check, use tag_ignore()

2025-03-03 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu_bits.h | 2 ++ target/hexagon/gen_tcg_funcs.py | 32 +++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h index ff596e2a94

[PATCH 31/38] target/hexagon: Add {TLB, k0}lock, cause code, wait_next_pc

2025-03-03 Thread Brian Cain via
From: Brian Cain {TLB,k0}lock counts are used to represent the TLB, k0 locks among hardware threads. wait_next_pc represents the program counter to set when resuming from a wait-for-interrupts state. cause_code contains the precise exception cause.This will be used by subsequent commits

[PATCH 39/39] target/hexagon: Add pcycle setting functionality

2025-03-02 Thread Brian Cain
Signed-off-by: Brian Cain Signed-off-by: Matheus Tavares Bernardino --- target/hexagon/cpu.c| 10 +++--- target/hexagon/cpu_helper.c | 17 ++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 80f5e23794

[PATCH 23/38] target/hexagon: Add implicit attributes to sysemu macros

2025-03-02 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 5 + 1 file changed, 5 insertions(+) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 1e94e1fef5..7b5bb2cd46 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon

[PATCH 22/39] target/hexagon: Implement setprio, resched

2025-03-01 Thread Brian Cain
From: Brian Cain The hardware-assisted scheduler helps manage tasks on the run queue and interrupt steering. This instruction is defined in the Qualcomm Hexagon V71 Programmer's Reference Manual - https://docs.qualcomm.com/bundle/publicresource/80-

[PATCH 24/39] target/hexagon: Add exec-start-addr prop

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 1 + target/hexagon/cpu.c | 7 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index baa48ec051..4667a1f748 100644 --- a/target/hexagon/cpu.h +++ b/target

[PATCH 31/39] target/hexagon: Add implicit sysreg writes

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/translate.c | 16 1 file changed, 16 insertions(+) diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index d4b22acb72..ff881d1060 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon

[PATCH 19/38] target/hexagon: Define register fields for system regs

2025-03-01 Thread Brian Cain
From: Brian Cain Define the register fields for ssr, schedcfg, stid, bestwait, ccr, modectl, imask, ipendad. Define the fields for TLB entries. Signed-off-by: Brian Cain --- target/hexagon/reg_fields_def.h.inc | 96 + 1 file changed, 96 insertions(+) diff --git a

[PATCH 4/8] hw/hexagon: Add support for cfgbase

2025-03-01 Thread Brian Cain
From: Sid Manning Signed-off-by: Sid Manning --- target/hexagon/cpu.h | 1 + hw/hexagon/hexagon_dsp.c | 10 ++ target/hexagon/cpu.c | 6 ++ 3 files changed, 17 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 73c3bb34b0..0608d3265c 100644 --- a

[PATCH 10/39] target/hexagon: Implement arch_{s, g}et_{thread, system}_reg()

2025-03-01 Thread Brian Cain via
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu_helper.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/target/hexagon/cpu_helper.h b/target/hexagon/cpu_helper.h index e8d89d8526..1cdf4f8dd0 100644 --- a/target/hexagon/cpu_helper.h +++ b

[PATCH 6/8] target/hexagon: add build config for softmmu

2025-03-01 Thread Brian Cain
Signed-off-by: Brian Cain --- MAINTAINERS | 1 + configs/devices/hexagon-softmmu/default.mak | 7 +++ configs/targets/hexagon-softmmu.mak | 6 ++ target/Kconfig | 1 + target/hexagon/Kconfig | 2

[PATCH 7/8] hw/hexagon: Define hexagon "virt" machine

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- configs/devices/hexagon-softmmu/default.mak | 1 + configs/targets/hexagon-softmmu.mak | 1 + include/hw/hexagon/virt.h | 41 ++ hw/hexagon/virt.c | 395 target/hexagon

[PATCH 8/8] tests/functional: Add a hexagon minivm test

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- MAINTAINERS | 1 + tests/functional/meson.build| 8 + tests/functional/test_hexagon_minivm.py | 42 + 3 files changed, 51 insertions(+) create mode 100755 tests/functional

[PATCH 0/8] hexagon system emu, part 3/3

2025-03-01 Thread Brian Cain
uction set simulator included with the Hexagon SDK. These programs generally depend on semihosting support, which will come later. Brian Cain (6): hw/hexagon: Add machine configs for sysemu hw/hexagon: Add v68, sa8775-cdsp0 defs hw/hexagon: Modify "Standalone" symbols target/hexag

[PATCH 3/8] hw/hexagon: Add v68, sa8775-cdsp0 defs

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- hw/hexagon/machine_cfg_sa8775_cdsp0.h.inc | 64 ++ hw/hexagon/machine_cfg_v68n_1024.h.inc| 65 +++ 2 files changed, 129 insertions(+) create mode 100644 hw/hexagon/machine_cfg_sa8775_cdsp0.h.inc create

[PATCH 5/8] hw/hexagon: Modify "Standalone" symbols

2025-03-01 Thread Brian Cain
From: Brian Cain These symbols are used by Hexagon Standalone OS to indicate whether the program should halt and wait for interrupts at startup. For QEMU, we want these programs to just continue crt0 startup through to the user program's main(). Signed-off-by: Brian Cain --- hw/he

[PATCH 2/8] hw/hexagon: Add machine configs for sysemu

2025-03-01 Thread Brian Cain
From: Brian Cain Co-authored-by: Mike Lambert Co-authored-by: Sid Manning Signed-off-by: Brian Cain --- MAINTAINERS| 2 + qapi/machine.json | 2 +- include/hw/hexagon/hexagon.h | 151 + hw/hexagon

[PATCH 1/8] hw/intc: Add l2vic interrupt controller

2025-03-01 Thread Brian Cain
From: Sid Manning Co-authored-by: Matheus Tavares Bernardino Co-authored-by: Damien Hedde Signed-off-by: Brian Cain --- MAINTAINERS| 2 + docs/devel/hexagon-l2vic.rst | 59 + docs/devel/index-internals.rst | 1 + include/hw/intc/l2vic.h| 37 +++ hw

[PATCH 22/38] target/hexagon: Add sysemu TCG overrides

2025-03-01 Thread Brian Cain
From: Brian Cain Define TCG overrides for setprio(), crswap(,sgp{0,1,1:0}). Signed-off-by: Brian Cain --- target/hexagon/cpu_helper.h | 32 target/hexagon/gen_tcg_sys.h | 41 target/hexagon/helper.h | 1 + target/hexagon

[PATCH 18/38] target/hexagon: Make A_PRIV, "J2_trap*" insts need_env()

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index db50defeb6..7fb11a0819 100755 --- a/target/hexagon/hex_common.py +++ b/target

[PATCH 03/38] target/hexagon: Add System/Guest register definitions

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/gen_analyze_funcs.py | 21 +++- target/hexagon/hex_common.py| 163 2 files changed, 181 insertions(+), 3 deletions(-) diff --git a/target/hexagon/gen_analyze_funcs.py b/target/hexagon

[PATCH 28/39] target/hexagon: Implement modify_ssr, resched, pending_interrupt

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/helper.h| 3 +++ target/hexagon/op_helper.c | 20 2 files changed, 23 insertions(+) diff --git a/target/hexagon/helper.h b/target/hexagon/helper.h index 730eaf8b9a..3df663baeb 100644 --- a/target/hexagon

[PATCH 21/38] target/hexagon: Add system reg insns

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/macros.h | 2 + target/hexagon/hex_common.py | 15 +- target/hexagon/imported/encode_pp.def | 213 +++-- target/hexagon/imported/system.idef | 262 +++--- 4 files

[PATCH 09/38] target/hexagon: Add guest, system reg number state

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 8 target/hexagon/cpu.c | 17 + 2 files changed, 25 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 20ea0adcca..b7789a3c90 100644 --- a/target/hexagon/cpu.h +++ b

[PATCH 15/38] target/hexagon: Add handlers for guest/sysreg r/w

2025-03-01 Thread Brian Cain
From: Brian Cain This commit provides handlers to generate TCG for guest and system register reads and writes. They will be leveraged by a future commit. Signed-off-by: Brian Cain --- target/hexagon/genptr.c | 159 1 file changed, 159 insertions

[PATCH 36/38] target/hexagon: Add clear_wait_mode() definition

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu_helper.h | 1 + target/hexagon/cpu_helper.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/target/hexagon/cpu_helper.h b/target/hexagon/cpu_helper.h index e0c0c037a6..6f0c6697ad 100644 --- a/target/hexagon

[PATCH 16/39] target/hexagon: Implement hex_tlb_lookup_by_asid()

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/hex_mmu.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/target/hexagon/hex_mmu.c b/target/hexagon/hex_mmu.c index d2297c036d..07ad8e9616 100644 --- a/target/hexagon/hex_mmu.c +++ b

[PATCH 11/38] target/hexagon: Add guest/sys reg writes to DisasContext

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/translate.h | 36 1 file changed, 36 insertions(+) diff --git a/target/hexagon/translate.h b/target/hexagon/translate.h index f611c854dc..0eaa3db03e 100644 --- a/target/hexagon/translate.h +++ b

[PATCH 27/38] target/hexagon: Add sreg_{read,write} helpers

2025-03-01 Thread Brian Cain
From: Brian Cain Co-authored-by: Sid Manning Signed-off-by: Brian Cain --- target/hexagon/cpu_helper.h | 8 +++ target/hexagon/cpu.c| 1 + target/hexagon/cpu_helper.c | 37 target/hexagon/op_helper.c | 114 ++-- 4 files changed, 156

[PATCH 21/39] target/hexagon: Implement hexagon_resume_threads()

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu.h| 1 + target/hexagon/cpu_helper.h | 1 + target/hexagon/cpu_helper.c | 37 + target/hexagon/op_helper.c | 3 ++- 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a

[PATCH 33/39] target/hexagon: initialize sys/guest reg TCGvs

2025-03-01 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/translate.c | 20 1 file changed, 20 insertions(+) diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index ff881d1060..248ed60f29 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon

[PATCH 11/39] target/hexagon: Add representation to count cycles

2025-03-01 Thread Brian Cain
From: Brian Cain The PCYCLE register can be enabled to indicate accumulated clock cycles. Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 3 ++- target/hexagon/cpu.c | 3 +++ target/hexagon/machine.c | 25 - 3 files changed, 29 insertions(+), 2 deletions

[PATCH 00/38] hexagon system emu, part 1/3

2025-03-01 Thread Brian Cain
Hexagon Virtual Machine Specification. [1] https://github.com/quic/hexagonMVM Brian Cain (38): docs: Add hexagon sysemu docs docs/system: Add hexagon CPU emulation target/hexagon: Add System/Guest register definitions target/hexagon: Make gen_exception_end_tb non-static target/hexagon: Switc

[PATCH 29/38] target/hexagon: Add locks, id, next_PC to state

2025-02-28 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 37 +++-- target/hexagon/cpu.c | 6 ++ target/hexagon/machine.c | 4 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon

[PATCH 05/38] target/hexagon: Switch to tag_ignore(), generate via get_{user, sys}_tags()

2025-02-28 Thread Brian Cain via
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/gen_helper_funcs.py | 23 ++- target/hexagon/gen_helper_protos.py | 23 --- target/hexagon/gen_idef_parser_funcs.py | 2 ++ target/hexagon/gen_op_attribs.py| 2 +- target

[PATCH 00/39] hexagon system emu, part 2/3

2025-02-28 Thread Brian Cain
this series. Brian Cain (38): target/hexagon: Implement ciad helper target/hexagon: Implement {c,}swi helpers target/hexagon: Implement iassign{r,w} helpers target/hexagon: Implement start/stop helpers target/hexagon: Implement modify SSR target/hexagon: Implement {g,s}etimask helpers

[PATCH 32/38] target/hexagon: Add stubs for modify_ssr/get_exe_mode

2025-02-28 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu_helper.h | 2 ++ target/hexagon/cpu_helper.c | 8 2 files changed, 10 insertions(+) diff --git a/target/hexagon/cpu_helper.h b/target/hexagon/cpu_helper.h index 5f5f15149a..e0c0c037a6 100644 --- a/target/hexagon

[PATCH 29/39] target/hexagon: Add pkt_ends_tb to translation

2025-02-28 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/translate.h | 1 + target/hexagon/translate.c | 99 +- 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/target/hexagon/translate.h b/target/hexagon/translate.h index 9bc4b3ce8b

[PATCH 03/39] target/hexagon: Implement iassign{r,w} helpers

2025-02-28 Thread Brian Cain
From: Brian Cain iassign{r,w} are the "Interrupt to thread assignment {read,write}" instructions. Signed-off-by: Brian Cain --- target/hexagon/op_helper.c | 48 -- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/target/hexagon/op_

[PATCH 06/39] target/hexagon: Implement {g,s}etimask helpers

2025-02-28 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/op_helper.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 9f79b1a20c..83088cfaa3 100644 --- a/target/hexagon

[PATCH 20/38] target/hexagon: Implement do_raise_exception()

2025-02-28 Thread Brian Cain
From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/internal.h | 5 + target/hexagon/op_helper.c | 20 2 files changed, 25 insertions(+) diff --git a/target/hexagon/internal.h b/target/hexagon/internal.h index 9658141316..7cf7bcaa6c 100644 --- a/target

[PATCH 02/39] target/hexagon: Implement {c,}swi helpers

2025-02-28 Thread Brian Cain
From: Brian Cain {c,}swi are the "software interrupt"/"Cancel pending interrupts" instructions. Signed-off-by: Brian Cain --- target/hexagon/op_helper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/hexagon/op_helper.c b/target/hexag

[PATCH 01/39] target/hexagon: Implement ciad helper

2025-02-28 Thread Brian Cain
From: Brian Cain ciad is the clear interrupt auto disable instruction. This instruction is defined in the Qualcomm Hexagon V71 Programmer's Reference Manual - https://docs.qualcomm.com/bundle/publicresource/80-N2040-51_REV_AB_Hexagon_V71_ProgrammerS_Reference_Manual.pdf See §11.9.2 S

  1   2   3   4   >