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.web11.20630.1650544082266396295 for ; Thu, 21 Apr 2022 05:28:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=falwGkdd; 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=1650544081; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=28ZgjZt9UYYlhpxzldRGn/KCJqys7c32VypVkXn/M6w=; b=falwGkddC/IAsgyKn93zNHvGFlfpdLAbocaLsXGn2z8/Vs6PAhE51lRd2emLd9+wEpcWfU sn6MqR2/L2R8kp9PPwSL947/of8sVF9lI2APonxdqw4BppsECdvV0+S7fTa41nx/N0zADW ZtPnwnC3mtcOnUQXMX/2xVAqfGBOsRs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-146-KqquXeGWONWj1N7g2lgu8Q-1; Thu, 21 Apr 2022 08:27:58 -0400 X-MC-Unique: KqquXeGWONWj1N7g2lgu8Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3660185A7BA; Thu, 21 Apr 2022 12:27:57 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BD73C44AE9; Thu, 21 Apr 2022 12:27:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 428B6180039F; Thu, 21 Apr 2022 14:27:55 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Gerd Hoffmann , Ard Biesheuvel , Liming Gao , Hao A Wu , Ray Ni , Oliver Steffen , Leif Lindholm , Jiewen Yao , Jordan Justen , Abner Chang , Jian J Wang , Ard Biesheuvel Subject: [PATCH v4 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Date: Thu, 21 Apr 2022 14:27:50 +0200 Message-Id: <20220421122755.1436026-2-kraxel@redhat.com> In-Reply-To: <20220421122755.1436026-1-kraxel@redhat.com> References: <20220421122755.1436026-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true io range is not mandatory according to pcie spec, so allow bridge configurations without io address space assigned. Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index b20bcd310ad5..b83761721e4b 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c @@ -1085,6 +1085,9 @@ NotifyPhase ( RootBridge->ResAllocNode[Index].Base = BaseAddress; RootBridge->ResAllocNode[Index].Status = ResAllocated; DEBUG ((DEBUG_INFO, "Success\n")); + } else if (Index == TypeIo && RootBridge->Io.Base == MAX_UINT64) { + /* optional on PCIe */ + DEBUG ((DEBUG_INFO, "PCI Root Bridge does not provide IO Resources.\n")); } else { ReturnStatus = EFI_OUT_OF_RESOURCES; DEBUG ((DEBUG_ERROR, "Out Of Resource!\n")); -- 2.35.1