17#define USER_STACK_SIZE (16 * 1024)
18#define USER_HEAP_SIZE (1 * 1024 * 1024)
19#define USER_MMAP_SIZE (4 * 1024 * 1024)
21#define USER_CODE_VADDR 0x0000400000000000ULL
22#define USER_HEAP_VADDR 0x0000400010000000ULL
23#define USER_MMAP_VADDR (USER_HEAP_VADDR + USER_HEAP_SIZE)
24#define USER_TLS_VADDR (USER_MMAP_VADDR + USER_MMAP_SIZE)
25#define USER_TLS_REGION_SIZE (16 * 1024)
26#define USER_PHDR_VADDR (USER_TLS_VADDR + USER_TLS_REGION_SIZE)
27#define USER_STACK_TOP 0x00007FFFFFFFF000ULL
29#define LINUX_AT_NULL 0
30#define LINUX_AT_PHDR 3
31#define LINUX_AT_PHENT 4
32#define LINUX_AT_PHNUM 5
33#define LINUX_AT_PAGESZ 6
34#define LINUX_AT_BASE 7
35#define LINUX_AT_FLAGS 8
36#define LINUX_AT_ENTRY 9
37#define LINUX_AT_UID 11
38#define LINUX_AT_EUID 12
39#define LINUX_AT_GID 13
40#define LINUX_AT_EGID 14
41#define LINUX_AT_PLATFORM 15
42#define LINUX_AT_HWCAP 16
43#define LINUX_AT_HWCAP2 26
44#define LINUX_AT_CLKTCK 17
45#define LINUX_AT_SECURE 23
46#define LINUX_AT_RANDOM 25
47#define LINUX_AT_EXECFN 31
48#define IA32_FS_BASE_MSR 0xC0000100
49#define USER_AUXV_MAX 18
67 uint32_t multiple_threads;
71 uint64_t pointer_guard;
72 uint64_t unused_vgetcpu_cache[2];
74 int32_t __glibc_unused1;
75 void* __private_tm[4];
87_Static_assert(__builtin_offsetof(
glibc_tcb_head_t, stack_guard) == 0x28,
"glibc stack_guard offset mismatch");
88_Static_assert(__builtin_offsetof(
glibc_tcb_head_t, pointer_guard) == 0x30,
"glibc pointer_guard offset mismatch");
89_Static_assert(__builtin_offsetof(
glibc_tcb_head_t, __private_ss) == 0x70,
"glibc __private_ss offset mismatch");
90_Static_assert(__builtin_offsetof(
glibc_tcb_head_t, __glibc_unused2) == 0x80,
"glibc __glibc_unused2 offset mismatch");
97void enter_userland_at(uint64_t entry_point);
98int userland_exec(
const char* path,
int argc,
const char*
const* argv,
const char*
const* envp);
99void userland_heap_init(
void);
100uint64_t userland_brk(uint64_t requested_break);
101uint64_t userland_mmap_anon(uint64_t length);
102bool userland_prepare_exit(syscall_frame_t* frame, uint64_t exit_code);
103bool userland_is_running(
void);
104void userland_abort_from_exception(uint64_t int_no, uint64_t err_code, uint64_t fault_rip)
__attribute__((noreturn));
struct acpi_gas __attribute__
Physical Region Descriptor Table (PRDT) entry.
This is a basic header files with FrostWing specific short forms and basically a good for life header...