Reserved memory

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
8infy
Member
Member
Posts: 185
Joined: Sun Apr 05, 2020 1:01 pm

Reserved memory

Post by 8infy »

Hey everyone, sorry if this is a stupid question, i'm very much a beginner in osdev.

I know that a lot of physical address space is reserved for memory mapped devices, sometimes even gigabytes.
Does that mean that if I put in like 4 gigabytes of ram like half of it gets reserved?
Or does the bios somehow remap the memory so that I can access everything?
If so, does it actually map above 4 gigabytes? How does one even access that memory in 32 bit mode?
Or does some part of the RAM become unreachable? Also, can I manually remap it?
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Reserved memory

Post by PeterX »

8infy wrote:Or does the bios somehow remap the memory so that I can access everything?
No!
8infy wrote:Does that mean that if I put in like 4 gigabytes of ram like half of it gets reserved?
Yes, sort of. Don't know how much exactly.
8infy wrote:If so, does it actually map above 4 gigabytes? How does one even access that memory in 32 bit mode?
No way. 32bit mode can't access more than 4GB.
8infy wrote:Or does some part of the RAM become unreachable? Also, can I manually remap it?
Unreachable: Yes, see answer above. Remap: No.

Greetings
Peter
8infy
Member
Member
Posts: 185
Joined: Sun Apr 05, 2020 1:01 pm

Re: Reserved memory

Post by 8infy »

PeterX wrote:
8infy wrote:Or does the bios somehow remap the memory so that I can access everything?
No!
8infy wrote:Does that mean that if I put in like 4 gigabytes of ram like half of it gets reserved?
Yes, sort of. Don't know how much exactly.
8infy wrote:If so, does it actually map above 4 gigabytes? How does one even access that memory in 32 bit mode?
No way. 32bit mode can't access more than 4GB.
8infy wrote:Or does some part of the RAM become unreachable? Also, can I manually remap it?
Unreachable: Yes, see answer above. Remap: No.

Greetings
Peter

But on my computer I have 32 gigabytes of memory and a ton of modern hardware and windows says that 31.9 is available, that doesn't seem right? So whats going on here? Or does it include the reserved memory as well?

Image
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Reserved memory

Post by PeterX »

8infy wrote:But on my computer I have 32 gigabytes of memory and a ton of modern hardware and windows says that 31.9 is available, that doesn't seem right? So whats going on here? Or does it include the reserved memory as well?
No it doesn't show reserved memory.
The footprint on reserved memory can be very small, I don't know why it differs on different machines.

Greetings
Peter
Octocontrabass
Member
Member
Posts: 5575
Joined: Mon Mar 25, 2013 7:01 pm

Re: Reserved memory

Post by Octocontrabass »

8infy wrote:Does that mean that if I put in like 4 gigabytes of ram like half of it gets reserved?
Usually no, but it depends on the chipset.
8infy wrote:Or does the bios somehow remap the memory so that I can access everything?
Usually yes, but it depends on the chipset.
8infy wrote:If so, does it actually map above 4 gigabytes?
When the chipset is capable of remapping memory, yes.
8infy wrote:How does one even access that memory in 32 bit mode?
PAE.
8infy wrote:Or does some part of the RAM become unreachable?
Usually no, but it depends on the chipset.
8infy wrote:Also, can I manually remap it?
You should let the firmware handle it.
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Reserved memory

Post by PeterX »

Uh, then I was wrong. Thanks for correcting me.

I kind of can't believe BIOS really remaps memory above 4GB!?

Greetings
Peter
Post Reply