From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 4263721F2E16F for ; Tue, 17 Apr 2018 02:42:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DE3F76FBA; Tue, 17 Apr 2018 09:42:10 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-161.rdu2.redhat.com [10.10.120.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C2CD7C30; Tue, 17 Apr 2018 09:42:09 +0000 (UTC) To: Udit Kumar , Leif Lindholm Cc: "Kinney, Michael D" , "edk2-devel@lists.01.org" , "Gao, Liming" References: <20180413174211.858-1-leif.lindholm@linaro.org> <20180413193143.t45tua3yi7sopk4d@bivouac.eciton.net> <20180416100712.6v642ycksvmoffvt@bivouac.eciton.net> From: Laszlo Ersek Message-ID: <2ceaae52-2061-a412-638c-7ebf73f6e5ff@redhat.com> Date: Tue, 17 Apr 2018 11:42:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 17 Apr 2018 09:42:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 17 Apr 2018 09:42:10 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' 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: Tue, 17 Apr 2018 09:42:11 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 04/17/18 10:15, Udit Kumar wrote: > Hi Laszlo, > > Considering all possible option is best to have in code 😊 > But IMO, We are running UEFI on LE CPU only, Not sure someone is running on BE. AFAIK even specs says LE. > >> (c) assuming we introduce a CPU with BE byte order, the same driver >> source will work (for both LE and BE devices), only the lib >> instances will have to be switched around. (This might even happen >> dynamically, via function pointers.) > > I assume , when we say CPU in BE , this means we are talking here new CPU architecture > and new SOC. So I expect some changes in hardware IP as well. > If not then, I see still this working with patch of Leif > > Like > CPU (LE,) Driver (LE) Uses Mmio > CPU (LE,) Driver (BE) Uses BeMmio (Mmio with swap) > > CPU (BE,) Driver (LE) Uses Mmio (Does read and Swap) <-- This will be new Mmio Lib for particular architecture > CPU (BE,) Driver (BE) Uses BeMmio (Mmio with swap) <-- Swap of swap will make same value > > With this, I see driver code is same irrespective of CPU arch > > thoughts ? Apparently I've needlessly complicated things already. Feel free to proceed as you see fit. Laszlo