AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
sys.h
Go to the documentation of this file.
1
#include <
core/system.h
>
2
#include <
cpu/cpu.h
>
3
#include <
mm/mm.h
>
4
#include <
sys/proc.h
>
5
6
/* x86: what arch/i386/sys/ shares. */
7
8
/* Start running in user mode, and jump to an address with a frame pointer
9
* and a stack (cpu.S). */
10
void
x86_jump_user
(
uintptr_t
eax,
uintptr_t
eip,
uintptr_t
cs,
uintptr_t
eflags,
uintptr_t
esp,
uintptr_t
ss) __attribute__((noreturn));
11
void
x86_goto
(
uintptr_t
eip,
uintptr_t
ebp,
uintptr_t
esp) __attribute__((noreturn));
12
13
/* clock.c */
14
void
x86_clock_init
(
void
);
15
void
x86_clock_ticks
(
uint32_t
period_ns);
16
void
x86_clock_tick
(
void
);
17
const
char
*
x86_clock_source
(
void
);
18
19
/* Pushes `value`, of `type`, on the stack at `stack`. */
20
#define PUSH(stack, type, value)\
21
do {\
22
(stack) -= sizeof(type);\
23
*((type *) (stack)) = (type) (value);\
24
} while (0)
x86_goto
void x86_goto(uintptr_t eip, uintptr_t ebp, uintptr_t esp)
x86_jump_user
void x86_jump_user(uintptr_t eax, uintptr_t eip, uintptr_t cs, uintptr_t eflags, uintptr_t esp, uintptr_t ss)
x86_clock_ticks
void x86_clock_ticks(uint32_t period_ns)
Says how often the timer ticks, from now on: with neither TSC nor HPET, the ticks are the clock.
Definition
clock.c:180
x86_clock_source
const char * x86_clock_source(void)
Returns the name of the clock's counter.
Definition
clock.c:257
x86_clock_init
void x86_clock_init(void)
Chooses the clock's counter and calibrates it, at boot, before the timer ticks.
Definition
clock.c:200
x86_clock_tick
void x86_clock_tick(void)
Counts a tick of the timer, and moves the clock's base on to now.
Definition
clock.c:130
system.h
cpu.h
mm.h
proc.h
uintptr_t
__SIZE_TYPE__ uintptr_t
Definition
stddef.h:12
uint32_t
unsigned int uint32_t
Definition
stddef.h:22
kernel
arch
i386
sys
sys.h
Generated by
1.18.0