wip: S3 sleep debugging

This commit is contained in:
2026-03-30 10:46:37 +02:00
parent b3ba4249ee
commit ef380db992
4 changed files with 52 additions and 24 deletions
+5
View File
@@ -70,6 +70,11 @@ namespace Hal {
}
void LoadTSS() {
// LTR marks the TSS descriptor busy in the GDT (type 0xB). S3 loses
// the CPU's loaded task register state, but the busy bit in RAM
// persists, so a plain second LTR on resume can #GP. Re-mark it as an
// available 64-bit TSS before reloading TR.
kernelGDT.TSS.AccessByte = 0x89;
LoadTR();
KernelLogStream(OK, "Hal") << "Loaded TSS (selector 0x28)";
}