diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 18:53:36 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 18:53:36 +0100 |
commit | 0ea68568372b7b7b20bca6985ae4b36e8c99c0e9 (patch) | |
tree | 832f7f4ac8e2537cf5aee531634d01499bb4a318 /src/kernel/include | |
parent | 7aafc22a01de5cabb99aed76782f6c0999b7de05 (diff) | |
download | kogata-0ea68568372b7b7b20bca6985ae4b36e8c99c0e9.tar.gz kogata-0ea68568372b7b7b20bca6985ae4b36e8c99c0e9.zip |
Implement switching to usermode.
Diffstat (limited to 'src/kernel/include')
-rw-r--r-- | src/kernel/include/gdt.h | 2 | ||||
-rw-r--r-- | src/kernel/include/process.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/include/gdt.h b/src/kernel/include/gdt.h index a62d0db..048accd 100644 --- a/src/kernel/include/gdt.h +++ b/src/kernel/include/gdt.h @@ -9,6 +9,8 @@ void gdt_init(); +void set_kernel_stack(void* addr); + #define K_CODE_SEGMENT 0x08 #define K_DATA_SEGMENT 0x10 #define U_CODE_SEGMENT 0x18 diff --git a/src/kernel/include/process.h b/src/kernel/include/process.h index 30e24db..d67ede6 100644 --- a/src/kernel/include/process.h +++ b/src/kernel/include/process.h @@ -21,6 +21,9 @@ #define MM_WRITE (0x02) #define MM_EXEC (0x04) +#define USERSTACK_ADDR 0xB8000000 +#define USERSTACK_SIZE 0x00020000 // 32 KB + struct process; typedef struct process process_t; |