Page 1 of 1

Reserved memory

Posted: Mon Jun 01, 2020 1:43 pm
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?

Re: Reserved memory

Posted: Mon Jun 01, 2020 1:52 pm
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

Re: Reserved memory

Posted: Mon Jun 01, 2020 1:57 pm
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

Re: Reserved memory

Posted: Mon Jun 01, 2020 2:06 pm
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

Re: Reserved memory

Posted: Mon Jun 01, 2020 5:37 pm
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.

Re: Reserved memory

Posted: Tue Jun 02, 2020 12:58 am
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