#include <IOKit/IOLib.h>
#include <libkern/c++/OSUnserialize.h>
+#include <IOKit/platform/ApplePlatformExpert.h>
#include "AppleI386PlatformExpert.h"
#include <IOKit/assert.h>
+__BEGIN_DECLS
+extern void kdreboot(void);
+__END_DECLS
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#define super IOPlatformExpert
{
gIntelPICName = (OSSymbol *) OSSymbol::withCStringNoCopy("intel-pic");
+ setBootROMType(kBootROMTypeNewWorld); /* hammer to new world for i386 */
+
// setupPIC(provider);
if (!super::start(provider))
return false;
+ // Install halt/restart handler.
+
+ PE_halt_restart = handlePEHaltRestart;
+
return true;
}
return (true);
}
+
+int AppleI386PlatformExpert::handlePEHaltRestart( unsigned int type )
+{
+ int ret = 1;
+
+ switch ( type )
+ {
+ case kPERestartCPU:
+ // Use the pexpert service to reset the system through
+ // the keyboard controller.
+ kdreboot();
+ break;
+
+ case kPEHaltCPU:
+ default:
+ ret = -1;
+ break;
+ }
+
+ return ret;
+}