diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-09-26 13:17:41 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-09-26 13:17:41 -0400 |
commit | 2dadbfc899df4179ca70c4ea04f74a5e190c2ae7 (patch) | |
tree | b166aaa9af42406cd07fbaf150f93aefeb2fbe33 /arch/x86_64/device/processor.c | |
parent | ddc4fbc15223e362896a9f42beca73f05f48e664 (diff) | |
download | jove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.tar.gz jove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.tar.bz2 jove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.zip |
fix usermode interrupts. add ability to define custom interrupt handlersmain
Diffstat (limited to 'arch/x86_64/device/processor.c')
-rw-r--r-- | arch/x86_64/device/processor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/device/processor.c b/arch/x86_64/device/processor.c index ff920c8..1b3daa2 100644 --- a/arch/x86_64/device/processor.c +++ b/arch/x86_64/device/processor.c @@ -44,7 +44,7 @@ typedef union msr_star uint32_t eip; uint16_t kcs; uint16_t ucs; - }; + }__attribute__((packed)); uint32_t v[2]; } msr_star_t; @@ -65,7 +65,7 @@ s_enable_sce(void) msr_star_t star; star.kcs = GDT_OFFSET_KERNEL_CODE; - star.ucs = GDT_OFFSET_USER_CODE; + star.ucs = GDT_OFFSET_USER_NULL; wrmsr(MSR_STAR, star.v[0], star.v[1]); extern void _syscall_entry(void); |