ref: b136801101b8197b90071dd70b050911f6a7ac10
parent: b6b72565ea3e349ba7de143112bd8dbd8403709b
author: glenda <glenda@cirno>
date: Wed May 8 19:04:02 EDT 2024
new idt for nix threads is working.
--- a/sys/src/nix/pc64/devnix.c
+++ b/sys/src/nix/pc64/devnix.c
@@ -56,12 +56,13 @@
ptr[1] = (uintptr)acidt;
print("lidt %#p %#p\n", ptr[0], ptr[1]);
print("lidt with %#p\n", &((ushort*)&ptr[1])[-1]);
- if (0)
+ if (1)
lidt(&((ushort*)&ptr[1])[-1]);
((ushort*)&ptr[1])[-1] = sizeof(Segdesc)*512-1;
ptr[1] = IDTADDR;
print("boot lidt %#p %#p\n", ptr[0], ptr[1]);
print("lim is %#x\n", ((ushort*)&ptr[1])[-1]);
+ if (0)
lidt(&((ushort*)&ptr[1])[-1]);
p[0] = 0;
((ushort*)&p[1])[-1] = sizeof(Segdesc)*512-1;