From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1301E2095DB8D for ; Sun, 6 Aug 2017 04:32:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D0CCC047B69; Sun, 6 Aug 2017 11:35:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4D0CCC047B69 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-32.phx2.redhat.com [10.3.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EAF9612BB; Sun, 6 Aug 2017 11:34:59 +0000 (UTC) To: =?UTF-8?Q?Marvin_H=c3=a4user?= References: From: Laszlo Ersek Cc: "edk2-devel@lists.01.org" Message-ID: Date: Sun, 6 Aug 2017 13:34:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sun, 06 Aug 2017 11:35:00 +0000 (UTC) Subject: Re: PciLib/PciExpressLib: 64-bit r/w functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Aug 2017 11:32:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/05/17 23:38, Marvin H?user wrote: > Dear developers, > > While browsing the KabylakeSiPkg code, I noticed that 64-bit registers are read directly via MmioRead64() as there is no PciRead64() function. > Is there a specific reason there are no PciRead64() and PciExpressRead64() functions or were they simply not needed previously? Validity of 64-bit accesses to PCI config space is platform dependent [*] and I guess the PciLib designers didn't want to deviate from the common interface pattern that PciReadXX() always succeeds (as long as the input parameter is valid), regardless of XX. [*] The UEFI spec repeats the following paragraph in several places: The I/O operations are carried out exactly as requested. The caller is responsible satisfying any alignment and I/O width restrictions that the PCI controller on a platform might require. For example on some platforms, width requests of EfiPciIoWidthUint64 do not work. Thanks Laszlo