From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web12.29046.1612745593269416352 for ; Sun, 07 Feb 2021 16:53:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=UO/zA8xa; spf=pass (domain: nuviainc.com, ip: 209.85.210.177, mailfrom: rebecca@nuviainc.com) Received: by mail-pf1-f177.google.com with SMTP id x136so2074818pfc.2 for ; Sun, 07 Feb 2021 16:53:13 -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=UO/zA8xaTSdoFjbgpiwXzCEpyWxKIuwj+5lDNPcx7w66XEKMSH39UNUh9PxVgBRSSG h2lGEIhHPtNTL4VQqc7bjyF+H4tJQd9BMxKPkJLbQdTiyxeE0ttmx/Xn+CbtaVGdQBDS hn/93NmkZWhuwunV0VTzDrKLgveE2rKfgwW0lrNyylhMU9ILi2xuNDqYsUih0+/MWV3q 5GxYR60XLYw7hO5E+YheryDEtlKhCAhUIzA2pSMAGgQSU9OcZlfm6pQq0blHNrSHLeL7 nx6BzYujytjewhYBtK0awxv6hTh8JfqNYeDEr8qoi5A66IDiv7DBhHCvRlGV/ErzphjX Ie9g== 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=uMKwIQqFAdcuHBN1U9g2pAx4FvM7VwEu3d4IPOAECDI9C+a7Kd5Iuq3f+53GtIyMOi PtFtIZbFDW5i5G3uAK03kicTLBkLLULr5jfiKLDek7b3mNmKkqDczEVbWPpSaDACJgLW QKnFLTMR0sfj2e8ZEfWCVyiCDwGee81+caNERtbmtiwNSCJkwhak8PAEUjyLSKlrRSz1 3CPYgj5xYqnKEZEkvFPbDRR5x2RqjEfXJn8E07qnB43YjHALX1LLnpXZgpqCfDoiFGLS PTyIBAZj1OGfaUrW0jl5GWVB05DDvebHsCqxSjR5NTgJs1DaJNKuasH6JRkOWyWiMo0A CzNQ== X-Gm-Message-State: AOAM533DrJXCYreOkctldmA/TUfpcUdV3AH1FZT466etNkHnrx26c1+0 OmfF9R0emR9Rj3/IbQwicDiT6XQpXk6GuroG9AArtkVhGt0bZ84mvIdyMgg5taDi/6aAha+Sfjz fQ/VBn86CJ8MvZTYP2ACqX6f9EjgEvKqEQ41ikfW42WaDoQCa+9pQ6Emj4Hy0jzsmFrgAyw== X-Google-Smtp-Source: ABdhPJzVUM4cPgIDZqvAnXa5/bYQ92EGDQAfg1RnfAUnIS4skjbD7fgy9ph97gBfX2h/27oBA4dBjA== X-Received: by 2002:a63:e30d:: with SMTP id f13mr14834570pgh.39.1612745592525; Sun, 07 Feb 2021 16:53:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 16:53:12 -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 05/21] ArmPkg: Add helper function to read the Memory Model Feature Register 4 Date: Sun, 7 Feb 2021 17:52:38 -0700 Message-Id: <20210208005254.12176-6-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 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