[SOLVED] Cannot reach address over 8-GByte

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.
Post Reply
Rukog
Member
Member
Posts: 51
Joined: Sun Aug 01, 2021 5:24 pm

[SOLVED] Cannot reach address over 8-GByte

Post by Rukog »

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

Re: Cannot reach address over 8 GB

Post by Octocontrabass »

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.
Rukog
Member
Member
Posts: 51
Joined: Sun Aug 01, 2021 5:24 pm

Re: Cannot reach address over 8 GB

Post by Rukog »

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.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: [SOLVED] Cannot reach address over 8-GByte

Post by iansjack »

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

Re: Cannot reach address over 8 GB

Post by Octocontrabass »

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