How can I map 4GB of RAM memory to 4GB CPU address space

-1

0

I'm confused with a situation where there is 4GB of CPU address space and I have 4GB of RAM memory.

Now is it possible to map this whole 4GB of RAM memory to CPU address space and if so, then where would peripherals registers be mapped in CPU address space.

Is there any limitation on how much RAM memory could be mapped 32 bit CPU address space.

AMIT

Posted 2015-03-12T14:53:18.777

Reputation: 499

Question was closed 2015-03-18T00:05:51.370

2Are we talking about 32-bit operating system or 64-bit operating system. What operating system? Yes; 4GB of memory can be mapped at once. How much of that can be mapped by applications is controlled by the operating system. – Ramhound – 2015-03-12T15:04:39.737

No,I'm not talking about OS here.I'm talking RAM memory mapped to CPU/Physical address space :) – AMIT – 2015-03-12T15:56:11.557

if you tried anything then can you give a screenshot showing what you tried? – barlop – 2015-03-12T15:58:22.993

I'm trying to talk about http://www.barrgroup.com/Embedded-Systems/Glossary-M Processor's memory map.

– AMIT – 2015-03-12T16:04:43.767

This a homework question? – Ramhound – 2015-03-12T16:25:45.647

No it is not ,Let me know if it doesn’t belong here. – AMIT – 2015-03-12T16:29:09.460

Answers

2

I think you're on the right track and you've essentially already answered your question. A 32 bit CPU can address 4,294,967,296 memory locations. 4GB of RAM is a total of 4,294,967,296 bytes, so how can the CPU access all of that memory and still have address space to access hardware (registers are not mapped to memory locations)? Well, it can't. It just ignores part of the RAM and maps the addresses it is ignoring to I/O. This is why you'll never see a full 4BG of RAM on a 32 bit machine/OS.

heavyd

Posted 2015-03-12T14:53:18.777

Reputation: 54 755

2It is possible to use the full 4gb of ram via kludgy hacks like PAE, but you are right that no single application can make use of the full 4gb of ram at once while still retaining access to devices such as the graphics card. – Mokubai – 2015-03-12T17:28:44.820

PAE is in no way a "kludgy hack". – Jamie Hanrahan – 2016-02-25T21:47:12.143