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:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Wake 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.

Proto:static int wakeup_cpu_via_init_nmi(int cpu, unsigned long start_ip, int apicid, int *cpu0_nmi_registered)

Type:int

Parameter:

TypeParameterName
intcpu
unsigned longstart_ip
intapicid
int *cpu0_nmi_registered
960  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
965  If cpu Then
966  boot_error = wakeup_secondary_cpu_via_init(apicid, start_ip)
967  Go to out
975  boot_error = register_nmi_handler(NMI_LOCAL, wakeup_cpu0_nmi, 0, "wake_cpu0")
978  If Not boot_error Then
979  enable_start_cpu0 = 1
980  cpu0_nmi_registered = 1
981  If dest_logical is used by the IPI functions == APIC_DEST_LOGICAL Then id = cpu0_logical_apicid
983  Else id = apicid
985  boot_error = 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.
988  out :
989  preempt_enable()
991  Return boot_error
Caller
NameDescribe
do_boot_cpuNOTE - on most systems this is a PHYSICAL apic ID, but on multiquad* (ie clustered apic addressing mode), this is a LOGICAL apic ID.* Returns zero if CPU booted OK, else error code from* ->wakeup_secondary_cpu.