函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\smpboot.c Create Date:2022-07-27 09:24:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip)

返回类型:int

参数:

类型参数名称
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  如果APIC_INTEGRATED(boot_cpu_apic_version)则
764  maxlvt等于lapic_get_maxlvt - get the maximum number of local vector table entries
765  如果maxlvt大于3则apic_write(APIC_ESR, 0)
767  accept_status等于apic_read(APIC_ESR)按位与0xEF
769  pr_debug("NMI sent\n")
771  如果send_status打印错误信息("APIC never delivered???\n")
773  如果accept_status打印错误信息("APIC delivery error (%lx)\n", accept_status)
776  返回:send_status按位或accept_status
调用者
名称描述
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.