From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web12.29045.1612745591365626310 for ; Sun, 07 Feb 2021 16:53:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=Pcc3fR0p; spf=pass (domain: nuviainc.com, ip: 209.85.215.179, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f179.google.com with SMTP id t11so5458134pgu.8 for ; Sun, 07 Feb 2021 16:53:11 -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=G64OPImiElgyFpB3W0w3Qx+CfjXg08HsJB8doq3l01s=; b=Pcc3fR0prHmjd4Mcafz4oQ29fs+EYATs7xmKtu5IDrvtIoZnpfpdOOz0y6q7lZQQ1E NRCC0CAH0pj4rp/x/CHCwqL87kpJQqZgvrlxhXKHheTR4ijBOXPeb9k9sxtZ10gpkB7i +6g80F4sA1mdbeho3cbL4cca7KVtnek/7/CSWztIPVgkomB1xcPe7oIxvjvz8mmwGRax W33j3LTNfUqeh1gMFg+9GvatUHN+Qq7Efmf3xvJbrd9Yp6MUtQzrmchoCYQwuHO4QK3d Bz5cTX9MAJJDYOFgdPg3AZi6BlNCGe0CBEOeChH2xspL8j3aHWJQmSlRESS/mbhbVrtj Aw2w== 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=G64OPImiElgyFpB3W0w3Qx+CfjXg08HsJB8doq3l01s=; b=l8f3axKDSCWjfPLM0FC7CGng9Cy+qRoxy4BUB9bGVxYRWTeEDj21MmKcIqjhpJSt4/ MCXobRdMtXnxYDfy+LfYkeNzQs1b9JM36+R4NsKl0VpIvSiV/wjvBKr5Ck6HZMeeCIdG ir21r0ITfMnvUnwa+IK+myPnzTk0H5I0rSeQGeWf6sJ/d9rKaxCB368FkpTpDX9shnby Fo97UTHFStKYBUJ04TrKGS8YfzkDZTwBgb4coPssVOV0/+QMwbOHGUKazfSUav6X4GMM AFakNtOsV+Kw1pGtGncwT+8RHjkdWpAKEm+v+e6p7AUgnTd+MgG3jbngV0qtf/blHDNY a1Tg== X-Gm-Message-State: AOAM533Tl5aaXLnZzHeXkqOBcTdKZei+iLU0r7YfBOsjlCaOKDnpCQT9 i0C5RP/43BAiiWuNe5WfgV5BbMHOX3LHpLL+JqzgV1ojso8jVoGK/veHsn3p6zB++hB20WJUn7a moN/gJVwFAL+27YO0guNhswlzNHg0pDZHjoG3aIPb9hi4Z9A5lIFhQzBj2t2NlJ8P7BZkbw== X-Google-Smtp-Source: ABdhPJxXAJfigEK+VOG3piOLOU7vyaNmA28bpf/8lmeQYJtqLE6z7dIje7o2oyMPbGWpWjCkfHrkGA== X-Received: by 2002:a62:800d:0:b029:1bc:9cd1:8ee1 with SMTP id j13-20020a62800d0000b02901bc9cd18ee1mr15297177pfd.69.1612745590528; Sun, 07 Feb 2021 16:53:10 -0800 (PST) Return-Path: Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id c6sm11095883pjd.21.2021.02.07.16.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 16:53:10 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , leif@nuviainc.com, Ard Biesheuvel , nd@arm.com, Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu , Samer El-Haj-Mahmoud , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Sami Mujawar Subject: [PATCH v8 04/21] ArmPkg: Add helper to read the Memory Model Features Register 2 Date: Sun, 7 Feb 2021 17:52:37 -0700 Message-Id: <20210208005254.12176-5-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210208005254.12176-1-rebecca@nuviainc.com> References: <20210208005254.12176-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 Reviewed-by: Leif Lindholm Reviewed-by: Sami Mujawar --- 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