Interrupts are a major source of problems already, so I am especially sorry about this mistake.
In line 11-14 of gdt.cpp, it should be
- Code: Select all
// right
i[0] = sizeof(GlobalDescriptorTable) << 16;
i[1] = (uint32_t)this;
instead of
- Code: Select all
// WRONG!!!
i[0] = (uint32_t)this;
i[1] = sizeof(GlobalDescriptorTable) << 16;
I don't even know how this happened - it's correct in the git commit, so I probably fixed it somewhere in between and forgot to mention it in the video.