Improve Banshee error reporting
Stubbed Banshee AGP registers
This commit is contained in:
@@ -98,6 +98,12 @@ typedef struct banshee_t {
|
|||||||
uint32_t vidScreenSize;
|
uint32_t vidScreenSize;
|
||||||
uint32_t vidSerialParallelPort;
|
uint32_t vidSerialParallelPort;
|
||||||
|
|
||||||
|
uint32_t agpReqSize;
|
||||||
|
uint32_t agpHostAddressHigh;
|
||||||
|
uint32_t agpHostAddressLow;
|
||||||
|
uint32_t agpGraphicsAddress;
|
||||||
|
uint32_t agpGraphicsStride;
|
||||||
|
|
||||||
int overlay_pix_fmt;
|
int overlay_pix_fmt;
|
||||||
|
|
||||||
uint32_t hwCurPatAddr, hwCurLoc, hwCurC0, hwCurC1;
|
uint32_t hwCurPatAddr, hwCurLoc, hwCurC0, hwCurC1;
|
||||||
@@ -161,19 +167,25 @@ enum {
|
|||||||
Video_vidOverlayDvdy = 0xac,
|
Video_vidOverlayDvdy = 0xac,
|
||||||
Video_vidOverlayDvdyOffset = 0xe0,
|
Video_vidOverlayDvdyOffset = 0xe0,
|
||||||
Video_vidDesktopStartAddr = 0xe4,
|
Video_vidDesktopStartAddr = 0xe4,
|
||||||
Video_vidDesktopOverlayStride = 0xe8
|
Video_vidDesktopOverlayStride = 0xe8,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
cmdBaseAddr0 = 0x20,
|
cmdBaseAddr0 = 0x20,
|
||||||
cmdBaseSize0 = 0x24,
|
cmdBaseSize0 = 0x24,
|
||||||
cmdBump0 = 0x28,
|
cmdBump0 = 0x28,
|
||||||
cmdRdPtrL0 = 0x2c,
|
cmdRdPtrL0 = 0x2c,
|
||||||
cmdRdPtrH0 = 0x30,
|
cmdRdPtrH0 = 0x30,
|
||||||
cmdAMin0 = 0x34,
|
cmdAMin0 = 0x34,
|
||||||
cmdAMax0 = 0x3c,
|
cmdAMax0 = 0x3c,
|
||||||
cmdFifoDepth0 = 0x44,
|
cmdFifoDepth0 = 0x44,
|
||||||
cmdHoleCnt0 = 0x48
|
cmdHoleCnt0 = 0x48,
|
||||||
|
|
||||||
|
Agp_agpReqSize = 0x00,
|
||||||
|
Agp_agpHostAddressLow = 0x04,
|
||||||
|
Agp_agpHostAddressHigh = 0x08,
|
||||||
|
Agp_agpGraphicsAddress = 0x0C,
|
||||||
|
Agp_agpGraphicsStride = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VGAINIT0_EXTENDED_SHIFT_OUT (1 << 12)
|
#define VGAINIT0_EXTENDED_SHIFT_OUT (1 << 12)
|
||||||
@@ -1123,6 +1135,26 @@ banshee_cmd_read(banshee_t *banshee, uint32_t addr)
|
|||||||
uint32_t ret = 0xffffffff;
|
uint32_t ret = 0xffffffff;
|
||||||
|
|
||||||
switch (addr & 0x1fc) {
|
switch (addr & 0x1fc) {
|
||||||
|
case Agp_agpHostAddressLow:
|
||||||
|
ret = banshee->agpHostAddressLow;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpHostAddressHigh:
|
||||||
|
ret = banshee->agpHostAddressHigh;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpGraphicsAddress:
|
||||||
|
ret = banshee->agpGraphicsAddress;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpGraphicsStride:
|
||||||
|
ret = banshee->agpGraphicsStride;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpReqSize:
|
||||||
|
ret = banshee->agpReqSize;
|
||||||
|
break;
|
||||||
|
|
||||||
case cmdBaseAddr0:
|
case cmdBaseAddr0:
|
||||||
ret = voodoo->cmdfifo_base >> 12;
|
ret = voodoo->cmdfifo_base >> 12;
|
||||||
// banshee_log("Read cmdfifo_base %08x\n", ret);
|
// banshee_log("Read cmdfifo_base %08x\n", ret);
|
||||||
@@ -1142,7 +1174,7 @@ banshee_cmd_read(banshee_t *banshee, uint32_t addr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatal("Unknown banshee_cmd_read %08x\n", addr);
|
fatal("Unknown banshee_cmd_read 0x%08x (reg 0x%03x)\n", addr, addr & 0x1fc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1348,6 +1380,26 @@ banshee_cmd_write(banshee_t *banshee, uint32_t addr, uint32_t val)
|
|||||||
voodoo_t *voodoo = banshee->voodoo;
|
voodoo_t *voodoo = banshee->voodoo;
|
||||||
// banshee_log("banshee_cmd_write: addr=%03x val=%08x\n", addr & 0x1fc, val);
|
// banshee_log("banshee_cmd_write: addr=%03x val=%08x\n", addr & 0x1fc, val);
|
||||||
switch (addr & 0x1fc) {
|
switch (addr & 0x1fc) {
|
||||||
|
case Agp_agpHostAddressLow:
|
||||||
|
banshee->agpHostAddressLow = val;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpHostAddressHigh:
|
||||||
|
banshee->agpHostAddressHigh = val;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpGraphicsAddress:
|
||||||
|
banshee->agpGraphicsAddress = val;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpGraphicsStride:
|
||||||
|
banshee->agpGraphicsStride = val;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Agp_agpReqSize:
|
||||||
|
banshee->agpReqSize = val;
|
||||||
|
break;
|
||||||
|
|
||||||
case cmdBaseAddr0:
|
case cmdBaseAddr0:
|
||||||
voodoo->cmdfifo_base = (val & 0xfff) << 12;
|
voodoo->cmdfifo_base = (val & 0xfff) << 12;
|
||||||
voodoo->cmdfifo_end = voodoo->cmdfifo_base + (((voodoo->cmdfifo_size & 0xff) + 1) << 12);
|
voodoo->cmdfifo_end = voodoo->cmdfifo_base + (((voodoo->cmdfifo_size & 0xff) + 1) << 12);
|
||||||
@@ -1382,7 +1434,7 @@ banshee_cmd_write(banshee_t *banshee, uint32_t addr, uint32_t val)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
banshee_log("Unknown banshee_cmd_write: addr=%08x val=%08x\n", addr, val);
|
banshee_log("Unknown banshee_cmd_write: addr=%08x val=%08x reg=0x%03x\n", addr, val, addr & 0x1fc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user