AMD Developer
Decrease font size
Increase font size
Topic Title: ATOM BIOS documentation
Topic Summary: ATOM BIOS documentation request
Created On: 07/13/2009 03:27 AM
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 07/13/2009 03:27 AM
User is offline View Users Profile Print this message

Author Icon
lmike

Posts: 3
Joined: 01/28/2009

Is it possible to get ATOM BIOS structures description/specification ? As far as I know ATI has been released source code for ATOM BIOS parsing to X.org (xf86-video-ati), but it would be nice to have document which describes all ATOM structures for developing graphics driver for non X11, instead of reading a source code. Thanks in advance.

 

 07/13/2009 06:31 PM
User is offline View Users Profile Print this message

Author Icon
bridgman

Posts: 48
Joined: 12/18/2008

Take a look in the source tree for either of the open source DDX drivers at http://cgit.freedesktop.org :

xorg/driver/xf86-video-ati ("radeon")

xorg/driver/xf86-video-radeonhd ("radeonhd")

Click on "tree" to view the source code, then look at the file src/atombios/includes/atombios.h. That header file contains all of the atombios structure definitions. We released the header file with a license which lets you use it in other projects as well.

Note that we update this file from time to time, in order to add or revise data structures relevent to new GPUs.



-------------------------
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied.
 07/14/2009 07:44 AM
User is offline View Users Profile Print this message

Author Icon
lmike

Posts: 3
Joined: 01/28/2009

Thanks. I have to write graphics driver for HD series for QNX 6.4.x RTOS. The main problem which I have is how to detect XTAL clock frequency to calculate proper CRTC settings. Can I rely on fact that it is fixed to 27MHz only or some manufacturers could change reference clock ? That is why I need to read reference clock from ATOM BIOS structures, but I supposed to obtain a good datasheet for it Ok, I have to read the sources.

By the way, xf86-video-ati doesn't uses overlays, only textured video. And open RV630 documentation doesn't have any video overlay format descriptions, except for RGB. But a couple of registers are used for colorspace conversion, so I suppose RV630 is able to show YUV overlays, not RGB with 16/32 bpp only, but these formats are no documented, am I right ?

 

 07/20/2009 06:49 PM
User is offline View Users Profile Print this message

Author Icon
bridgman

Posts: 48
Joined: 12/18/2008

If that's all you need then you probably don't need to look at the source. There's a ROM header at the front of the image; that structure points to a list of data tables. One of the data tables is FirmwareInfo; the structure for ATOM_FIRMWARE_INFO includes the reference clock freq in 10 KHz units.

The radeon (xf86-video-ati) driver does use overlays (or textured video) on pre-5xx GPUs with the older display controller. That display controller had a lot of video processing hardware in the overlay block; on the newer chips have enough processing power to do it easily on the 3D engine.

If you really need an overlay, the 630 and m76 docs do give you format information for either ARGB or ACbYCr (look under the 32-bit formats). I believe you need to set up the conversion matrix to go from YCbCr to RGB; don't think we use that capability in either open or proprietary drivers today so I'm guessing...

Are you planning to support just one GPU (eg an embedded app) or the whole range ? If the latter, you might want to think about porting the AtomBIOS interpreter across to make your life simpler.



-------------------------
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied.
 10/15/2010 09:20 AM
User is offline View Users Profile Print this message

Author Icon
cccccc

Posts: 5
Joined: 06/01/2008

Hi,

I know that this is a (relatively) old topic, but I would like to extend it with a simple question:

Is there any documentation on using AtomBIOS from outside the linux kernel like there is for the VESA VBE ( http://www.petesqbsite.com/sections/tutorials/tuts/vbe3.pdf ) (i.e., explanations of interrupts)?

AFAIK, the pci (and pci express) configuration space is all about that: interrupts (IRQs), ports, and device-mapped memory regions. You probably won't provide any documentation about this.

The BIOS, on the other hand, is all about "software" interrupts, and most of the BIOS code is firmware loaded from physical hardware.

So: How do you access AtomBios? I assume it is done through some interrupts, like VESA BIOS. But why is this required AtomBIOS documentation such a big secret at AMD that all you can do is send us to the AtomBIOS.h header file? There is no useful information for us there! It's just a bunch of #defines, typedefs and structure definitions - with no informational comments or anything at all. No wonder your open source driver developers didn't want to use it at first!

Plainly put: What interrupts are involved in accessing AtomBios and which are the functions supported by those interrupts?

If you don't have this documentation, then why are you hyping on about supporting open-source developers? Either stop doing that, or give us some documentation!

Thanks!

 10/22/2010 11:56 PM
User is offline View Users Profile Print this message

Author Icon
bridgman

Posts: 48
Joined: 12/18/2008

Quick answer is that the AtomBIOS calls (aka "command tables") are written in an interpreted bytecode and called by passing the table address and parameters to an AtomBIOS interpreter written in C and compiled into your OS/driver/app/whatever.

We provide a couple of interpreters... the original one is used in the user modesetting drivers (radeonhd and radeon) while a more recent one is used in the kernel modesetting driver.

The best place to pick up the interpreter is from the Linux kernel tree in the drivers/gpu/drm/radeon folder, but over the years those files have had a lot of driver-specific bits added to them. Take a look at the kgrids-atom.zip contents at http://www.x.org/docs/AMD to see the original files.

The initial drivers were developed using internal atombios docs issued under NDA, and after the drivers were working there wasn't much demand for documentation so we've been focusing on other things like getting support and docs out for more recent GPU generations. If you are trying to write something using atombios shoot us an email -- gpudriverdevsupport at amd dot com - and we should be able to get you set up with better information.

The important thing to understand is that AtomBIOS does not define a static "least common denominator" set of functionality like traditional BIOS calls -- the API does evolve slowly as the GPU hardware evolves... but the API changes a lot less frequently than the hardware.



-------------------------
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied.
Statistics
10816 users are registered to the AMD Developer forum.
There are currently 4 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2011 FuseTalk Inc. All rights reserved.

Contact AMD | Terms and Conditions | Forum Rules | ©2009 Advanced Micro Devices, Inc. | Privacy | Trademark information