Wei,
> + if (EFI_ERROR (Status)) {
> + //
> + // If PciRootBridgeIo protocol is not support, scan PCI device from root
> bus 0x00.
> + //
> + Status = ScanPciBus(Context, Segment, 0x00, Callback);
1. Is the error handling necessary?
In a simple client platform, there is only one PciRootBridgeIo protocol
instance.
In a complex client or server platform, there are multiple PciRootBridgeIo
protocol instances.
Additionally, the INF has a dependency on PciRootBridgeIo protocol.
The driver doesn't run if the protocol doesn't exist.
> +
> + while (Descriptors->Desc != ACPI_END_TAG_DESCRIPTOR) {
> + if (Descriptors->ResType == ACPI_ADDRESS_SPACE_TYPE_BUS) {
> + break;
> + }
> + Descriptors++;
> + }
> +
2. You might need to add the error handling in case the ACPI descriptor doesn't
contain
record for ACPI_ADDRESS_SPACE_TYPE_BUS.
That would be a fatal error. So, even an assertion is ok to me.
Thanks,
Ray
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82469): https://edk2.groups.io/g/devel/message/82469
Mute This Topic: https://groups.io/mt/86487827/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-