From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.6956.1643963812179033657 for ; Fri, 04 Feb 2022 00:36:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qiw7lX+H; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643963811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DKQf2Rvc2ckF3bQVZ1s7C7HzDvL8RLlAMu4ghGa9T1c=; b=Qiw7lX+HYxhW/b1BH6AVEyCbqai8X0Zt5lnG5HEtESpsoFI4N5e3iBG7ljqbgrP8sp+FMy 7XEANAc7O5xRDm9d7VBGlIhMjqS71bQUip5f/ZMAE3ZtewM1xwHmz3j29q6aUV7DI7qNC4 iqKa30NgLW5l3D4aValjm3yaRS3H0XY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-112-huI-oHnQNk6211HjPTKeDA-1; Fri, 04 Feb 2022 03:36:05 -0500 X-MC-Unique: huI-oHnQNk6211HjPTKeDA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C44A38143F2; Fri, 4 Feb 2022 08:36:04 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E6A778DE6; Fri, 4 Feb 2022 08:36:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E6174180039F; Fri, 4 Feb 2022 09:36:02 +0100 (CET) Date: Fri, 4 Feb 2022 09:36:02 +0100 From: "Gerd Hoffmann" To: Nicolas Ojeda Leon Cc: devel@edk2.groups.io, atugup@amazon.com, Alexander Graf Subject: Re: [PATCH v4 7/8] PciHostBridgeDxe: Extend service to get base addresses before allocation Message-ID: <20220204083602.w2r7c6hwj423a6bm@sirius.home.kraxel.org> References: <68baf235a1b6fe824424f874c6d6f5a015676717.1643919691.git.ncoleon@amazon.com> MIME-Version: 1.0 In-Reply-To: <68baf235a1b6fe824424f874c6d6f5a015676717.1643919691.git.ncoleon@amazon.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > - if (ResStatus == EFI_RESOURCE_SATISFIED) { > + if ((ResStatus == EFI_RESOURCE_SATISFIED) || > + (ResStatus == PCI_RESOURCE_PARTIAL)) > + { > +++ b/MdeModulePkg/Include/Library/PciResourceLib.h > @@ -0,0 +1,20 @@ > +/** @file > + Pci resource library consumed by PciBusDxe and PciHostBridgeDxe drivers to > + share non-UEFI spec artefacts used in both drivers > + > + Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. > + > + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the BSD License > + which accompanies this distribution. The full text of the license may be found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + **/ > +#ifndef __PCI_RESOURCE_LIB_H__ > +#define __PCI_RESOURCE_LIB_H__ > + > +#define PCI_RESOURCE_PARTIAL 0xFFFFFFFFFFFFFFFDULL > + > +#endif 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? Also: Maybe split this series into two? One for the host-provided bridges, and another for the pre-populated bars? So the former can already be merged while the later is still sorted? take care, Gerd