Question about Intel and AMD GPU documentation
Question about Intel and AMD GPU documentation
So, I'm kinda confused about the Intel and AMD GPU documentation. For the Intel documentation over here, I notice that there's documentation for various architectures like Skylake, Ice Lake, and DG1, but for others like Coffee Lake there's only a volume about "Configurations". My question regarding those is: is there some kind of inheritance kind of thing going on, where for example Ice Lake is its own independent architecture but others like Whiskey Lake depend on something like Ice Lake?
For the amd documentation -- for up-to-date documentation anyway -- I was only able to find this. There is, of course, this page for general ISA documentation, but the Open GPU documentation there appears to be for much older GPUs.
Am I missing something? Is there a website that I'm not aware of that contains GPU documentation like PCIe information and such? Or is this all that's available? I know that AMD has their BIOS and Kernel Developer Guides (BKDGs), and while some of those contain "integrated" graphics, I'm wondering if there's a more "authoritative" reference that doesn't depend so heavily on the particular processor.
For the amd documentation -- for up-to-date documentation anyway -- I was only able to find this. There is, of course, this page for general ISA documentation, but the Open GPU documentation there appears to be for much older GPUs.
Am I missing something? Is there a website that I'm not aware of that contains GPU documentation like PCIe information and such? Or is this all that's available? I know that AMD has their BIOS and Kernel Developer Guides (BKDGs), and while some of those contain "integrated" graphics, I'm wondering if there's a more "authoritative" reference that doesn't depend so heavily on the particular processor.
Re: Question about Intel and AMD GPU documentation
I don't know about AMD, but for Intel you're spot on, for example Coffee Lake is mostly similar to Skylake.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Question about Intel and AMD GPU documentation
The abbreviations in the configuration table tell you that, for example, Whiskey Lake inherits its GPU from Coffee Lake (CFL) and Kaby Lake (KBL).
I can't find any register-level documentation for recent AMD GPUs either, but they are at least nice enough to provide source code for an entire Linux driver.
I can't find any register-level documentation for recent AMD GPUs either, but they are at least nice enough to provide source code for an entire Linux driver.
Re: Question about Intel and AMD GPU documentation
Thanks for your answers! I was going to ask about PCIe but I just grepped the documents and found it -- it seems to be all over the place depending on the generation. I assume GPU initialization and setup is also like that?
Re: Question about Intel and AMD GPU documentation
Okay, so I'm definitely confused. What does Intel call the MMIO BAR? I've found the I/O BAR but that appears to be BAR 4. I can't find anything about what BARs 0-3 are, or what BAR 5 is. This is the skylake PRM but if they call it the same on everything then that would work. It'd be a lot nicer if PCI/PCIe registers were separate from GPU registers because I seriously have no idea how to initialize the GPU or what BAR gives me access to GPU configuration or anything like that. The Intel graphics article isn't very useful, unfortunately.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Question about Intel and AMD GPU documentation
Why on earth did Intel choose to alphabetize all of the registers instead of sorting by address? Anyway, you can find the configuration space registers by searching for "PCI: 0/2/0". (The registers listed as "PCI: 0/0/0" seem to belong to the memory controller instead of the GPU.)
BAR0 is GTTMMADR_0_2_0_PCI - Graphics Translation Table Memory Mapped Range Address.
BAR2 is GMADR_0_2_0_PCI - Graphics Memory Range Address.
BAR4 is IOBAR_0_2_0_PCI - I/O Base Address.
BAR1 and BAR3 are the upper bits of BAR0 and BAR2, since they're 64-bit. BAR5 doesn't seem to be used.
BAR0 is GTTMMADR_0_2_0_PCI - Graphics Translation Table Memory Mapped Range Address.
BAR2 is GMADR_0_2_0_PCI - Graphics Memory Range Address.
BAR4 is IOBAR_0_2_0_PCI - I/O Base Address.
BAR1 and BAR3 are the upper bits of BAR0 and BAR2, since they're 64-bit. BAR5 doesn't seem to be used.
Re: Question about Intel and AMD GPU documentation
Thanks for that! What about GPU initialization and such? Is there a specific volume that covers that or is there a guide I can find, or will I just have to play with it? (Also, what can I use to emulate the graphics? I could use PCIe passthrough -- I do have an Intel HD 620 GPU (Linux says its a Skylake GPU) but I'm hesitant to do that since its my primary GPU).Octocontrabass wrote:Why on earth did Intel choose to alphabetize all of the registers instead of sorting by address? Anyway, you can find the configuration space registers by searching for "PCI: 0/2/0". (The registers listed as "PCI: 0/0/0" seem to belong to the memory controller instead of the GPU.)
BAR0 is GTTMMADR_0_2_0_PCI - Graphics Translation Table Memory Mapped Range Address.
BAR2 is GMADR_0_2_0_PCI - Graphics Memory Range Address.
BAR4 is IOBAR_0_2_0_PCI - I/O Base Address.
BAR1 and BAR3 are the upper bits of BAR0 and BAR2, since they're 64-bit. BAR5 doesn't seem to be used.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Question about Intel and AMD GPU documentation
It looks like volume 12 explains at least part of how to get the GPU up and displaying things, but you'll have to cross-reference information across other volumes to find everything you need, and I'm not sure where you're supposed to start. You might want to look at the Linux drivers for guidance here.Ethin wrote:What about GPU initialization and such? Is there a specific volume that covers that or is there a guide I can find, or will I just have to play with it?
There's no emulator that I know of. If you can convince the host OS to give up control of the GPU, you can try PCIe passthrough, but there's no guarantee it'll work.Ethin wrote:Also, what can I use to emulate the graphics?
Re: Question about Intel and AMD GPU documentation
Ugh. That might make writing GPU drivers pointless for now then, especially because I wouldn't really be able to see if I'm making any progress or not in terms of actually displaying anything. I also don't have an external GPU or thunderbolt support, so...Octocontrabass wrote:It looks like volume 12 explains at least part of how to get the GPU up and displaying things, but you'll have to cross-reference information across other volumes to find everything you need, and I'm not sure where you're supposed to start. You might want to look at the Linux drivers for guidance here.Ethin wrote:What about GPU initialization and such? Is there a specific volume that covers that or is there a guide I can find, or will I just have to play with it?
There's no emulator that I know of. If you can convince the host OS to give up control of the GPU, you can try PCIe passthrough, but there's no guarantee it'll work.Ethin wrote:Also, what can I use to emulate the graphics?
-
- Posts: 1
- Joined: Wed Mar 16, 2022 3:38 pm
Re: Question about Intel and AMD GPU documentation
You can try creating a uefi boot loader to test your gpu driver on real hardware.
Re: Question about Intel and AMD GPU documentation
It does work on Linux (in combination with Qemu). I use it everyday to test my GPU code. Let me know if you need any specifics.Octocontrabass wrote: There's no emulator that I know of. If you can convince the host OS to give up control of the GPU, you can try PCIe passthrough, but there's no guarantee it'll work.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader