Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed with AMD R7 340 GPU #11

Open
huzhifeng opened this issue Apr 16, 2024 · 0 comments
Open

Failed with AMD R7 340 GPU #11

huzhifeng opened this issue Apr 16, 2024 · 0 comments

Comments

@huzhifeng
Copy link

I'm so excited to have found this awesome project, thank you for your efforts.

I was able to test successfully with an AMD RX 550 graphics card, which supports EFI natively.

However, it's not working when testing with AMD R7 340 graphics card, which doesn't support EFI by itself.
Even though i used the gpuz and GOPupd tools to create EFI-enabled ROM, and then passed it to the graphics card via parameter romfile=xxx.rom.

Under the EFI Shell, I found that the EFI ROM was loaded but displayed as AMD GOP X64 INVALID Driver Rev.1.67.

I verified that the romfile is valid on x86_64 platform and AMD R7 340 works fine.

Here are the differences between AMD RX 550 and AMD R7 340 from EFI Shell:

AMD RX 550

Shell> pci
   Seg  Bus  Dev  Func
   ---  ---  ---  ----
    00   00   00    00 ==> Bridge Device - Host/PCI bridge
             Vendor 1B36 Device 0008 Prog Interface 0
    00   00   01    00 ==> Network Controller - Ethernet controller
             Vendor 1AF4 Device 1000 Prog Interface 0
    00   00   02    00 ==> Display Controller - VGA/8514 controller
             Vendor 1002 Device 699F Prog Interface 0
Shell> 
Shell> devices
     T   D
     Y C I
     P F A
CTRL E G G #P #D #C  Device Name
==== = = = == == === =========================================================
...
  99 D - -  1  0   0 PciRoot(0x0)/Pci(0x0,0x0)
  9A B - -  1  1   1 PciRoot(0x0)/Pci(0x1,0x0)
  9C B - -  1  1   2 AMD Radeon LEXA Graphics
...
Shell> 
Shell> drivers -b
            T   D
D           Y C I
R           P F A
V  VERSION  E G G #D #C DRIVER NAME                         IMAGE NAME
== ======== = = = == == =================================== ==========
...
9B 01711ADA B - -  2  2 1af41000.efidrv                     Offset(0x25000,0x3B3FF)
9D 00014600 B - -  1  2 AMD GOP X64 Release Driver Rev.1.70 Offset(0xE800,0x1CDFF)
Shell>
Shell> drivers -sfo -b
ShellCommand,"drivers"
...
DriversInfo,"9B","1711ADA","B","N","N","2","2","1af41000.efidrv","PciRoot(0x0)/Pci(0x1,0x0)/Offset(0x25000,0x3B3FF)"
DriversInfo,"9D","14600","B","N","N","1","2","AMD GOP X64 Release Driver Rev.1.70.0.15.50.Jul 13 2020.23:42:33","PciRoot(0x0)/Pci(0x2,0x0)/Offset(0xE800,0x1CDFF)"
Shell>

AMD R7 340:

Shell> pci
   Seg  Bus  Dev  Func
   ---  ---  ---  ----
    00   00   00    00 ==> Bridge Device - Host/PCI bridge
             Vendor 1B36 Device 0008 Prog Interface 0
    00   00   01    00 ==> Network Controller - Ethernet controller
             Vendor 1AF4 Device 1000 Prog Interface 0
    00   00   02    00 ==> Display Controller - VGA/8514 controller
             Vendor 1002 Device 6611 Prog Interface 0
Shell>
Shell> devices
     T   D
     Y C I
     P F A
CTRL E G G #P #D #C  Device Name
==== = = = == == === =========================================================
...
  99 D - -  1  0   0 PciRoot(0x0)/Pci(0x0,0x0)
  9A B - -  1  1   1 PciRoot(0x0)/Pci(0x1,0x0)
  9C D - -  1  0   0 PciRoot(0x0)/Pci(0x2,0x0)
...

Shell>
Shell> drivers -b
            T   D
D           Y C I
R           P F A
V  VERSION  E G G #D #C DRIVER NAME                         IMAGE NAME
== ======== = = = == == =================================== ==========
...
9B 01711ADA B - -  2  2 1af41000.efidrv                     Offset(0x25000,0x3B3FF)
9D 00014300 ? - X  -  - AMD GOP X64 INVALID Driver Rev.1.67 Offset(0x10000,0x1E5FF)
Shell>
Shell> drivers -sfo -b
ShellCommand,"drivers"
...
DriversInfo,"9B","1711ADA","B","N","N","2","2","1af41000.efidrv","PciRoot(0x0)/Pci(0x1,0x0)/Offset(0x25000,0x3B3FF)"
DriversInfo,"9D","14300","?","N","Y","0","0","AMD GOP X64 INVALID Driver Rev.1.67.0.15.50.Oct 18 2018.14:11:59","PciRoot(0x0)/Pci(0x2,0x0)/Offset(0x10000,0x1E5FF)"
Shell>
Shell> drvdiag
Available Diagnostics.
Driver [9D]: No controller handles found.
Shell>

In addition, the ROM differences are as follows:

[root@localhost ~]# ./EfiRom -d amd-rx-550.rom
Image 1 -- Offset 0x0
  ROM header contents
    Signature              0xAA55
    PCIR offset            0x0244
    Signature               PCIR
    Vendor ID               0x1002
    Device ID               0x699F
    Length                  0x0018
    Revision                0x0000
    DeviceListOffset        0x00
    Class Code              0x030000
    Image size              0xE800
    Code revision:          0x0F32
    MaxRuntimeImageLength   0x00
    ConfigUtilityCodeHeaderOffset 0x4D41
    DMTFCLPEntryPointOffset 0x2044
    Indicator               0x00
    Code type               0x00
Image 2 -- Offset 0xE800
  ROM header contents
    Signature              0xAA55
    PCIR offset            0x001C
    Signature               PCIR
    Vendor ID               0x1002
    Device ID               0x699F
    Length                  0x0018
    Revision                0x0000
    DeviceListOffset        0x00
    Class Code              0x030000
    Image size              0xE600
    Code revision:          0x0000
    MaxRuntimeImageLength   0x00
    ConfigUtilityCodeHeaderOffset 0x4F47
    DMTFCLPEntryPointOffset 0x2050
    Indicator               0x80   (last image)
    Code type               0x03   (EFI image)
  EFI ROM header contents
    EFI Signature          0x0EF1
    Compression Type       0x0001 (compressed)
    Machine type           0x8664 (X64)
    Subsystem              0x000B (EFI boot service driver)
    EFI image offset       0x0050 (@0xE850)
[root@localhost ~]#
[root@localhost ~]# ./EfiRom -d gpuz-amd-r7-340_updGOP.rom
Image 1 -- Offset 0x0
  ROM header contents
    Signature              0xAA55
    PCIR offset            0x022C
    Signature               PCIR
    Vendor ID               0x1002
    Device ID               0x6611
    Length                  0x0018
    Revision                0x0000
    DeviceListOffset        0x00
    Class Code              0x030000
    Image size              0x10000
    Code revision:          0x0F31
    MaxRuntimeImageLength   0x00
    ConfigUtilityCodeHeaderOffset 0x4D41
    DMTFCLPEntryPointOffset 0x2044
    Indicator               0x00
    Code type               0x00
Image 2 -- Offset 0x10000
  ROM header contents
    Signature              0xAA55
    PCIR offset            0x001C
    Signature               PCIR
    Vendor ID               0x1002
    Device ID               0x6611
    Length                  0x0018
    Revision                0x0000
    DeviceListOffset        0x00
    Class Code              0x030000
    Image size              0xE600
    Code revision:          0x0000
    MaxRuntimeImageLength   0x00
    ConfigUtilityCodeHeaderOffset 0x4F47
    DMTFCLPEntryPointOffset 0x2050
    Indicator               0x80   (last image)
    Code type               0x03   (EFI image)
  EFI ROM header contents
    EFI Signature          0x0EF1
    Compression Type       0x0001 (compressed)
    Machine type           0x8664 (X64)
    Subsystem              0x000B (EFI boot service driver)
    EFI image offset       0x0058 (@0x10058)
[root@localhost ~]#

I tried to connect the device and driver manually, but I got a Result Not Found error.

Shell> connect 9c 9d
Connect - Handle [9C] Result Not Found.
Connect No drivers could be connected.
Shell>

@ardbiesheuvel
Do you have any experience with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant