@CaseySJ Any input as to what 4G Encoding is is needed for? Thanks.
Above 4G Decoding (not Encoding) requires a little background explanation first...
Every PCIe device that is preinstalled on the motherboard or plugged into a PCIe slot needs to be controllable by the CPU. The CPU needs to be able to (a) change the many states or parameters of the device, (b) get current status of the many states or parameters of the device, (c) initialize and power down the device, (d) get the device ID and vendor ID and lots of other device information, and (e) set/get large buffers of data to/from the device.
These and other functions are possible because each PCIe device “maps” all the necessary “control registers” and “buffers” to certain addresses in your DRAM modules. This is known as “memory mapping”.
As an example, a PCIe device might map a 32-bit control register to memory addresses 0x00000000 to 0x00000003 (4 bytes = 32 bits). Each of the 32 bits in the register can be read or written. And each read or write will perform an operation on the device. Normally, each read and write to a memory address simply reads and writes data to a memory location on the DRAM module. But in this case, memory addresses 0x00000000 through 0x00000003 are hijacked for another purpose. They no longer store data in DRAM. Instead, those 32 bits are redirected to the PCIe card, and it is the PCIe card that determines what happens when bits in that range are read and written.
And that, in a nutshell, is how the CPU controls PCIe devices. You might think that all of your memory is used as memory, but in fact many chunks of it are never used as memory. Instead, those chunks are used to control PCIe devices.
Historically we have had 32-bit CPUs and hence a limit of 4GB of memory. A 32-bit CPU cannot directly address more than 2 raised to the 32 power or 4GB of memory. There were clever ways of bypassing this limit through various virtualization techniques, but the fact remained that the limit of each contiguous chunk was 4GB.
And typically the first 1MB of that space was allocated for memory mapping. Not necessarily the entire 1MB, but sections of the first 1MB.
But when we start adding more and more PCIe devices, particularly two or more GPUs such as for crypto mining, we quickly run out of space in the first 1MB.
And so we enable “Above 4G Decoding”.
Now memory addresses above the historical 32-bit or 4GB limit can be used to map PCIe devices. And this in turn allows more devices to be attached.
Some devices require relatively large memory buffers (I/O buffers) and therefore take up more than their fair share of the memory map region. So enabling Above 4G Decoding is particularly necessary for such device types, particularly GPUs.