diff options
author | Benjamin Nash <benash@umich.edu> | 2005-07-01 13:06:35 -0400 |
---|---|---|
committer | Benjamin Nash <benash@umich.edu> | 2005-07-01 13:06:35 -0400 |
commit | 81b57af24118ad61329a848b3b66874e6e05ecb9 (patch) | |
tree | f847a6ce99a64466aac95b6b344eb136c843070b /dev | |
parent | 6cf1740bf5be924a58178a6d53500110e068b656 (diff) | |
download | gem5-81b57af24118ad61329a848b3b66874e6e05ecb9.tar.xz |
Fix formatting, move default size (0x8) of TsunamiFake from C++ code to Python code.
dev/ide_disk.cc:
Fix formatting. Panic if unexpected register type is given.
python/m5/objects/Tsunami.py:
Add default size of TsunamiFake device.
--HG--
extra : convert_revision : 03a35a2f6468b95746cba41ce7e93afeeb70ccef
Diffstat (limited to 'dev')
-rw-r--r-- | dev/ide_disk.cc | 59 |
1 files changed, 31 insertions, 28 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); |