Shutting down the operating system without using the API
1 answer
Your low-level hardware shutdown code will vary by architecture. To disable i386 device with BIOS, INT 15h is a vector that is ultimately used by OS monitors.
You should consider APM and ACPI schemes for power management, graceful disconnection of power-controlled peripherals, and power consumption considerations in multiprocessor systems.
I expect others to provide answers to help you learn Linux APM and ACPI code. In i386 kernels, there is a very simple apm_power_off () function in arch / x86 / kernel / apm_32.c that disables INT 15.
+6
source to share