kernel: usercopy functions

This commit is contained in:
Matheus
2024-06-09 19:31:26 -03:00
parent 429f56aced
commit 50b4b45d00
53 changed files with 712 additions and 260 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ typedef struct {
}
void arch_context_switch(context_t *context);
void arch_context_saveandcall(void (*fn)(context_t *context, void *argument), void *stack, void *argument);
int arch_context_saveandcall(void (*fn)(context_t *context, void *argument), void *stack, void *argument);
#include <string.h>
+2
View File
@@ -10,6 +10,8 @@
#define USERSPACE_START (void *)0x0000000000001000
#define USERSPACE_END (void *)0x0000800000000000
#define IS_USER_ADDRESS(a) ((void *)a < USERSPACE_END)
#define PAGE_SIZE 4096
#define ARCH_MMU_FLAGS_READ (uint64_t)1
#define ARCH_MMU_FLAGS_WRITE (uint64_t)2