From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web10.6067.1582711443305643570 for ; Wed, 26 Feb 2020 02:04:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=zIDmAPNY; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f67.google.com with SMTP id a141so1539263wme.2 for ; Wed, 26 Feb 2020 02:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=omQrqFVIbKaa7UycGOldOHaDLlRnkBqylAZQG8uuiD0=; b=zIDmAPNYVqBILvQPAf9B5hIGG6iOk1FvxWF0lHR/VHftl6yogJcmifeJ4c7NAtcWoX o4nQRUpvUTv2IQwqbHdEuYrgqe804aQYueNQfuudAbhSfmusS89MSqrfWj1JhJvatTo4 KBdB48v7/c5LhyG2AxcySY7D0V7pHKLCP+0MepEmKyKz2qVIefeTJ1n+taSuxB2vOTda //bK1NfaF5exzSU9eYVUJZrWAURFt2HwOr/LsmmFdJAg4APnEKyiiHbTNy9IrIdnIgUy cMm3gEdGKyq1xOiKVcEcaKu5IDwRoQ3uZpDn6m7AhDI1o5cW9A9IymSkIlYO5PpMaoiO NiJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=omQrqFVIbKaa7UycGOldOHaDLlRnkBqylAZQG8uuiD0=; b=sXjnjblLgJ4iqW4Klj/ek6XFwKDqlvwULovz7BvH+IDqwmGtdNW1iVT5MA2wiLTrTd BfoYzY9us4tpQDEjnJD0HHURKvLG27E6nqzsYnqVylj6x7JgyRjaVlSHQ6m9FGj1fnzs EJApl9Hhh8JBr3gSCiC6+ykx3aC/YikEq0yJlPixBv7xyoPG6+f1w2DXjVQKCFh6CBf8 JFYvkvmv31wDNN3Uky0w7d8vbd91JoRK1lBb9eMh6+y2VGTJgEF80QCqfpL+DFqcjxTp HwSNBvg4Vb5PeiQgEO0SAhw9QpNjsY1t6fjCHinilT1X58xUoImfy0dISVKrcKFr0EHe QzqA== X-Gm-Message-State: APjAAAWY5uQ68hxIk8DDn0PJIjhchDc67gjxeXIdeqTEB4T953A/nEia EqDU7yCjoetNxrE0Qyjolor6RwtYTglixA== X-Google-Smtp-Source: APXvYqw+PjTjSAgLIbd8uIWIHD6nJfygbaMU5j/NKDH0HoHDDWwMutDivFl2WQeC5NOWLzCqeQYSKg== X-Received: by 2002:a1c:9811:: with SMTP id a17mr2140606wme.8.1582711441137; Wed, 26 Feb 2020 02:04:01 -0800 (PST) Return-Path: Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id b10sm2559159wrw.61.2020.02.26.02.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 02:04:00 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif@nuviainc.com, lersek@redhat.com, sami.mujawar@arm.com, Ard Biesheuvel Subject: [PATCH 0/6] ArmPkg: eradicate and deprecate by set/way cache ops Date: Wed, 26 Feb 2020 11:03:47 +0100 Message-Id: <20200226100353.31962-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 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 -- 2.17.1