>> > Hmm, so you are hiding the #define here to avoid updating 
>> > Protocol/PciHostBridgeResourceAllocation.h ...
>> >
>> > I suspect if this can't be implemented in the pci enumerator alone there 
>> > is just no way around actually extending uefi protocols.  But it's also 
>> > not fully clear to me why you need this new "partial" state.
>> > Wouldn't you know either nothing or both base + size for a resource?
>> >
>>
>> Yes you are right, the current status is we have nothing and after the 
>> resources are allocated we have base and size. However, the allocation 
>> happens after CreateResourceMap is called, this function is the one 
>> that iterates over all resources of all devices under a root bridges 
>> and places them in a root bridge relative offset to then calculate the 
>> length of the resources required for that specific root bridge. For 
>> the pre-populated BARs I retrieve the Base Address of the Root Bridge 
>> before placing the resources at the root bridge relative offset so 
>> that I can translate the BAR address (set by the host) into an offset.
>> That's why I created this patch to retrieve only the base address 
>> before the root bridge resource map is created, submitted and 
>> allocated.
>
>Hmm, nasty init order issue.  No good idea offhand.
>
>Have you tried to exclude the pre-populated BARs from the host bridge windows 
>communicated to the edk2 pci core?  The pci enumerator should not create 
>overlapping pci bar assignment then.  But it might very well be that this only 
>shifts the problem to another place ...
>
>take care,
>  Gerd

Haven't tried that but we are working on a new approach that do not touches the 
protocol at all but instead profits from the retry loop already in place and, 
after an allocation round, verifies if the pre-populated BARs are in the 
correct place, otherwise tries again. Similar to what is currently done when 
the allocation fails due to not enough space. Also we are creating a routine 
that "adjusts" the resources by analyzing pre-populated BAR situation to decide 
which device to reject before trying again.

Expect a new revision soon.

Best regards,

Nicolas





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86658): https://edk2.groups.io/g/devel/message/86658
Mute This Topic: https://groups.io/mt/88893097/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to