From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Sheng, W" <w.sheng@intel.com>
Cc: "Kowalewski, Robert" <robert.kowalewski@intel.com>,
"Huang, Jenny" <jenny.huang@intel.com>,
"Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Albecki, Mateusz" <mateusz.albecki@intel.com>,
"Kolakowski, Jacek" <Jacek.Kolakowski@intel.com>
Subject: Re: [edk2-devel] [PATCH v3] IntelSiliconPkg/IntelVTdDxe: Support Multi PCI Root Bus
Date: Fri, 22 Oct 2021 03:26:05 +0000 [thread overview]
Message-ID: <BN0PR11MB5696970C013D9BF4C3B0D1668C809@BN0PR11MB5696.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211021121129.16184-1-w.sheng@intel.com>
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
next prev parent reply other threads:[~2021-10-22 3:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 12:11 [PATCH v3] IntelSiliconPkg/IntelVTdDxe: Support Multi PCI Root Bus Sheng Wei
2021-10-22 3:26 ` Ni, Ray [this message]
2021-10-27 6:04 ` [edk2-devel] " jenny.huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BN0PR11MB5696970C013D9BF4C3B0D1668C809@BN0PR11MB5696.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox