32bit CPU, 32bit Linux access 36bit address

Jade-JL

New Member
Joined
May 12, 2022
Messages
3
Reaction score
0
Credits
28
On my platform (FPGA cores), the CPU is 32bit, so Linux is 32bit. But there are 36bit address space.
I have a question on Linux kernel starting address, it is must be under 4G?
I assume it is must be under 4G, because the PAE (physical address extension) is enabled in kernel. So the time when kernel starts, PAE has not been enabled.
Another question is, if the main memory is starting from 0x1 0000 0000, it is possible to run?
I assume cannot, because u-boot itself has to be loaded under 4G and run.
 


Welcome to the forums,
I don't understand your question, if you have a 32 bit processor then you must use a 32 bit distribution, which? Will run on your machine will be determined more by the amount of ram available
 
Welcome to the forums,
I don't understand your question, if you have a 32 bit processor then you must use a 32 bit distribution, which? Will run on your machine will be determined more by the amount of ram available
Yes. I am using a 32bit processor and 32bit of Linux. The ram size is 4GB which should be enough.
My question is the requirement on the starting address of the ram. Now the ram is 0x1 00000000 - 0x2 00000000. When I compile the kernel, I passed in UIMAGE_ADDR=0x1 00000000 and LOADADDR=0x1 00000000, but the vmlinux starting address is 0xC0000000.
 
If you install Debian 32bit , and you have more then 4 GB of RAM, you won’t be able to use it, The easiest solution is to grab latest 64 bit version and install it (Only if your hardware supports 64bit architecture) otherwise you have to use PAE enabled kernel.
For example if you have 8GB of ram, and you issue the command,
Code:
free -m
you will see only 3-4 GB of total ram. You need to install Physical Address Extension (PAE) aware kernel under 32 bit Debian Linux. It is a feature of x86 and x86-64 processors that allows more than 4 Gigabytes of physical memory to be used in 32-bit systems.
run
Code:
grep -o pae /proc/cpuinfo
to check if the 32 bit CPU is PAE compatible
run
Code:
uname -a
and check if the kernel has the -pae extension at the end of it
As physical (real) addresses are never used directly by a user program, and because the effective address is limited to 32 bits, a user program can only ever access 32 bits, or 4 Gbytes, of the address space at one time. Systems may place further limits on the amount of address space a user program can access. Because user programs do not use physical addresses, no change to a user program is required to run on a system with 36-bit physical addressing.
U-Boot must specify a memory map that details the allocation of the 36-bit physical address space. On most of the 32-bit PowerPC configurations, U-Boot utilizes one-to-one mappings for the address space; that is, the effective address and the physical address are always equal.

This document explains it better then I can - https://www.nxp.com/docs/en/application-note/AN4064.pdf
 
If you install Debian 32bit , and you have more then 4 GB of RAM, you won’t be able to use it, The easiest solution is to grab latest 64 bit version and install it (Only if your hardware supports 64bit architecture) otherwise you have to use PAE enabled kernel.
For example if you have 8GB of ram, and you issue the command,
Code:
free -m
you will see only 3-4 GB of total ram. You need to install Physical Address Extension (PAE) aware kernel under 32 bit Debian Linux. It is a feature of x86 and x86-64 processors that allows more than 4 Gigabytes of physical memory to be used in 32-bit systems.
run
Code:
grep -o pae /proc/cpuinfo
to check if the 32 bit CPU is PAE compatible
run
Code:
uname -a
and check if the kernel has the -pae extension at the end of it
As physical (real) addresses are never used directly by a user program, and because the effective address is limited to 32 bits, a user program can only ever access 32 bits, or 4 Gbytes, of the address space at one time. Systems may place further limits on the amount of address space a user program can access. Because user programs do not use physical addresses, no change to a user program is required to run on a system with 36-bit physical addressing.
U-Boot must specify a memory map that details the allocation of the 36-bit physical address space. On most of the 32-bit PowerPC configurations, U-Boot utilizes one-to-one mappings for the address space; that is, the effective address and the physical address are always equal.

This document explains it better then I can - https://www.nxp.com/docs/en/application-note/AN4064.pdf
I only have 4GB ram, not more than 4GB. Question is the starting of RAM is 0x1 0000 0000.
I read the doc you recommended before I post my question on this forum. In the doc, the RAM starting address is below 4GB.
 

Staff online

Members online


Latest posts

Top