Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
There is an ARM part in that ROM which I don’t see the need for. Is eliminating that part going to help?
According to my DumpPCIRom.sh script, your ROM has three images:
- BIOS (44032 bytes)
- EFI X64 (38400 bytes compressed)
- EFI ARM 64-bit (39936 bytes compressed)
A GPU for a Power Mac or other Open Firmware system would include an Open Firmware image.

I think the BIOS image includes some stuff in the header so it shouldn't be removed.

To remove the EFI ARM image, you can probably just change the Indicator at 0xAC31 from 00 to 80.

Code:
\        00000000:                              PCI magic number (55AA): 55AA
\        00000002:                            Image Length in 512 bytes: 56 (* 0x200 = 0xAC00)
\        00000003:               Entry point for INIT function (Legacy): E9 06250000 00000000 00000000 00000000 00000000  ..%..................
\        00000018:               Pointer to start of PCI Data Structure: 036C
\        0000001A:                                            Pad bytes: 0000
\                                             Variable length pad bytes:
\        0000001c: 00004942 4D7E42A0 00000000 00000000 00000004 20373631 32393535 32300000  ..IBM~B............. 761295520..
\        0000003c: 00000000 00000000 00000000 40030000 00000000 31312F30 342F3230 2032323A  ............@.......11/04/20 22:
\        0000005c: 30330000 32000000 E9F92500 E9032600 00001002 09000000 01024000 00C0BF73  03..2.....%...&...........@....s
\        0000007c: 00000000 6E006400 90010000 5F007206 D007E40C 7C990500 00000000 00000000  ....n.d....._.r.....|...........
\        0000009c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  ................................
\        000000bc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  ................................
\        000000dc: 00000000 00000000 00000000 00000000 00000000 00000000 07000000 00000000  ................................
\        000000fc: 16003403 0FFC4001 00000000 08000800 088041CC F32842CD A31080E8 0D7EE378  ..4...@...........A..(B......~.x
\        0000011c: CEFFFF00 00000000 00207EC5 FF010000 00800510 0090F53B 87B26A3A 473AC700  ......... ~............;..j:G:..
\        0000013c: 0000003F 00AE7353 05800F08 2104FF3C 00C02202 0242C701 65D5740E 81E0810A  ...?..sS....!..<.."..B..e.t.....
\        0000015c: 001E9008 F03EA768 24002100 21002100 0100C002 50029101 02001880 01400606  .....>.h$.!.!.!.....P........@..
\        0000017c: 1E110752 80180C0E 12000000 0EF00200 00000800 80010600 08401810 30000000  ...R.....................@..0...
\        0000019c: 20000000 04000000 1C040000 C8000000 30000000 0000F808 40000000 00000004   ...............0.......@.......
\        000001bc: 00000000 1C320008 40E83800 00000000 00000000 00000000 000000E4 27094010  .....2..@.8.................'.@.
\        000001dc: 18006400 000000C0 98070000 40FA01A0 00240000 00801090 01180000 08008081  ..d.........@....$..............
\        000001fc: 470100F0 A11F1130 00000000 02FCCE81 8E830004 3131332D 44343132 30313030  G......0............113-D4120100
\        0000021c: 2D313030 004E4156 49323100 5043495F 45585052 45535300 47444452 36000D0A  -100.NAVI21.PCI_EXPRESS.GDDR6...
\        0000023c: 4E415649 32312047 616D696E 67205854 58204434 31322020 20202020 20202020  NAVI21 Gaming XTX D412          
\        0000025c: 20202020 20202020 20202020 20202020 20202020 20202020 20202020 20202020                                  
\        0000027c: 20202020 20202020 20202020 0D0A000D 0A200D0A 00284329 20313938 382D3230              ..... ...(C) 1988-20
\        0000029c: 32302C20 41647661 6E636564 204D6963 726F2044 65766963 65732C20 496E632E  20, Advanced Micro Devices, Inc.
\        000002bc: 0041544F 4D42494F 53424B2D 414D4420 56455230 32302E30 30312E30 30302E30  .ATOMBIOSBK-AMD VER020.001.000.0
\        000002dc: 34332E30 31353932 39004434 31323031 30302E31 30300032 31393632 36342000  43.015929.D4120100.100.2196264 .
\        000002fc: 35333836 32382020 00202020 20202020 2000414D 445F4E41 56493231 5F443431  538628  .        .AMD_NAVI21_D41
\        0000031c: 32303130 305F5854 585F4130 5F474444 52365F31 3647425C 636F6E66 69672E68  20100_XTX_A0_GDDR6_16GB\config.h
\        0000033c: 00000090 2C000203 41544F4D 00C00B26 E6029103 3A023E26 00000000 02103A0E  ....,...ATOM...&....:.>&......:.
\        0000035c: 6C038EA3 C4030000 080B0000 00000300                                      l...............
\                   PCI Data Structure (4 byte aligned)
\        0000036C:                              Signature string (PCIR): PCIR
\        00000370:                         Vendor ID = config reg 00/01: 1002
\        00000372:                         Device ID = config reg 02/03: 73BF
\        00000374:                        Pointer to Vital Product Data: 0000
\        00000376:                            PCI Data Structure length: 0018
\        00000378:                          PCI Data Structure revision: 00 = PCI 2.2
\        00000379:                     Class Code = config reg 09/0a/0b: 030000 (Class code / Subclass code / Programming interface code)
\        0000037C:                            Image Length in 512 bytes: 0056 (* 0x200 = 0xAC00)
\        0000037E:                          Revision Level of Code/Data: 1401
\        00000380:                                            Code Type: 00 = BIOS
\        00000381:                                            Indicator: 00 = another image
\        00000382:                                             Reserved: 0000

\                   PCI expansion PROM header
\        0000AC00:                              PCI magic number (55AA): 55AA
\        0000AC02:                 EFI initialization size in 512 bytes: 004B (* 0x200 = 0x9600)
\        0000AC04:                             EFI Signature (00000EF1): 00000EF1
\        0000AC08:                                        EFI subsystem: 000B = EFI Boot Service Driver
\        0000AC0A:                                     EFI machine type: 8664 = X64
\        0000AC0C:                                 EFI compression type: 0001 = Compressed
\        0000AC0E:                      EFI reserved (0000000000000000): 0000000000000000
\        0000AC16:                                  EFI offset to image: 0064
\        0000AC18:               Pointer to start of PCI Data Structure: 001C
\        0000AC1A:                                            Pad bytes: 0000
\                   PCI Data Structure (4 byte aligned)
\        0000AC1C:                              Signature string (PCIR): PCIR
\        0000AC20:                         Vendor ID = config reg 00/01: 1002
\        0000AC22:                         Device ID = config reg 02/03: 73BF
\        0000AC24:                        Pointer to Vital Product Data: 0000
\        0000AC26:                            PCI Data Structure length: 0018
\        0000AC28:                          PCI Data Structure revision: 00 = PCI 2.2
\        0000AC29:                     Class Code = config reg 09/0a/0b: 030000 (Class code / Subclass code / Programming interface code)
\        0000AC2C:                            Image Length in 512 bytes: 004B (* 0x200 = 0x9600)
\        0000AC2E:                          Revision Level of Code/Data: 0000
\        0000AC30:                                            Code Type: 03 = EFI
\        0000AC31:                                            Indicator: 00 = another image
\        0000AC32:                                             Reserved: 0000

\                   PCI expansion PROM header
\        00014200:                              PCI magic number (55AA): 55AA
\        00014202:                 EFI initialization size in 512 bytes: 004E (* 0x200 = 0x9C00)
\        00014204:                             EFI Signature (00000EF1): 00000EF1
\        00014208:                                        EFI subsystem: 000B = EFI Boot Service Driver
\        0001420A:                                     EFI machine type: AA64 = ARM 64-bit
\        0001420C:                                 EFI compression type: 0001 = Compressed
\        0001420E:                      EFI reserved (0000000000000000): 0000000000000000
\        00014216:                                  EFI offset to image: 0064
\        00014218:               Pointer to start of PCI Data Structure: 001C
\        0001421A:                                            Pad bytes: 0000
\                   PCI Data Structure (4 byte aligned)
\        0001421C:                              Signature string (PCIR): PCIR
\        00014220:                         Vendor ID = config reg 00/01: 1002
\        00014222:                         Device ID = config reg 02/03: 73BF
\        00014224:                        Pointer to Vital Product Data: 0000
\        00014226:                            PCI Data Structure length: 0018
\        00014228:                          PCI Data Structure revision: 00 = PCI 2.2
\        00014229:                     Class Code = config reg 09/0a/0b: 000000 (Class code / Subclass code / Programming interface code)
\        0001422C:                            Image Length in 512 bytes: 004E (* 0x200 = 0x9C00)
\        0001422E:                          Revision Level of Code/Data: 0000
\        00014230:                                            Code Type: 03 = EFI
\        00014231:                                            Indicator: 80 = last image
\        00014232:                                             Reserved: 0000
 
  • Like
Reactions: Bmju and startergo
To remove the EFI ARM image, you can probably just change the Indicator at 0xAC31 from 00 to 80.
So, this will set the image as a last image and everything after that will be ignored?
Also what will happen if I reset back the 80 to 0 after patching?
 
Can you elaborate please? There are many files in that directory?
View attachment 2181186
I wasn't at Mac to remind myself, but it is indeed the highlighted one. insert_fixed.rom is the same size, and almost the same thing. In terms of how much space is free now, you need to look inside the original rom. Hex Fiend is great for this, and there is already a pci option rom template for it. I'm pretty sure this is the one: https://gist.github.com/al3xtjames/b58f22f12bd4952e08c9f30195cc8de6 (again not at Mac to double check).
 
To remove the EFI ARM image, you can probably just change the Indicator at 0xAC31 from 00 to 80.
@joevt @startergo See my previous https://forums.macrumors.com/thread...-era-imacs-and-mac-pros.2378942/post-32066081 - because my script (currently) checks for overflow by seeing if non-padding (not 0xffffffff or 0x00000000) bytes reach the end of the 128k area, you will unfortunately also need to blank out (set to 0xffffffff preferably or 0x00000000 less preferably) the area of the removed rom.
 
  • Like
Reactions: startergo
I can't find it in gists is it located somewhere else?
It look like they are here?
Yes, that's it. It's mostly for dealing with Open Firmware ROMs - it can convert fcode to Forth using detok and ConvertFCodeTokensToForth.pl which are also included. For BIOS and EFI images, you only get a hex dump.

For hex editing, I would use xxd to get the hex dump and xxd -r to convert hex dump to binary. Edit the hex dump in BBEdit.app or Xcode.app. Then xxd the result and compare to make sure your changes came through.

Note that PCI rom images exist on 512 byte boundaries. The last image in your rom starts at 00014200 and ends before 0001de00. Text editors like BBEdit.app and Xcode.app allow you to select a rectangular block of text using the Option key. You can paste a single line of text ffff ffff ffff ffff ffff ffff ffff ffff ................ and it will replace all the selected lines of text in the block selection with that line.

Your ROM image is 1MB but only the first 128K is used. I think you can delete everything beyond 00020000.

UPDATE: Moved JoesOpenBIOSStuff to OpenBIOSStuff on GitHub.
 
Last edited:
*** EnableGop 1.2 with GopBurstMode is now in pre-release ***

See the first few posts in this thread for how to obtain it before the OpenCore 0.9.1 release date.

A corresponding GopBurstMode quirk is new in OpenCore. It turns out Apple missed a trick - Intel processors of this era include a burst-mode cache setting which makes graphics operations noticeably faster, but Apple never turned it on in pre-boot EFI GOP.

Enabling this feature provides considerably faster GOP rendering on all EnableGopDirect (and OpenCore DirectGopRendering) systems; and should provide rendering speeds at least the same as before, and on some systems noticeably faster, on other supported systems. The GopBurstMode quirk itself is safe to use on newer systems - it detects whether burst-mode caching is already enabled, and if so does nothing - and on older systems - it recognises that it is not supported and does nothing - but it seems to be supported but not enabled by the BIOS on all EFI-era Mac Pros and iMacs.

The compressed driver for version 1.2 is slightly (1KB, 0x400 bytes) larger than version 1.1, so for AMD vBIOSes which are tight on space version 1.1 may be used instead to avoid the need to do VGA stripping to free up additional space.

Version 1.2 flashed on two 5,1s here and both working fine. One is OLCP and other in non-OC with both running RX580s.
 
  • Like
Reactions: Bmju
Yes, that's it. It's mostly for dealing with Open Firmware ROMs - it can convert fcode to Forth using detok and ConvertFCodeTokensToForth.pl which are also included. For BIOS and EFI images, you only get a hex dump.

For hex editing, I would use xxd to get the hex dump and xxd -r to convert hex dump to binary. Edit the hex dump in BBEdit.app or Xcode.app. Then xxd the result and compare to make sure your changes came through.

Note that PCI rom images exist on 512 byte boundaries. The last image in your rom starts at 00014200 and ends before 0001de00. Text editors like BBEdit.app and Xcode.app allow you to select a rectangular block of text using the Option key. You can paste a single line of text ffff ffff ffff ffff ffff ffff ffff ffff ................ and it will replace all the selected lines of text in the block selection with that line.

Your ROM image is 1MB but only the first 128K is used. I think you can delete everything beyond 00020000.
How did you produce detailed info with the script?
Code:
DumpPCIRom.sh log:

# Working Path: /Users/x299/MyTools
# Script Name: ./DumpPCIRom.sh
# Script Path: .
### Error in parameter list
### Usage - DumpPCIRom.sh [-v|-l|-e part|-ea part] romfile > output 2> messages
#
#         -v        output fcode numbers for all tokens
#         -l        list PCI option rom parts
#         -e part   extract part as an only image
#         -ea part  extract part as not an only image
I only get this:

Code:
./DumpPCIRom.sh -v -l RX6900XT_patched.rom
========================
DumpPCIRom.sh log:

# Working Path: /Users/x299/MyTools
# Script Name: ./DumpPCIRom.sh
# Script Path: .
# TempFolder: /tmp/DumpPCIRom.ms6zmW
# Doing part: 0
# Got PCI Header
# start:0 offset:384
# part:0 type:"BIOS" indicator:"another image" offset:0 size:ac00
# Doing part: 1
# Got PCI Header
# start:ac00 offset:ac34
# part:1 type:"EFI" indicator:"another image" offset:ac00 size:9600
# Doing part: 2
# Got PCI Header
# start:14200 offset:14234
# part:2 type:"EFI" indicator:"last image" offset:14200 size:9c00
# Doing part: 3
# No PCI Header
# start:1de00 offset:0
# part:3 type:"Open Firmware" indicator:"last image" offset:1de00 size:100000
 
Last edited:
It seems you misunderstand how OpenCore works, that’s why you believe it never work.

By holding Option key to boot, you are actually commanding the 5,1 to use the natively Apple boot manager, but don’t let it boot to OpenCore. Then of course OpenCore won’t work. You asked the cMP to NOT to boot OpenCore.

For OpenCore core boot picker to show up. You need to have a graph card that has working UEFI GOP, but not Metal. Metal is OS level API, can’t do anything to provide boot screen.

If you use a “known good” OpenCore EFI folder, but stop can’t see the boot picker. Then there are few possible reasons.

1) Your RX580 was flashed for mining etc. Therefore, the GOP part is now broken. In this case, you can re-flash it with another known good factory ROM.

2) The card never flashed, but with a factory ROM which has no GOP to work on cMP. This happen occasionally, usually on the card that has dual ROM. If your card has dual ROM, try to boot from another ROM. If that’s a single ROM card, then you have to flash it.

3) Your monitor has a very long wake up time. E.g. it takes more than 10s to wake up, therefore, you can’t see the boot picker before time out, but straight to the Apple loading screen. You can check the OC config, increase timeout value (e.g. 30s). Then you may able to see the boot picker.

4) The port you are using cannot display the GOP boot screen. But another port actually works.

5) You programmed OpenCore config to not show boot picker by default. In this case, you should hold Esc key to call the boot picker, but not Option key.

Anyway, the EnableGop tool in this thread is actually able to fix that “Option boot” issue.

You can follow the instruction to create a Mac Pro BootROM with EnableGop injected. Then once you flashed the cMP with this new ROM, you will able to hold Option key to boot (with almost any modern graphic card that can utilise UEFI GOP). However, the logic still the same, when you hold Option key to boot, you are using the native Apple boot manger, not OpenCore boot picker.
Thank you very much fellow, I am job to next weekend to try again with your whole and essential explanation. (my rx580 hasn't switch however I don't know if has two .rom (I am afraid not, but I used 5,1 (2010) MX25L3205D/MX25L3208D from for flashed (it's meaning two .rom?). Regards other points, so I'll check them again. See you and again, thk!
 
Last edited:
Your ROM image is 1MB but only the first 128K is used. I think you can delete everything beyond 00020000.
You should avoid deleting non-blank parts of a ROM. Use hexdump -C as a convenient way to see which parts of a ROM have data. This ROM has data at 0x30000. You need to preserve everything above 0x20000 unchanged and unmoved, when you change or move parts below 0x20000. (Unless the part above 0x20000 is completely blank, in which case it doesn't matter, but that's not true in this case.) It is true that other parts of the system don't (normally) see this data, but the GPU itself can and does use it.
 
Last edited:
Thank you very much fellow, I am job to next weekend to try again with your whole and essential explanation. (my rx580 hasn't switch however I don't know if has two .rom (I am afraid not, but I used 5,1 (2010) MX25L3205D/MX25L3208D from for flashed (it's meaning two .rom?). Regards other points, so I'll check them again. See you and again, thk!
Not two ROMS. Just the method for flashing is the same for both chips.
 
How did you produce detailed info with the script?
Code:
DumpPCIRom.sh log:

# Working Path: /Users/x299/MyTools
# Script Name: ./DumpPCIRom.sh
# Script Path: .
### Error in parameter list
### Usage - DumpPCIRom.sh [-v|-l|-e part|-ea part] romfile > output 2> messages
#
#         -v        output fcode numbers for all tokens
#         -l        list PCI option rom parts
#         -e part   extract part as an only image
#         -ea part  extract part as not an only image
I only get this:

Code:
./DumpPCIRom.sh -v -l RX6900XT_patched.rom
========================
DumpPCIRom.sh log:
You don't need -v fcode numbers since that's only for Open Firmware images.
-l is for listing the parts. It will list the stuff beyond the last image as an Open Firmware image. Ignore that.
The script outputs the main dump to stdout and logging stuff to stderr (it could contain errors). I always pipe stdout and stderr to separate files like this:
Code:
DumpPCIRom=/Volumes/Updates/Docs/Open_Firmware_and_Forth/OpenBIOS/JoesOpenBIOSStuff/macOS/DumpPCIRom.sh
sh "$DumpPCIRom" RX6900XT_patched.rom > RX6900XT_patched.txt 2> RX6900XT_patched_log.txt
sh "$DumpPCIRom" -l RX6900XT_patched.rom > RX6900XT_patched_list.txt 2> RX6900XT_patched_list_log.txt
 
  • Like
Reactions: startergo
You don't need -v fcode numbers since that's only for Open Firmware images.
-l is for listing the parts. It will list the stuff beyond the last image as an Open Firmware image. Ignore that.
The script outputs the main dump to stdout and logging stuff to stderr (it could contain errors). I always pipe stdout and stderr to separate files like this:
Code:
DumpPCIRom=/Volumes/Updates/Docs/Open_Firmware_and_Forth/OpenBIOS/JoesOpenBIOSStuff/macOS/DumpPCIRom.sh
sh "$DumpPCIRom" RX6900XT_patched.rom > RX6900XT_patched.txt 2> RX6900XT_patched_log.txt
sh "$DumpPCIRom" -l RX6900XT_patched.rom > RX6900XT_patched_list.txt 2> RX6900XT_patched_list_log.txt
Ok. So the detailed result is in RX6900XT_patched.txt. Thanks.
 
You don't need -v fcode numbers since that's only for Open Firmware images.
-l is for listing the parts. It will list the stuff beyond the last image as an Open Firmware image. Ignore that.
The script outputs the main dump to stdout and logging stuff to stderr (it could contain errors). I always pipe stdout and stderr to separate files like this:
Code:
DumpPCIRom=/Volumes/Updates/Docs/Open_Firmware_and_Forth/OpenBIOS/JoesOpenBIOSStuff/macOS/DumpPCIRom.sh
sh "$DumpPCIRom" RX6900XT_patched.rom > RX6900XT_patched.txt 2> RX6900XT_patched_log.txt
sh "$DumpPCIRom" -l RX6900XT_patched.rom > RX6900XT_patched_list.txt 2> RX6900XT_patched_list_log.txt
Your script probably identifies incorrectly the last part as OpenFirmware:
Code:
# part:0 type:"BIOS" indicator:"another image" offset:0 size:ac00
# part:1 type:"EFI" indicator:"another image" offset:ac00 size:3600
# part:2 type:"EFI" indicator:"last image" offset:e200 size:9600
# part:3 type:"Open Firmware" indicator:"last image" offset:17800 size:100000
 

Attachments

  • RX6900XT_patched_cut_EnableGop.rom.zip
    403.1 KB · Views: 96
Last edited:
Your script probably identifies incorrectly the last part as OpenFirmware:
Code:
# part:0 type:"BIOS" indicator:"another image" offset:0 size:ac00
# part:1 type:"EFI" indicator:"another image" offset:ac00 size:3600
# part:2 type:"EFI" indicator:"last image" offset:e200 size:9600
# part:3 type:"Open Firmware" indicator:"last image" offset:17800 size:100000
Right. part 3 is not a PCI option rom image. It's just the stuff that exists after the last PCI option rom image. It's listed so that you can extract it separately.
 
You should avoid deleting non-blank parts of a ROM. Use hexdump -C as a convenient way to see which parts of a ROM have data. This ROM has data at 0x30000. You need to preserve everything above 0x20000 unchanged and unmoved, when you change or move parts below 0x20000. (Unless the part above 0x20000 is completely blank, in which case it doesn't matter, but that's not true in this case.) It is true that other parts of the system don't (normally) see this data, but the GPU itself can and does use it.
I have set the indicator to 80 and deleted the last image and falshed it to the card, but there is no output to the monitor.
Code:
Detecting AMD GPU/APU. Please wait...

Adapter 1 (0x0000:24:00.0)
    ASIC Family                   Navi21
    Flash Type                    GD25Q80C
    Product Name                  NAVI21 Gaming XTX D412
    Bios Config File              D4120100.100
    Bios P/N                      113-D4120100-100
    Bios Version                  020.001.000.043.015929
    Bios Date                     11/04/20 22:03

Image 0 -- Offset 0x0000
__________________
  ROM header contents:
    Signature                     0xaa55
    PCIR Offset                   0x036c
  PCI Data Structure:
    Signature                     PCIR☻
    Vendor ID                     0x1002
    Device ID                     0x73bf
    PCI Revision                  0x00
    Image Size                    0xac00
    Code Revision                 0x1401
    Indicator                     0x00     (Not Last Image)
    Code Type                     0x00     (Intel IA-32, PC-AT compatible)
    Legacy BIOS File Name         D4120100.100
    Legacy BIOS Part Number       113-D4120100-100
    Legacy BIOS Build Number      538628
    Legacy BIOS Change List       2196264
    Binary BIOS Identifier (IDTF) 0x7e18e229

Image 1 -- Offset 0xac00
__________________
    Signature                     0xaa55
    PCIR Offset                   0x001c
  PCI Data Structure:
    Signature                     PCIR☻
    Vendor ID                     0x1002
    Device ID                     0x73bf
    PCI Revision                  0x00
    Image Size                    0x9600
    Code Revision                 0x0000
    Indicator                     0x80     (Last Image)
    Code Type                     0x03     (EFI)
    Image Size                    0x00000ef1
    Compression Type              0x80     (Compressed)
    MachineType                   0x8664   (X64 Machine Type)
    Subsystem                     0x0b     (EFI Boot Service Driver)
    EFI Image Offset              0x64     (abs: 0xac64)
  UEFI IDs from EFI_PCI_EXPANSION_ROM_HEADER
    UEFI Source Revision          GOP AMD REV: 000.000.000.020.001
    UEFI Source Change List       2196264
    UEFI BIOS Build Number        538628
  GOP Driver Info:
    Machine Type Code             0x8664   (AMD64 (K8))
    Authenticode Signed           true
    GOP Image Size                0xdd40   (55KB)
    Driver Name                   AMD GOP X64 Release Driver Rev.3.0.0.Sep  6 2020.22:12:31
    UEFI Major Revision           0x03
    UEFI Minor Revision           0x00
    UEFI Fix Revision             0x00
    Legacy Major Version          0x00
    Legacy Minor Version          0x00
    GOP AMD Build
    GOP AMD CL
    GOP BIOS Identifier (IDTF)    0xdeadbeef
    Driver Carries legacy tables  false
This is without any GOP upgrade.
 

Attachments

  • RX6900XT_patched - Copy.zip
    388.5 KB · Views: 124
Upgraded the GOP on the reconstructed vbios and tried to flash the vbios, but it comes with an error:
Code:
C:\Users\G5\Downloads\amdvbflash_win_5.0.567>amdvbflash.exe -p 1 "C:\Users\G5\Downloads\amdvbflash_win_5.0.567\RX6900XT_patched_GOP.rom"
AMD IFWI Flasher Tool Version 5.0.567.0-External. Copyright© 2020-2022 Advanced Micro Devices, Inc. All rights reserved.

Detecting AMD GPU/APU. Please wait...
Failed to flash the VBIOS.

C:\Users\G5\Downloads\amdvbflash_win_5.0.567>amdvbflash.exe -fp -p 1 "C:\Users\G5\Downloads\amdvbflash_win_5.0.567\RX6900XT_patched_GOP.rom"
AMD IFWI Flasher Tool Version 5.0.567.0-External. Copyright© 2020-2022 Advanced Micro Devices, Inc. All rights reserved.

Detecting AMD GPU/APU. Please wait...
Failed to flash the VBIOS.
 

Attachments

  • RX6900XT_patched_GOP.zip
    425.4 KB · Views: 89
Ok, so I was able to flash the patched 6900XT vbios.
I deleted the last GOP image with a starting offset of 14200 (filled the image with FFFF using Synalyze It! Pro.
Then I created test folder:
./vBiosInsert.sh -a -t test "RX6900XT_patched.rom" EnableGop.efi RX6900XT_patched_GOP.rom
After that I opened insert.rom in the test folder using Synalyze It! Pro and copied the bytes then I just pasted them at offset 14200 where I previously filled FFFF.
Flashed the vbios using amdvbflashWin version AMDVBFlash / ATI ATIFlash 3.31.
I can output video to the monitor on my PC. In a couple of days I will test it in a cMP5.1.
 

Attachments

  • RX6900XT_patched_GOP1.rom.zip
    426.8 KB · Views: 135
Ok, so I was able to flash the patched 6900XT vbios.
I deleted the last GOP image with a starting offset of 14200 (filled the image with FFFF using Synalyze It! Pro.
Then I created test folder:
./vBiosInsert.sh -a -t test "RX6900XT_patched.rom" EnableGop.efi RX6900XT_patched_GOP.rom
After that I opened insert.rom in the test folder using Synalyze It! Pro and copied the bytes then I just pasted them at offset 14200 where I previously filled FFFF.
Flashed the vbios using amdvbflashWin version AMDVBFlash / ATI ATIFlash 3.31.
I can output video to the monitor on my PC. In a couple of days I will test it in a cMP5.1.
Why not just use RX6900XT_patched_GOP.rom the output from running the script, though?

After deleting the second EFI, you would need to switch the byte at offset 0x31 within the remaining EFI from 0x00 to 0x80 to make the file valid (it should then work as is, if you flash it; and for that matter should look valid to the various tools you've gathered), and then the script should also complete fine.
 
Why not just use RX6900XT_patched_GOP.rom the output from running the script, though?

After deleting the second EFI, you would need to switch the byte at offset 0x31 within the remaining EFI from 0x00 to 0x80 to make the file valid (it should then work as is, if you flash it; and for that matter should look valid to the various tools you've gathered), and then the script should also complete fine.
The last image (GOP Update) starts at 14200. 14231 is set to 80. Am I missing something?
Code:
Adapter  1 (BN=24, DN=00, FN=00, PCIID=00001002, SSID=00000E3A)
    Asic Family     :  Navi21         
    Flash Type         :  GD25Q80C    ( 0 KB)
    Product Name is :    NAVI21 Gaming XTX D412
    Bios Config File:  D4120100.100   
    Bios P/N is     :    113-D4120100-100
    Bios Version    :    020.001.000.043.015929
    Bios Date is    :    11/04/20 22:03   
Image 1 -- Offset 0x0
=======================
  ROM header contents:
    Signature              0xAA55
    PCIR offset            0x036C
  PCI Data Structure
    Signature              PCIR
    Vendor ID              0x1002
    Device ID              0x73BF
    PCI Revision           0x00
    Image size             0xAC00
    Code revision          0x1401
    Indicator              0x00   (Not last image)
    Code type              0x00   (PCAT Image)
  Legacy BIOS File Name    D4120100.100
  Legacy BIOS Part Number  113-D4120100-100
  Legacy BIOS Build Number 538628
  Legacy BIOS Change List  2196264
  Binary BIOS_IDTF         0x7E18E229
  ByteCheckSum             0
Image 2 -- Offset 0xAC00
=======================
  ROM header contents:
    Signature              0xAA55
    PCIR offset            0x001C
  PCI Data Structure
    Signature              PCIR
    Vendor ID              0x1002
    Device ID              0x73BF
    PCI Revision           0x00
    Image size             0x9600
    Code revision          0x0000
    Indicator              0x00   (Not last image)
    Code type              0x03   (EFI Image)
    EFI Signature          0x0EF1
    Compression Type       0x0001 (compressed)
    Machine type           0x8664 (X64)
    Subsystem              0x000B (EFI boot service driver)
    EFI image offset       0x0064 (abs: 0xAC64)
  Uefi Ids from EFI_PCI_EXPANSION_ROM_HEADER:
    UefiSourceRevision     GOP AMD REV: 000.000.000.020.001
    UefiSourceChangeList   2196264
    UefiBiosBuildNumber    538628

  Dump Gop Driver Info:
    Machine type code      X64
    The GOP Driver appears to be Authenticode signed.
    Size Of Gop Image      56640 (55 KB)
    GOP Driver Name: AMD GOP X64 Release Driver Rev.3.0.0.Sep  6 2020.22:12:31
    UEFI_MAJ_REV           3
    UEFI_MIN_REV           0
    UEFI_FIX_REV           0
    LEGACY_MAJ_VER         0
    LEGACY_MIN_VER         0
    GOP AMD_Build          2196
    GOP AMD_CL             1786616
    GOP BIOS_IDTF          0xDEADBEEF
    GOP Driver does n·L
WTì{
 
Ok, so I was able to flash the patched 6900XT vbios.
I deleted the last GOP image with a starting offset of 14200 (filled the image with FFFF using Synalyze It! Pro.
Then I created test folder:
./vBiosInsert.sh -a -t test "RX6900XT_patched.rom" EnableGop.efi RX6900XT_patched_GOP.rom
After that I opened insert.rom in the test folder using Synalyze It! Pro and copied the bytes then I just pasted them at offset 14200 where I previously filled FFFF.
Flashed the vbios using amdvbflashWin version AMDVBFlash / ATI ATIFlash 3.31.
I can output video to the monitor on my PC. In a couple of days I will test it in a cMP5.1.
Whatever you have created there, it is not a BIOS containing the EnableGop driver. You replaced the ARM GOP with a different driver of Image Size 75 I have never seen before and which will not be created by the scripts provided here, unless @Bmju did some magic during the last days.

The EnableGop driver is of Image Size about 24-27 depending on the version of OpenCore you are using.
 
Whatever you have created there, it is not a BIOS containing the EnableGop driver. You replaced the ARM GOP with a different driver of Image Size 75 I have never seen before and which will not be created by the scripts provided here, unless @Bmju did some magic during the last days.

The EnableGop driver is of Image Size about 24-27 depending on the version of OpenCore you are using.
I must have used the incorrect intermediate file (insert.rom). I was able to flash the vbios you created using the Win version amdvbflash_win_3.31. Will test it on Mac as soon as possible.
 

Attachments

  • RX6900XT_patched_EnableGop_cut.rom.zip
    403.1 KB · Views: 121
  • Like
Reactions: Ausdauersportler
Why not just use RX6900XT_patched_GOP.rom the output from running the script, though?

After deleting the second EFI, you would need to switch the byte at offset 0x31 within the remaining EFI from 0x00 to 0x80 to make the file valid (it should then work as is, if you flash it; and for that matter should look valid to the various tools you've gathered), and then the script should also complete fine.
This is what I did:
1. Deleted last image (filled with FFFF)
2. Set the AMD GOP as last image (80).
3.Used the script:
Code:
./vBiosInsert.sh -a -t test "RX6900XT_patched.rom" EnableGop.efi RX6900XT_patched_GOP.rom
Auto-detecting GOP offset...
Compressing EFI using EfiRom...
Combining...
Verifying (starting at 0xAC00)...
Found compressed EFI ROM start at 0x34
Input size: 1004492, Output size: 94208, Scratch size: 13376
SUCCESS.
Done.
 

Attachments

  • RX6900XT_patched_GOP.rom.zip
    426.7 KB · Views: 124
  • RX6900XT_patched_GOP.txt
    464.7 KB · Views: 218
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.