Page 1 of 2
#1 How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by drbob 10.01.2019 16:07

Hello,

Recent AMD GPUs have a hybrid ROM which contains two images: A legacy video BIOS (vBIOS) image and a compressed graphics output protocol (GOP) driver image. In theory this allows the card to work well on both legacy systems (which will use the vBIOS image) and more modern systems with a unified extensible firmware interface (UEFI) compatible pre-boot firmware architecture (which use the GOP driver).

However some early UEFI implementations cannot cope with the hybrid BIOS, they try to load the GOP driver and fail, hanging at boot with a blank screen. I have personally experienced this with an AMD RX480 and an Alienware Aurora R3 system (other examples: RX 480 incompatibility thread on reddit, R3 with an RX580, another R3 with an RX480)

It is a particular problem for branded systems with custom motherboards like many systems from HP, Dell, Lenovo etc that no longer receive BIOS updates from the manufacturer and have no options within the BIOS to force legacy mode boot when an EFI module is detected.

Some older video cards have a physical switch on them to swap between legacy and UEFI mode. The RX 480 however has no switch and exposes both the legacy and the GOP images to the pre boot firmware. I found that by modifying the firmware ROM for my GPU to mark the legacy image as the "last" image it would hide the GOP image and render the system bootable.

Here is what I did (cross posted from the AMD and Nvidia GOP update thread):

Zitat von drbob im Beitrag AMD and Nvidia GOP update (No requests, DIY)
I manually edited the BIOS ROM of my RX 480 to set the last image indicator byte to 0x80 in the PCIR header of the first (legacy) vbios image in the ROM. I found this table helpful in identifying the correct byte to set (byte offset 0x15 from the start of the PCIR header), as I found the image @lordkag posted at the top of this thread a bit confusing.

The biggest hassle was finding out how to fix the BIOS checksum. I modified a 0xFF byte in the padding at the end of the legacy image to 0x7F (0xFF-0x80=0x7F), thereby compensating for the 0x80 I had added to the total, to make the checksum for the entire legacy image match that of the original. There is probably a better way to do this, but I couldn't work out how the value at 0x21 related to the image checksum. On my RX480 the legacy image occupied offset 0x00 to 0xE5FF

After loading the modified image, my RX480 card no longer hangs at boot in my Alienware Aurora R3 and I can use it normally. Similar mods may well help others with poorly implemented EFI BIOS that can't cope with the GOP image on a stock radeon card.

I was expecting the modification to trigger the AMD driver vbios signature checks and necessitate use of the AMD/ATI Pixel Clock Patcher driver patch, but with Radeon 18.12.3 at least, this was not necessary.


To perform this fix you will need a system that will boot with the card you plan to modifiy (I had an older legacy BIOS only Q6600 system to hand). I downloaded the firmware of my GPU to a ROM file using atiwinflash (included with the command line too atiflash.exe, which would also work). I then used HxD to edit the ROM and verified that the ROM checksum matched that of the original BIOS with atiflash (atiflash.exe -cf <FILE> on both original and modified bios, or load the modified bios into atiwinflash without programming it to the card).

I programmed the modified BIOS to the GPU using atiflash.

IMPORTANT: If you plan to do this - backup your original BIOS first (make all edits to second copy) and be very careful you are modifying the correct bytes in the ROM, an error could easily brick your GPU.

NOTE: The offsets mentioned in the table I link above are from the start of the PCIR header. The actual location of this header will vary depending on your GPU rom, it won't start at 0x00. For example, in the ROM of my RX 480 the PCIR header of the legacy VBIOS image starts at offset 0x254 and the last image indicator byte which I modified from 0x00 to 0x80 is at offset 0x269 (0x254 + 0x15):


Below is an example showing how I modified ROM of my card at offset 0xE568 in the the padding at the end of the legacy vBIOS image to balance the checksum so it would match the checksum of the original BIOS. You can also see the start of the next image (the GOP UEFI driver) which begins at 0xE600:

ALSO NOTE: All the offsets and values mentioned above are in hexadecimal Don't attempt this unless you understand what that means and what a hex editor is.

EDIT: corrected hex range example for legacy image in my ROM.

#2 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by drbob 10.01.2019 16:32

Zitat von JanCerny im Beitrag AMD and Nvidia GOP update (No requests, DIY)
@drbob: Did you try Polaris BIOS editor (just do small mod like +1 MHz on core)? This utility will damge AMD EFI signature and card will no longer boot up in UEFI mode. You will also need AMD/ATI Pixel Clock Patcher for patching drivers..

I tried loading the ROM into Polaris editor (v 1.4) but it complained that the ROM was not 512kb (my card uses 256kb ROMs) and the values loaded made no sense. Polaris editor thought my card vendor id was 0x5249 when that is in fact the last two bytes of the PCIR signature, the other values also looked off (2000 Mhz is not the card's max frequency!) so I did not risk using it:



Also the method I detailed above resulted in a bios that did not require use of the ati pixel patcher, which for simplicity I would prefer not to have to use.

#3 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by MrGenius 15.01.2019 04:18

avatar

Like I said in reply to your post about this over on TPU, just delete the UEFI GOP module and be done with it. You seriously overcomplicated things by doing what you did. I'm glad it worked for you. But I wouldn't suggest anybody else waste their time with it.

#4 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by drbob 17.01.2019 13:55

Zitat von MrGenius im Beitrag #3
just delete the UEFI GOP module and be done with it.

I think that should work as well in most cases, though by deleting the GOP driver image without also setting the last image byte in the PCIR header of the vBIOS image you end up with a GPU firmware that doesn't meet the PCI specification (the last image should be marked as such according to the spec):

Zitat von PCI Firmware Specification
Revision 3.0, section 5.1

PCI device Expansion ROMs may contain code (executable or interpretive) for multiple processor
architectures. This may be implemented in a single physical ROM which can contain as many code
images as desired for different system and processor architectures (see Figure 5-1). Each image
must start on a 512-byte boundary and must contain the PCI Expansion ROM header. The starting
point of each image depends on the size of previous images. The last image in a ROM has a special
encoding in the header to identify it as the last image.



I imagine there may be some motherboard firmwares out there that may not like it if no image on the card is marked as last.

#5 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by sebulis 26.01.2019 15:06

Hello, would you please help me with my Asus RX 580 Dual Fan OC? I have an Asus Rampage II Extreme, and it simply won't boot, because it's not UEFI.
I would like to know if you could modify my vBios, because i don't know anything about editing HeX and i don't want to brick my card.
Thanks in advance,
Sebastian

#6 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by Lost_N_BIOS 27.01.2019 06:08

avatar

@drbob ^^ Thanks @sebulis - if you want him to modify your vBIOS for you, and he will do it, you'll need to dump it via GPU-z and attach the file so he can edit.

#7 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by sebulis 27.01.2019 09:05

Thank you so much!!!!!! My vBios is here http://depositfiles.org/files/spvimtnn9
I will invite both of you a couple of beers!!! 🍺🍺

Edit:
I have attached the bios file to this post. I couldn't find the option before! Thanks @drbob @Lost_N_BIOS

#8 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by drbob 05.02.2019 22:03

Hi @sebulis,

I don't check this forum very often, sorry for the delay in response. You can try the attached bios. I modified it in the same way I modified my RX480 bios to get it working with an incompatible motherboard (as described in the first post)

Whilst the modification worked for me, you install it at your own risk... It's also always possible that your Rampage II system has a different issue stopping your card from working (PSU insufficient etc)

Let us know how you get on!

#9 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by faded082 20.03.2019 01:50

Did this work for the Asus Dual RX 580 OC 8gb card?

#10 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by Lost_N_BIOS 14.06.2019 09:55

avatar

@drbob - Just an addition here to the originally considered method, if you edit first image (legacy) indicator to be 80 (Last image), you then shouldn't you also edit last image (UEFI/EFI) indicator to be 00 (first/other than last etc)?
I assumed you probably did this, but didn't mention in the above info.

I just did this for someone here, two ways, one using your method (but doing as I mentioned above) and then a second edit blanking out the GOP image (FF) with legacy one set to last
I need help moding vbios

#11 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by msi armor sucks a** 03.11.2019 21:15

hello, could you do this for my msi armor rx 570 8 gig?

#12 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by drbob 15.12.2019 03:53

Zitat von Lost_N_BIOS im Beitrag #10
@drbob - Just an addition here to the originally considered method, if you edit first image (legacy) indicator to be 80 (Last image), you then shouldn't you also edit last image (UEFI/EFI) indicator to be 00 (first/other than last etc)?
I assumed you probably did this, but didn't mention in the above info.
Sorry for the long delay in replying, I don't read here often!

In answer to your question. I don't think it matters, the BIOS should treat any other data as junk and ignore it.

AIUI the ROM is read sequentially, the reason the mod works is setting the last image indicator on the VBIOS causes the system to not look for any other ROM images after it has read that first image. So it it's not necessary to modify anything other than the header on that first VBIOS image.

#13 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by Shit tier xeon user 11.02.2020 13:30

So... I don't really know anything about editing the bios and my old X58 mobo (Rampage II Extreme) not giving display even post bios just classic 1 long 4 short beep...

https://yadi.sk/d/a8F1OOBfZ2nKlA here is the my bios. If already shared non ufei bios please leave link thank you so much.

#14 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by remdale 12.02.2020 16:47

avatar

I've just modified it for you. This is a temporary link
https://fex.net/s/9n70mmp

#15 RE: How to disable UEFI for legacy only boot on recent AMD Radeon GPUs by loginsubhan 14.02.2020 18:30

i got an RX480 8gb armor OC, just sitting on the shelf for 6 months now, please can anyone mod the bios for me, i know how to flash but im not familiar with Hex,, i have attached the bios file, thanks a lot ,in case if the file is corrupt ill provide a link below
https://www.techpowerup.com/vgabios/191088/191088.rom

Xobor Forum Software von Xobor
Datenschutz