tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Trying to access the Expansion ROM of a video card



Hello All,

As you know I have a laptop that has amd radeon r7 m265 graphics
device (it seems there are two actually; 0x1002/0x1309 and
0x1002/0x6604). My kernel panics when I do enable radeon, not finding
any ROM.

I am using netbsd 9.2 amd64 and am using UEFI boot.

After reading kern/49964 (which had the same panic with my system -
radeon_get_bios does not find a bios) I did some testing. Here is what
I have so far.

The memory at 0xC0000 (size 131072) starts with 0xff 0xff. So this
means that there is no valid expansion ROM here. This is what I have
done to get this dump (dd if=/dev/mem of=/tmp/bios bs=1 iseek=786432
count=131072) and to view it I used (hexdump -C /tmp/bios). If there
is anything that looks wrong let me know.

Then I have dumped the data on the two PCI devices mentioned above. To
arrive at these I did use (pcictl pci0 dump -d 1 -f 0 and pcictl pci1
dump -d 0 -f 0). Here is the outcome.

The device on pci0:1:0 is as such

PCI configuration registers:
  Common header:
    0x00: 0x13091002 0x00100007 0x03000000 0x00800010

    Vendor Name: ATI Technologies (0x1002)
    Device ID: 0x1309
    Command register: 0x0007
.....
 Type 0 ("normal" device) header:
    0x10: 0xe000000c 0x00000000 0xf000000c 0x00000000
    0x20: 0x00004001 0xf0b00000 0x00000000 0x08641025
    0x30: 0xfffe0001 0x00000048 0x00000000 0x00000100

    Base address register at 0x10
      type: 64-bit prefetchable memory
      base: 0x00000000e0000000
    Base address register at 0x18
      type: 64-bit prefetchable memory
      base: 0x00000000f0000000
    Base address register at 0x20
      type: I/O
      base: 0x00004000
    Base address register at 0x24
      type: 32-bit nonprefetchable memory
      base: 0xf0b00000
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0x1025
    Subsystem ID: 0x0864
    Expansion ROM Base Address Register: 0xfffe0001
      base: 0xfffe0000
      Expansion ROM Enable: on
      Validation Status: Validation not supported
      Validation Details: 0x0
    Capability list pointer: 0x48
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x00
    Minimum Grant: 0x00
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x00

and for the device on pci1:0:0 has this information

PCI configuration registers:
  Common header:
    0x00: 0x66041002 0x00100007 0x03800000 0x00000010

    Vendor Name: ATI Technologies (0x1002)
    Device ID: 0x6604
    Command register: 0x0007
.......
Type 0 ("normal" device) header:
    0x10: 0xd000000c 0x00000000 0xf0a00004 0x00000000
    0x20: 0x00003001 0x00000000 0x00000000 0x086a1025
    0x30: 0xfffe0000 0x00000048 0x00000000 0x00000100

    Base address register at 0x10
      type: 64-bit prefetchable memory
      base: 0x00000000d0000000
    Base address register at 0x18
      type: 64-bit nonprefetchable memory
      base: 0x00000000f0a00000
    Base address register at 0x20
      type: I/O
      base: 0x00003000
    Base address register at 0x24
      not implemented
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0x1025
    Subsystem ID: 0x086a
    Expansion ROM Base Address Register: 0xfffe0000
      base: 0xfffe0000
      Expansion ROM Enable: off
      Validation Status: Validation not supported
      Validation Details: 0x0
    Capability list pointer: 0x48
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x00
    Minimum Grant: 0x00
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x00

The ROM in the pci0:1:0 has the PCI ROM enabled but the ROM address is
not correct i think. Would you have any ideas on where the expansion
ROM might be found? Whereelse might I look? Since I am using UEFI, can
this ROM be located in the UEFI boot directories somewhere? Any
pointers, any information or any ideas would be appreciated.

Thanks in advance.

Best Regards,
Riza Dindir


Home | Main Index | Thread Index | Old Index