From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by mx.groups.io with SMTP id smtpd.web10.26289.1612135525640189527 for ; Sun, 31 Jan 2021 15:25:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=g7IL6qSL; spf=pass (domain: nuviainc.com, ip: 209.85.160.181, mailfrom: rebecca@nuviainc.com) Received: by mail-qt1-f181.google.com with SMTP id z9so11042919qtv.6 for ; Sun, 31 Jan 2021 15:25:25 -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=g7IL6qSLi8Niin4OCnzvQQGWcgGXaEiMP8xY1Yj7uszW5HrW+aKrv32poRpZ36Vd1/ iWQVtQU5pvXXT99U00U09U4Cp3RcNbdj6A891q4JNnSjcRBcm+NG0xlTGwOINM+TW1P9 xCgNFB+LA50uHqZkGO3prjHQ4HXDLQ7Ae/u86D9bcTMzshofpK3UtzygRzvHEZ2C93Jo scXHdNOoxfUxerP5xupJfCLSHgLWZOTJ7c2eE0XK9o+d2G4Bo7j+gYqR8ZH5eFzJlFua MKpdirBP3AfNtAJYQAq9KDzuNuIlX4qCRZ/GV/bi37XvQdfHd326qmKBdNzcGsz7sHGT hGqA== 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=QMQO4CHFv0M9oxqVbaujdekCUOPIKLmZUJG1gxAZynC631R/+gA5+5L+hsgH2rWUWc 8MwJxYeVMk/L2NEEcaU8XFYNReKvXryBa5elQgzzQdRFIwyKrIA2Ag3bDQYmdAIKmViD zjNuV/JbXhOKE9xvKZ+xavpLf8ZJSN6/V469xYsTAVV6pUt4UaA8n5yZIxo4UoHi9BdK llXdbUb8pm8DU21sYz7uBH1D+eFq1+kin1+Doaxu7AUFhT1ivOvMAF1GhEH/mY5/8LSH sgjVtqyfljRidXyvbfQ3Qginni4UNzGKZ0S/3+hxqxLvwcb6ZVwZdtRnIo7xGuAfM1GI IuVQ== X-Gm-Message-State: AOAM530L0on+f0a+ZwHWFsdV5eR4mTQvZUxUASbrL/m6ZfNWMPh52sLM 4cHcZOKl6NwVqJUV61a2UI88jlezT2kb4dMhje3S/XJfgWC6ygbqpd61GLj12RLnu6xTSIdaVKx C4ByhQblPL2NujtGjIF00U3kH9Rhkeau6QES40/F7AMME0GtA3RGZ5X7UgWllBPN1nbHV0g== X-Google-Smtp-Source: ABdhPJwfQSx9uHomfcrqHA7VC9sHGpNFwhg2txMsixkGJfdftVU28rY1kVu/HIsk/3PnaTZhPoDGVA== X-Received: by 2002:ac8:36e2:: with SMTP id b31mr13192728qtc.19.1612135524550; Sun, 31 Jan 2021 15:25:24 -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 12sm11809361qkg.39.2021.01.31.15.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 15:25:24 -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 v7 04/21] ArmPkg: Add helper to read the Memory Model Features Register 2 Date: Sun, 31 Jan 2021 16:24:54 -0700 Message-Id: <20210131232511.18340-5-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210131232511.18340-1-rebecca@nuviainc.com> References: <20210131232511.18340-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