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.129.124]) by mx.groups.io with SMTP id smtpd.web12.4352.1654159342618250751 for ; Thu, 02 Jun 2022 01:42:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cniWQTKO; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654159341; 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=+HV4TFZumd1sEbD1zhv7SSK4hTr6FpmaWABqNG1IFS8=; b=cniWQTKOwjre4/W6tekfrO8pd22DJBM/cwR5+SVjm5Q9J5zbu7GJ86gjWXYfvR/CQEMSTz S1kUb0CHUxJk7sfK4JKJZUWhIEH7VUs8pvaRK7wDT+6dH07RP+GFaS/8JzC7cV0E75qBhW VcmmYgTZ2fba9g+sUhXTQi+9CmMDtBY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-bWidjuj_M_e7uk4O5R2sHQ-1; Thu, 02 Jun 2022 04:42:18 -0400 X-MC-Unique: bWidjuj_M_e7uk4O5R2sHQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CADF296A62F; Thu, 2 Jun 2022 08:42:18 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C96CE1121314; Thu, 2 Jun 2022 08:42:17 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 673801800397; Thu, 2 Jun 2022 10:42:16 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Hao A Wu , Pawel Polawski , Ard Biesheuvel , mateusz.albecki@intel.com, Abner Chang , Ray Ni , Leif Lindholm , Jiewen Yao , Oliver Steffen , Liming Gao , Gerd Hoffmann , Jian J Wang , Jordan Justen , Ard Biesheuvel Subject: [PATCH v7 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Date: Thu, 2 Jun 2022 10:42:11 +0200 Message-Id: <20220602084216.159028-2-kraxel@redhat.com> In-Reply-To: <20220602084216.159028-1-kraxel@redhat.com> References: <20220602084216.159028-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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 pcie host bridge configurations without io window in case there are no io reservations. Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index b20bcd310ad5..354be6dbb313 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c @@ -1085,6 +1085,12 @@ 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) && + (RootBridge->ResAllocNode[Index].Length == 0)) + { + /* I/O is optional on PCIe */ + DEBUG ((DEBUG_INFO, "Success (PCIe NoIO)\n")); } else { ReturnStatus = EFI_OUT_OF_RESOURCES; DEBUG ((DEBUG_ERROR, "Out Of Resource!\n")); -- 2.36.1