From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mx.groups.io with SMTP id smtpd.web09.69.1609801125602750070 for ; Mon, 04 Jan 2021 14:58:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=iz6sA4f3; spf=pass (domain: nuviainc.com, ip: 209.85.216.48, mailfrom: rebecca@nuviainc.com) Received: by mail-pj1-f48.google.com with SMTP id m5so525360pjv.5 for ; Mon, 04 Jan 2021 14:58:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SYGT630ZHmjm9h4uI/FSSGyXtYGLMoPBcDtmjOV6H3s=; b=iz6sA4f3GZcGCiQIvF8UYyo/7rJ3dnHuHpxNSvPsSqPe/Nm7O5Bg7PEWihzQCs6HjC 6Tvh8sS749pXiEBY5XAVZLpRSGAZO5aNMNKaZJ0rMk9xegqd6f75oaZt4ZotwuUxDEAq mk0JG/4FdMbOsMpQ5W6REPyrkBTIHcZv1JwO/1nxJFxX2dkxfsw8GaBKvDON8CcNANd+ iZteRgq8+0gxrbRxVSVAAsENa2HfH5u4w40SRehn8oLf9VvmZCkSR8u8kLOr9pyg+Fan +tkReGluHJGQSLqzWxX5HRWbPT/2pRkLOuEM0dmsPuHLItTx2nOxSefZqkviRAMxYrUg wnAQ== 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:mime-version:content-transfer-encoding; bh=SYGT630ZHmjm9h4uI/FSSGyXtYGLMoPBcDtmjOV6H3s=; b=gxTLqj9G6MEzIjVhMGNj2bI72FaJEx4By21DPO7ySjG0hnZGCXThzuL11eYDlQMBKy hOgYSqMDKlEQDJveb5+14eprNgGI1CzqKr7sYAGmyFataK51/7NR28Ra6H18hCRZLyF2 m2zpZj/5EcFC52NOnM8eGdKvXsILXE0C829wunGuPCBBqWiSdqXjnA+pEvNe+Jkr78dR drE7P1b2ylzG5e/w5l5+pzXueKeTyOwr9dbdSEIZwma1PRMfMyZ/Rj2/nxcg+xl0i+uj QdVsW1/YieY2zHSBh+P0boE1Hv6XsN8VCWImx2eJMkiYMs1CwsVCIPQATyKJj7tBfirf hMnw== X-Gm-Message-State: AOAM531TUgapFvSdxCIOxtKEDKQA0ymZhPsPqBzwLOLX9xFVCUCsZaP9 oF1zRqhxaxY2/Jci6Z5p9avs8k9eK98ih4AaoDFu4CycmHPNiPSTeZiDWolW1aE+Idpfdigc1Yp Vc5cKcttg6BOXXF9TS8Qp/JESn7aB3yHo6pse2LF6dqoB9wpb86Jl6EshEGCZcojUhzj2INb9 X-Google-Smtp-Source: ABdhPJzg2OaORWWLKuDOzJbhYIKcD/6eWNertHHKuu/40a+ih4IOH11L/o4NZzsmSXJtgpykOkNLxQ== X-Received: by 2002:a17:90a:ea02:: with SMTP id w2mr1058607pjy.99.1609801124791; Mon, 04 Jan 2021 14:58:44 -0800 (PST) Return-Path: Received: from cube.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x143sm64185289pgx.66.2021.01.04.14.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 14:58:44 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel , "nd @ arm . com . Sami Mujawar" , Liming Gao , Michael D Kinney , Zhiguang Liu Subject: [PATCH v5 04/23] ArmPkg: Add helper to read the Memory Model Features Register 2 Date: Mon, 4 Jan 2021 15:58:11 -0700 Message-Id: <20210104225830.12606-5-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210104225830.12606-1-rebecca@nuviainc.com> References: <20210104225830.12606-1-rebecca@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add helper function to read the MMFR2 register. We will need this to determine CCIDX support. Signed-off-by: Rebecca Cran --- ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 11 +++++++++++ ArmPkg/Library/ArmLib/AArch64/AArch64Support.S | 3 +++ 2 files changed, 14 insertions(+) diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h index 85bcecda730f..cfc0c878a415 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h @@ -41,5 +41,16 @@ EFIAPI ArmReadIdAA64Pfr0 ( VOID ); + +/** Reads the ID_AA64MMFR2_EL1 register. + + @return The contents of the ID_AA64MMFR2_EL1 register. +**/ +UINTN +EFIAPI +ArmReadIdAA64Mmfr2 ( + VOID + ); + #endif // __AARCH64_LIB_H__ diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S index 129205d2ac27..d3cc1e86716b 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S @@ -425,6 +425,9 @@ ASM_FUNC(ArmCallWFI) wfi ret +ASM_FUNC(ArmReadIdAA64Mmfr2) + mrs x0, ID_AA64MMFR2_EL1 // read EL1 MMFR2 + ret ASM_FUNC(ArmReadMpidr) mrs x0, mpidr_el1 // read EL1 MPIDR -- 2.26.2