From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mx.groups.io with SMTP id smtpd.web12.4172.1610642203292489994 for ; Thu, 14 Jan 2021 08:36:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=IHXLjDjd; spf=pass (domain: nuviainc.com, ip: 209.85.166.51, mailfrom: rebecca@nuviainc.com) Received: by mail-io1-f51.google.com with SMTP id e22so12357744iom.5 for ; Thu, 14 Jan 2021 08:36:43 -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=xTIa/eIoBwOj5L/7UJMCqrSsi1TPn0qqMK3/dVsE77E=; b=IHXLjDjdvG9ZnR5JJ9xVZ+mY8FA19zXql+FL5XgtyVVVhdUv0Xs8lMOoGGtjNjsOLr 34UGEPON98F7YZikKBSFgqRiWNChFiLAONCtzDNMQMfxdtGxKwzaJXTnYiU03RGLpbiL MghgwBrxF12+LtFTM0C3cIdWAe2bzeUum9B4SC8ntIIImDHEV4wu+WLwD8qOV48b5G9e 1byFuCGSrc0Ra9f4Zkidyyu4VFOIj/KeFnf5iN5llIzeiA1aZ3MQkm3Z4pnJeHO/9s00 Cu32zk3Pr18nF4CqyInoyLn9shMoIS/apsQG0VYqU+hUtCE9dNH+NpQP8s7hpTEiS5ka R/rw== 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=xTIa/eIoBwOj5L/7UJMCqrSsi1TPn0qqMK3/dVsE77E=; b=lVGMdSj1/mTv7WLCl4pJ5dzQxUYR8znCQFddwF47tF3hWSRYSmQNPXpnvao6dle/eX KLLMDr97bwGxrhk7fLLdYruuOlAGORB6l40PlzzJHzb12jjXAZPXdOgO6ZtWuUR7TOZX AtZjngWVPuzjVFPKJ9DUy7WC/TGD1Sfvw5mmuGuWAJBFdTe4vmQrmqbZc+utHuGqfuRn s2qoMOeucH70iuMXz639axRd5JkhzkCHfpoPkxx7jm/QAcp9MQMvKEui/Soas4AmDiQ/ eCsl7UrY4HSFxsZdVQ89s5kDY8FrxvPN8ejqkXmRmAvz4+xsNXJ9pdeLfEuR+M1KHYIQ nJgg== X-Gm-Message-State: AOAM5317CDJBI8fZYDkI7b7Q2V4LSxqovVmLnKOF+5n6Sw0OGipWPHea tjkZ1RRDf95StpV9Olt3bd4aVWCd4tYPWkX+eVJIb/zYeUITqvtFwgZQubrSLyos2BOBbBjXmm6 T3nP4akM3mIcrISXHKvZlTdFH3Fa1U7LLhRNcXQy9qPV7ZEKLDnPtCqk8SHYm6RV5/2YfyeXT X-Google-Smtp-Source: ABdhPJx59FjwIGlOWvsVRCI8OZho7d6RQrccFh0I9lW6hewaZlmBxuIkNJCZhi10EdZfwgHQMQ0QxQ== X-Received: by 2002:a6b:dc17:: with SMTP id s23mr1166723ioc.170.1610642202439; Thu, 14 Jan 2021 08:36:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 08:36:41 -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 06/22] ArmPkg: Add helper function to read the Memory Model Feature Register 4 Date: Thu, 14 Jan 2021 09:36:12 -0700 Message-Id: <20210114163628.31952-7-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 In AARCH32, CCIDX support is indicated in the MMFR4 register - unlike under AARCH64 where it's in MMFR2. Add a helper function to read it. Signed-off-by: Rebecca Cran Reviewed-by: Sami Mujawar Reviewed-by: Leif Lindholm --- ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 8 ++++++-- ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S | 4 ++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h index bb7bda0a3aeb..dcf6723b803b 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h @@ -48,9 +48,13 @@ ArmCleanInvalidateDataCacheEntryBySetWay ( IN UINTN SetWayFormat ); -UINTN +/** Reads the ID_MMFR4 register. + + @return The contents of the ID_MMFR4 register. +**/ +UINT32 EFIAPI -ArmReadIdPfr0 ( +ArmReadIdMmfr4 ( VOID ); diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S index 01c91b10fcb7..a60a2f634132 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S @@ -60,6 +60,10 @@ ASM_FUNC(ArmDisableInterrupts) isb bx LR +ASM_FUNC(ArmReadIdMmfr4) + mrc p15,0,r0,c0,c2,6 @ Read ID_MMFR4 Register + bx lr + // UINT32 // ReadCCSIDR ( // IN UINT32 CSSELR diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm index 26ffa331b929..1679b09b797a 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm @@ -64,6 +64,10 @@ isb bx LR + RVCT_ASM_EXPORT ArmReadIdMmfr4 + mrc p15,0,r0,c0,c2,6 ; Read ID_MMFR4 Register + bx LR + // UINT32 // ReadCCSIDR ( // IN UINT32 CSSELR -- 2.26.2