From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-fw-33001.amazon.com (smtp-fw-33001.amazon.com [207.171.190.10]) by mx.groups.io with SMTP id smtpd.web11.7103.1643966286509249529 for ; Fri, 04 Feb 2022 01:18:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=kNcdGpOf; spf=pass (domain: amazon.de, ip: 207.171.190.10, mailfrom: prvs=0270f64da=ncoleon@amazon.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1643966286; x=1675502286; h=from:to:cc:date:message-id:references:in-reply-to: mime-version:content-transfer-encoding:subject; bh=9jNvg6pNzJy062DPaWjo49dHmLXGgXulPkWTpnCKn4A=; b=kNcdGpOfYBg+uam9qAnhWPnBW8DiT/ajRQZKjXn9af8thwPj/E+Sp/YU wziivBXb+aCNMHBFJnF+UILouUQSirkQuED6wLpSZJWYpJn1R2iZR+/bJ HXsNDDBib8FVHIhviBsQiPxMe0uv8ydSN6CaSMuX9wN5hsZ5rBHWMy/U+ M=; X-IronPort-AV: E=Sophos;i="5.88,342,1635206400"; d="scan'208";a="174011201" Subject: Re: [PATCH v4 7/8] PciHostBridgeDxe: Extend service to get base addresses before allocation Thread-Topic: [PATCH v4 7/8] PciHostBridgeDxe: Extend service to get base addresses before allocation Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-33001.sea14.amazon.com with ESMTP; 04 Feb 2022 09:17:51 +0000 Received: from EX13D37EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com (Postfix) with ESMTPS id 7F662414E4; Fri, 4 Feb 2022 09:17:50 +0000 (UTC) Received: from EX13D49EUC003.ant.amazon.com (10.43.164.91) by EX13D37EUB003.ant.amazon.com (10.43.166.251) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Fri, 4 Feb 2022 09:17:49 +0000 Received: from EX13D49EUC003.ant.amazon.com ([10.43.164.91]) by EX13D49EUC003.ant.amazon.com ([10.43.164.91]) with mapi id 15.00.1497.028; Fri, 4 Feb 2022 09:17:48 +0000 From: "Ojeda Leon, Nicolas" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Gupta, Atul" , "Graf (AWS), Alexander" Thread-Index: AQHYGaJhvGW/R1BnMEuF/4tUUX1HFayDGlqA Date: Fri, 4 Feb 2022 09:17:48 +0000 Message-ID: <51b4eb6b2c1049f29e21dd6a208e6965@EX13D49EUC003.ant.amazon.com> References: <68baf235a1b6fe824424f874c6d6f5a015676717.1643919691.git.ncoleon@amazon.com> <20220204083602.w2r7c6hwj423a6bm@sirius.home.kraxel.org> In-Reply-To: <20220204083602.w2r7c6hwj423a6bm@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.164.142] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Gerd, = > Hmm, so you are hiding the #define here to avoid updating Protocol/PciHos= tBridgeResourceAllocation.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 reso= urces are allocated we have base and size. However, the allocation happens = after CreateResourceMap is called, this function is the one that iterates o= ver 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 r= equired for that specific root bridge. For the pre-populated BARs I retriev= e the Base Address of the Root Bridge before placing the resources at the r= oot 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. > Also: Maybe split this series into two? One for the host-provided bridge= s, and another for the pre-populated bars? So the former can already be me= rged while the later is still sorted? Yes I will do that. > take care, > Gerd Thanks, 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