More than 4GB RAM on 32bit OS (64GB max)

ReactOS, Linux, macOS, BSD, and whatever.
User avatar
luk3Z
Posts: 72
Joined: 10 Dec 2021, 19:23
Location: Metavira
OS: XP/Vista/W7 x64
Has thanked: 5 times
Been thanked: 40 times
Poland

More than 4GB RAM on 32bit OS (64GB max)

Unread post by luk3Z »

Actually the Intel 386 chip could use 48 bit addressing using the Segment Descriptor Table. Apparently nobody wanted to write the OS to take advantage of it. 4 GB seemed like a huge space then. Plus MS got the guys from DEC who did VMS, which used a flat 32 bit address space, to write NT. It was just easier to let them apply their experience rather than complicating things.

According to Microsoft it's possible for a 32-bit system to access more than 4 GB of physical memory providing PAE (physical address extension) is explicitly enabled.

With PAE, the operating system moves from two-level linear address translation to three-level address translation. Instead of a linear address being split into three separate fields for indexing into memory tables, it is split into four separate fields: a 2-bit field, two 9-bit fields, and a 12-bit field that corresponds to the page size implemented by Intel architecture (4 KB). The size of page table entries (PTEs) and page directory entries (PDEs) in PAE mode is increased from 32 to 64 bits. The additional bits allow an operating system PTE or PDE to reference physical memory above 4 GB.
https://www.sevenforums.com/hardware-devices/193323-possible-use-full-4gb-ram-win7-x86.html
https://www.raymond.cc/blog/make-windows-7-and-vista-32-bit-x86-support-more-than-4gb-memory/
https://learn.microsoft.com/en-us/windows/win32/memory/physical-address-extension?redirectedfrom=MSDN
https://github.com/wj32/PatchPae2
Last edited by luk3Z on 29 Dec 2022, 08:37, edited 1 time in total.

User avatar
K4sum1
Lazy Owner
Posts: 806
Joined: 11 Jan 2021, 07:40
OS: Windows 8.1 x64
Has thanked: 494 times
Been thanked: 219 times
Contact:
United States of America

More than 4GB RAM on 32bit OS

Unread post by K4sum1 »

Wait is the 386 a 48 bit CPU?
R3n who?

User avatar
luk3Z
Posts: 72
Joined: 10 Dec 2021, 19:23
Location: Metavira
OS: XP/Vista/W7 x64
Has thanked: 5 times
Been thanked: 40 times
Poland

More than 4GB RAM on 32bit OS

Unread post by luk3Z »

K4sum1 wrote: 21 Dec 2022, 18:04 Wait is the 386 a 48 bit CPU?
It is in the sense that the register width is 32-bits, the integer math is limited to 32-bits (64-bit result), and it has a 32-bit instruction set. 48-bit addressing refers to how the PC handles memory.
http://www.monstersoft.com/tutorial1/48bit_intro.html
https://pdos.csail.mit.edu/6.828/2005/readings/i386/s05_01.htm#fig5-2
https://wiki.osdev.org/Global_Descriptor_Table

User avatar
K4sum1
Lazy Owner
Posts: 806
Joined: 11 Jan 2021, 07:40
OS: Windows 8.1 x64
Has thanked: 494 times
Been thanked: 219 times
Contact:
United States of America

More than 4GB RAM on 32bit OS

Unread post by K4sum1 »

Oh, ok, that's interesting. I guess PAE was developed to make coding for more RAM easier.

I guess that's also why I paired 4GB of DDR with a P4 without PAE, the BIOS showed it all, but no way to use it all in Windows.
R3n who?

User avatar
CalmCreeper360
Posts: 203
Joined: 22 Apr 2021, 07:06
OS: Windows 7 x64
Has thanked: 41 times
Been thanked: 46 times
Russia

More than 4GB RAM on 32bit OS

Unread post by CalmCreeper360 »

luk3Z wrote: 21 Dec 2022, 17:38
Actually the Intel 386 chip could use 48 bit addressing using the Segment Descriptor Table. Apparently nobody wanted to write the OS to take advantage of it. 4 GB seemed like a huge space then. Plus MS got the guys from DEC who did VMS, which used a flat 32 bit address space, to write NT. It was just easier to let them apply their experience rather than complicating things.

According to Microsoft it's possible for a 32-bit system to access more than 4 GB of physical memory providing PAE (physical address extension) is explicitly enabled.

With PAE, the operating system moves from two-level linear address translation to three-level address translation. Instead of a linear address being split into three separate fields for indexing into memory tables, it is split into four separate fields: a 2-bit field, two 9-bit fields, and a 12-bit field that corresponds to the page size implemented by Intel architecture (4 KB). The size of page table entries (PTEs) and page directory entries (PDEs) in PAE mode is increased from 32 to 64 bits. The additional bits allow an operating system PTE or PDE to reference physical memory above 4 GB.
https://www.sevenforums.com/hardware-devices/193323-possible-use-full-4gb-ram-win7-x86.html
https://www.raymond.cc/blog/make-windows-7-and-vista-32-bit-x86-support-more-than-4gb-memory/
https://learn.microsoft.com/en-us/windows/win32/memory/physical-address-extension?redirectedfrom=MSDN
https://github.com/wj32/PatchPae2
This is interesting af.
I knew that there were patches for Windows XP 32bit to use more RAM, than 4 GB, but i didnt know, why or how this worked
Друштвени партнер компаније Застава Аутомобили, Крагујевац

nt7

More than 4GB RAM on 32bit OS (64GB max)

Unread post by nt7 »

XP SP1 supports PAE properly. It was XP SP2 and later that disabled addressing anything over 4GiB because of stability concerns (not a lot of drivers were written with PAE in mind).

Presumably this artificial limitation was kept around long after XP mainly in order to push people into using the 64-bit versions of Windows (which makes sense given 32-bit x86 CPUs weren't exactly being produced in 2009 besides the Atom line)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest