OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 4:24 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 4:05 pm 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:00 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Are you collecting the entire memory map?

Are you reading all 64 bits of the addresses?


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:12 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
I belive so, I send peramitors to the bios and send a pointer to the result to the kernel


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:14 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Have you tried looking at the memory map? Like, by printing it or something?


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:29 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:32 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
How much RAM did you configure in those VMs?


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:34 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:36 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Can you print the whole memory map and share it?


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:39 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:40 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 5:46 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
VBox halts apon:
Code:
gas("movq %0, %%cr3" : : "r" (pt) :);

when I am using more than 1G ram


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 6:00 pm 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 6:02 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
well iv figured out vbox, but not why i cant see more memory hm


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 6:06 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Xeno wrote:
Does VBox not suport 1GiB pages???

It's an optional feature, you need to check CPUID before you try to use it.


Top
 Profile  
 
 Post subject: Re: My OS can only see ~3 GiB
PostPosted: Fri Mar 22, 2024 6:15 pm 
Offline
Member
Member

Joined: Tue Oct 10, 2023 7:40 pm
Posts: 51
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot] and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group