Skip to content

Preboot EFI Utility to isolate defective memory regions, enabling macOS to boot reliably on Intel-based Macs with faulty RAM.

Notifications You must be signed in to change notification settings

0nelight/macOS-Disable-RAM-Areas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EFI Memory Patch Utility for macOS (Intel CPUs)

This utility disables defective memory regions on Intel-based Macs to prevent system crashes or kernel panics caused by faulty RAM. It is not compatible with Apple Silicon Macs.

Chances are high, you can resolve the following error when executing this utility (automatically) before each macOS Boot:

  • PPM002, PPM003, PPM004...: "There may be an issue with the onboard memory."

This tool fulfills the same purpose as the grub-badram command which disables RAM-Areas on Linux Systems.

Requirements

  • Intel-based Mac or MacBook
  • Diagnostic tool like Memtest86+ to identify faulty memory addresses
  • EFI boot manager like rEFInd

Usage

  1. Identify Faulty Memory: Run Memtest86+ in Error-Summary-Mode to note the lowest and highest addresses of defective RAM.
  2. Run Utility: Use rEFInd to execute this EFI utility before booting macOS. It marks faulty memory as unusable.
  3. Boot macOS: Start macOS normally.
  4. Verify: Check if memory is disabled by running:
    sysctl -a | grep mem | grep Unusable
    Expected output: machdep.memmap.Unusable: <size_of_disabled_area>
  5. Automate: Follow this guide to automate the process.

Alternative

Use OpenCore Legacy Patcher to configure defective RAM areas. Verify compatibility here.

Compatibility

Tested on:

  • MacBook Pro (Late 2013, macOS Big Sur)
  • MacBook Pro (2019, 16") (see, and here)
  • MacBook Pro (2020, macOS Sequoia) (see)
  • Additional success stories on the Issues page

Support

Disclaimer

This utility is not affiliated with Apple Inc. Use at your own risk. The author is not responsible for any outcomes or time invested. Provided as-is, without warranties, for personal use only. A swollen battery can deform components, cause shorts, or catch fire. Ensure your RAM issues are not due to battery swelling pressing on the logic board.

Some additonal Notes:

Screenshot-from refind (instead of grubx64.efi you can have your DISABLE-RAM.EFI utility there):

refind

The Place of this Utility within the Boot Process of a Mac:

grafik

Documentation of AllocatePages-Function:

Documentation of this function: gBS -> AllocatePages(2, 8, 40960, & Addr); efi-v1-10-specification.pdf Page: 119

More Information on Mac-Internals:

https://eclecticlight.co/mac-troubleshooting-summary/