Opened 10 years ago

Closed 2 years ago

#10505 closed enhancement (fixed)

radeon_hd needs ACPI support for finding the AtomBIOS

Reported by: kallisti5 Owned by: korli
Priority: normal Milestone: R1/beta4
Component: Drivers/Graphics/radeon_hd Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Radeon HD devices can stash their AtomBIOS in the ATRM ACPI node. We should try and obtain a copy there first before attempting other methods.

The location this needs done in is: http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/drivers/graphics/radeon_hd/radeon_hd.cpp#n133

Defines of the AMD ACPI methods are here: http://lists.freedesktop.org/archives/dri-devel/2012-July/025517.html

ATRM contains the AtomBIOS (or points to it, not 100% how that works)

At the moment, a lot of cards that should be using the ATRM node are falling back to my Video shadow bios hack (0xC0000) which can be unreliable.

Change History (7)

comment:1 by tqh, 10 years ago

This needs to be done:

  • Get ACPI module.
  • Find ACPI handle for card.
  • Find ATRM function under card.
  • Execute ATRM to get BIOS.

If anyone fails fallthrough to next way of getting firmware.

Possibly we need to do like Linux that calls ATRM with offset into bios as first param and length to read as second. Reading the BIOS is done with several calls with chunks that are ATRM page size until 256 * 1024 bytes are read.

comment:2 by phoudoin, 9 years ago

Could someone with such ROM detection could post its /dev/acpi/namespace please ?

Last edited 9 years ago by phoudoin (previous) (diff)

comment:3 by korli, 2 years ago

Some ACPI support was added in hrev55760

comment:4 by tqh, 2 years ago

Owner: changed from tqh to korli
Status: newassigned

Fixed by korli in hrev55760. I guess if everything works it should be closed.

comment:5 by kallisti5, 2 years ago

I just tried it on my Radeon RX 480.

KERN: radeon_hd: radeon_hd_init: card(0): Radeon Polaris 10 1002:67DF
KERN: radeon_hd: radeon_hd_init: shrinking frame buffer to PCI bar...
KERN: radeon_hd: radeon_hd_init: mapping a frame buffer of 256MB out of 8192MB video ram
KERN: radeon_hd: framebuffer paddr: 0xd0000000
KERN: radeon_hd: frambuffer vaddr: 0xffffffffe8000000
KERN: radeon_hd: frambuffer size: 0x10000000
KERN: radeon_hd: card(0): radeon_hd_getbios: called
KERN: radeon_hd: mapAtomBIOSACPI: seeking AtomBIOS from ACPI
KERN: radeon_hd: radeon_hd_getbios: AtomBIOS not found using active method 0 at 0x0
KERN: radeon_hd: mapAtomBIOS: seeking AtomBIOS @ 0xD0000000 [size: 0x40000]
KERN: radeon_hd: mapAtomBIOS: BIOS signature incorrect @ 0xD0000000 (0)
KERN: radeon_hd: radeon_hd_getbios: AtomBIOS not found using active method 1 at 0xD0000000
KERN: radeon_hd: radeon_hd_getbios: PCI ROM decode enabled
KERN: radeon_hd: mapAtomBIOS: seeking AtomBIOS @ 0xFCE40000 [size: 0x20000]
KERN: radeon_hd: mapAtomBIOS: AtomBIOS verified and locked

Didn't find it... however i'm pretty sure that's expected as the AHCI table entry is mostly reserved for laptops and integrated GPU's?

comment:6 by kallisti5, 2 years ago

*ACPI :-)

comment:7 by korli, 2 years ago

Milestone: R1R1/beta4
Resolution: fixed
Status: assignedclosed

Seems to work as seen on #17582

KERN: radeon_hd: mapAtomBIOSACPI: ACPI VFCT contains a BIOS for: 0:1:0 1002:9994
KERN: radeon_hd: mapAtomBIOSACPI: AtomBIOS verified and locked (20480)
KERN: radeon_hd: radeon_hd_getbios: AtomBIOS found using active method 0 at 0x0
Note: See TracTickets for help on using tickets.