Page 1 of 2

My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 4:05 pm
by Xeno
My 64 Bit OS can only detect ~3-3.5 GiB ram
If I use VBox it sees 3.5G if I use Qemu it only sees 3G
My bootloader uses the INT 0x15, EAX = 0xE820 method to detect ram

I have no other information, and am lost im this mess.

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:00 pm
by Octocontrabass
Are you collecting the entire memory map?

Are you reading all 64 bits of the addresses?

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:12 pm
by Xeno
I belive so, I send peramitors to the bios and send a pointer to the result to the kernel

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:14 pm
by Octocontrabass
Have you tried looking at the memory map? Like, by printing it or something?

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:29 pm
by Xeno
Yes, not priting the full thing but i did a print out of lengths and it shows exactly why my OS detects

I am trying to work throught my boot code and do some checks there but I still have not found a solution

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:32 pm
by Octocontrabass
How much RAM did you configure in those VMs?

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:34 pm
by Xeno
i have tride at 4G but am curently trying with 8G
I have tride between 32M and 24G in Vbox yet it only works up to 3.5G

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:36 pm
by Octocontrabass
Can you print the whole memory map and share it?

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:39 pm
by Xeno
Also VBox will freeze during initiation of page tables when its using more than 3GiB
And I just noticed it crashes if I use exactly 2G

This is only in VBox

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:40 pm
by Xeno
Octocontrabass wrote:Can you print the whole memory map and share it?
I can try but I will need to try to fix my crash problem too, as it messes with output

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 5:46 pm
by Xeno
VBox halts apon:

Code: Select all

gas("movq %0, %%cr3" : : "r" (pt) :);
when I am using more than 1G ram

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 6:00 pm
by Xeno
Does VBox not suport 1GiB pages???

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 6:02 pm
by Xeno
well iv figured out vbox, but not why i cant see more memory hm

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 6:06 pm
by Octocontrabass
Xeno wrote:Does VBox not suport 1GiB pages???
It's an optional feature, you need to check CPUID before you try to use it.

Re: My OS can only see ~3 GiB

Posted: Fri Mar 22, 2024 6:15 pm
by Xeno
Octocontrabass wrote:
Xeno wrote:Does VBox not suport 1GiB pages???
It's an optional feature, you need to check CPUID before you try to use it.
I realized
my code is bad -_-
Im still not able to fuigure out the first problem