[edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver####

Ni, Ray ray.ni at intel.com
Wed Jan 15 03:12:02 UTC 2020


> -----Original Message-----
> From: afish at apple.com <afish at apple.com>
> Sent: Wednesday, January 15, 2020 1:45 AM
> To: devel at edk2.groups.io; Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Cc: Laszlo Ersek <lersek at redhat.com>; Ni, Ray <ray.ni at intel.com>; Leif
> Lindholm <leif.lindholm at linaro.org>; Gao, Zhichao <zhichao.gao at intel.com>;
> Ma, Maurice <maurice.ma at intel.com>; Dong, Guo <guo.dong at intel.com>;
> You, Benjamin <benjamin.you at intel.com>
> Subject: Re: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow
> consoles on drivers loaded via Driver####
> 
> 
> 
> > On Jan 14, 2020, at 8:46 AM, Ard Biesheuvel <ard.biesheuvel at linaro.org>
> wrote:
> >
> > On Mon, 13 Jan 2020 at 18:57, Andrew Fish via Groups.Io
> > <afish=apple.com at groups.io> wrote:
> >>
> >> Ard,
> >>
> >> Is the problem GFX console? Would it be possible to have a PCD to
> assume graphics console, and if non was found on the boot connect those
> PCI devices and update the NVRAM to cause a console to connect. You might
> have to do a 2nd connect on the GOP handle after the nvram variable was
> written to make the ConSpliter see it?
> >>
> >
> > I'm not sure I follow. Do you mean update the console variable if it
> > doesn't contain the GOP produced by the Driver#### option and reboot?
> >
> 
> Ard,
> 
> I was thinking this specific case was no active GOP driver in the system due to
> the emulation of the ROM. I was saying there could be a platform policy to
> require GOP, and there could be a  platform hook point to check for no GOP
> and take action. This is not really a Driver#### path, but a fallback path for no
> GOP. So that is kind of cheating :).
> 
> Also I was thinking the ConSpliter would activate the new GOP if you do a
> 2nd gBS->ConnectController on the Graphics PCI or GOP handle after
> updating the console nvram variable.
> 
> Sorry I'm not really familiar with the modern TianoCore BDS, as we have a
> custom BDS on Macs, so I'm talking more hypothetically about how BDS could
> work.

Andrew,
TianoCore BDS in this part is very simple. The BDS core expects a platform
hook (PlatformBootManagerBeforeConsole()) to initialize every BDS related UEFI
variables like ConIn, ConOut, Driver####, Boot####, DriverOrder, BootOrder, etc.
Then BDS core consumes these variables and acts accordingly.
I think the "platform hook" you suggested is similar to what I suggested earlier,
except that you think that putting GOP in Driver#### is unnecessary.

Ard,
Assuming you've put GOP driver path to Driver####,
you could put below code in the beginning of PlatformBootManagerAfterConsole():
1. Find the GFX controller handle
2. EfiBootManagerConnectVideoController (GFXHandle)

Thanks,
Ray


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#53255): https://edk2.groups.io/g/devel/message/53255
Mute This Topic: https://groups.io/mt/67470372/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list