Thanks to @BrianCArnold for identifying and fixing a critical bug that caused incorrect page size calculations.
The three Command Line Arguments are taken in from the Calling EFI-Application fe. rEFInd:
Lowest Error Address (as reported by memtest86+)
Highest Error Address (as reported by memtest86+)
Wait time in milliseconds before the program exits
You should put this code at the end of your refind.conf File - adjusting your folder-paths and the command line options:
menuentry "Disable RAM-Areas with args" {
icon /EFI/BOOT/icons/vol_efi.png
loader /EFI/tools/disable-ram-area.efi
options "0x300000000 0x309FFFF48 3000"
}
Follow the rEFInd Documentation of how to boot into rEFInd.
To get the Lowest & Highest Error Address from memtest86+ you have to change the #1 (comment) in memtest86+.