From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web10.6070.1582711452323966753 for ; Wed, 26 Feb 2020 02:04:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=vVpL3rz2; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f67.google.com with SMTP id r17so50317wrj.7 for ; Wed, 26 Feb 2020 02:04:12 -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:in-reply-to:references; bh=7NrAZ4R3wr27OM5+CCA0/eYhzSeobBJlzbh18kcEgAw=; b=vVpL3rz2EJM1dcdGjgU3Zpwjlhm5IYVkItAjUmR6aqTcAZAvtvkHVZQLMfvfx66pQU Z23v1cvYlwy8ABt9Ulhwsq7EA1wMfJXneV81z2L5ZH9YET0madf2SODbKLNypOeYRb1j OXkjf+aXBnKa2sZH/z0shuGl4m5Q/E7y6zCzHf5RxV8ZGOpRkoQbS75jKcOscVMiW3AC XDyjLpJ8vsuzf+clY9Ay11YVz0xrP9rxwOKUCM98DgDf5uaTDLg2xMICNQkgXqeuJw5p 3mDaX4Sa8/yUL8FywYv9TAUqTcqSqKjC/zc6Fg+lsb061HWLr8Un8eZSj2WKVHJ1Nj3K q2qQ== 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:in-reply-to :references; bh=7NrAZ4R3wr27OM5+CCA0/eYhzSeobBJlzbh18kcEgAw=; b=PmbzMcj6+q1+tePIn3J2FNbF0tAsGnwskK0DQEDRB3vKW5NvTE6TQg6fCKOxm/mnfw r5OxbW7PqNvBU4gidqtXpTVMNgQ8xpUKbAKGonwXv8vu0pgO4i/erm7HwGzclVt+akZA NNqV8Z7A6VWlCOewznDIUK3p/sEhySLhOouyDMU4Fb21We4R5q6hPP9vWzUcVQPmrYml 0GI2vKEfTzyORhi3xszKKNY44Cno1mbfvbuE04Z7Bm3FY663oOAR58XIeaPc2xQWiCoJ yBSGKmNhKR/RmNsB3udfl/sk9X1SixLrvMtv9dt5zjHxohHC/pSH5VWvF4nnD7jc0DOY 0xbA== X-Gm-Message-State: APjAAAUExV6kxAPAPAs6zggfvm+zAEZpgPBEY35JpXcrtQoPXqABYKL7 WbpNy0OrDunRICFc+cukqpA2ehwFWmzENg== X-Google-Smtp-Source: APXvYqz8/RDCbSoto4tymIoX8LxKWGGBrGmqQAll6a5FIWg+dZbj78mgBPxnW0geaIP8cneC5NU37g== X-Received: by 2002:a5d:6406:: with SMTP id z6mr4561779wru.294.1582711450343; Wed, 26 Feb 2020 02:04:10 -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.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 02:04:09 -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 6/6] ArmPkg/ArmLib: deprecate set/way cache maintenance routines Date: Wed, 26 Feb 2020 11:03:53 +0100 Message-Id: <20200226100353.31962-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226100353.31962-1-ard.biesheuvel@linaro.org> References: <20200226100353.31962-1-ard.biesheuvel@linaro.org> Cache maintenance on ARMv7 systems and up should be done by virtual address if the purpose is to manage the cached state of contents of memory. Set/way operations are only intended to maintain the caches themselves, e.g., to ensure that the contents of dirty cachelines are brought to main memory before the core is powered off entirely. UEFI on ARM is typically not involved in the latter at all, and any cache maintenance it does is to ensure that the memory it occupies and modifies remains in a consistent state with respect to the caches. So let's deprecate the set/way routines now that we have removed all uses of it in the core code. Signed-off-by: Ard Biesheuvel --- ArmPkg/Include/Library/ArmLib.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 5a27b7c2fc27..8330339302ca 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -156,6 +156,8 @@ ArmIsMpCore ( VOID ); +#ifndef DISABLE_NEW_DEPRECATED_INTERFACES + VOID EFIAPI ArmInvalidateDataCache ( @@ -169,6 +171,8 @@ ArmCleanInvalidateDataCache ( VOID ); +#endif + VOID EFIAPI ArmCleanDataCache ( -- 2.17.1