|
iPXE
|
BIOS multiprocessor API implementation. More...
#include <registers.h>#include <librm.h>#include <ipxe/uaccess.h>#include <ipxe/timer.h>#include <ipxe/msr.h>#include <ipxe/mp.h>Go to the source code of this file.
Macros | |
| #define | MSR_APIC_BASE 0x0000001b |
| Local APIC base address MSR. | |
| #define | MSR_APIC_BASE_X2APIC 0x400 |
| Local APIC is in x2APIC mode. | |
| #define | MSR_APIC_BASE_MASK ( ~0xfffULL ) |
| Local APIC base address mask. | |
| #define | APIC_ICR 0x0300 |
| Interrupt command register. | |
| #define | MSR_X2APIC_ICR 0x830 |
| Interrupt command register (x2APIC) | |
| #define | APIC_ICR_ALL_NOT_SELF 0x000c0000 |
| Interrupt command register: send to all excluding self. | |
| #define | APIC_ICR_LEVEL 0x00008000 |
| Interrupt command register: level mode. | |
| #define | APIC_ICR_LEVEL_ASSERT 0x00004000 |
| Interrupt command register: level asserted. | |
| #define | APIC_ICR_INIT 0x00000500 |
| Interrupt command register: INIT. | |
| #define | APIC_ICR_SIPI(vector) |
| Interrupt command register: SIPI. | |
| #define | IPI_WAIT_MS 10 |
| Time to wait for an IPI to complete. | |
| #define | SIPI_VECTOR 0x08 |
| Startup IPI vector. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| void __asmcall | mp_jump (mp_addr_t func, mp_addr_t opaque) |
| Protected-mode startup IPI handler. | |
| static void | bios_mp_exec_boot (mp_func_t func, void *opaque) |
| Execute a multiprocessor function on the boot processor. | |
| static void | bios_mp_ipi (void *apic, int x2apic, uint32_t icr) |
| Send an interprocessor interrupt. | |
| static void | bios_mp_start_all (mp_func_t func, void *opaque) |
| Start a multiprocessor function on all application processors. | |
| PROVIDE_MPAPI_INLINE (pcbios, mp_address) | |
| PROVIDE_MPAPI (pcbios, mp_exec_boot, bios_mp_exec_boot) | |
| PROVIDE_MPAPI (pcbios, mp_start_all, bios_mp_start_all) | |
BIOS multiprocessor API implementation.
Definition in file bios_mp.c.
| #define MSR_APIC_BASE 0x0000001b |
Local APIC base address MSR.
Definition at line 40 of file bios_mp.c.
Referenced by bios_mp_ipi(), and bios_mp_start_all().
| #define MSR_APIC_BASE_X2APIC 0x400 |
Local APIC is in x2APIC mode.
Definition at line 43 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define MSR_APIC_BASE_MASK ( ~0xfffULL ) |
Local APIC base address mask.
Definition at line 46 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define APIC_ICR 0x0300 |
| #define MSR_X2APIC_ICR 0x830 |
Interrupt command register (x2APIC)
Definition at line 52 of file bios_mp.c.
Referenced by bios_mp_ipi().
| #define APIC_ICR_ALL_NOT_SELF 0x000c0000 |
Interrupt command register: send to all excluding self.
Definition at line 55 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define APIC_ICR_LEVEL 0x00008000 |
Interrupt command register: level mode.
Definition at line 58 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define APIC_ICR_LEVEL_ASSERT 0x00004000 |
Interrupt command register: level asserted.
Definition at line 61 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define APIC_ICR_INIT 0x00000500 |
Interrupt command register: INIT.
Definition at line 64 of file bios_mp.c.
Referenced by bios_mp_start_all().
| #define APIC_ICR_SIPI | ( | vector | ) |
| #define IPI_WAIT_MS 10 |
Time to wait for an IPI to complete.
Definition at line 70 of file bios_mp.c.
Referenced by bios_mp_ipi().
| #define SIPI_VECTOR 0x08 |
Startup IPI vector.
The real-mode startup IPI code must be copied to a page boundary in base memory. We fairly arbitrarily choose to place this at 0x8000.
Definition at line 78 of file bios_mp.c.
Referenced by bios_mp_start_all().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Execute a multiprocessor function on the boot processor.
| func | Multiprocessor function |
| opaque | Opaque data pointer |
Definition at line 89 of file bios_mp.c.
References __asm__(), __volatile__(), mp_address(), mp_call(), and PHYS_CODE.
Referenced by PROVIDE_MPAPI().
|
static |
Send an interprocessor interrupt.
| apic | APIC base address |
| x2apic | x2APIC mode enabled |
| icr | Interrupt control register value |
Definition at line 108 of file bios_mp.c.
References APIC_ICR, DBGC, IPI_WAIT_MS, mdelay(), MSR_APIC_BASE, MSR_X2APIC_ICR, and writel.
Referenced by bios_mp_start_all().
|
static |
Start a multiprocessor function on all application processors.
| func | Multiprocessor function |
| opaque | Opaque data pointer |
Definition at line 128 of file bios_mp.c.
References APIC_ICR_ALL_NOT_SELF, APIC_ICR_INIT, APIC_ICR_LEVEL, APIC_ICR_LEVEL_ASSERT, APIC_ICR_SIPI, base, bios_mp_ipi(), DBGC, ioremap(), iounmap(), mp_address(), mp_jump(), MSR_APIC_BASE, MSR_APIC_BASE_MASK, MSR_APIC_BASE_X2APIC, PAGE_SIZE, regs, setup_sipi(), and SIPI_VECTOR.
Referenced by PROVIDE_MPAPI().
| PROVIDE_MPAPI_INLINE | ( | pcbios | , |
| mp_address | ) |
References mp_address().
| PROVIDE_MPAPI | ( | pcbios | , |
| mp_exec_boot | , | ||
| bios_mp_exec_boot | ) |
References bios_mp_exec_boot(), and mp_exec_boot().
| PROVIDE_MPAPI | ( | pcbios | , |
| mp_start_all | , | ||
| bios_mp_start_all | ) |
References bios_mp_start_all(), and mp_start_all().