Improved 32-bit x86 support

This commit is contained in:
Jeremy Soller
2022-08-18 14:57:15 -06:00
parent c09be1770b
commit 6b2439f1b9
6 changed files with 31 additions and 20 deletions
+6
View File
@@ -218,6 +218,12 @@ impl GdtEntry {
}
}
pub fn offset(&self) -> u32 {
(self.offsetl as u32) |
((self.offsetm as u32) << 16) |
((self.offseth as u32) << 24)
}
pub fn set_offset(&mut self, offset: u32) {
self.offsetl = offset as u16;
self.offsetm = (offset >> 16) as u8;