函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle, int *cpu0_nmi_registered)

返回类型:int

参数:

类型参数名称
intapicid
intcpu
struct task_struct *idle
int *cpu0_nmi_registered
1027  start_ip等于SMP trampoline
1029  boot_error等于0
1032  sp等于task_pt_regs(idle)
1033  address等于Provide the original GDT
1034  initial_code等于Activate a secondary processor.
1035  initial_stack等于sp
1038  init_espfix_ap(cpu)
1041  duce the number of lines printed when booting a large cpu count system
1048  如果warm_reset
1050  pr_debug("Setting warm reset code and vector.\n")
1052  smpboot_setup_warm_reset_vector(start_ip)
1057  apic_write(APIC_ESR, 0)
1068  清空CPU信息
1069  smp_mb()
1077  如果wakeup_secondary_cpuboot_error等于wakeup_secondary_cpu(apicid, start_ip)
1079  否则boot_error等于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.
1083  如果非boot_error
1087  boot_error等于负1
1088  timeout等于jiffies加10乘HZ
1090  如果测试CPU信息
1095  boot_error等于0
1096  退出
1098  schedule()
1102  如果非boot_error
1106  当非测试CPU信息循环
1113  schedule()
1117  如果warm_reset
1121  smpboot_restore_warm_reset_vector()
1124  返回:boot_error
调用者
名称描述
native_cpu_up