]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Drivers/platform/drvAppleNMI/AppleNMI.cpp
xnu-517.tar.gz
[apple/xnu.git] / iokit / Drivers / platform / drvAppleNMI / AppleNMI.cpp
index bf9965c97c0c0b19fb9cce83054dc4931209e442..74ceaaa95d525f6fa83d6efb0f5748efef0f7a79 100644 (file)
@@ -136,12 +136,12 @@ IOReturn AppleNMI::powerStateWillChangeTo ( IOPMPowerFlags theFlags, unsigned lo
 
             // Mask NMI and change from edge to level whilst sleeping (copied directly from OS9 code)
             nmiIntSourceAddr = (volatile unsigned long *)kExtInt9_NMIIntSource;
-            nmiIntSource = *nmiIntSourceAddr;
+            nmiIntSource = ml_phys_read(nmiIntSourceAddr);
             nmiIntSource |= kNMIIntLevelMask;
-            *nmiIntSourceAddr = nmiIntSource;
+            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
             eieio();
             nmiIntSource |= kNMIIntMask;
-            *nmiIntSourceAddr = nmiIntSource;
+            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
             eieio();
         }
         else
@@ -150,12 +150,12 @@ IOReturn AppleNMI::powerStateWillChangeTo ( IOPMPowerFlags theFlags, unsigned lo
 
             // Unmask NMI and change back to edge (copied directly from OS9 code)
             nmiIntSourceAddr = (volatile unsigned long *)kExtInt9_NMIIntSource;
-            nmiIntSource = *nmiIntSourceAddr;
+            nmiIntSource = ml_phys_read(nmiIntSourceAddr);
             nmiIntSource &= ~kNMIIntLevelMask;
-            *nmiIntSourceAddr = nmiIntSource;
+            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
             eieio();
             nmiIntSource &= ~kNMIIntMask;
-            *nmiIntSourceAddr = nmiIntSource;
+            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
             eieio();
         }
     }