diff options
author | Ian Moffett <ian@osmora.org> | 2023-12-13 12:47:10 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2023-12-13 12:47:10 -0500 |
commit | e4988a569cdbbbdc70187e80309d496e46225b73 (patch) | |
tree | f2d476aa0e1263b722d4f88c34eac32f82fe1385 /sys/include/arch | |
parent | 9eb956111bed4f414345f936af83395044f719b0 (diff) |
kernel/amd64: tss: Add TSS stack helpers
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch')
-rw-r--r-- | sys/include/arch/amd64/tss.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/tss.h b/sys/include/arch/amd64/tss.h index 90f6289..bca572e 100644 --- a/sys/include/arch/amd64/tss.h +++ b/sys/include/arch/amd64/tss.h @@ -100,6 +100,20 @@ struct __packed tss_desc { uint32_t reserved; }; +/* + * Holds the address of the address pointing + * to the top of an interrupt stack. + */ +union tss_stack { + struct { + uint32_t top_lo; + uint32_t top_hi; + }; + uint64_t top; +}; + +int tss_alloc_stack(union tss_stack *entry_out, size_t size); +int tss_update_ist(struct cpu_info *ci, union tss_stack stack, uint8_t istno); void write_tss(struct cpu_info *cpu, struct tss_desc *desc); void tss_load(void); /* In tss.S */ |