kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Procedure Linux follows for shutting down an x86 system when ACPI is not used
@ 2011-06-14 19:53 limp
  2011-06-15  7:55 ` Peter Teoh
  0 siblings, 1 reply; 2+ messages in thread
From: limp @ 2011-06-14 19:53 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I am trying to figure out the procedure that Linux follows for shutting down
an x86 based system when ACPI is not used. From what I've found, when we try
to shutdown the system from user-space, _reboot() system call is called with
"LINUX_REBOOT_CMD_POWER_OFF" as argument. By tracking down the steps
performed in the kernel when the aforementioned system call is involved, I
ended up in kernel_power_off(), unlock_kernel(), and finaly do_exit()
functions.

The kernel_power_off() ultimately calls the  native_machine_shutdown() form
which Linux disables LAPIC, I/O APIC, HPET, etc. Then, after calling the
unlock_kernel(), the do_exit() is called for ultimately shutting down the
system. In the end of this function, I can see that the processor enters an
infinite loop from which it repeatedly executes NOP instructions. That is
actually the behaviour that I experience when I am not using ACPI; the
system is not actually turning off but it goes into an idle state.

Is this how Linux should act when ACPI is not used? I would expect in this
case Linux to invoke an SMI so that the appropriate SMI function actually
shutdown the system but I can't see where (and if) that takes place.

Any help will be greatly appreciated.

John K.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-15  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 19:53 Procedure Linux follows for shutting down an x86 system when ACPI is not used limp
2011-06-15  7:55 ` Peter Teoh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).