Thanks for the information. I’ve been really curious about this with the incoming ARM dev boards that have full PCI-e edge connectors.
Pretty fascinating that X11 of all things is dealing with Video BIOS initialization, though. The sheer amount of functionality that was overloaded into X...
You don't need X, and I wouldn't assume its remnants of userspace mode setting would work on non-x86.
The amdgpu kernel driver POSTs the GPUs when loaded just fine! I run an RX 480 on a MACCHIATObin with FreeBSD and Wayland only :)
Plus, there are two ways to get the GPU in UEFI already – X86EmulatorPkg and native aarch64 GOP driver builds provided by AMD.
X86EmulatorPkg is pretty cool. I guess if you have a board with UEFI it only makes sense to use something like that.
I always assumed the VideoBIOS runs on the GPU, but if I understand you correctly this is code run on the CPU?
Yes — "VBIOS", and these days mostly "UEFI GOP driver", is code that runs on the CPU and allows the system firmware to initialize the card and preset video output before any operating system is booted. Without it, you cannot enter the setup screen graphically, only over a serial port :D
Re:PCI Express on the Raspberry Pi 4
by ComputerGuru on Wednesday July 10, 2019 @06:03PM
(#20407080)
Yes, the PC (or whatever) hands off control of the entire system to the VideoBIOS which must do its thing and then pass control back.
My AMD TAHITIs for instance need VideoBIOS to start some form of thermal management loop - otherwise they just run full-throttle on the fan.
Then whichever card prevails (BIOS has the ability to select the initialization order) becomes the boot display device.
X11 has some (generally working, for well behaved GPUs) emulation of this environment, so that the GPU can initialize late, and even reset under X control. This is how sane cards can work under headless ARM etc.
Now, some manufacturers assume you get something like SSE or MMX - VideoBIOS spec technically mandates 386 instruction set only. That crap gets badly emulated.
On top of this, drivers can sometimes reinit anyways, from native kernel code. If that happens, the VideoBIOS concerns are moot.