From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) by mx.groups.io with SMTP id smtpd.web12.15679.1583345587027770705 for ; Wed, 04 Mar 2020 10:13:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=vyO507IU; spf=pass (domain: linaro.org, ip: 209.85.167.195, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-oi1-f195.google.com with SMTP id c1so3082453oiy.2 for ; Wed, 04 Mar 2020 10:13:06 -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=H5AVNVlGgq36EKmWUxfm1j49MLx84IGVvSp54z2E9nE=; b=vyO507IUVulXRZU8g9BVrXSrTfnIs5FQqfva1MZGqs4krUMH6KCio16AHzSDLhVOTh AnxN+J4lE71WghNYi6vP+LOG7t1po+Jos5zuPh+GyVLf3VH7HBySp+vZ69K52xJk+2Ga X7oKCadnYb+Wqkv13GX/YLZLr51Dvgy4CRvxEUUEKANGAtTLUKATYaW+Oa3HLZDbfT3/ EtXA3qGRPnq62XVNEVFvY1n9RADFO81eZEI3MW/VZGAwGGSEjCBixpuOfCnFRQsZusZ2 XY4TE/q+70B42DYjpqr1ZzQYJna98JlI/v1m9w7Nb3mlgeCmOo6TmaSZ7c8QvbxxI3mn foHw== 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=H5AVNVlGgq36EKmWUxfm1j49MLx84IGVvSp54z2E9nE=; b=eAmHoin8PBuH+1sJPtekBQFRvUOxrcVKQYIRRH1BWWnc7eKZ1uFVWeKRGv5G1qamjZ wCk8DnwTIf5UTAlUeXPWVIgJ8PeF69wB93FVBHX/PI4CLYXtsyIDQmpGhrlGj4V1iw8I Ko9ro3S7Yvq56/hmxMoDxxztxMgnCwP1p//NlKSqvDAjcVX1xbvyhwn7h+MFOzhajcMl ObXVNzE6CPFUvNp8ZaN/q7NGoje175Vp2JnHUCB5S4VDPc37wbooseI37z9zyLFH+wp3 o10WvqdEzXyjUzjGFR+E4c+U3pcxQpo63biG1cNT7GvVoEGvXunW4zCAXqT0UGRx1jwi MMTw== X-Gm-Message-State: ANhLgQ1fAvRtEtR1kjWyOyVBsSE20D6xwjJxGNUc8nAAoQfk8uXNPQjZ 0pK3KLyTi4GWCr4H+7oK5RVZnhGBe0o0kg== X-Google-Smtp-Source: ADFU+vv7klHkcQs5eAeT2PMTFds8Tl0enV7t5XucJJ3SWVwXMIYhIyVn/IORNm0CkP5c6wfTnS3LAw== X-Received: by 2002:aca:1903:: with SMTP id l3mr2553092oii.178.1583345585989; Wed, 04 Mar 2020 10:13:05 -0800 (PST) Return-Path: Received: from cam-smtp0.cambridge.arm.com ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id p65sm9083971oif.47.2020.03.04.10.13.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 10:13:04 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif@nuviainc.com, Ard Biesheuvel Subject: [PATCH v2 6/9] ArmPkg/ArmLib: move set/way helper functions into private header Date: Wed, 4 Mar 2020 19:12:43 +0100 Message-Id: <20200304181246.23513-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200304181246.23513-1-ard.biesheuvel@linaro.org> References: <20200304181246.23513-1-ard.biesheuvel@linaro.org> The clean/invalidate helper functions that operate on a single cache line identified by set, way and level in a special, architected format are only used by the implementations of the clean/invalidate routines that operate on the entire cache hierarchy, as exposed by ArmLib. The latter routines will be deprecated soon, so move the helpers out of ArmLib.h and into a private header so they are safe from abuse. Signed-off-by: Ard Biesheuvel --- ArmPkg/Include/Library/ArmLib.h | 18 ------------------ ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 18 ++++++++++++++++++ ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index e76a46d5f4ce..5a27b7c2fc27 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -211,24 +211,6 @@ ArmCleanInvalidateDataCacheEntryByMVA ( IN UINTN Address ); -VOID -EFIAPI -ArmInvalidateDataCacheEntryBySetWay ( - IN UINTN SetWayFormat - ); - -VOID -EFIAPI -ArmCleanDataCacheEntryBySetWay ( - IN UINTN SetWayFormat - ); - -VOID -EFIAPI -ArmCleanInvalidateDataCacheEntryBySetWay ( - IN UINTN SetWayFormat - ); - VOID EFIAPI ArmEnableDataCache ( diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h index ab9bcf553c4d..b2c8a8ea0b84 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h @@ -17,5 +17,23 @@ AArch64AllDataCachesOperation ( IN AARCH64_CACHE_OPERATION DataCacheOperation ); +VOID +EFIAPI +ArmInvalidateDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + +VOID +EFIAPI +ArmCleanDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + +VOID +EFIAPI +ArmCleanInvalidateDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + #endif // __AARCH64_LIB_H__ diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h index c52fb9a1b484..93183e67230e 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h @@ -30,5 +30,23 @@ ArmV7AllDataCachesOperation ( IN ARM_V7_CACHE_OPERATION DataCacheOperation ); +VOID +EFIAPI +ArmInvalidateDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + +VOID +EFIAPI +ArmCleanDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + +VOID +EFIAPI +ArmCleanInvalidateDataCacheEntryBySetWay ( + IN UINTN SetWayFormat + ); + #endif // __ARM_V7_LIB_H__ -- 2.17.1