IDE,X86: Fix IDE controller BAR configuration for x86.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 22 Nov 2010 07:33:47 +0000 (02:33 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 22 Nov 2010 07:33:47 +0000 (02:33 -0500)
src/dev/ide_ctrl.cc

index 4bbad883d7bfb97d74142a4c884f4f579097dfed..95b13bc7a74ee425194866cd69d07ab6ecb49b82 100644 (file)
@@ -107,11 +107,11 @@ IdeController::IdeController(Params *p)
     primary.select(false);
     secondary.select(false);
 
-    if ((BARAddrs[0] & ~BAR_IO_MASK) != 0){
+    if ((BARAddrs[0] & ~BAR_IO_MASK) && !legacyIO[0]){
         primary.cmdAddr = BARAddrs[0];  primary.cmdSize = BARSize[0];
         primary.ctrlAddr = BARAddrs[1]; primary.ctrlSize = BARAddrs[1];
     }
-    if ((BARAddrs[2] & ~BAR_IO_MASK) != 0){
+    if ((BARAddrs[2] & ~BAR_IO_MASK) && !legacyIO[2]){
         secondary.cmdAddr = BARAddrs[2];  secondary.cmdSize = BARSize[2];
         secondary.ctrlAddr = BARAddrs[3]; secondary.ctrlSize = BARAddrs[3];
     }