Loading [MathJax]/extensions/tex2jax.js
CS350 COS
COS
All Data Structures Files Functions Variables Typedefs Macros
machine.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <sys/kconfig.h>
#include <sys/kassert.h>
#include <sys/kmem.h>
#include <sys/mp.h>
#include <sys/irq.h>
#include <sys/spinlock.h>
#include <machine/amd64.h>
#include <machine/ioapic.h>
#include <machine/lapic.h>
#include <machine/trap.h>
#include <machine/pmap.h>
#include <machine/mp.h>
#include <sys/thread.h>
#include <sys/disk.h>
#include <sys/bufcache.h>
#include <sys/vfs.h>
#include <sys/elf64.h>
#include "../dev/console.h"
Include dependency graph for machine.c:

Go to the source code of this file.

Macros

#define GDT_MAX   8
 

Functions

void KTime_Init ()
 
void KTimer_Init ()
 
void RTC_Init ()
 
void PS2_Init ()
 
void PCI_Init ()
 
void IDE_Init ()
 
void MachineBoot_AddMem ()
 
void Loader_LoadInit ()
 
void PAlloc_LateInit ()
 
static void Machine_GDTInit ()
 
static void Machine_TSSInit ()
 
static void Machine_SyscallInit ()
 
void Machine_EarlyInit ()
 
static void Machine_IdleThread (void *test)
 
void Machine_Init ()
 
void Machine_InitAP ()
 

Variables

static SegmentDescriptor GDT [MAX_CPUS][GDT_MAX]
 
static PseudoDescriptor GDTDescriptor [MAX_CPUS]
 
TaskStateSegment64 TSS [MAX_CPUS]
 
static char df_stack [4096]
 

Macro Definition Documentation

◆ GDT_MAX

#define GDT_MAX   8

Definition at line 36 of file machine.c.

Function Documentation

◆ IDE_Init()

void IDE_Init ( )

Definition at line 86 of file ide.c.

87{
88 ASSERT(sizeof(ATAIdentifyDevice) == 512);
89
92 Spinlock_Init(&primary.lock, "IDE Primary Controller Lock",
94
96 kprintf("IDE: No controller detected\n");
97 return;
98 }
99
105}
Spinlock lock
Definition: ide.c:62
uint16_t devctl
Definition: ide.c:60
void IDE_Identify(IDE *ide, int drive)
Definition: ide.c:182
IDE primary
Definition: ide.c:82
bool IDE_HasController(IDE *ide)
Definition: ide.c:131
void IDE_Reset(IDE *ide)
Definition: ide.c:145
#define IDE_PRIMARY_BASE
Definition: ide.c:18
#define IDE_PRIMARY_DEVCTL
Definition: ide.c:19
uint16_t base
Definition: ide.c:59
#define ASSERT(_x)
Definition: kassert.h:8
int kprintf(const char *fmt,...)
Definition: printf.c:210
void Spinlock_Unlock(Spinlock *lock) __UNLOCK_EX(*lock)
Definition: spinlock.c:109
#define SPINLOCK_TYPE_NORMAL
Definition: spinlock.h:12
void Spinlock_Lock(Spinlock *lock) __LOCK_EX(*lock)
Definition: spinlock.c:75
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)
Definition: spinlock.c:43
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KTime_Init()

void KTime_Init ( )

Definition at line 26 of file ktime.c.

27{
30 ktimeLastTSC = 0;
32}
static Spinlock ktimeLock
Definition: ktime.c:14
uint64_t ticksPerSecond
Definition: ktime.c:17
static uint64_t ktimeLastTSC
Definition: ktime.c:16
static uint64_t ktimeLastEpoch
Definition: ktime.c:15
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KTimer_Init()

void KTimer_Init ( )
Here is the caller graph for this function:

◆ Loader_LoadInit()

void Loader_LoadInit ( )

Loader_LoadInit –

The init process is created from the execution kernel thread that initializes the system. This function initializes the thread and process state then loads the init binary.

Definition at line 187 of file loader.c.

188{
189 int status;
190 void *pg;
191 VNode *initvn;
192
193 pg = PAlloc_AllocPage();
194 if (!pg)
195 Panic("Not enough memory!");
196
197 initvn = VFS_Lookup("/sbin/init");
198 status = VFS_Open(initvn);
199 if (status < 0)
200 Panic("Loading init process failed!");
201 status = VFS_Read(initvn, pg, 0, 1024);
202 if (status < 0)
203 Panic("Reading init process failed!");
204
205 Thread *thr = Sched_Current();
206
207 // Open stdin/out/err
208 Handle *handle = Console_OpenHandle();
209 Handle_Add(thr->proc, handle);
210 handle = Console_OpenHandle();
211 Handle_Add(thr->proc, handle);
212 handle = Console_OpenHandle();
213 Handle_Add(thr->proc, handle);
214
215 /*
216 * Load init binary
217 */
218 Loader_Load(thr, initvn, pg, 1024);
219
220 VFS_Close(initvn);
221
222 Log(loader, "Jumping to userspace\n");
223
224 /*
225 * Reload the page tables for the current process
226 */
227 PMap_LoadAS(thr->space); // Reload CR3
228
229 /*
230 * Pass in zero arguments with null pointers to init
231 */
232 uintptr_t ap[3];
233 ap[0] = 0;
234 ap[1] = 0;
235 ap[2] = 0xDEADBEEF;
237
238 Copy_Out(&ap[0], rsp, sizeof(uintptr_t)*3);
239
240 /*
241 * The last step is to return into userspace handing control to init. We
242 * create a valid trap frame and return into userspace using Trap_Pop().
243 */
244 TrapFrame tf;
245 memset(&tf, 0, sizeof(tf));
246 tf.ds = SEL_UDS | 3;
247 tf.rip = thr->proc->entrypoint;
248 tf.cs = SEL_UCS | 3;
249 tf.rsp = rsp;
250 tf.ss = SEL_UDS | 3;
251 tf.rflags = RFLAGS_IF;
252 tf.rdi = rsp;
253 Trap_Pop(&tf);
254
255 /*
256 * We should never reach this point!
257 */
258 Panic("Unreachable: Trap_Pop() returned!\n");
259}
#define RFLAGS_IF
Definition: amd64.h:180
#define SEL_UDS
Definition: amd64.h:84
#define SEL_UCS
Definition: amd64.h:83
int Copy_Out(void *fromkernel, uintptr_t touser, uintptr_t len)
Definition: copy.c:70
uint64_t Handle_Add(Process *proc, Handle *handle)
Definition: handle.c:47
Thread * Sched_Current()
Definition: sched.c:56
#define Log(_module, _format,...)
Definition: kassert.h:32
void * PAlloc_AllocPage()
Definition: palloc.c:188
#define PGSIZE
Definition: malloc.c:21
bool Loader_Load(Thread *thr, VNode *vn, void *buf, uint64_t len)
Definition: loader.c:131
Handle * Console_OpenHandle()
Definition: console.c:200
#define MEM_USERSPACE_STKTOP
Definition: pmap.h:38
void PMap_LoadAS(AS *space)
Definition: pmap.c:182
void * memset(void *dst, int c, size_t len)
Definition: string.c:164
Definition: handle.h:17
uintptr_t entrypoint
Definition: thread.h:69
Definition: thread.h:31
struct Process * proc
Definition: thread.h:39
AS * space
Definition: thread.h:33
uint16_t cs
Definition: trap.h:73
uint16_t ss
Definition: trap.h:79
uint64_t rsp
Definition: trap.h:78
uint64_t rip
Definition: trap.h:72
uint64_t rdi
Definition: trap.h:61
void Trap_Pop(TrapFrame *tf)
uint64_t rflags
Definition: trap.h:77
uint64_t ds
Definition: trap.h:66
Definition: trap.h:51
uint64_t uintptr_t
Definition: types.h:16
int VFS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len)
Definition: vfs.c:180
VNode * VFS_Lookup(const char *path)
Definition: vfs.c:63
int VFS_Open(VNode *fn)
Definition: vfs.c:147
int VFS_Close(VNode *fn)
Definition: vfs.c:162
Definition: vfs.h:24
void Panic(const char *str)
Definition: vgacons.c:164
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_EarlyInit()

void Machine_EarlyInit ( )

Machine_EarlyInit –

Initializes early kernel state.

Definition at line 146 of file machine.c.

147{
152 Console_Init();
153 PAlloc_Init();
154}
void Console_Init()
Definition: console.c:22
void Critical_Enter()
Definition: critical.c:28
void Critical_Init()
Definition: critical.c:17
void PAlloc_Init()
void Spinlock_EarlyInit()
void WaitChannel_EarlyInit()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_GDTInit()

static void Machine_GDTInit ( )
static

Machine_GDTInit –

Configures the Global Descriptor Table (GDT) that lists all segments and privilege levels in x86. 64-bit mode uses flat 64-bit segments and doesn't support offsets and limits except for the special FS/GS segment registers.
We create four segments for the kernel code/data and user code/data.

Definition at line 53 of file machine.c.

54{
55 uint64_t offset;
56 uint64_t tmp;
57 int c = CPU();
58
59 kprintf("Initializing GDT... "); // Caused pagefault??
60
61 GDT[c][0] = 0x0;
62 GDT[c][1] = 0x00AF9A000000FFFFULL; /* Kernel CS */
63 GDT[c][2] = 0x00CF92000000FFFFULL; /* Kernel DS */
64 GDT[c][3] = 0x0;
65
66 // TSS
67 offset = (uint64_t)&TSS[c];
68 GDT[c][4] = sizeof(TaskStateSegment64);
69 tmp = offset & 0x00FFFFFF;
70 GDT[c][4] |= (tmp << 16);
71 tmp = offset & 0xFF000000;
72 GDT[c][4] |= (tmp << 56);
73 GDT[c][4] |= 0x89ULL << 40;
74 GDT[c][5] = offset >> 32;
75
76 GDT[c][6] = 0x00AFFA000000FFFFULL; /* User CS */
77 GDT[c][7] = 0x00CFF2000000FFFFULL; /* User DS */
78
79 GDTDescriptor[c].off = (uint64_t)&GDT[c];
80 GDTDescriptor[c].lim = 8*GDT_MAX - 1;
81
83
84 kprintf("Done!\n");
85}
uint64_t off
Definition: amd64.h:64
uint16_t lim
Definition: amd64.h:63
static INLINE void lgdt(PseudoDescriptor *gdt)
Definition: amd64op.h:70
#define CPU
Definition: mp.h:7
#define GDT_MAX
Definition: machine.c:36
TaskStateSegment64 TSS[MAX_CPUS]
Definition: machine.c:40
static PseudoDescriptor GDTDescriptor[MAX_CPUS]
Definition: machine.c:39
static SegmentDescriptor GDT[MAX_CPUS][GDT_MAX]
Definition: machine.c:38
unsigned long uint64_t
Definition: types.h:13
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_IdleThread()

static void Machine_IdleThread ( void *  test)
static

Definition at line 157 of file machine.c.

158{
159 while (1) { enable_interrupts(); hlt(); }
160}
static INLINE void hlt()
Definition: amd64op.h:19
static INLINE void enable_interrupts()
Definition: amd64op.h:9
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_Init()

void Machine_Init ( )

Machine_Init –

At this point the assembly startup code has setup temporary processor data structures sufficient to execute C code and make it through this initialization routine.

Definition at line 169 of file machine.c.

170{
171 /*
172 * Initialize Processor State
173 */
176 Trap_Init();
178 clts(); // Enable FPU/XMM
179
180 /*
181 * Initialize Memory Allocation and Virtual Memory
182 */
183 PAlloc_AddRegion(DMPA2VA(16*1024*1024), 16*1024*1024);
184 PMap_Init();
185 XMem_Init();
188
189 /*
190 * Initialize Time Keeping
191 */
192 KTime_Init();
193 RTC_Init(); // Finishes initializing KTime
194
195 /*
196 * Initialize Interrupts
197 */
198 IRQ_Init();
199 LAPIC_Init();
200 IOAPIC_Init();
201 IOAPIC_Enable(0); // Enable timer interrupts
202 Thread_Init();
203
204 KTimer_Init(); // Depends on RTC and KTime
205
206 /*
207 * Initialize Additional Processors
208 */
209 MP_Init();
210
211 /*
212 * Initialize Basic Devices
213 */
214 PS2_Init(); // PS2 Keyboard
215 PCI_Init(); // PCI BUS
216 IDE_Init(); // IDE Disk Controller
218
219 /*
220 * Open the primary disk and mount the root file system
221 */
222 Disk *root = Disk_GetByID(0, 0);
223 if (!root)
224 Panic("No boot disk!");
225 VFS_MountRoot(root);
226
228
229 /*
230 * Create the idle thread
231 */
233 if (thr == NULL) {
234 kprintf("Couldn't create idle thread!\n");
235 }
237
238 /*
239 * Load the init processor
240 */
242
243 breakpoint();
244}
void MP_Init()
Definition: mp.c:91
static INLINE void clts()
Definition: amd64op.h:372
static INLINE void breakpoint()
Definition: amd64op.h:29
void BufCache_Init()
void Critical_Exit()
Definition: critical.c:35
Disk * Disk_GetByID(uint64_t ctrlNo, uint64_t diskNo)
Definition: disk.c:31
Thread * Thread_KThreadCreate(void(*f)(void *), void *arg)
Definition: thread.c:136
void Thread_Init()
Definition: thread.c:53
void Sched_SetRunnable(Thread *thr)
Definition: sched.c:77
void IOAPIC_Init()
Definition: ioapic.c:54
void IOAPIC_Enable(int irq)
Definition: ioapic.c:70
void IRQ_Init()
Definition: irq.c:14
void LAPIC_Init()
Definition: lapic.c:179
void PCI_Init()
Definition: pci.c:27
void IDE_Init()
Definition: ide.c:86
static void Machine_SyscallInit()
Definition: machine.c:128
void Loader_LoadInit()
Definition: loader.c:187
static void Machine_GDTInit()
Definition: machine.c:53
static void Machine_IdleThread(void *test)
Definition: machine.c:157
static void Machine_TSSInit()
Definition: machine.c:94
void PS2_Init()
Definition: ps2.c:274
void RTC_Init()
Definition: rtc.c:23
void MachineBoot_AddMem()
Definition: mbentry.c:192
void KTime_Init()
Definition: ktime.c:26
void KTimer_Init()
void PAlloc_LateInit()
Definition: palloc.c:71
void PAlloc_AddRegion(uintptr_t start, uintptr_t len)
Definition: palloc.c:92
void PMap_Init()
Definition: pmap.c:19
#define DMPA2VA(pa)
Definition: pmap.h:48
#define NULL
Definition: stddef.h:6
Definition: disk.h:11
void Trap_Init()
Definition: trap.c:33
int VFS_MountRoot(Disk *root)
Definition: vfs.c:36
void XMem_Init()
Definition: xmem.c:28
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_InitAP()

void Machine_InitAP ( )

Machine_InitAP –

Shorter initialization routine for co-processors.

Definition at line 251 of file machine.c.

252{
254
255 // Setup CPU state
256 Trap_InitAP();
257 PMap_InitAP();
261 clts(); // Enable FPU/XMM
262
263 // Setup LAPIC
264 LAPIC_Init();
265
266 // Boot processor
267 MP_InitAP();
270
272}
void MP_InitAP()
Definition: mp.c:119
void Thread_InitAP()
Definition: thread.c:79
void PMap_InitAP()
Definition: pmap.c:67
void Trap_InitAP()
Definition: trap.c:89
Here is the call graph for this function:

◆ Machine_SyscallInit()

static void Machine_SyscallInit ( )
static

Machine_SyscallInit –

Configure the model specific registers (MSRs) that specify how to transfer control to the operating system when the system call instruction is invoked.

Definition at line 128 of file machine.c.

129{
130 kprintf("Initializing Syscall... ");
131
132 wrmsr(MSR_STAR, (uint64_t)SEL_KCS << 32 | (uint64_t)SEL_UCS << 48);
133 wrmsr(MSR_LSTAR, 0);
134 wrmsr(MSR_CSTAR, 0);
135 wrmsr(MSR_SFMASK, 0);
136
137 kprintf("Done!\n");
138}
#define SEL_KCS
Definition: amd64.h:80
#define MSR_STAR
Definition: amd64.h:221
#define MSR_LSTAR
Definition: amd64.h:222
#define MSR_SFMASK
Definition: amd64.h:224
#define MSR_CSTAR
Definition: amd64.h:223
static INLINE void wrmsr(uint32_t addr, uint64_t val)
Definition: amd64op.h:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Machine_TSSInit()

static void Machine_TSSInit ( )
static

Machine_TSSInit –

Configures the Task State Segment (TSS) that specifies the kernel stack pointer during an interrupt.

Definition at line 94 of file machine.c.

95{
96 int c = CPU();
97
98 kprintf("Initializing TSS... ");
99
100 TSS[c]._unused0 = 0;
101 TSS[c]._unused1 = 0;
102 TSS[c]._unused2 = 0;
103 TSS[c]._unused3 = 0;
104 TSS[c]._unused4 = 0;
105 TSS[c].ist1 = ((uint64_t)&df_stack) + 4096;
106 TSS[c].ist2 = 0x0;
107 TSS[c].ist3 = 0x0;
108 TSS[c].ist4 = 0x0;
109 TSS[c].ist5 = 0x0;
110 TSS[c].ist6 = 0x0;
111 TSS[c].ist7 = 0x0;
112 TSS[c].rsp0 = ((uint64_t)&df_stack) + 4096;
113 TSS[c].rsp1 = 0;
114 TSS[c].rsp2 = 0;
115
116 ltr(SEL_TSS);
117
118 kprintf("Done!\n");
119}
uint64_t ist5
Definition: amd64.h:116
uint64_t _unused1
Definition: amd64.h:111
uint64_t ist6
Definition: amd64.h:117
uint64_t rsp0
Definition: amd64.h:108
uint32_t _unused3
Definition: amd64.h:120
uint64_t ist4
Definition: amd64.h:115
uint64_t rsp1
Definition: amd64.h:109
uint64_t ist7
Definition: amd64.h:118
uint64_t ist2
Definition: amd64.h:113
uint16_t _unused4
Definition: amd64.h:121
uint64_t rsp2
Definition: amd64.h:110
uint64_t ist3
Definition: amd64.h:114
uint32_t _unused0
Definition: amd64.h:107
uint64_t ist1
Definition: amd64.h:112
#define SEL_TSS
Definition: amd64.h:82
uint32_t _unused2
Definition: amd64.h:119
static INLINE void ltr(uint16_t tss)
Definition: amd64op.h:78
static char df_stack[4096]
Definition: machine.c:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MachineBoot_AddMem()

void MachineBoot_AddMem ( )

Definition at line 192 of file mbentry.c.

193{
194 int i;
195 uintptr_t initRamEnd = 32*1024*1024;
196
197 for (i = 0; i < memRegionIdx; i++)
198 {
199 uintptr_t start = memRegionStart[i];
201
202 if (start + len < initRamEnd)
203 continue;
204
205 if (start < initRamEnd) {
206 len = initRamEnd - start;
207 start = initRamEnd;
208 }
209
210 kprintf("AddRegion: %08llx %08llx\n", start, len);
212 }
213}
static uintptr_t memRegionLen[MAX_REGIONS]
Definition: mbentry.c:77
static uintptr_t memRegionStart[MAX_REGIONS]
Definition: mbentry.c:76
static int memRegionIdx
Definition: mbentry.c:78
uint64_t len
Definition: multiboot.h:2
#define MEM_DIRECTMAP_BASE
Definition: pmap.h:40
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAlloc_LateInit()

void PAlloc_LateInit ( )

PAlloc_LateInit –

The late init call is made after the page tables are initialized using a small boot memory region (2nd 16MBs). This is where initialize the XMem region that represents the PageInfo array, and map memory into it.

Definition at line 71 of file palloc.c.

72{
73 void *pageInfoOld = pageInfoTable;
74
77 Panic("Cannot back pageInfoTable!");
78 }
79
81 memcpy(pageInfoTable, pageInfoOld, pageInfoLength);
82
83 // Free old pages
84}
PageInfo * pageInfoTable
Definition: palloc.c:43
uint64_t pageInfoLength
Definition: palloc.c:44
XMem * pageInfoXMem
Definition: palloc.c:42
void * memcpy(void *dst, const void *src, size_t len)
Definition: string.c:177
XMem * XMem_New()
Definition: xmem.c:47
bool XMem_Allocate(XMem *xmem, uintptr_t length)
Definition: xmem.c:92
uintptr_t XMem_GetBase(XMem *xmem)
Definition: xmem.c:80
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCI_Init()

void PCI_Init ( )

Definition at line 27 of file pci.c.

28{
29 kprintf("PCI: Initializing ...\n");
30 PCIScan();
31 kprintf("PCI: Initialization Done!\n");
32}
static void PCIScan()
Definition: pci.c:226
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PS2_Init()

void PS2_Init ( )

Definition at line 274 of file ps2.c.

275{
276 uint8_t status, data;
277
278 keyState = 0;
279
281
282 while (1) {
283 status = inb(PS2_STATUS_PORT);
284 if ((status & PS2_STATUS_OBS) == 0)
285 break;
286
287 data = inb(PS2_DATA_PORT);
288 }
289
290 // Self test
292 PS2Wait();
293 data = inb(PS2_DATA_PORT);
294 if (data != 0x55)
295 kprintf("PS2: Controller test failed\n");
296
298
299 kbdHandler.irq = 1;
302 psmHandler.irq = 12;
305
308}
static INLINE uint8_t inb(uint16_t port)
Definition: amd64op.h:452
static INLINE void outb(uint16_t port, uint8_t data)
Definition: amd64op.h:431
void IRQ_Register(int irq, struct IRQHandler *h)
Definition: irq.c:35
static uint32_t keyState
Definition: ps2.c:50
#define PS2_COMMAND_KBDDISABLE
Definition: ps2.c:29
void PS2Wait()
Definition: ps2.c:262
#define PS2_STATUS_PORT
Definition: ps2.c:17
static void PS2_MouseIntr(void *arg)
Definition: ps2.c:257
static IRQHandler psmHandler
Definition: ps2.c:40
#define PS2_COMMAND_KBDENABLE
Definition: ps2.c:30
#define PS2_DATA_PORT
Definition: ps2.c:19
#define PS2_COMMAND_SELFTEST
Definition: ps2.c:28
#define PS2_COMMAND_PORT
Definition: ps2.c:18
#define PS2_STATUS_OBS
Definition: ps2.c:22
static IRQHandler kbdHandler
Definition: ps2.c:39
static void PS2_KeyboardIntr(void *arg)
Definition: ps2.c:167
void * arg
Definition: irq.h:10
int irq
Definition: irq.h:8
void(* cb)(void *)
Definition: irq.h:9
unsigned char uint8_t
Definition: types.h:10
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RTC_Init()

void RTC_Init ( )

Definition at line 23 of file rtc.c.

24{
25 uint64_t startTSC, stopTSC;
26 UnixEpoch first, second;
27
28 kprintf("RTC: Measuring CPU clock...\n");
29
30 first = RTC_ReadTime();
31 while (1) {
32 second = RTC_ReadTime();
33 if (first != second)
34 break;
35 first = second;
36 }
37 startTSC = Time_GetTSC();
38
39 first = RTC_ReadTime();
40 while (1) {
41 second = RTC_ReadTime();
42 if (first != second)
43 break;
44 first = second;
45 }
46 stopTSC = Time_GetTSC();
47
48 kprintf("RTC: %lld Ticks Per Second: %lld\n", second, stopTSC - startTSC);
49
50 KTime_SetTime(second, stopTSC, stopTSC - startTSC);
51}
uint64_t UnixEpoch
Definition: ktime.h:18
void KTime_SetTime(UnixEpoch epoch, uint64_t tsc, uint64_t tps)
Definition: ktime.c:163
UnixEpoch RTC_ReadTime()
Definition: rtc.c:61
uint64_t Time_GetTSC()
Definition: time.c:13
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ df_stack

char df_stack[4096]
static

Definition at line 42 of file machine.c.

◆ GDT

Definition at line 38 of file machine.c.

◆ GDTDescriptor

PseudoDescriptor GDTDescriptor[MAX_CPUS]
static

Definition at line 39 of file machine.c.

◆ TSS

Definition at line 40 of file machine.c.