From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:ba8:0:1d4::6950:5845; helo=duck.fensystems.co.uk; envelope-from=mcb30@ipxe.org; receiver=edk2-devel@lists.01.org Received: from duck.fensystems.co.uk (duck.fensystems.co.uk [IPv6:2001:ba8:0:1d4::6950:5845]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 247332244E3F2 for ; Mon, 16 Apr 2018 07:34:11 -0700 (PDT) Received: from pudding.home (unknown [IPv6:2001:470:1dbe:1::c5f1]) by duck.fensystems.co.uk (Postfix) with ESMTPSA id 2236F14491; Mon, 16 Apr 2018 15:34:09 +0100 (BST) To: "Kinney, Michael D" , Leif Lindholm Cc: "edk2-devel@lists.01.org" , Laszlo Ersek , "Gao, Liming" References: <20180413174211.858-1-leif.lindholm@linaro.org> <20180413193143.t45tua3yi7sopk4d@bivouac.eciton.net> <20180416100712.6v642ycksvmoffvt@bivouac.eciton.net> From: Michael Brown Message-ID: <52ea5684-380d-0519-2545-6ef7f62198ae@ipxe.org> Date: Mon, 16 Apr 2018 15:34:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH] MdePkg: add big-endian MMIO BaseBeIoLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 14:34:11 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit On 16/04/18 15:10, Kinney, Michael D wrote: > I agree that the opposite use case is a BE CPU > needing a LE operation. > > I think we only need a single lib class and lib > Instance that does the byte swap and we should > not use Le or Be in any of the names of the class, > instance, or APIs. Just "Swap". I may have misunderstood, but wouldn't using "Swap" within the API names effectively encode knowledge of the endianness of the _build_ platform into the source code? This would prevent the same source code being built for both little-endian and big-endian CPUs. Michael