From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.2833.1649827512749356819 for ; Tue, 12 Apr 2022 22:25:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=Te487MEc; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0102df6825=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23D2fQGi027841; Wed, 13 Apr 2022 05:24:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=KqDE73Qmcp9LWNDInADWimKhTyqLjAVkhFKKQc28WFE=; b=Te487MEcuJDKOVI+ArmKwnsM/eEqQPxRxy2p0K1pE/ysaWstAQn+hHVs80FZWNNxdTXv Hx3Eo7lUPPnDkU5Eupr849ijCD1RYlT/UqLbom5ijapT+jmTdSVOfNUxrr8tGWj/73Zj r3DEgpBFQSOBoq2aEXJT67NbvEMtALMDUiDR+awDvBKZL2Ey2t60wnkm+WSVtXplc36e jE2YZ6GgXZxVIsH9j3OoJdSQd5lUU5IXcwRRGaFt7vKdtukVVd20Xuuoe++Medwdp+ee 6sBGXmQD3/6OcvIj6eO2WcQTyPPHSZuddiV8JW46Dgj9RsAeWC17/fkYCdhfeCF9TSR0 BQ== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3fddxtcvha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Apr 2022 05:24:57 +0000 Received: from p1wg14923.americas.hpqcorp.net (unknown [10.119.18.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14878.it.hpe.com (Postfix) with ESMTPS id 60FDA131BF; Wed, 13 Apr 2022 05:24:53 +0000 (UTC) Received: from p1wg14923.americas.hpqcorp.net (10.119.18.111) by p1wg14923.americas.hpqcorp.net (10.119.18.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 12 Apr 2022 17:24:52 -1200 Received: from p1wg14920.americas.hpqcorp.net (16.230.19.123) by p1wg14923.americas.hpqcorp.net (10.119.18.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Tue, 12 Apr 2022 17:24:52 -1200 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 12 Apr 2022 17:24:51 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NODKkB+gPU3nCxxtHAeTl9Z07m8VWQTNG0tpuvMGaxxE+3PP/RJbK0YzSlFAEh2Hf4EfE3NYLPVLsYt+k39l3xfTHUTF9MekyTTX+KpUBNySS2BXPmoZLxuiz5R7o8tzNz7OFWnhXz8x/yVMQ2yN3sQYvYs3nSRlriEihOXsFDAgkK7X/Qgid35ley+XvFVVSF/lw2yNtBbY+513bl9krXSgjlJn0LIQ6kOCuHU/ImAm1ybiovBwnIh58rX7skWj5ZtbPRUihvVWYCdoZzBzczXl3LkyXMkSG/7fy3OgM6gLUFC8/wCsnSnhrl2aCRJpGqwx4N42qXe3TaYTuzH6Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KqDE73Qmcp9LWNDInADWimKhTyqLjAVkhFKKQc28WFE=; b=gG7W58xCTrkAz5aTB3OyioXoNTztx98hxBq1kWHOqcLRI5wY+TR8Dyal9c/0VcDdw1cmhykwaupnlBEOKHg9DwVrcYNx3DwxpaJLpT0xzqDWgWkSHBw5E6DBemKJAThemRhVRbhS+17vQiY6qX/eImdyubAfJVepMIEGS1mTIHORt+7rJc06zmohVqvKiez8EBlogZaoa5QtQU/DQrQTg5TwZ5qE+i0GisW3linziC2KC1A+re3PfBCbW4qZl8rTelKBa03HPU8R6msjNG9nLGGI2SkfHGIV4hMALzaK2ARoHetgkHH0ydJ76zKvaD/N+F/shj3dvAOYdEHodc6IQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:173::6) by MW4PR84MB1732.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1a7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.30; Wed, 13 Apr 2022 05:24:49 +0000 Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc95:6a61:fb46:aed1]) by PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc95:6a61:fb46:aed1%9]) with mapi id 15.20.5164.020; Wed, 13 Apr 2022 05:24:49 +0000 From: "Abner Chang" To: Gerd Hoffmann , "devel@edk2.groups.io" CC: Leif Lindholm , Ard Biesheuvel , Jordan Justen , "Jian J Wang" , Ray Ni , Hao A Wu , Jiewen Yao , Liming Gao , Pawel Polawski , "Oliver Steffen" , Ard Biesheuvel Subject: Re: [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Thread-Topic: [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Thread-Index: AQHYSmKLbBt7zfC830SDabFgkVUBzaztV/HQ Date: Wed, 13 Apr 2022 05:24:49 +0000 Message-ID: References: <20220407093304.1551182-1-kraxel@redhat.com> <20220407093304.1551182-2-kraxel@redhat.com> In-Reply-To: <20220407093304.1551182-2-kraxel@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e99e8368-6af8-42ad-c0b9-08da1d0dee3b x-ms-traffictypediagnostic: MW4PR84MB1732:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8CVWw2baFn2h5QhB8jAl40RSMRocc1heKOsu2h9ZemLgOeCik5c18PxcfKLOZ0ogkf5VBlYz5grGNPzMArYCi/m3owU1A8mRZVLYD78IfG8MtujcreF2RdeTVUsyf4ZUz0FwHiaeK6UYGcJBPioYG7mrU1a2yGuVBGEjMrcyGnEcOqR8jJp59xIoZ3L1goAHBYo1Q7JthjBHkVldlq/R7utaOqzp3zdiNlqkpV4JC9QKFrCg/TBwvndDc+p1a6dUtyNwKGPwrLRky7PUjjXGGOkpmlmmoBp7HJu0Gl7ATJN800DVWOJLyT5MNJhxKCGI09Rty9JvA/djxfaxRkfn/EG2CiBLS6rvKLBhTbOT7jcuALyv2TUSODVyvJojZhRTGOLirC1wF/ISpNOXcnXnoumMi0T86F4T+7YTLFioAvpQdcUPaabdZPonS5n/PD2FzmfOiDS4WRIi+aH03yk+aAi6y6bdqaMZppqDnw1y1mbvrrlvbZnN9f41hBoPUZ6jrLF+vqxf6w94ZJgaj4bkeZVsw+yNrJho+vqEtUyjhxBK6RPxj8HJnvd+f79SgprqEdeQIi2qkgdRcZn1fhF2Fw+PaoQOe0tsHGcTUoQBuJbLTIb+BnftT+Ly4TPy/a4mxNB0qV/7Au/rJOz9j47V1D3oSF6PUw9IpGOK5LIvnChGbVX0LXZVj4zEdR9A4/esj4yTIy/jwCzu8bFALk/c1A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(366004)(38070700005)(82960400001)(55016003)(53546011)(33656002)(54906003)(6506007)(8676002)(38100700002)(71200400001)(4326008)(66946007)(64756008)(66556008)(66476007)(66446008)(76116006)(5660300002)(7696005)(9686003)(122000001)(110136005)(186003)(316002)(83380400001)(7416002)(8936002)(86362001)(52536014)(2906002)(508600001)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?j7w6hhlc6tKm6hhqkvPyc6E/YSxwO7pG2j6f63BofII7RAT25F+KpZN8w6Ki?= =?us-ascii?Q?UInyubV/bw6BM+8OLb5GQ5uhKkB8APLhsljQP+EFXsdsoPDKSEthJBMD7Udv?= =?us-ascii?Q?g06D76g2MFpzJbJwIa9BexvAGCTY+1OoQ9hRbUV4LZf+c5dLGWEaVnjNGBp6?= =?us-ascii?Q?bjH0LEzcg17S+PQGKdgCTvYXPUMaNPd825a0xl5GxGJwOONrXCvMIZ/lbfHg?= =?us-ascii?Q?7fP07/TQJWl5TpVUvXpnSns/b/zxbgIcl0BKeNpnM++2kw0DYm42GPQM5Tzg?= =?us-ascii?Q?me6L0WRpOCVQuKkUDm8WWA6P6VEG9yT/98+3ZXudJ6Qk9sZ3J1Goi8/sUrg6?= =?us-ascii?Q?j24BJPFnJDfZ0KhuFOfbxxw8lWl1iGmBgbAaEyYvUl8xqOIVVF0MNV1BJsuH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E4NHc8CPkw544XuHRARCs3n?= =?us-ascii?Q?fRDYFmySyHDIMRM1qG8mT1SVL41LipMbZunP2LNneXbi5AHiO0fFbFOrJHIB?= =?us-ascii?Q?Y3z064RWdgSEwzJlMfLwOvzCXp3ZqAwbAK+4UWw5LwL8zLZSVQU3X2yMzgGx?= =?us-ascii?Q?Mfz0x3eJjTKOT1P0HKzAquzgJMjT32OxHp62ZR9OX+g6sngnJWDGXL3ngXb4?= =?us-ascii?Q?XKwILTx1RnpXBwHq15MCyOfiuZrRCOZBQPqTztOoq/21Vuc5rCLxnwuTRFhR?= =?us-ascii?Q?9OD38bxzIlIL5bX9z9G4NcVQgB+3R9UTEelT7dkZlIxCJnEk+yPiMcgc2xSJ?= =?us-ascii?Q?aRzustUuFExLxsQmPWRxDd/BQLTo3n81fSCWF+a26pk7/ouC2My0RCtqMV/m?= =?us-ascii?Q?i3iQDZOTKuDDV7NFklErQSkYUR0EwiZ5PtjSsR5ILYuBfTKC6WqK2HJSusZN?= =?us-ascii?Q?WD/Y63RjVA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: e99e8368-6af8-42ad-c0b9-08da1d0dee3b X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2022 05:24:49.3770 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: okqqVGbDvYLWGSyhxyy+F5lIAlgJ0sIZVGkSDE8RCLEujE2jnbBR4Bn64FBcn+lWutSiVm0b1dxEi8Ul8p0mdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR84MB1732 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: WLs8x-FXhgPj6SnacJis1MlkTdbprlAY X-Proofpoint-ORIG-GUID: WLs8x-FXhgPj6SnacJis1MlkTdbprlAY X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-12_06,2022-04-12_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=784 bulkscore=0 adultscore=0 spamscore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204130031 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Gerd Hoffmann > Sent: Thursday, April 7, 2022 5:33 PM > To: devel@edk2.groups.io > Cc: Leif Lindholm ; Ard Biesheuvel > ; Jordan Justen ; > Jian J Wang ; Ray Ni ; Hao A Wu > ; Gerd Hoffmann ; Jiewen Yao > ; Liming Gao ; Pawel > Polawski ; Chang, Abner (HPS SW/FW Technologist) > ; Oliver Steffen ; Ard > Biesheuvel > Subject: [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not > mandatory >=20 > io range is not mandatory according to pcie spec, > so allow bridge configurations without io address > space assigned. >=20 > Signed-off-by: Gerd Hoffmann > Reviewed-by: Ard Biesheuvel > --- > MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > 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 =3D BaseAddress; > RootBridge->ResAllocNode[Index].Status =3D ResAllocated; > DEBUG ((DEBUG_INFO, "Success\n")); > + } else if (Index =3D=3D TypeIo) { How do we tell the BaseAddress is set to UINT64 because "(BaseAddress < Lim= it)" or "gDS->AllocateMemorySpace()" returns error in AllocateResource() fo= r TypeIo ? Is "else if (Index =3D=3D TypeIo && RootBridge->Io.Base =3D=3D MAX_UINT64)= " more reliable? Or I missed the code logic here? > + /* optional on PCIe */ We should use double back slash for the comment in the function if my under= standing of the coding standard is correct. Abner > + DEBUG ((DEBUG_INFO, "No IO\n")); > } else { > ReturnStatus =3D EFI_OUT_OF_RESOURCES; > DEBUG ((DEBUG_ERROR, "Out Of Resource!\n")); > -- > 2.35.1