summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev/ide_disk.cc59
-rw-r--r--python/m5/objects/Tsunami.py2
2 files changed, 32 insertions, 29 deletions
diff --git a/dev/ide_disk.cc b/dev/ide_disk.cc
index 7096c6948..3d7bd19c0 100644
--- a/dev/ide_disk.cc
+++ b/dev/ide_disk.cc
@@ -220,34 +220,34 @@ IdeDisk::read(const Addr &offset, RegType_t type)
else if (offset == DATA_OFFSET)
action = ACT_DATA_READ_SHORT;
- switch (offset) {
- case DATA_OFFSET:
- data = cmdReg.data;
- break;
- case ERROR_OFFSET:
- data = cmdReg.error;
- break;
- case NSECTOR_OFFSET:
- data = cmdReg.sec_count;
- break;
- case SECTOR_OFFSET:
- data = cmdReg.sec_num;
- break;
- case LCYL_OFFSET:
- data = cmdReg.cyl_low;
- break;
- case HCYL_OFFSET:
- data = cmdReg.cyl_high;
- break;
- case SELECT_OFFSET:
- data = cmdReg.drive;
- break;
- case STATUS_OFFSET:
- data = status;
- break;
- default:
- panic("Invalid IDE command register offset: %#x\n", offset);
- }
+ switch (offset) {
+ case DATA_OFFSET:
+ data = cmdReg.data;
+ break;
+ case ERROR_OFFSET:
+ data = cmdReg.error;
+ break;
+ case NSECTOR_OFFSET:
+ data = cmdReg.sec_count;
+ break;
+ case SECTOR_OFFSET:
+ data = cmdReg.sec_num;
+ break;
+ case LCYL_OFFSET:
+ data = cmdReg.cyl_low;
+ break;
+ case HCYL_OFFSET:
+ data = cmdReg.cyl_high;
+ break;
+ case SELECT_OFFSET:
+ data = cmdReg.drive;
+ break;
+ case STATUS_OFFSET:
+ data = status;
+ break;
+ default:
+ panic("Invalid IDE command register offset: %#x\n", offset);
+ }
}
else if (type == CONTROL_BLOCK) {
if (offset != ALTSTAT_OFFSET)
@@ -255,6 +255,9 @@ IdeDisk::read(const Addr &offset, RegType_t type)
data = status;
}
+ else {
+ panic("Invalid IDE register type: %#x\n", type);
+ }
if (action != ACT_NONE)
updateState(action);
diff --git a/python/m5/objects/Tsunami.py b/python/m5/objects/Tsunami.py
index 8e16d5d1e..dd52bd11d 100644
--- a/python/m5/objects/Tsunami.py
+++ b/python/m5/objects/Tsunami.py
@@ -13,7 +13,7 @@ class TsunamiCChip(FooPioDevice):
class TsunamiFake(FooPioDevice):
type = 'TsunamiFake'
- size = Param.Addr("Size of address range")
+ size = Param.Addr(0x8, "Size of address range")
class TsunamiIO(FooPioDevice):
type = 'TsunamiIO'