OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:05 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [SOLVED] Cannot reach address over 8-GByte
PostPosted: Sat Aug 21, 2021 7:41 pm 
Offline
Member
Member

Joined: Sun Aug 01, 2021 5:24 pm
Posts: 51
After setting up my pagination (1-Gbyte page frame) with success, I tried to read high address and I am stuck at reading a 8-Gbyte address position, the CPU does a reset maybe a Page Fault.
Address below 8-Gbyte was readable.

So I am wondering if it's a matter of RAM stick management, I have two of 8 GB and maybe I have to know how can I reach the 2nd RAM stick.

How can I fix that issue.


Last edited by Rukog on Sun Aug 22, 2021 3:55 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Cannot reach address over 8 GB
PostPosted: Sat Aug 21, 2021 8:17 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Rukog wrote:
maybe a Page Fault.

You don't know what kind of fault it is? You should set up exception handlers.

Rukog wrote:
So I am wondering if it's a matter of RAM stick management, I have two of 8 GB and maybe I have to know how can I reach the 2nd RAM stick.

Use the firmware's memory map to find usable RAM.


Top
 Profile  
 
 Post subject: Re: Cannot reach address over 8 GB
PostPosted: Sun Aug 22, 2021 2:58 am 
Offline
Member
Member

Joined: Sun Aug 01, 2021 5:24 pm
Posts: 51
Also I have made a discovery about mapping page frame, normally we are talking about storing physical address page frame inside page tables right.

But for the 1-GByte paging there was a problem, how can we map 256-TByte of address with only a 20-bit capable physical address inside a PDPTE, it was mission impossible.

So Ive tried another storing method and Ive just did a simple incrementation of page number, assuming it was the CPU that does the translation based on RAM divided into nĂ— 1GB frame

1st page refer to the 1st GByte, 2nd to the second and so on.

Not sure if it does apply the same for other page mapping.



Update:
Ok so ive found the bug and it was a mistype of offset in the code, so just a coincidence :mrgreen:

So it's working, I have now access to the upper 8 GB RAM


Last edited by Rukog on Sun Aug 22, 2021 4:18 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [SOLVED] Cannot reach address over 8-GByte
PostPosted: Sun Aug 22, 2021 4:02 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Note that you are only going to want to use 1GB pages in very specific, limited circumstances. Otherwise you lose most of the advantages of paying and will likely waste huge amounts of RAM.


Top
 Profile  
 
 Post subject: Re: Cannot reach address over 8 GB
PostPosted: Sun Aug 22, 2021 2:51 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Rukog wrote:
But for the 1-GByte paging there was a problem, how can we map 256-TByte of address with only a 20-bit capable physical address inside a PDPTE, it was mission impossible.

The PDPTE only holds the upper bits of the physical address. 20 bits is more than enough for 256 TiB.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 90 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