kernel: ldt support

This commit is contained in:
Matheus
2026-03-20 21:23:59 -03:00
parent a73c82f912
commit 41f97c6c61
17 changed files with 315 additions and 94 deletions
+10
View File
@@ -349,6 +349,16 @@ static void pfisr(isr_t *self, context_t *ctx) {
}
static void gpfisr(isr_t *self, context_t *ctx) {
if (ctx->rip >= (uintptr_t)load_seg_gs && ctx->rip <= (uintptr_t)load_seg_gs_fallback) {
ctx->rip = (uintptr_t)load_seg_gs_fallback;
return;
}
if (ctx->rip >= (uintptr_t)load_seg_fs && ctx->rip <= (uintptr_t)load_seg_fs_fallback) {
ctx->rip = (uintptr_t)load_seg_fs_fallback;
return;
}
thread_t *thread = current_thread();
if (thread && thread->usercopyctx) {
memcpy(ctx, thread->usercopyctx, sizeof(context_t));