Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm trying to implement the Intel 36bit extensions but how do I detect up to 64gb. The only way I can think of (unless a capable BIOS function exists) is to setup up paging and map a page to a higher and higher address. But this will take all day to get up to 64GB. Unless I can assume that memory sizes will be on of:-
4mb
8mb
16mb
32mb
64mb
...
512mb
1gb
2gb
4gb
But I know that my old 486 has 12mb (4 + and it would be possible to have 1.5 GB etc..
What will definitely be there is int 15h, 88h (Plenty of info about int 15 on the web) which will give the size of extended memory. Alternatively read the CMOS data directly.
Will the information passed by GRUB be accurate. I know that the memory size variable formultiboot is only 32bit but what about the memory map. Could that go up to 36bit. Does anyone else use PAE/PSE in their OS. I'm starting to think that its not worth it because I'll probally have to write my own bootsector and also I don't think their are any motherboards with support it.
Pete wrote:
Does anyone else use PAE/PSE in their OS. I'm starting to think that its not worth it because I'll probally have to write my own bootsector and also I don't think their are any motherboards with support it.
Well, all processors from PPro+ support 36-bits and up, and from A64 they support 40-bits or more (even in 32-bit mode). Using it only allows for using the NX bit (and only on Itaniums and AMD64s) and that only in special modes. In other words, if you don't aim for the top, it's not worth it. As an aside, Bochs does NOT support PAE as it should. It crashes when setting the registers with the correct values, even when compiling WITH support for AMD64 (which requires PAE). However, I tested my code on multiple physical computers (all AMDs), where the PAE code worked flawlessly. I therefore support it but not on bochs.
Look at my 0.0.2 code for some code that works, it's been prepared to support 64-bit PAE-ish translation so you can probably skip 1/4 of each function.