summaryrefslogtreecommitdiff
path: root/src/dev/storage/ide_disk.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-10-28 19:52:23 -0700
committerGabe Black <gabeblack@google.com>2019-10-30 08:51:02 +0000
commitf5f60a5e467f74dc14b10d431795363deff33b76 (patch)
tree7eeccdf3db557b269e84eaff9e033b0230640da3 /src/dev/storage/ide_disk.hh
parentbff5eba6b77243dda49ffb5ee7411ec397a7ec01 (diff)
downloadgem5-f5f60a5e467f74dc14b10d431795363deff33b76.tar.xz
dev: Get PageBytes from the system in the ide_disk model.
This avoids having to use TheISA::. Change-Id: I020860ab343f9b6fafbcb0e23479d0b64f094512 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22268 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/dev/storage/ide_disk.hh')
-rw-r--r--src/dev/storage/ide_disk.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dev/storage/ide_disk.hh b/src/dev/storage/ide_disk.hh
index fa5bb760d..37aa9eed1 100644
--- a/src/dev/storage/ide_disk.hh
+++ b/src/dev/storage/ide_disk.hh
@@ -241,6 +241,8 @@ class IdeDisk : public SimObject
DmaState_t dmaState;
/** Dma transaction is a read */
bool dmaRead;
+ /** Size of OS pages. */
+ Addr pageBytes;
/** PRD table base address */
uint32_t curPrdAddr;
/** PRD entry */
@@ -282,9 +284,12 @@ class IdeDisk : public SimObject
* Set the controller for this device
* @param c The IDE controller
*/
- void setController(IdeController *c) {
- if (ctrl) panic("Cannot change the controller once set!\n");
+ void
+ setController(IdeController *c, Addr page_bytes)
+ {
+ panic_if(ctrl, "Cannot change the controller once set!\n");
ctrl = c;
+ pageBytes = page_bytes;
}
// Device register read/write