<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>To shutdown the CPU, it is just the command "halt" in assembly, but to shutdown the system' powersupply, and all other component, nowdays it is hardwired to ACPI, eg:</div>
<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.thinkwiki.org/wiki/How_to_make_APM_work">http://www.thinkwiki.org/wiki/How_to_make_APM_work</a><br><div><br></div><div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://tuxmobil.org/apm_linux.html">http://tuxmobil.org/apm_linux.html</a></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.linuxdocs.org/HOWTOs/mini/Battery-Powered-3.html">http://www.linuxdocs.org/HOWTOs/mini/Battery-Powered-3.html</a></div>
<div><br></div><div><a href="http://forums.anandtech.com/showthread.php?t=487583"></a>So without ACPI, as mentioned in URL above, alternative is APM. Alternatively if u are talking about SMM/SMI, yes, sounds logical, as that is how system can shutdown itself after detecting overheating in motherboard (for example) - temperature monitoring is part of SMM mode. But I am not sure if u can trigger SMI that specifically shutdown system or not. (software trigger for SMI is possible ....port 0xb2)</div>
<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://en.wikipedia.org/wiki/System_Management_Mode">http://en.wikipedia.org/wiki/System_Management_Mode</a></div><div><br></div>
<div>Do aware that Intel VT (VMM) can intercept these SMI too:</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://software.intel.com/en-us/forums/showthread.php?t=67301">http://software.intel.com/en-us/forums/showthread.php?t=67301</a></div>
<div><br></div><div><br></div><div><div class="gmail_quote">On Wed, Jun 15, 2011 at 3:53 AM, limp <span dir="ltr"><<a href="mailto:johnkyr83@hotmail.com">johnkyr83@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
I am trying to figure out the procedure that Linux follows for shutting down<br>
an x86 based system when ACPI is not used. From what I've found, when we try<br>
to shutdown the system from user-space, _reboot() system call is called with<br>
"LINUX_REBOOT_CMD_POWER_OFF" as argument. By tracking down the steps<br>
performed in the kernel when the aforementioned system call is involved, I<br>
ended up in kernel_power_off(), unlock_kernel(), and finaly do_exit()<br>
functions.<br>
<br>
The kernel_power_off() ultimately calls the native_machine_shutdown() form<br>
which Linux disables LAPIC, I/O APIC, HPET, etc. Then, after calling the<br>
unlock_kernel(), the do_exit() is called for ultimately shutting down the<br>
system. In the end of this function, I can see that the processor enters an<br>
infinite loop from which it repeatedly executes NOP instructions. That is<br>
actually the behaviour that I experience when I am not using ACPI; the<br>
system is not actually turning off but it goes into an idle state.<br>
<br>
Is this how Linux should act when ACPI is not used? I would expect in this<br>
case Linux to invoke an SMI so that the appropriate SMI function actually<br>
shutdown the system but I can't see where (and if) that takes place.<br>
<br>
Any help will be greatly appreciated.<br>
<br>
John K.<br>
<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Peter Teoh<br>
</div>