From: Richard Henderson <richard.henderson@linaro.org>
To: Helge Deller <deller@gmx.de>, qemu-devel@nongnu.org
Cc: Sven Schnelle <svens@stackframe.org>
Subject: Re: [PATCH v2 3/6] hppa: Add support for an emulated TOC/NMI button.
Date: Tue, 1 Feb 2022 09:06:14 +1100 [thread overview]
Message-ID: <85d3ed39-76df-2ebb-d1d9-65e426302c06@linaro.org> (raw)
In-Reply-To: <20220131213529.17404-4-deller@gmx.de>
On 2/1/22 08:35, Helge Deller wrote:
> Almost all PA-RISC machines have either a button that is labeled with 'TOC' or
> a BMC/GSP function to trigger a TOC. TOC is a non-maskable interrupt that is
> sent to the processor. This can be used for diagnostic purposes like obtaining
> a stack trace/register dump or to enter KDB/KGDB in Linux.
>
> This patch adds support for such an emulated TOC button.
>
> It wires up the qemu monitor "nmi" command to trigger a TOC. For that it
> provides the hppa_nmi function which is assigned to the nmi_monitor_handler
> function pointer. When called it raises the EXCP_TOC hardware interrupt in the
> hppa_cpu_do_interrupt() function. The interrupt function then calls the
> architecturally defined TOC function in SeaBIOS-hppa firmware (at fixed address
> 0xf0000000).
>
> According to the PA-RISC PDC specification, the SeaBIOS firmware then writes
> the CPU registers into PIM (processor internal memmory) for later analysis. In
> order to write all registers it needs to know the contents of the CPU "shadow
> registers" and the IASQ- and IAOQ-back values. The IAOQ/IASQ values are
> provided by qemu in shadow registers when entering the SeaBIOS TOC function.
> This patch adds a new aritificial opcode "getshadowregs" (0xfffdead2) which
> restores the original values of the shadow registers. With this opcode SeaBIOS
> can store those registers as well into PIM before calling an OS-provided TOC
> handler.
>
> To trigger a TOC, switch to the qemu monitor with Ctrl-A C, and type in the
> command "nmi". After the TOC started the OS-debugger, exit the qemu monitor
> with Ctrl-A C.
>
> Signed-off-by: Helge Deller<deller@gmx.de>
> ---
> hw/hppa/machine.c | 35 ++++++++++++++++++++++++++++++++++-
> target/hppa/cpu.c | 2 +-
> target/hppa/cpu.h | 5 +++++
> target/hppa/helper.h | 1 +
> target/hppa/insns.decode | 1 +
> target/hppa/int_helper.c | 19 ++++++++++++++++++-
> target/hppa/op_helper.c | 7 ++++++-
> target/hppa/translate.c | 10 ++++++++++
> 8 files changed, 76 insertions(+), 4 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2022-01-31 22:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 21:35 [PATCH v2 0/6] Fixes and updates for hppa target Helge Deller
2022-01-31 21:35 ` [PATCH v2 1/6] seabios-hppa: Update SeaBIOS-hppa to VERSION 3 Helge Deller
2022-01-31 21:35 ` [PATCH v2 2/6] hw/hppa: Allow up to 16 emulated CPUs Helge Deller
2022-01-31 22:05 ` Richard Henderson
2022-02-01 9:37 ` Helge Deller
2022-01-31 21:35 ` [PATCH v2 3/6] hppa: Add support for an emulated TOC/NMI button Helge Deller
2022-01-31 22:06 ` Richard Henderson [this message]
2022-01-31 23:56 ` Philippe Mathieu-Daudé via
2024-05-29 15:11 ` Philippe Mathieu-Daudé
2024-05-29 20:06 ` Helge Deller
2022-01-31 21:35 ` [PATCH v2 4/6] hw/display/artist: rewrite vram access mode handling Helge Deller
2022-01-31 21:35 ` [PATCH v2 5/6] hw/display/artist: Mouse cursor fixes for HP-UX Helge Deller
2022-01-31 21:35 ` [PATCH v2 6/6] hw/display/artist: Fix draw_line() artefacts Helge Deller
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=85d3ed39-76df-2ebb-d1d9-65e426302c06@linaro.org \
--to=richard.henderson@linaro.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=svens@stackframe.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).