Page 1 of 1

How do I disable PAE in grub?

Posted: Mon Jun 01, 2020 2:23 pm
by mrjbom
Hi.
I use grub as a loader. I use it to read memory map.
I'm not going to use more than 4 GB because my core is running in protected mode. While reading memory_map, I get addresses that go beyond the 4 GB area, but in my memory management system everything is calculated for 4 GB.
I would like to make it so that if some memory area starts below 4 GB, but ends up higher, then its length is trimmed to 0xFFFFFFFF. If I disable PAE, will the memory area be truncated(length) over the line 4 GB?

Re: How do I disable PAE in grub?

Posted: Mon Jun 01, 2020 3:48 pm
by AndrewAPrice
Video cards and other hardware can be be memory mapped at high addresses. So, you might have 4GB of RAM, but a hole at the 3GB->4GB address range, pushing the last 1GB of RAM to the 4GB->5GB range. See https://wiki.osdev.org/Memory_Map_(x86)

So you can either:
- ignore the memory above 4GB
- work with PAE
- switch to long mode