EnableGop - Ausdauersportler/IMAC-EFI-BOOT-SCREEN GitHub Wiki

You may have noticed neither this repository nor the OC development and surely not the world is spinning around the needs of MacPro users. So you need the ability of abstraction - all AMD vBIOS versions are build following the same rules and modding an iMac MXM card AMD vBIOS follows the very same recipe as modding an PC card vBIOS. You need to start with the vBIOS found on the card. I has to be a GOP vBIOS.

Recently Mike Beaton developed an EFI driver named EnableGop based on OpenCore code. Initially it was planned to include this driver into MacPro5,1 firmware, but it turned out to be much more easy and user friendly to include the driver into the vBIOS itself and so we convinced him to spend some more time on adjusting this driver to work in iMacs, too.

This driver will enable the native boot picker when pressing the ALT/OPTION key.

Any additional driver added to the vBIOS - regardless how small it may be - can always collide with the 128k limit (AMD vBIOS, only). In general the legacy vBIOS and the UEFI2 GOP driver are roughly of 64K size each, there is not much space left.

To overcome this limitation Internetzel developed a method to strip the (ancient und unused) VGA part out of the legacy vBIOS saving approximately 30-40K of space, enough to add either the CoreEG2 and EDIDParser modules to realize an Apple EG2 based EFI vBIOS or the newly developed much smaller EnableGop driver.

The new EnableGop.efi driver needs to be compressed in the same way as the other modules using the Efirom tool (assuming here we have the W5170M with device-id 0x6820):

./EfiRom -ec EnableGop.efi -l 0x30000 -f 0x1002 -i 0x6820 -p -o EnableGop-2820_.rom

This rom fragment has to be included right in between legacy and GOP part. EfiRom automatically add some padding bytes to create a resulting file with a size of a multiple of 512 byte (needed for alignment).

The manual process using the Hex Fiend editor would be

  1. Create the EnableGop-XXXX_.rom file for your particular AMD device-ID
  2. Open this file in Hex editor Hex Fiend using the TCL template published here. You will find the so called Last Image Indicator marked with this template. It has the value of 0x80 - change it to 0x00 - this step is important since the EnableGop module will be located in between the legacy and GOP part, so it is not the last image and should not be marked as the last image available.
  3. Open the iMac enabled GOP vBIOS (OBJ_INFO adjusted to recognized the main LCD as an internal display) in Hex editor (second file)
  4. Copy manually the GOP from this file including the 0xFF padding bytes and insert it into the first file behind the EnableGop part. If you cannot identify which padding bytes need to be added just to some basic math: The Image Size of the GOP part given times 512 is the number of bytes to be copied. The GOP part start with bytes AA55 - every valid AMD video BIOS fragment starts with these values and it is called ROM signature. How to find this spot in the large file? Use the left pane and search for Rom Signature of the GOP part and click with the curser onto it, the file contents will move on to the very same location. The first part is the legacy part, the second the GOP.

Now you have a modified first file containing both EnableGop and GOP glued together. If you check the Last Image Indicator values you may notice the GOP part still has the value of 0x80. This is correct since it is the last image.

  1. Change the mode in the original iMac GOP vBIOS (second file) to overwrite
  2. Copy the complete EnableGop+GOP contents from the first file to overwrite the GOP within the second file

You simply need to copy (command+C) the contents of the first file and move the cursor to the beginning of the GOP part in the second file and insert (command+V) - it will overwrite.

Why this complex process? Some vBIOS versions (RX5500XT, S7100X, RX480, WX7100 and others) have data at fixed addresses after the first 0x20000 bytes. You cannot simply move these contents by inserting more drivers into the first 0x20000 bytes without breaking the functionality of the vBIOS at all. Inserting some data in the beginning and deleting some bytes at the very end would not work. We need to make sure all changes happen within the first 128k, only! Therefore copying this first 0x20000 bytes out and do the changes on the copy has proven to be less error prone.

Although this driver was created using OpenCore code you do not need to use OpenCore after flashing a PC (MXM or PC) card with a modified vBIOS. You can still run supported macOS versions natively or boot Windows installed in legacy mode.

We tested meanwhile every AMD MXM card available and listed on this page and five different MacPro5,1 cards (RX560, RX570, RX580, RX590 and Vega). All cards worked from the start without any issues.