|
CS350 COS
COS
|
#include <stdbool.h>#include <stdint.h>#include <string.h>#include <sys/kassert.h>#include <sys/kconfig.h>#include <sys/kdebug.h>#include <sys/kmem.h>#include <sys/ktime.h>#include <sys/mp.h>#include <machine/amd64.h>#include <machine/amd64op.h>#include <machine/pmap.h>#include <machine/lapic.h>#include <machine/mp.h>#include <machine/trap.h>Go to the source code of this file.
Data Structures | |
| struct | CrossCallFrame |
| struct | CPUState |
Macros | |
| #define | MP_WAITTIME 250000000ULL |
Typedefs | |
| typedef struct CrossCallFrame | CrossCallFrame |
| typedef struct CPUState | CPUState |
Functions | |
| static int | MPBootAP (int procNo) |
| void | MP_Init () |
| void | MP_InitAP () |
| void | MP_SetState (int state) |
| int | MP_GetCPUs () |
| void | MP_CrossCallTrap () |
| int | MP_CrossCall (CrossCallCB cb, void *arg) |
| static int | MPPing (void *arg) |
| static void | Debug_CrossCall (int argc, const char *argv[]) |
| REGISTER_DBGCMD (crosscall, "Ping crosscall", Debug_CrossCall) | |
| static void | Debug_CPUS (int argc, const char *argv[]) |
| REGISTER_DBGCMD (cpus, "Show MP information", Debug_CPUS) | |
| static void | Debug_CPU (int argc, const char *argv[]) |
| REGISTER_DBGCMD (cpu, "Current CPU number", Debug_CPU) | |
Variables | |
| uint8_t | mpstart_begin [] |
| uint8_t | mpstart_end [] |
| AS | systemAS |
| const char * | CPUStateToString [] |
| static volatile bool | booted |
| static volatile int | lastCPU |
| static volatile CPUState | cpus [MAX_CPUS] |
| struct CrossCallFrame |
| struct CPUState |
| Data Fields | ||
|---|---|---|
| CrossCallFrame * | frame | |
| UnixEpochNS | heartbeat | |
| int | state | |
| typedef struct CrossCallFrame CrossCallFrame |
|
static |
|
static |
|
static |
Definition at line 212 of file mp.c.
| int MP_CrossCall | ( | CrossCallCB | cb, |
| void * | arg | ||
| ) |
Definition at line 168 of file mp.c.
| void MP_CrossCallTrap | ( | ) |
Definition at line 140 of file mp.c.
| int MP_GetCPUs | ( | ) |
| void MP_Init | ( | ) |
Definition at line 91 of file mp.c.
| void MP_InitAP | ( | ) |
| void MP_SetState | ( | int | state | ) |
|
static |
Definition at line 52 of file mp.c.
|
static |
| REGISTER_DBGCMD | ( | cpus | , |
| "Show MP information" | , | ||
| Debug_CPUS | |||
| ) |
| REGISTER_DBGCMD | ( | crosscall | , |
| "Ping crosscall" | , | ||
| Debug_CrossCall | |||
| ) |
| const char* CPUStateToString[] |
|
extern |
|
extern |