-
-
Notifications
You must be signed in to change notification settings - Fork 24
DVMT Pre Alloc Stolen Memory Issues
Some OSes may have issues with the way the ROM allocates the total amount of Stolen Memory, also known as a DVMT Pre-Allocation. By default, the ROM will calculate this value based on the display characteristics to be the minimum amount it can be. However, if the OS or any application expects more for whatever reason, this could cause issues. These issues may include panics, bugs, and other situations as what likely would ocurr is that the system memory is being overwritten by display data. For example, if the ROM allocates 8MB, but the OS expects 60MB, there will be 52MB of RAM that the OS/Applications will use for whatever purpose while simultaneously allowing it to be used as display data.
TO fix this, you need to manually change this line of code from
UINTN MaxFbSize = ((x_active * 4 + 64) & -64) * y_active;
to
UINTN MaxFbSize = 67108864
(For 64MB)
The value is the size in Bytes(binary, not decimal). You can use this calculator: https://www.gbmb.org/mb-to-bytes
You will then need to manually compile.