From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mx.groups.io with SMTP id smtpd.web11.77.1609801127200246077 for ; Mon, 04 Jan 2021 14:58:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=lcuIzXVW; spf=pass (domain: nuviainc.com, ip: 209.85.214.181, mailfrom: rebecca@nuviainc.com) Received: by mail-pl1-f181.google.com with SMTP id t6so15349354plq.1 for ; Mon, 04 Jan 2021 14:58:47 -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=GkCfSF0mwnECNuiwobXiUrVhCkRptsM4nA89o5io3YU=; b=lcuIzXVW9ixl1Fbn81ufSKfOU603BGNkmVNKKb0ElMUoW36W+cQ+iZyGc9H26jAvFp B0utSk1CTcDj/5UsjyTy+LcALG7CD1DrbMzOFC39W/2Lvwfd4+8TcVwW/sWuJLxrR91n X35eYyoOFB89SSxvPlClvHCya7WKUTQMzz3Nha/Bog6W20U9c2WHcoWuCglox4WuRavk Y2bxSbnZSbhNY46dyVE9TQQH7FegNMzfOKru2ZT4tSlQtXZX4E/awBV1CEaRzGN2A6LR 7EZ47sRwiR4uZ1sVVz6MEq+dpGBaPZ/3Fzw2L+ATv599AA0kqnEc8q/wjOkUCRzlB6er DrWw== 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=GkCfSF0mwnECNuiwobXiUrVhCkRptsM4nA89o5io3YU=; b=LSOw3u1WW8nAvEMSuf46/1aBIMjo0op4BBuwTs8FqZtZ/tfF0Q9K2QcpLQygIhZ2zc q+YDFwSR42T+Mhkg6wA+S5oiszaGIPZ+P4EDfxXFLVV5VbylNoWX+MUfSJZOXIDLaIbw y2NtfIkyxm8Fz2O8hWW+tkqltcxawL0ce3UnsexFt02/R/gUUKE5wLtzeWBGyQWtsgEf SJ2WwufPYgPeBEMTTUU/B/0EAMnds8DYcp1N2QYg1b53zCqXWCDViVLKF6gqvI2OOVm7 /hCIQWqZI0Fwi5QT+smzMqXXtPpS2or8SPI4qSSuPAcGS2Wu91jQDaabqBgJh4H30zcA q2qA== X-Gm-Message-State: AOAM530jzugaqLxmgXAGemoyw/VpCnvPs8YxvM8d6gqd/bfFYh9XxDz/ CMfrcBUrUwRjz7uMTmNXyQP24+fgHavGbB8ZG2WUee0HR8Sr0fpEDQjUgFdPP4SjGLCc5ytQLgT HgFnzBRInsfla0r5f6PQn/XjrCtEkLtmaIPXJxeHyVdbpqx5ZuJZSTX9BkGtr72CS97pPkfsg X-Google-Smtp-Source: ABdhPJwn2IszVXN0XY9Ia49NyiJjhBrz8TvfXcjiIX4rvf9HyleMGQQcScsSnUHrIkbYnqZzEzMDwg== X-Received: by 2002:a17:90a:5501:: with SMTP id b1mr1060439pji.7.1609801126500; Mon, 04 Jan 2021 14:58:46 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 14:58:46 -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 v5 05/23] ArmPkg: Add helper function to read the Memory Model Feature Register 4 Date: Mon, 4 Jan 2021 15:58:12 -0700 Message-Id: <20210104225830.12606-6-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 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 --- 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