My OS can only see ~3 GiB

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.
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

My OS can only see ~3 GiB

Post 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.
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: My OS can only see ~3 GiB

Post by Octocontrabass »

Are you collecting the entire memory map?

Are you reading all 64 bits of the addresses?
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post by Xeno »

I belive so, I send peramitors to the bios and send a pointer to the result to the kernel
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: My OS can only see ~3 GiB

Post by Octocontrabass »

Have you tried looking at the memory map? Like, by printing it or something?
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post 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
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: My OS can only see ~3 GiB

Post by Octocontrabass »

How much RAM did you configure in those VMs?
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post 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
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: My OS can only see ~3 GiB

Post by Octocontrabass »

Can you print the whole memory map and share it?
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post 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
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post 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
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post by Xeno »

VBox halts apon:

Code: Select all

gas("movq %0, %%cr3" : : "r" (pt) :);
when I am using more than 1G ram
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post by Xeno »

Does VBox not suport 1GiB pages???
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post by Xeno »

well iv figured out vbox, but not why i cant see more memory hm
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: My OS can only see ~3 GiB

Post 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.
Xeno
Member
Member
Posts: 56
Joined: Tue Oct 10, 2023 7:40 pm

Re: My OS can only see ~3 GiB

Post 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
Post Reply