函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\apic.c Create Date:2022-07-27 09:26:54
Last Modify:2020-03-16 21:21:31 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:setup_local_APIC - setup the local APIC* Used to setup local APIC while initializing BSP or bringing up APs.* Always called with preemption disabled.

函数原型:static void setup_local_APIC(void)

返回类型:void

参数:

1600  cpu等于当前cpu ID()
1603  如果disable_apic
1604  disable_ioapic_support()
1605  返回
1612  value等于apic_read(APIC_SPIV)
1613  value与等于APIC_SPIV_APIC_ENABLED的反
1614  apic_write(APIC_SPIV, value)
1618  如果Check, if the APIC is integrated or a separate chipdisable_esr
1619  apic_write(APIC_ESR, 0)
1620  apic_write(APIC_ESR, 0)
1621  apic_write(APIC_ESR, 0)
1622  apic_write(APIC_ESR, 0)
1629  BUG_ON(!apic_id_registered())
1636  init_apic_ldr()
1639  如果dest_logical is used by the IPI functions
1647  logical_apicid等于early_per_cpu(On x86_32, the mapping between cpu and logical apicid may vary* depending on apic in use. The following early percpu variable is* used for the mapping. This is where the behaviors of x86_64 and 32* actually diverge. Let's keep it ugly for now., cpu)
1648  ldr_apicid等于GET_APIC_LOGICAL_ID(apic_read(APIC_LDR))
1649  如果logical_apicid不等于BAD_APICIDWARN_ON(logical_apicid != ldr_apicid)
1652  early_per_cpu(On x86_32, the mapping between cpu and logical apicid may vary* depending on apic in use. The following early percpu variable is* used for the mapping. This is where the behaviors of x86_64 and 32* actually diverge. Let's keep it ugly for now., cpu)等于ldr_apicid
1662  value等于apic_read(APIC_TASKPRI)
1663  value与等于APIC_TPRI_MASK的反
1664  value或等于0x10
1665  apic_write(APIC_TASKPRI, value)
1668  After a crash, we no longer service the interrupts and a pending* interrupt from previous kernel might still have ISR bit set
1673  value等于apic_read(APIC_SPIV)
1674  value与等于APIC_VECTOR_MASK的反
1678  value或等于APIC_SPIV_APIC_ENABLED
1705  value与等于APIC_SPIV_FOCUS_DISABLED的反
1711  value或等于Special IRQ vectors used by the SMP architecture, 0xf0-0xff* some of the following vectors are 'rare', they are merged* into a single vector (CALL_FUNCTION_VECTOR) to save vector space.* TLB, reschedule and local APIC vectors are performance-critical.
1712  apic_write(APIC_SPIV, value)
1714  perf_events_lapic_init()
1726  value等于apic_read(APIC_LVT0)按位与APIC_LVT_MASKED
1727  如果非cpupic_mode或非valueskip_ioapic_setup的值则
1728  value等于APIC_DM_EXTINT
1729  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu)
1730  否则
1731  value等于APIC_DM_EXTINT按位或APIC_LVT_MASKED
1732  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", cpu)
1734  apic_write(APIC_LVT0, value)
1740  如果非cpuThis variable controls which CPUs receive external NMIs. By default,* external NMIs are delivered only to the BSP.不等于APIC_EXTNMI_NONEThis variable controls which CPUs receive external NMIs. By default,* external NMIs are delivered only to the BSP.恒等于APIC_EXTNMI_ALLvalue等于APIC_DM_NMI
1743  否则value等于APIC_DM_NMI按位或APIC_LVT_MASKED
1747  如果非Check, if the APIC is integrated or a separate chipvalue或等于APIC_LVT_LEVEL_TRIGGER
1749  apic_write(APIC_LVT1, value)
调用者
名称描述
apic_ap_setupAPIC setup function for application processors. Called from smpboot.c
apic_bsp_setup