40#define MSR_APIC_BASE 0x0000001b
43#define MSR_APIC_BASE_X2APIC 0x400
46#define MSR_APIC_BASE_MASK ( ~0xfffULL )
49#define APIC_ICR 0x0300
52#define MSR_X2APIC_ICR 0x830
55#define APIC_ICR_ALL_NOT_SELF 0x000c0000
58#define APIC_ICR_LEVEL 0x00008000
61#define APIC_ICR_LEVEL_ASSERT 0x00004000
64#define APIC_ICR_INIT 0x00000500
67#define APIC_ICR_SIPI( vector ) ( 0x00000600 | (vector) )
78#define SIPI_VECTOR 0x08
95 "addl $8, %%esp\n\t" )
144 ( x2apic ?
"x2" :
"" ), ( (
unsigned long long )
base ) );
#define __asmcall
Declare a function with standard calling conventions.
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
unsigned long long uint64_t
#define MSR_APIC_BASE
Local APIC base address MSR.
#define APIC_ICR_LEVEL
Interrupt command register: level mode.
#define APIC_ICR_ALL_NOT_SELF
Interrupt command register: send to all excluding self.
#define IPI_WAIT_MS
Time to wait for an IPI to complete.
#define MSR_X2APIC_ICR
Interrupt command register (x2APIC)
void __asmcall mp_jump(mp_addr_t func, mp_addr_t opaque)
Protected-mode startup IPI handler.
static void bios_mp_start_all(mp_func_t func, void *opaque)
Start a multiprocessor function on all application processors.
static void bios_mp_ipi(void *apic, int x2apic, uint32_t icr)
Send an interprocessor interrupt.
static void bios_mp_exec_boot(mp_func_t func, void *opaque)
Execute a multiprocessor function on the boot processor.
#define SIPI_VECTOR
Startup IPI vector.
#define APIC_ICR_INIT
Interrupt command register: INIT.
#define MSR_APIC_BASE_X2APIC
Local APIC is in x2APIC mode.
#define APIC_ICR_LEVEL_ASSERT
Interrupt command register: level asserted.
#define MSR_APIC_BASE_MASK
Local APIC base address mask.
#define APIC_ICR_SIPI(vector)
Interrupt command register: SIPI.
#define APIC_ICR
Interrupt command register.
static mp_address(void *address)
Calculate address as seen by a multiprocessor function.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define PAGE_SIZE
Page size.
void * ioremap(unsigned long bus_addr, size_t len)
Map bus address as an I/O address.
void iounmap(volatile const void *io_addr)
Unmap I/O address.
Multiprocessor functions.
void mp_exec_boot(mp_func_t func, void *opaque)
Execute a multiprocessor function on the boot processor.
#define PROVIDE_MPAPI(_subsys, _api_func, _func)
Provide a multiprocessor API implementation.
void mp_start_all(mp_func_t func, void *opaque)
Start a multiprocessor function on all application processors.
void mp_func_t(mp_addr_t opaque, unsigned int cpuid)
A multiprocessor function.
#define PROVIDE_MPAPI_INLINE(_subsys, _api_func)
Provide a static inline multiprocessor API implementation.
unsigned long mp_addr_t
An address within the address space for a multiprocessor function.
void __asmcall mp_call(mp_addr_t func, mp_addr_t opaque)
Call a multiprocessor function from C code on the current CPU.
Access to external ("user") memory.
#define PHYS_CODE(asm_code_str)
void setup_sipi(unsigned int vector, uint32_t handler, struct i386_regs *regs)
Set up startup IPI handler.
Model-specific registers.
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
A 32-bit general register dump.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.