From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/scsi/lsi53c895a: add support for additional diag / debug registers
Date: Mon, 12 Jan 2015 11:21:12 +0100 [thread overview]
Message-ID: <54B3A018.5070202@redhat.com> (raw)
In-Reply-To: <1421055917-17701-1-git-send-email-pl@kamp.de>
On 12/01/2015 10:45, Peter Lieven wrote:
> Some ancient Linux kernels read from registers 0x09 and 0x3c-3f during
> boot. According to the spec these registers are for diag and debug
> purposes only. If they are absend qemu aborts on read.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> hw/scsi/lsi53c895a.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
> index ec92048..db7d4b8 100644
> --- a/hw/scsi/lsi53c895a.c
> +++ b/hw/scsi/lsi53c895a.c
> @@ -277,6 +277,7 @@ typedef struct {
> uint32_t csbc;
> uint32_t scratch[18]; /* SCRATCHA-SCRATCHR */
> uint8_t sbr;
> + uint32_t adder;
>
> /* Script ram is stored as 32-bit words in host byteorder. */
> uint32_t script_ram[2048];
> @@ -1389,6 +1390,7 @@ again:
> switch ((insn >> 27) & 7) {
> case 0: /* Jump */
> DPRINTF("Jump to 0x%08x\n", addr);
> + s->adder = addr;
> s->dsp = addr;
> break;
> case 1: /* Call */
> @@ -1513,6 +1515,8 @@ static uint8_t lsi_reg_readb(LSIState *s, int offset)
> return 0x7f;
> case 0x08: /* Revision ID */
> return 0x00;
> + case 0x09: /* SOCL */
> + return s->socl;
> case 0xa: /* SSID */
> return s->ssid;
> case 0xb: /* SBCL */
> @@ -1577,6 +1581,8 @@ static uint8_t lsi_reg_readb(LSIState *s, int offset)
> return s->sbr;
> case 0x3b: /* DCNTL */
> return s->dcntl;
> + /* ADDER Output (Debug of relative jump address) */
> + CASE_GET_REG32(adder, 0x3c)
> case 0x40: /* SIEN0 */
> return s->sien0;
> case 0x41: /* SIEN1 */
>
Thanks!
Paolo
prev parent reply other threads:[~2015-01-12 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 9:45 [Qemu-devel] [PATCH] hw/scsi/lsi53c895a: add support for additional diag / debug registers Peter Lieven
2015-01-12 10:21 ` Paolo Bonzini [this message]
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=54B3A018.5070202@redhat.com \
--to=pbonzini@redhat.com \
--cc=pl@kamp.de \
--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).