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.web08.9336.1642413713338616503 for ; Mon, 17 Jan 2022 02:01:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aGGq9ZUY; 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=1642413712; 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=ed/UtqjSglj66dqwvPEXJtbRUb1VARAbYkzOHRaKw2I=; b=aGGq9ZUYkl74tnE/Q6re5aZn8Gowhx9RPmUBQnGIReGEIaxT2NJL5+xI7QKCVWnPobLi8L Qa9h6VOe8y4o2NlsuF6OvQH5f8IujirhM/hceyc1//VRzUFPd8wmtv9v3tdKmotvBD8sc6 /euaxiOLJgFi1jXLDPncJBUJ/+U29nc= 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-356-ge-4dvx1PDuobFFAKhyAlQ-1; Mon, 17 Jan 2022 05:01:51 -0500 X-MC-Unique: ge-4dvx1PDuobFFAKhyAlQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE6421023F4F; Mon, 17 Jan 2022 10:01:49 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A05C570398; Mon, 17 Jan 2022 10:01:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B1517180060F; Mon, 17 Jan 2022 11:01:46 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Ray Ni , Liming Gao , Abner Chang , Jiewen Yao , Jordan Justen , Leif Lindholm , Ard Biesheuvel , Jian J Wang , Pawel Polawski , Hao A Wu , Ard Biesheuvel Subject: [PATCH v2 1/6] PciHostBridge: io range is not mandatory Date: Mon, 17 Jan 2022 11:01:41 +0100 Message-Id: <20220117100146.1965662-2-kraxel@redhat.com> In-Reply-To: <20220117100146.1965662-1-kraxel@redhat.com> References: <20220117100146.1965662-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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" 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..51a3b987967f 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) { + /* optional on PCIe */ + DEBUG ((DEBUG_INFO, "No IO\n")); } else { ReturnStatus = EFI_OUT_OF_RESOURCES; DEBUG ((DEBUG_ERROR, "Out Of Resource!\n")); -- 2.34.1