dev: Fix an IDE error check.
authorGabe Black <gabeblack@google.com>
Tue, 8 Aug 2017 00:46:28 +0000 (17:46 -0700)
committerGabe Black <gabeblack@google.com>
Sat, 12 Aug 2017 00:50:04 +0000 (00:50 +0000)
The error message says an IDE controller can support at most 4 disks, but the
check would fail if there were more than 3 disks.

Change-Id: Ic7d5d8c941fe2580da43019f53991377d4727bb9
Reviewed-on: https://gem5-review.googlesource.com/4460
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/dev/storage/ide_ctrl.cc

index feed9cfd2e4ef56f00260fb17b71df2b046dcc37..6d507269f402454b8bfec4ea03169b292e2b2426 100644 (file)
@@ -102,7 +102,7 @@ IdeController::IdeController(Params *p)
     ioEnabled(false), bmEnabled(false),
     ioShift(p->io_shift), ctrlOffset(p->ctrl_offset)
 {
-    if (params()->disks.size() > 3)
+    if (params()->disks.size() > 4)
         panic("IDE controllers support a maximum of 4 devices attached!\n");
 
     // Assign the disks to channels