RE: [EDK DEV] Query with VGA (or any other device driver)

Subject: RE: [EDK DEV] Query with VGA (or any other device driver)

From: adhyas <>


Date: 2008-09-10 04:41:49

That brings me to my next set of questions about legacy VGA Oprom.

-> Do I necessarily need legacy VGA oprom ? How about VgaClass.inf driver? =
I see a lot of VGA code there. Can it not handle VGA programming ?
You can consider that I have already initialized my VGA adapter with everyt=
hing that the hardware needs. All I want is the actual VGA Programming code=
 which was handled by INT in legacy BIOS (INT code provided by VGA oprom, o=
f course).

-> If I need legacy VGA oprom necessarily, how much of thunk code and csm c=
ode would I need to use VGA oprom ? We do not have CSM code as of now, is t=
here a driver in EDK which can be included and used readily for the require=
ments to load and execute a legacy VGA oprom ?

- Adhyas

From: Ni, Ruiyu []
Sent: Tuesday, September 09, 2008 7:49 PM
Subject: RE: [EDK DEV] Query with VGA (or any other device driver)

The VgaMiniPort driver is specially for DUET so the driver has an
assumption that the legacy video option ROM has been dispatched and the
MMIO decoding is turned on by that option ROM.
The device driver is responsible to turn on the MMIO decoding if it
wants to do.
A full functional VgaMiniport driver should do the additional things in
its Start routine:
1). Dispatch the legacy video option ROM
2). Enable MMIO decoding if necessary

I think you can write another small driver that do these additional
things prior to VgaMiniPort driver, such that preventing maintaining
different versions of VgaMiniPort driver.

-----Original Message-----
From: adhyas []
Sent: Wednesday, September 10, 2008 8:00 AM
Subject: [EDK DEV] Query with VGA (or any other device driver)

Here is what I am noticing.

I include Sample\Bus\Pci\VgaMiniPort\Dxe\VgaMiniPort.inf in my DSC file.

Its supported routine is invoked again and again only to return false.
The reason it returns false is because my PCI initialization code has
initialized all the BARs for this device but has turned off the MMIO
decoding using the PCI Command register.

-> Is the PCI initialization code supposed to be turning MMIO windows ON

for PCI devices. I would think otherwise because it is not smart enough
to figure out which devices need MMIO windows turned on.
-> If not, then who is supposed to do that? I would say one possible way

for me is to have an event registered in VGA driver which waits for the
event to be triggered from PCI enumeration code (which triggers the
event once PCI has been enumerated). Once the event is triggered, the
VGA driver can enable MMIO decoding itself (or any other device driver,
for that matter).

Is there a recommended design of accomplishing what I want? Or if there
is something I am not really accomplishing in my PCI initialization code
I just wanted to know how you think in EFI for this design problem
instead of putting in a hack myself and solve the issue at hand.

- Adhyas


To unsubscribe from this discussion, e-mail:


To unsubscribe from this discussion, e-mail: [dev-unsubscribe@edk.tianocore=


To unsubscribe from this discussion, e-mail: [dev-unsubscribe@edk.tianocore=