On 15 March 2017 at 02:51, Heyi Guo heyi.guo@linaro.org wrote:
Hi Ard,
To support UEFI GOP frame buffer, is it enough to provide UEFI GOP protocol and valid FrameBufferBase and FrameBufferSize via GOP mode?
You need to expose the pixel mode and color depth etc, as well, and you can use the existing framebufferbltlib to implement blitting in software if you don't want to wire up the hardware support.
I still have some question. As we are using a PCIe VGA device, the frame buffer might probably be certain PCIe memory resource BAR of VGA device. Then is it possible for OS to re-enumerate PCIe bus and re-allocate memory BAR resources? If so, who will be responsible to update frame buffer base?
That is a good question, and an unsolved problem. I know Lorenzo is aware of this, and there has been discussion in the past about preserving the PCI configuration performed by the firmware when booting in ACPI mode.
In any case, the EFI GOP driver in the kernel should probably double check that the [base, size) exposed by the GOP protocol is covered entirely by a single PCI bar if the protocol was exposed by a PCI device to begin with. I could add some code to the stub for that.