aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-04-10 00:26:39 +0200
committerMarvin Borner2021-04-10 00:26:39 +0200
commit9655593d80e23d2ea3c091e3187e8e47b278bc3d (patch)
treef618723fd9d457147f4663d2d4990f69fabb2d48 /kernel/inc
parenteeb88df1d501ccec4737c18dddb7ca0a1176304f (diff)
Gave procs own kernel stack (TSS)
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/boot.h7
-rw-r--r--kernel/inc/cpu.h2
-rw-r--r--kernel/inc/mm.h2
-rw-r--r--kernel/inc/proc.h3
4 files changed, 13 insertions, 1 deletions
diff --git a/kernel/inc/boot.h b/kernel/inc/boot.h
index 7f085cd..48ab440 100644
--- a/kernel/inc/boot.h
+++ b/kernel/inc/boot.h
@@ -35,4 +35,11 @@ struct mem_info {
u32 size;
};
+struct boot_info {
+ struct vid_info *vid;
+ struct mem_info *mem;
+ u32 tss;
+ u32 drive;
+};
+
#endif
diff --git a/kernel/inc/cpu.h b/kernel/inc/cpu.h
index 7ac6074..3d29e4f 100644
--- a/kernel/inc/cpu.h
+++ b/kernel/inc/cpu.h
@@ -32,6 +32,8 @@ void cr3_set(u32 cr3);
u32 cr4_get(void);
void cr4_set(u32 cr4);
+void tss_set_stack(u32 ss, u32 esp);
+
void clac(void);
void stac(void);
diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h
index b82b441..a9524ad 100644
--- a/kernel/inc/mm.h
+++ b/kernel/inc/mm.h
@@ -141,6 +141,6 @@ res memory_sys_free(struct page_dir *dir, u32 addr) NONNULL;
res memory_sys_shaccess(struct page_dir *dir, u32 id, u32 *addr, u32 *size) NONNULL;
void memory_user_hook(void);
-void memory_install(struct mem_info *mem_info, struct vid_info *vid_info) NONNULL;
+void memory_install(struct boot_info *boot) NONNULL;
#endif
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index dcc2eeb..f5dbf1a 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -53,6 +53,9 @@ struct stream {
struct proc {
u32 pid;
u32 entry;
+ u32 user_stack;
+ u32 kernel_stack;
+
char name[64];
char dir[64];
struct stream streams[4];