Long mode paging only works well for the first 2MB
Posted: Mon Feb 11, 2019 7:56 pm
I'm experiencing some very weird issues with long mode paging.. it seems like my first two MB identity mapping works very well. However, if I try mapping the 2MB starting at 0xFF00_0000_0000 (255TiB), accessing that location does not work. Strangely enough, if I map the 2MB region starting at 512GB (index 1 in the PML4T), I can access it, but I run into other weird issues like not getting the right value from a location in the area...
Please, if anyone has some time, could you tell me if you could spot a bug in my code? I'm already in protected mode .. the code sets up the paging tables and jumps into long mode. I'm also posting a link to my 64bit GDT.
Thank you so much.
https://pastebin.com/ghBLv1Db (Page tables + long mode)
https://pastebin.com/WHC4ZSJG (GDT for 64bits)
Please, if anyone has some time, could you tell me if you could spot a bug in my code? I'm already in protected mode .. the code sets up the paging tables and jumps into long mode. I'm also posting a link to my 64bit GDT.
Thank you so much.
https://pastebin.com/ghBLv1Db (Page tables + long mode)
https://pastebin.com/WHC4ZSJG (GDT for 64bits)