Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\reboot.c Create Date:2022-07-28 08:18:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:To the best of our knowledge Windows compatible x86 hardware expects* the following on reboot:* 1) If the FADT has the ACPI reboot register flag set, try it* 2) If still alive, write to the keyboard controller* 3) If still alive, write to the ACPI reboot

Proto:static void native_machine_emergency_restart(void)

Type:void

Parameter:Nothing

588  attempt = 0
589  orig_reboot_type = reboot_type
592  If This is set if we need to go through the 'emergency' path.* When machine_emergency_restart() is called, we may be on* an inconsistent state and won't be able to do a clean cleanup Then Use NMIs as IPIs to tell all CPUs to disable virtualization
595  tboot_shutdown(TB_SHUTDOWN_REBOOT)
598  mode = If reboot_mode == REBOOT_WARM Then 0x1234 Else 0
599  *__va(0x472) = mode
605  If efi_capsule_pending(NULL) Then
606  pr_info("EFI capsule is pending, forcing EFI reboot.\n")
607  reboot_type = BOOT_EFI
610  cycle
613  Case (reboot_type) == BOOT_ACPI
614  acpi_reboot()
616  Break
618  Case (reboot_type) == BOOT_KBD
621  When i < 10 cycle
627  If attempt == 0 && orig_reboot_type == BOOT_ACPI Then
628  attempt = 1
630  Else
633  Break
635  Case (reboot_type) == BOOT_EFI
636  efi_reboot(reboot_mode, NULL)
638  Break
640  Case (reboot_type) == BOOT_BIOS
645  Break
647  Case (reboot_type) == BOOT_CF9_FORCE
651  Case (reboot_type) == BOOT_CF9_SAFE
662  Break
664  Case (reboot_type) == BOOT_TRIPLE
666  __asm__ __volatile__
670  Break