[edk2-devel] [PATCH v4 8/9] ArmVirtPkg/FdtPciHostBridgeLib: Refactor GetRootBridges() / FreeRootBridges()
Jiahui Cen via groups.io
cenjiahui=huawei.com at groups.io
Thu Jan 14 12:48:41 UTC 2021
Hi Laszlo,
On 2021/1/14 19:01, Laszlo Ersek wrote:
> On 01/12/21 10:45, Jiahui Cen via groups.io wrote:
>> Rebase ArmVirtPkg/FdtPciHostBridgeLib with the new
>> PciHostBridgeUtilityGetRootBridges() / PciHostBridgeUtilityFreeRootBridges()
>> functions.
>
> (1) This commit message is utterly useless.
>
> This is the patch where the entire series culminates -- where you
> actually bring pxb support to ArmVirtPkg. Do you think you should
> perhaps elaborate on the *WHOLE GOAL* of this series, in this commit
> message?
>
Right, I will add some more detailed commit message.
Thanks,
Jiahui
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059
>>
>> Cc: Laszlo Ersek <lersek at redhat.com>
>> Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
>> Cc: Leif Lindholm <leif at nuviainc.com>
>> Signed-off-by: Jiahui Cen <cenjiahui at huawei.com>
>> Signed-off-by: Yubo Miao <miaoyubo at huawei.com>
>> ---
>> ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 24 +++++---------------
>> 1 file changed, 6 insertions(+), 18 deletions(-)
>>
>> diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
>> index 95166d18c82d..89582ef76eb3 100644
>> --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
>> +++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
>> @@ -272,8 +272,6 @@ ProcessPciHost (
>> return Status;
>> }
>>
>> -STATIC PCI_ROOT_BRIDGE mRootBridge;
>> -
>> /**
>> Return all the root bridge instances in an array.
>>
>> @@ -361,8 +359,10 @@ PciHostBridgeGetRootBridges (
>> PMemAbove4G.Base = MAX_UINT64;
>> PMemAbove4G.Limit = 0;
>>
>> - Status = PciHostBridgeUtilityInitRootBridge (
>> - Attributes,
>> + *Count = 0;
>
> (2) As noted earlier, this assignment should be pushed down into
> PciHostBridgeUtilityGetRootBridges().
>
> Thanks
> Laszlo
>
>> +
>> + return PciHostBridgeUtilityGetRootBridges (
>> + Count,
>> Attributes,
>> AllocationAttributes,
>> TRUE,
>> @@ -373,19 +373,8 @@ PciHostBridgeGetRootBridges (
>> &Mem,
>> &MemAbove4G,
>> &PMem,
>> - &PMemAbove4G,
>> - &mRootBridge
>> + &PMemAbove4G
>> );
>> - if (EFI_ERROR (Status)) {
>> - DEBUG ((EFI_D_ERROR, "%a: failed to initialize PCI host bridge: %r\n",
>> - __FUNCTION__, Status));
>> - *Count = 0;
>> - return NULL;
>> - }
>> -
>> - *Count = 1;
>> -
>> - return &mRootBridge;
>> }
>>
>> /**
>> @@ -402,8 +391,7 @@ PciHostBridgeFreeRootBridges (
>> UINTN Count
>> )
>> {
>> - ASSERT (Count == 1);
>> - PciHostBridgeUtilityUninitRootBridge (Bridges);
>> + PciHostBridgeUtilityFreeRootBridges (Bridges, Count);
>> }
>>
>> /**
>>
>
>
>
>
>
>
> .
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70286): https://edk2.groups.io/g/devel/message/70286
Mute This Topic: https://groups.io/mt/79619796/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