Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Poke the other CPU in the eye via NMI to wake it up. Remember that the normal* INIT, INIT, STARTUP sequence will reset the chip hard for us, and this* won't ... remember to clear down the APIC, etc later.

Proto:int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip)

Type:int

Parameter:

TypeParameterName
intapicid
unsigned longstart_eip
748  accept_status = 0
754  apic_icr_write(APIC_DM_NMI | dest_logical is used by the IPI functions , apicid)
756  pr_debug("Waiting for send to finish...\n")
757  send_status = safe_apic_wait_icr_idle()
762  0x10c7 is 2**32 / 1000000 (rounded up) (200)
763  If APIC_INTEGRATED(boot_cpu_apic_version) Then
764  maxlvt = lapic_get_maxlvt - get the maximum number of local vector table entries
765  If maxlvt > 3 Then apic_write(APIC_ESR, 0)
767  accept_status = apic_read(APIC_ESR) & 0xEF
769  pr_debug("NMI sent\n")
771  If send_status Then pr_err("APIC never delivered???\n")
773  If accept_status Then pr_err("APIC delivery error (%lx)\n", accept_status)
776  Return send_status | accept_status
Caller
NameDescribe
wakeup_cpu_via_init_nmiWake up AP by INIT, INIT, STARTUP sequence.* Instead of waiting for STARTUP after INITs, BSP will execute the BIOS* boot-strap code which is not a desired behavior for waking up BSP. To* void the boot-strap code, wake up CPU0 by NMI instead.