qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Nicolas Eder <nicolas.eder@lauterbach.com>
Cc: qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Christian Boenig" <christian.boenig@lauterbach.com>
Subject: Re: [PATCH v3 04/20] mcdstub: added header with defines specific to the mcd tcp packet communication
Date: Wed, 29 Nov 2023 16:02:35 +0000	[thread overview]
Message-ID: <875y1ka6p0.fsf@draig.linaro.org> (raw)
In-Reply-To: <20231107130323.4126-5-nicolas.eder@lauterbach.com> (Nicolas Eder's message of "Tue, 7 Nov 2023 14:03:07 +0100")

Nicolas Eder <nicolas.eder@lauterbach.com> writes:

> ---
>  include/mcdstub/mcd_shared_defines.h | 108 +++++++++++++++++++++++++++
>  1 file changed, 108 insertions(+)
>  create mode 100644 include/mcdstub/mcd_shared_defines.h
>
> diff --git a/include/mcdstub/mcd_shared_defines.h b/include/mcdstub/mcd_shared_defines.h
> new file mode 100644
> index 0000000000..fa1adb5c77
> --- /dev/null
> +++ b/include/mcdstub/mcd_shared_defines.h
> @@ -0,0 +1,108 @@
> +/*
> + *this file is shared between the mcd dll and the mcd stub.
> + *it has to be kept exectly the same!
> + */

If this comes from the published API headers it needs clear attribution
and a license header. I assume it won't update anything like as
frequently as our linux and Xen headers so I don't think we need special
tooling to handle updates.

> +
> +#ifndef MCD_SHARED_DEFINES
> +#define MCD_SHARED_DEFINES
> +
> +/* default tcp port */
> +#define MCD_DEFAULT_TCP_PORT "1235"
> +
> +/* tcp data characters */
> +#define TCP_CHAR_OPEN_SERVER 'I'
> +#define TCP_CHAR_OPEN_CORE 'i'
> +#define TCP_CHAR_GO 'C'
> +#define TCP_CHAR_STEP 'c'
> +#define TCP_CHAR_BREAK 'b'
> +#define TCP_CHAR_QUERY 'q'
> +#define TCP_CHAR_CLOSE_SERVER 'D'
> +#define TCP_CHAR_CLOSE_CORE 'd'
> +#define TCP_CHAR_KILLQEMU 'k'
> +#define TCP_CHAR_RESET 'r'
> +#define TCP_CHAR_READ_REGISTER 'p'
> +#define TCP_CHAR_WRITE_REGISTER 'P'
> +#define TCP_CHAR_READ_MEMORY 'm'
> +#define TCP_CHAR_WRITE_MEMORY 'M'
> +#define TCP_CHAR_BREAKPOINT_INSERT 't'
> +#define TCP_CHAR_BREAKPOINT_REMOVE 'T'
> +
> +/* tcp protocol chars */
> +#define TCP_ACKNOWLEDGED '+'
> +#define TCP_NOT_ACKNOWLEDGED '-'
> +#define TCP_COMMAND_START '$'
> +#define TCP_COMMAND_END '#'
> +#define TCP_WAS_LAST '|'
> +#define TCP_WAS_NOT_LAST '~'
> +#define TCP_HANDSHAKE_SUCCESS "shaking your hand"
> +#define TCP_EXECUTION_SUCCESS "success"
> +#define TCP_EXECUTION_ERROR "error"
> +
> +/* tcp query arguments */
> +#define QUERY_FIRST "f"
> +#define QUERY_CONSEQUTIVE "c"
> +#define QUERY_END_INDEX "!"
> +
> +#define QUERY_ARG_SYSTEM "system"
> +#define QUERY_ARG_CORES "cores"
> +#define QUERY_ARG_RESET "reset"
> +#define QUERY_ARG_TRIGGER "trigger"
> +#define QUERY_ARG_MEMORY "memory"
> +#define QUERY_ARG_REGGROUP "reggroup"
> +#define QUERY_ARG_REG "reg"
> +#define QUERY_ARG_STATE "state"
> +
> +/* tcp query packet argument list */
> +#define TCP_ARGUMENT_NAME "name"
> +#define TCP_ARGUMENT_DATA "data"
> +#define TCP_ARGUMENT_ID "id"
> +#define TCP_ARGUMENT_TYPE "type"
> +#define TCP_ARGUMENT_BITS_PER_MAU "bpm"
> +#define TCP_ARGUMENT_INVARIANCE "i"
> +#define TCP_ARGUMENT_ENDIAN "e"
> +#define TCP_ARGUMENT_MIN "min"
> +#define TCP_ARGUMENT_MAX "max"
> +#define TCP_ARGUMENT_SUPPORTED_ACCESS_OPTIONS "sao"
> +#define TCP_ARGUMENT_REGGROUPID "reggroupid"
> +#define TCP_ARGUMENT_MEMSPACEID "memspaceid"
> +#define TCP_ARGUMENT_SIZE "size"
> +#define TCP_ARGUMENT_THREAD "thread"
> +#define TCP_ARGUMENT_ADDRESS "address"
> +#define TCP_ARGUMENT_STOP_STRING "stop_str"
> +#define TCP_ARGUMENT_INFO_STRING "info_str"
> +#define TCP_ARGUMENT_STATE "state"
> +#define TCP_ARGUMENT_EVENT "event"
> +#define TCP_ARGUMENT_DEVICE "device"
> +#define TCP_ARGUMENT_CORE "core"
> +#define TCP_ARGUMENT_AMOUNT_CORE "nr_cores"
> +#define TCP_ARGUMENT_AMOUNT_TRIGGER "nr_trigger"
> +#define TCP_ARGUMENT_OPTION "option"
> +#define TCP_ARGUMENT_ACTION "action"
> +#define TCP_ARGUMENT_OPCODE "opcode"
> +
> +/* for packets sent to qemu */
> +#define ARGUMENT_SEPARATOR ';'
> +#define NEGATIVE_FLAG 0
> +#define POSITIVE_FLAG 1
> +
> +/* core states */
> +#define CORE_STATE_RUNNING "running"
> +#define CORE_STATE_HALTED "halted"
> +#define CORE_STATE_DEBUG "debug"
> +#define CORE_STATE_UNKNOWN "unknown"
> +
> +/* breakpoint types */
> +#define MCD_BREAKPOINT_HW 1
> +#define MCD_BREAKPOINT_READ 2
> +#define MCD_BREAKPOINT_WRITE 3
> +#define MCD_BREAKPOINT_RW 4
> +
> +/* trigger data */
> +#define MCD_TRIG_ACT_BREAK "check_data_value"
> +#define MCD_TRIG_OPT_VALUE "break_on_trigger"
> +
> +/* register mem space key words */
> +#define MCD_GRP_KEYWORD "GPR"
> +#define MCD_CP_KEYWORD "CP"
> +
> +#endif

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2023-11-29 16:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 13:03 [PATCH v3 00/20] first version of mcdstub Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 01/20] mcdstub: initial file structure for new mcdstub created. -mcd QEMU startup option added. Functions for initializing the mcdstub added. Basic helper functions for processes/cpus in the mcdstub added Nicolas Eder
2023-11-29 15:23   ` Alex Bennée
2023-11-07 13:03 ` [PATCH v3 02/20] mcdstub gdbstub: new DebugClass and DebugState introduced. They are used to abstract the debugger details behind a QOM. This is currently used in the cpu_handle_guest_debug function Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 03/20] gdbstub: moving code so that it can be easier accessed from outside the gdbstub: fromhex and tohex functions moved to a cutils header. GDBRegisterState moved to gdbstub.h Nicolas Eder
2023-11-29 15:51   ` Alex Bennée
2023-11-07 13:03 ` [PATCH v3 04/20] mcdstub: added header with defines specific to the mcd tcp packet communication Nicolas Eder
2023-11-29 16:02   ` Alex Bennée [this message]
2023-11-07 13:03 ` [PATCH v3 05/20] mcdstub: tcp packet processing added Nicolas Eder
2023-11-08 14:33   ` Philippe Mathieu-Daudé
2023-11-13  9:18     ` nicolas.eder
2023-11-29 16:25   ` Alex Bennée
2023-11-07 13:03 ` [PATCH v3 06/20] mcdstub: open/close server functions and trigger/reset data added. User for initial connection with an mcd client Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 07/20] mcdstub: quitting QEMU via mcd command added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 08/20] mcdstub: query packet processing added and core/system querie added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 09/20] mcdstub: open/close core added. This includes core specific data preparation: memory spaces, register groups and registers. This data preparation is done in the arm mcdstub Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 10/20] mcdstub: state query added: this query collects information about the state of a specific core. This commit also includes mcd_vm_state_change, which is called when the cpu state changes because it collects data for the query Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 11/20] mcdstub: reset and trigger queries added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 12/20] mcdstub: missing parse_reg_xml function for parsing gdb register xml files added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 13/20] mcdstub: added queries for memory spaces, register groups and registers Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 14/20] mcdstub: missing handle_query_state function added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 15/20] mcdstub: added go, break and step functionality and all corresponding functions Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 16/20] mcdstub: function construct for resets added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 17/20] mcdstub: reading/writing registers added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 18/20] mcdstub: read/write to memory added: This also includes various helper functions in the QEMU memory code Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 19/20] mcdstub: break/watchpoints added Nicolas Eder
2023-11-07 13:03 ` [PATCH v3 20/20] mcdstub: updated MAINTAINERS file and fully activated the mcdstub in the meson build system Nicolas Eder
2023-11-29 16:31   ` Alex Bennée
2023-11-08 14:27 ` [PATCH v3 00/20] first version of mcdstub Philippe Mathieu-Daudé
2023-11-13  9:20   ` nicolas.eder
2023-11-29 14:44 ` Alex Bennée
2023-11-29 15:01   ` nicolas.eder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y1ka6p0.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=christian.boenig@lauterbach.com \
    --cc=nicolas.eder@lauterbach.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).