From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by mx.groups.io with SMTP id smtpd.web09.4093.1610642201872365330 for ; Thu, 14 Jan 2021 08:36:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=tqnQWi9t; spf=pass (domain: nuviainc.com, ip: 209.85.166.50, mailfrom: rebecca@nuviainc.com) Received: by mail-io1-f50.google.com with SMTP id d9so12367802iob.6 for ; Thu, 14 Jan 2021 08:36:41 -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=tqnQWi9tYX1GPyOCLETStbiigVe25BtFOwmOeIxfz47sOGBxpE+Lw9d0GXLL2m+XF4 IrHzR5G0OS0NzSEL4D7EqdxtxHYhxpGXJBMzTKcZNG8zOTMTSdk/Zspnp0mdkgjmIGNu f/CQl0YvzmVzsRFAI3HMZmXlMmlgoOenWqFpgcz7bc+SL3xA/n5uKSbvcJ3dWkdrd9oL vjE77H/1KAbnDb62/GcDZG5obofSZSCZwq6KIrKP0E2e9vwW3px2JyTpTCyrA3Gac+Zq s4kg8dRYaTLkpvIY1jiqD1s4fu+KJ+WQdN5yaLHCVUsVDGVssxCsY/A2CjVA3rlyTXj0 9mwA== 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=RRdprmJELvDqzmQoRtwYoyjE2lBdcYcsAH2fxksMBWX5BEzvbbOv+8v1wKy8H1Nomg DYuzdeznTG2KzZRsex1yNmqveLN/Qcu3eXE1/MEC1v8zJmYUva9DYgbFXHz52Wm1Bgn6 RzHt934EWVphGvRe41UHu2YNxcby+GKKTjqn8vcJmxQWy9J6ycyuo1lqUEgCpr8mtqhr 9BnUpGSb1v7Z+EDfHUnK8QqkbVwhOdaTZz9fmwhoSan+kvxyNk+5nFC2IvUgFSegS8Jn M3Umx4HprkbCviOWd0SytiT0M6IQ0GyHFPZM59U2gZgxnqPyK7aoYsZlGXcCIPn+X/z3 9fbA== X-Gm-Message-State: AOAM530cZBCRlw+92OvmcQT/Rsg38Z2QojjVvQJ/v9PmapqvpWUtUJhH T7NtzgOG+X881b9PkeHPO4yzRvWtImTCMhnk41Cqnqdt1q0Rpwv3DGaiSY5Su16S1mGOSqltJRM A+tSCcrDQ4fkFfmuPviIAWSYK0rjUGUuVQfWSOl/85LC4hwxRr32zOeHPHl5rQYRYo0ly/8vW X-Google-Smtp-Source: ABdhPJwPrcKE5lbbthMKrsO/WkHKG+wwhkjuqdn0jpovSGN4CDpasLtbwwMvB+ERUskuPzhr8m/JAg== X-Received: by 2002:a6b:7d42:: with SMTP id d2mr5728199ioq.176.1610642200990; Thu, 14 Jan 2021 08:36:40 -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 y5sm3711920ilj.35.2021.01.14.08.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 08:36:40 -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 , Sami Mujawar Subject: [PATCH v6 05/22] ArmPkg: Add helper to read the Memory Model Features Register 2 Date: Thu, 14 Jan 2021 09:36:11 -0700 Message-Id: <20210114163628.31952-6-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114163628.31952-1-rebecca@nuviainc.com> References: <20210114163628.31952-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