summaryrefslogtreecommitdiff
path: root/hw/scsi/lsi53c895a.c
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2015-01-12 10:45:17 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-01-14 10:38:57 +0100
commit6f84da3a07668ce881a0c853390eb05313d61157 (patch)
tree56260af8d5d16c73f199e592e38c7b183e2209c8 /hw/scsi/lsi53c895a.c
parente1660dc57c1bacb78cbe39001e58a577c927dacb (diff)
downloadqemu-6f84da3a07668ce881a0c853390eb05313d61157.tar.gz
hw/scsi/lsi53c895a: add support for additional diag / debug registers
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> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/lsi53c895a.c')
-rw-r--r--hw/scsi/lsi53c895a.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index ec920488d6..db7d4b8c9c 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 */