Re: [edk2] No graphical output with EDK2/trunk (f9cec5f1)

Subject: Re: [edk2] No graphical output with EDK2/trunk (f9cec5f1)

From: Laszlo Ersek <>

To: Oleksii Shevchuk <>

Date: 2013-07-24 01:21:36

On 07/19/13 08:20, Oleksii Shevchuk wrote:
> Qemu display shows nothing, debug.log attached.
>> git bisect bad
> ea8d98fa9f862ba533448983f81a79e4e71008f5 is the first bad commit
> commit ea8d98fa9f862ba533448983f81a79e4e71008f5
> Author: Olivier Martin 
> Date:   Thu Jul 18 07:21:35 2013 +0000
>     The PCI host bridge can signal failures in its initialization to
>     the PCI Bus driver through the function call NotifyPhase().
>     Contributed-under: TianoCore Contribution Agreement 1.0
>     Signed-off-by: Olivier Martin 
>     Reviewed-by: Ruiyu Ni 
>     git-svn-id: 6f19259b-4bc3-4df7-8a09-765794883524
> :040000 040000 7b616078efb7b79ae369c1b85127ea4c36432d7c 43455574939d648ecf669e3b80d686b58c99faef M	MdeModulePkg

Apparently this patch did not introduce the bug, it just exposed a bug
in PcAtChipsetPkg that used to be masked. See SVN rev14498 (thanks to

For more background (more precisely, a personal interpretation), from a
private thread,

On 07/08/12 16:18, Laszlo Ersek wrote:
> [...] example of the Strategy Pattern. PciEnumerator() implements the
> generic algorithm, hooking into a PCI Resource Allocator object in
> many-many spots. The PCI Resource Allocator object is actually a state
> machine, and as PciEnumerator() and its numerous sub-functions
> progress, they kick PciResAlloc through various states.
> There are two "kinds" of calls into PciResAlloc, state transitions
> (triggered by NotifyPhase()) and "more direct" calls via funcptrs.
> The path through PciResAlloc state diagram looks like this, in
> condensed form:
>     BeginEnumeration
>       BeginBusAllocation
>       EndBusAllocation
>       BeginResourceAllocation
>         AllocateResources       <--- this is where magic happens
>         SetResources
>       EndResourceAllocation
>     EndEnumeration
> The transitions in this path are dispersed accross the generic
> PciEnumerator() call tree.
> The PCIResAlloc implementation in this case comes from
> "PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.c", global variable /
> field "mPciHostBridgeInstanceTemplate.ResAlloc".
> [...]

AIUI the final EndEnumeration handler was missing in PcAtChipsetPkg and
EFI_INVALID_PARAMETER used to be returned. With Olivier's patch the
caller started to care about the return value and the lack of the
handler was exposed. Ray made sure that this handler would do nothing
(like before), but successfully.

I tested the patch and it works for me.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
edk2-devel mailing list