]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOPlatformExpert.cpp
xnu-3789.31.2.tar.gz
[apple/xnu.git] / iokit / Kernel / IOPlatformExpert.cpp
index 7dff66444ffb7fd320364892b61b14c855f89af9..c83a71fd5400adf0c098acb0ad650af4836878dc 100644 (file)
@@ -822,8 +822,13 @@ int PEHaltRestart(unsigned int type)
    }
    else if(type == kPEPanicRestartCPU || type == kPEPanicSync)
    {
-       IOCPURunPlatformPanicActions(type);
-       PE_sync_panic_buffers();
+       // Do an initial sync to flush as much panic data as possible,
+       // in case we have a problem in one of the platorm panic handlers.
+       // After running the platform handlers, do a final sync w/
+       // platform hardware quiesced for the panic.
+       PE_sync_panic_buffers();
+       IOCPURunPlatformPanicActions(type);
+       PE_sync_panic_buffers();
    }
 
   if (gIOPlatform) return gIOPlatform->haltRestart(type);