UbixOS
2.0
|
#include <ubixos/smp.h>
#include <ubixos/spinlock.h>
#include <ubixos/kpanic.h>
#include <lib/kprintf.h>
#include <lib/string.h>
#include <sys/io.h>
Go to the source code of this file.
Data Structures | |
struct | gdt_descr |
Functions | |
void | ap_trampoline_end () |
void | ap_trampoline_start () |
void | apicMagic (void) |
asm (".globl cpuid \n" "cpuid: \n" " pushl %ebx \n" " pushl %edi \n" " movl 12(%esp),%eax \n" " movl 16(%esp),%edi \n" " cpuid \n" " movl %eax,0(%edi) \n" " movl %ebx,4(%edi) \n" " movl %ecx,8(%edi) \n" " movl %edx,12(%edi) \n" " popl %edi \n" " popl %ebx \n" " ret \n") | |
void | c_ap_boot (void) |
void | cpu0_thread (void) |
void | cpu1_thread (void) |
void | cpu2_thread (void) |
void | cpu3_thread (void) |
void | cpuidDetect () |
uInt8 | cpuInfo () |
uInt32 | getEflags () |
uInt8 | kernel_function (void) |
void | setEflags (uInt32 eflags) |
void | smpInit () |
Variables | |
struct cpuinfo_t | cpuinfo [8] |
uInt8 * | vram = (uInt8 *)0xB8000 |
void ap_trampoline_end | ( | ) |
Referenced by apicMagic().
void ap_trampoline_start | ( | ) |
Referenced by apicMagic().
void apicMagic | ( | void | ) |
Definition at line 231 of file smp.c.
References ap_trampoline_end(), ap_trampoline_start(), kprintf(), and memcpy().
asm | ( | ".globl cpuid \n" "cpuid: \n" " pushl %ebx \n" " pushl %edi \n" " movl | 12%esp, |
%eax \n" " movl | 16%esp, | ||
%edi \n" " cpuid \n" " movl % | eax, | ||
0(%edi) \n" " movl % | ebx, | ||
4(%edi) \n" " movl % | ecx, | ||
8(%edi) \n" " movl % | edx, | ||
12(%edi) \n" " popl %edi \n" " popl %ebx \n" " ret \n" | |||
) |
void c_ap_boot | ( | void | ) |
Definition at line 133 of file smp.c.
References spinLockLocked().
void cpu0_thread | ( | void | ) |
Definition at line 95 of file smp.c.
References kernel_function(), and vram.
void cpu1_thread | ( | void | ) |
Definition at line 101 of file smp.c.
References kernel_function(), and vram.
void cpu2_thread | ( | void | ) |
Definition at line 107 of file smp.c.
References kernel_function(), and vram.
void cpu3_thread | ( | void | ) |
Definition at line 113 of file smp.c.
References kernel_function(), and vram.
void cpuidDetect | ( | ) |
Definition at line 168 of file smp.c.
References getEflags(), kpanic(), and setEflags().
uInt8 cpuInfo | ( | ) |
Definition at line 177 of file smp.c.
References getEflags(), kpanic(), setEflags(), and spinLock().
uInt32 getEflags | ( | ) |
Definition at line 253 of file smp.c.
Referenced by cpuidDetect(), and cpuInfo().
uInt8 kernel_function | ( | void | ) |
Definition at line 121 of file smp.c.
References spinLock().
Referenced by cpu0_thread(), cpu1_thread(), cpu2_thread(), and cpu3_thread().
void setEflags | ( | uInt32 | eflags | ) |
Definition at line 263 of file smp.c.
Referenced by cpuidDetect(), and cpuInfo().
void smpInit | ( | ) |
Definition at line 156 of file smp.c.
References spinLock().
Definition at line 42 of file smp.c.
Referenced by cpu0_thread(), cpu1_thread(), cpu2_thread(), and cpu3_thread().