Function report |
Source Code:arch\x86\kernel\smpboot.c |
Create Date:2022-07-28 08:24:36 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:wakeup_secondary_cpu_via_init
Proto:static int wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
int | phys_apicid | |
unsigned long | start_eip |
782 | send_status = 0 , accept_status = 0 |
790 | If APIC_INTEGRATED(boot_cpu_apic_version) Then |
791 | If maxlvt > 3 Then apic_write(APIC_ESR, 0) |
796 | pr_debug("Asserting INIT\n") |
807 | pr_debug("Waiting for send to finish...\n") |
808 | send_status = safe_apic_wait_icr_idle() |
812 | pr_debug("Deasserting INIT\n") |
818 | pr_debug("Waiting for send to finish...\n") |
819 | send_status = safe_apic_wait_icr_idle() |
829 | If APIC_INTEGRATED(boot_cpu_apic_version) Then num_starts = 2 |
831 | Else num_starts = 0 |
837 | pr_debug("#startup loops: %d\n", num_starts) |
839 | When j <= num_starts cycle |
841 | If maxlvt > 3 Then apic_write(APIC_ESR, 0) |
844 | pr_debug("After apic_write\n") |
853 | apic_icr_write(APIC_DM_STARTUP | (start_eip >> 12), phys_apicid) |
859 | If init_udelay == 0 Then 0x10c7 is 2**32 / 1000000 (rounded up) (10) |
861 | Else 0x10c7 is 2**32 / 1000000 (rounded up) (300) |
864 | pr_debug("Startup point 1\n") |
866 | pr_debug("Waiting for send to finish...\n") |
867 | send_status = safe_apic_wait_icr_idle() |
872 | If init_udelay == 0 Then 0x10c7 is 2**32 / 1000000 (rounded up) (10) |
874 | Else 0x10c7 is 2**32 / 1000000 (rounded up) (200) |
877 | If maxlvt > 3 Then apic_write(APIC_ESR, 0) |
879 | accept_status = apic_read(APIC_ESR) & 0xEF |
880 | If send_status || accept_status Then Break |
883 | pr_debug("After Startup\n") |
885 | If send_status Then pr_err("APIC never delivered???\n") |
887 | If accept_status Then pr_err("APIC delivery error (%lx)\n", accept_status) |
890 | Return send_status | accept_status |
Name | Describe |
---|---|
wakeup_cpu_via_init_nmi | 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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |