From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.6362.1649857528713508562 for ; Wed, 13 Apr 2022 06:45:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=PUwHwL8t; 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.147.86, mailfrom: prvs=0102df6825=abner.chang@hpe.com) Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23DD8iNc013384; Wed, 13 Apr 2022 13:45:12 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=XJI7n4dkpw2UAlpKDozwSu6Cw1oEtlbWuzmDIxUiT9E=; b=PUwHwL8tunSbW2gFG+CAG3gQ0S5TQjm3mBH2oBqKiDQA1G0FDEarIRb/R7ZzdHBk/DRB pif6nnWpNzaGRn08AmI/N65jw7DDFTLs50yjWo3fVfUT4eGFarICjN5ctbbppfZdnMJb CbXfkXyirJZxoaKyNJkawZNwMeNpF7mloqdLRNtzprxjzau4xk4hDuvYcuPfV3Jh6IBm 7T8XBeELAZIR0jGIOe3BipfJqfJt1zCgVktoNtxKLuHvkj5ufrcP+TNKBvRtTX/FVpnh 0cRDo+OUzBkNTWJZRancGt30VrIxCjMcNb3WIfSltTI8EeXIB55Fo1jmLy+qCkiPeXws +A== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3fdy54ree5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Apr 2022 13:45:11 +0000 Received: from p1wg14924.americas.hpqcorp.net (unknown [10.119.18.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14881.it.hpe.com (Postfix) with ESMTPS id A85CB805E16; Wed, 13 Apr 2022 13:45:10 +0000 (UTC) Received: from p1wg14924.americas.hpqcorp.net (10.119.18.113) by p1wg14924.americas.hpqcorp.net (10.119.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 13 Apr 2022 01:45:02 -1200 Received: from p1wg14921.americas.hpqcorp.net (16.230.19.124) by p1wg14924.americas.hpqcorp.net (10.119.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Wed, 13 Apr 2022 01:45:02 -1200 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 13 Apr 2022 01:45:01 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZnPKG8o3X/ucNbu9G1BK0QwNztCrUzhI77HBxsAPLJx2sOyfpp5Qr51wOQv7TxHqQBQdsKiyHf/n03IRO19PGmeiCjd8X9nQVSH2YKowWDIB7BIPaNvH50qBsQEoIjA8dx55nAwLmGnJKuVuQ5P4zDYu+fJF3ZTQQy5LIARO2T7iFkoN36AmyUg6Z/HsfE4bWxH8hhZstgN5Vy4yXg1fQihsxi2phlCKQRIPPQqMcbc4j0Q92MqaY38/NvXmlelVd/u0VjRU+9KPITUFne/AX4OYXQtm/zQpkFrbm1ERWaGdhgPwivpr7C0kH1MstFTHQqr7ty4d+PxHdBZ9g5cug== 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=XJI7n4dkpw2UAlpKDozwSu6Cw1oEtlbWuzmDIxUiT9E=; b=A/HXxPChlddxI/IuXay5TfdZK4ZzGtmYYLgRMvJT9tfOEvFSFMqiMvxLh08kUCpl1JWa3xAdV7YQHPvhyIV74EW6NIrGcOvIAoiukvdHb1yA/3egTe+BciDAB6w83ekGz2+K1PSt1Z0MgOhsfWZZcIH+USAH/OfWbyYDn7JwtlJnxC5ya9ZXuIFuPwBRJHH0mFSp2g5jmWF6KIsjSnC2f8j0BFjYYRs6xA/NlWdmATEuIIvGZPMMD1lZNeqHqDrjgCVMI+rH2qVyzU6jKChpoME0HYI8zMlSelP5akTDXu0xo9BT2clYbP7ToOmAOmbRGtvpT33EuKsYWtYOGgH6qA== 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 MW4PR84MB1419.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1a6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Wed, 13 Apr 2022 13:44:55 +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 13:44:55 +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: [edk2-devel] [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Thread-Topic: [edk2-devel] [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory Thread-Index: AQHYSmKLbBt7zfC830SDabFgkVUBzaztV/HQgAAvqQCAAFuB4A== Date: Wed, 13 Apr 2022 13:44:55 +0000 Message-ID: References: <20220407093304.1551182-1-kraxel@redhat.com> <20220407093304.1551182-2-kraxel@redhat.com> <20220413081216.l6j33a7emc3yy2qq@sirius.home.kraxel.org> In-Reply-To: <20220413081216.l6j33a7emc3yy2qq@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 598cdd1a-39c5-4d5d-ba46-08da1d53cb20 x-ms-traffictypediagnostic: MW4PR84MB1419: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: OHGT2OANXTReRRVg8u71Id++H8rRwMawEON212pj2M990W4tGhyRxlAaBxR2bP3vrtb6Erv3gLoRUAwPcmkKzuReBA1KJl9RwLZHgzzKLq5HGuvmYGwB9vft0ALP7LRj5pWnGxZVGeubNeck8QpHJFIcT/DMZeUjwltOvRmnkYjPiimCYXw91NI2MnDT1YwQ9LsZ2CS63HM67SQYjt854MtUP7lwd1ibaXKtDFeOoumk75FmXf6zkdhh3R/TiHASDYguVx/Cv8edz17ZcB6b1Jqr9JpFG++Xc2D0Thn88tBcb9Pwf8CDWpJN3mCJ5Ut4cICIiccJPV8Ofqt96Xq4spMv8T40ysRk6+JD5qSiw0VuqpQL71qLaiaXzRnyssL3a6Q6Is8vr6BqHamc3H1dWo6bjZTyMH7foBFGJEY1y9bLoKtQfAW53xCqPwTYvytMlcgkinukUAv2l2NaKiSO3Y92yfY8+Ypbf/0sxPuiAcJawn5w7ElyFYDpq3DEbZ5c5iG4NzvcMjOM1bjRjPj/Hm072dVHKPntOgenYLrp1vSZrEyaO4w91H+z8Iq9vGGfEVBr0EHhmGUZMSy4VBmj+nDNdOlz83M2PSsEB419e/6nitCb2MIqmk4B+UsR3eu8nFMmWomYmoHtnEhApUzjbVsstcpjKmDerf/QMnAXTGJy9K0N8Tp+pLyTu9sVAnerlxiJRsYAM96/OHhIqHuopA== 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)(33656002)(6506007)(53546011)(7696005)(2906002)(7416002)(71200400001)(316002)(110136005)(54906003)(26005)(5660300002)(4326008)(83380400001)(8936002)(76116006)(122000001)(186003)(52536014)(66476007)(66556008)(38100700002)(55016003)(64756008)(66446008)(8676002)(66946007)(38070700005)(9686003)(82960400001)(86362001)(508600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PAQMn4co6i8taaEbNgUgfZRNUQ6XoFsvkAi4a67/44h1mdjj6bypy4uuHXQg?= =?us-ascii?Q?tGrmUJkNqcyat/bcAsVIFOH9MiY1jU5+TQrXYe1COXaSRIM5HV/i0SLWo2yt?= =?us-ascii?Q?sEFBFBKcyyir1S6Ed9t7I97j5YJu3QbeXVlodolZxF9mrqoUThC9H9Fkg+ll?= =?us-ascii?Q?LKtMNN918Xx58EUsf3H9WIdbClrzkIZOsvYlmnz+0oJxd6nDyuEM+RkoOj1R?= =?us-ascii?Q?OMAXcC5j5YlMtigtvrQhgIw2JtY9/2s+RmGzkMSGDWQEpmZTFqpbbSn2Ufxf?= =?us-ascii?Q?+ZIwzRWJg64W/PelIxfxvfgW4gxa9V3v1CNUzmSJ0DFbl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4Lp6M2k3IYmPJFsYESoefSyCuSKz/P3afEfl247rVy9gASw5zTQW?= =?us-ascii?Q?EEjJHcMAjNbNDPx8LrsoUakz7fqlMeimdvaJ8m4WxJLnPoOQCsvFFyF+fY0q?= =?us-ascii?Q?I7O46Fa4CK79JzueCpWtUp8ZHdTVslgAbDGbUHGx5h4KFzgpHnbyqSiN6ODk?= =?us-ascii?Q?PFv+SNIcPt4gHYXl6Q3GSe9zZcW//dyphmt4Wj7BIiquhW/hI/T3+72IoU6W?= =?us-ascii?Q?LdfbrmJGl3+V2i8bPxAa0DJ1RNu+EbKma/Ypu59TK4PvxvjMM3B6AVsjqQ4d?= =?us-ascii?Q?rMjIK1SQR4VVJwicYrIZ+h2OreZuiRsFSeR66q/dTLGtE2kp4KDZ5ut8Gb9o?= =?us-ascii?Q?62VTY7jGu+ET1QTinivTf5QcTzMLu8G4GL9z3wdMp9BI8jgmj6RLHZkTByHe?= =?us-ascii?Q?Bz5XYDXVoiLxpMaBsG+J1V4xj2sR9/qLTuONlr8Ml9LQLAae90bYB15HgBxW?= =?us-ascii?Q?xu+cFY56WdVZL5Kz0yoPuXh8YziOsyPVE0ofWBPmShf6mlrbBZVu69ri4Kd/?= =?us-ascii?Q?8yGhp1en8Q=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: 598cdd1a-39c5-4d5d-ba46-08da1d53cb20 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2022 13:44:55.2976 (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: wShlgQldCFaCsyW8ZLfmX97j04JWTvQuYP3K+5G1vTzdEanU/CYCSV5lvU+Ev4leM1/CZNMrIX+nsiaWTUh7CQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR84MB1419 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: J5qe3HtTw7qmrb2pD5_OJKxARepJpgnU X-Proofpoint-ORIG-GUID: J5qe3HtTw7qmrb2pD5_OJKxARepJpgnU 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-13_01,2022-04-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=867 lowpriorityscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204130073 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Gerd Hoffmann > Sent: Wednesday, April 13, 2022 4:12 PM > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) > > 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: [edk2-devel] [PATCH v3 1/6] MdeModulePkg/PciHostBridge: io > range is not mandatory >=20 > Hi, >=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 ResAllocate= d; > > > DEBUG ((DEBUG_INFO, "Success\n")); > > > + } else if (Index =3D=3D TypeIo) { > > How do we tell the BaseAddress is set to UINT64 because "(BaseAddress < > Limit)" or "gDS->AllocateMemorySpace()" returns error in AllocateResource= () > for TypeIo ? >=20 > Does the reason matter? >=20 > io resources are optional, so if there is no io address space available > it should not be a fatal error, no matter what the root cause is. If the device requires I/O resource however the io address space is not ava= ilable, shouldn't this an error?=20 >=20 > > Is "else if (Index =3D=3D TypeIo && RootBridge->Io.Base =3D=3D MAX_UIN= T64)" > more reliable? Or I missed the code logic here? >=20 > I think it is not needed, but if you think it is better that way I can > change it. This is more clear to reader. That means that we don't have to treat it as = an error on the TypeIo if the base address for it is MAX_UINT64. Abner >=20 > > > + /* optional on PCIe */ > > We should use double back slash for the comment in the function if my > understanding of the coding standard is correct. >=20 > I'll fix in v4. >=20 > take care, > Gerd