diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/ide_ctrl.cc | 19 | ||||
-rw-r--r-- | dev/ide_disk.cc | 11 |
2 files changed, 17 insertions, 13 deletions
diff --git a/dev/ide_ctrl.cc b/dev/ide_ctrl.cc index 037de1dea..857cdeb78 100644 --- a/dev/ide_ctrl.cc +++ b/dev/ide_ctrl.cc @@ -289,15 +289,16 @@ IdeController::ReadConfig(int offset, int size, uint8_t *data) memcpy((void *)data, (void *)&pci_regs[offset], size); } - DPRINTF(IdeCtrl, "IDE PCI read offset: %#x (%#x) size: %#x data: %#x\n", - origOffset, offset, size, *(uint32_t *)data); + DPRINTF(IdeCtrl, "PCI read offset: %#x (%#x) size: %#x data: %#x\n", + origOffset, offset, size, + (*(uint32_t *)data) & (0xffffffff >> 8 * (4 - size))); } void IdeController::WriteConfig(int offset, int size, uint32_t data) { - DPRINTF(IdeCtrl, "IDE PCI write offset: %#x size: %#x data: %#x\n", - offset, size, data); + DPRINTF(IdeCtrl, "PCI write offset: %#x size: %#x data: %#x\n", + offset, size, data & (0xffffffff >> 8 * (4 - size))); // do standard write stuff if in standard PCI space if (offset < PCI_DEVICE_SPECIFIC) { @@ -438,8 +439,9 @@ IdeController::read(MemReqPtr &req, uint8_t *data) memcpy((void *)data, &bmi_regs[offset], req->size); } - DPRINTF(IdeCtrl, "IDE read from offset: %#x size: %#x data: %#x\n", - offset, req->size, *(uint32_t *)data); + DPRINTF(IdeCtrl, "read from offset: %#x size: %#x data: %#x\n", + offset, req->size, + (*(uint32_t *)data) & (0xffffffff >> 8 * (4 - req->size))); return No_Fault; } @@ -458,8 +460,9 @@ IdeController::write(MemReqPtr &req, const uint8_t *data) byte = (req->size == sizeof(uint8_t)) ? true : false; cmdBlk = (type == COMMAND_BLOCK) ? true : false; - DPRINTF(IdeCtrl, "IDE write from offset: %#x size: %#x data: %#x\n", - offset, req->size, *(uint32_t *)data); + DPRINTF(IdeCtrl, "write from offset: %#x size: %#x data: %#x\n", + offset, req->size, + (*(uint32_t *)data) & (0xffffffff >> 8 * (4 - req->size))); uint8_t oldVal, newVal; diff --git a/dev/ide_disk.cc b/dev/ide_disk.cc index bfaf3d3aa..213fc6a97 100644 --- a/dev/ide_disk.cc +++ b/dev/ide_disk.cc @@ -336,7 +336,8 @@ IdeDisk::dmaPrdReadDone() physmem->dma_addr(curPrdAddr, sizeof(PrdEntry_t)), sizeof(PrdEntry_t)); - DPRINTF(IdeDisk, "PRD: baseAddr:%#x (%#x) byteCount:%d (%d) eot:%#x sector:%d\n", + DPRINTF(IdeDisk, + "PRD: baseAddr:%#x (%#x) byteCount:%d (%d) eot:%#x sector:%d\n", curPrd.getBaseAddr(), pciToDma(curPrd.getBaseAddr()), curPrd.getByteCount(), (cmdBytesLeft/SectorSize), curPrd.getEOT(), curSector); @@ -609,10 +610,10 @@ void IdeDisk::abortDma() { if (dmaState == Dma_Idle) - panic("Inconsistent DMA state, should be in Dma_Start or Dma_Transfer!\n"); + panic("Inconsistent DMA state, should be Start or Transfer!"); if (devState != Transfer_Data_Dma && devState != Prepare_Data_Dma) - panic("Inconsistent device state, should be in Transfer or Prepare!\n"); + panic("Inconsistent device state, should be Transfer or Prepare!\n"); updateState(ACT_CMD_ERROR); } @@ -732,7 +733,7 @@ IdeDisk::startCommand() void IdeDisk::intrPost() { - DPRINTF(IdeDisk, "IDE Disk Posting Interrupt\n"); + DPRINTF(IdeDisk, "Posting Interrupt\n"); if (intrPending) panic("Attempt to post an interrupt with one pending\n"); @@ -746,7 +747,7 @@ IdeDisk::intrPost() void IdeDisk::intrClear() { - DPRINTF(IdeDisk, "IDE Disk Clearing Interrupt\n"); + DPRINTF(IdeDisk, "Clearing Interrupt\n"); if (!intrPending) panic("Attempt to clear a non-pending interrupt\n"); |