From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web09.154.1607363686619027673 for ; Mon, 07 Dec 2020 09:54:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=c+Gn1Jwn; spf=pass (domain: nuviainc.com, ip: 209.85.215.178, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f178.google.com with SMTP id g18so9554095pgk.1 for ; Mon, 07 Dec 2020 09:54:46 -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=iwv3mALmjDAo0MhwqdefD8YPQ2SZQ09Jw9Uha1MyoA0=; b=c+Gn1JwnStVrWgdSnU3KE9hGAfLUe5AkVH+pX+EHmzf1i+TyAX/SeoWPJh34U6PlXY ryRW7f+Mz85B7trItSYAsIe4FBs61eKWB4dJ8FsWWCifvz7cW2kJ/ngPSPv+vxt/0HL4 ODqQtiZft0iHiUSgLacJcpw92EyoSrCgPhgUdbtDnd19XsS/aprBdl5pRc0KFi38A4Sx JIYC2K0P5lFM8VoL7yOIT1DwOCitGOzFnTkq8UgBJzjKINJgikdqLFXxdyMhF+nbIutN EVHP4CHlmooDTQpE7GJz2hSMahGPsnZpPMVZhhY16RBdONK7YW0mXbEr0zrVNqS2UIUX Yu4Q== 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=iwv3mALmjDAo0MhwqdefD8YPQ2SZQ09Jw9Uha1MyoA0=; b=SIL1QqrqehvraODXf0/AU7VkIaA8khSdkdItwv3u9aeyrBwXh7SYHy77TF9WzOjuav a5tEVJbzKo2913BtEdira4OeFkpbSmp5hvw9teGdZ9TceoSkcWq9V9n2AKgksXbB/SqM 8Iq7kjmE71697DEAFMveV7E3XKDFsLBxUsVRj/UW85rbNdLhYO+I/tMncLG6a3ljx2pL FXFyPmDbgInfWmApLrpCceSoCzEM6moJN1DtypbKYFH4O06/z3jhyqR79JjFbi82T1GN pLgPq5OX++OvrKxg9/6HPmUqpDeqifo7T11tHSHNH8Egujwmpk/hr2e7SFxaRzU6C4Jx mgQg== X-Gm-Message-State: AOAM531f/f0dC6NhPydOV9dlBbdZNl8EnEzvsSHzbHS6IL654MlOv1aa 2QF8x6pYSebjfKqNrGWAC3l6o5jT2P0i9TlVXTaY3CmHCdYKYIU3q7yTWkNx6CgebBqnlaVCWOl /XkvcMLYOoGH0yZmiHFQXn9BewmAUE9olzfTd61AMazyM8cMdmTm/DPsyoHTYj+S8LLcxNeqp X-Google-Smtp-Source: ABdhPJw7KLa8g9IrORVq42ShqLV8d2Fhke2C5oK5/Z6mZ2Gx2igF8Lr3MLVhHBnEHe3f8Ib7/fvzFw== X-Received: by 2002:a17:902:8a87:b029:d7:cf56:ce1f with SMTP id p7-20020a1709028a87b02900d7cf56ce1fmr17446172plo.22.1607363685841; Mon, 07 Dec 2020 09:54:45 -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 nm6sm2369pjb.25.2020.12.07.09.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 09:54:45 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Michael D Kinney , Liming Gao , Zhiguang Liu , Leif Lindholm , Ard Biesheuvel Subject: [PATCH v4 05/10] ArmPkg: Add helper function to read the Memory Model Feature Register 4 Date: Mon, 7 Dec 2020 10:54:22 -0700 Message-Id: <20201207175427.28712-6-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201207175427.28712-1-rebecca@nuviainc.com> References: <20201207175427.28712-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 --- ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 6 ++++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.S | 4 ++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupportV7.asm | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h index 93183e67230e..3b331a3b2088 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h @@ -48,5 +48,11 @@ ArmCleanInvalidateDataCacheEntryBySetWay ( IN UINTN SetWayFormat ); +UINT32 +EFIAPI +ArmReadIdMmfr4 ( + VOID + ); + #endif // __ARM_V7_LIB_H__ 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