summaryrefslogtreecommitdiff
path: root/src/dev/storage/ide_disk.hh
diff options
context:
space:
mode:
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