From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web09.6160.1582713003806816576 for ; Wed, 26 Feb 2020 02:30:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YlIywtQp; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582713003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eJwe/ipDRGd0urlzrgcvPwDG7Ot/G6oSwHDL9+P+iZ8=; b=YlIywtQpA4Y9Ft5gt2LuxcHiGziYqhWp7ajCtl9smfig4PX8f0vvJv0DKh25PcwDws/wJx 5gtDxTS8eY7DWgaww07vZIYj9Dl8Orn0t7nDwIrgiuUXXyweA+4R2GfhQk1OrDjg9vsPoK Axk046qu0qI+S0a14C20LBn2bQYlmkg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-vf7-KR_ENF6-VQFfIgGwyg-1; Wed, 26 Feb 2020 05:29:59 -0500 X-MC-Unique: vf7-KR_ENF6-VQFfIgGwyg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 486E08017CC; Wed, 26 Feb 2020 10:29:58 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4179210001BD; Wed, 26 Feb 2020 10:29:57 +0000 (UTC) Subject: Re: [PATCH 0/6] ArmPkg: eradicate and deprecate by set/way cache ops To: Ard Biesheuvel , devel@edk2.groups.io Cc: leif@nuviainc.com, sami.mujawar@arm.com References: <20200226100353.31962-1-ard.biesheuvel@linaro.org> From: "Laszlo Ersek" Message-ID: <8467f806-a3cf-71fa-ca18-124eed23f7e4@redhat.com> Date: Wed, 26 Feb 2020 11:29:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200226100353.31962-1-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 02/26/20 11:03, Ard Biesheuvel wrote: > As it turns out, there were still some instances of set/way ops left in > the core code, in ArmMmuLib to be precise. > > This series fixes ArmMmuLib to perform the appropriate cache invalidation > when populating page tables with the MMU and caches off, allowing us to > get rid of the cache clean/disable/enable sequences which are incorrect > and pointless at the same time. > > While at it, do some mild refactoring of the ARM version of ArmMmuLib > first, and finally, deprecate the set/way ops in ArmLib. > > Note that the last patch needs coordination with edk2-platforms, as > there are a couple of users there which will need to be fixed, or > drop their definition of DISABLE_NEW_DEPRECATED_INTERFACES > > Ard Biesheuvel (6): > ArmPkg/ArmMmuLib ARM: remove dummy constructor > ArmPkg/ArmMmuLib ARM: split ArmMmuLibCore.c into core and update code > ArmPkg/ArmMmuLib ARM: cache-invalidate initial page table entries > ArmPkg/ArmMmuLib AARCH64: cache-invalidate initial page table entries > ArmPkg/ArmLib: move set/way helper functions into private header > ArmPkg/ArmLib: deprecate set/way cache maintenance routines > > ArmPkg/Include/Library/ArmLib.h | 22 +- > ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 18 + > ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 9 +- > ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 18 + > .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 9 - > .../Library/ArmMmuLib/Arm/ArmMmuLibConvert.c | 32 ++ > ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c | 468 +----------------- > .../Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c | 435 ++++++++++++++++ > ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf | 4 + > 9 files changed, 530 insertions(+), 485 deletions(-) > create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c > create mode 100644 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c > I'd like to leave reviewing this to Leif :) Thanks! Laszlo