From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 576D1D801D3 for ; Fri, 23 Feb 2024 10:56:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=JdePDxkhNJEaBZ6KnuNoXHTHCAkYG2KXBI8GlOHfHV4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1708685812; v=1; b=qMH0yOOyE7mmXy/ZgUv6hNKRFth+ieNtqxi2BKMx85sjgF0d4/BoXoIFGOMt0ohgC1Gqh9QP g7N4MP41dYlYi3aKOX4ANEbnufQvM6d+MY/S2ofE/RK9ZN6madK+2tiqFmsqHpdcZxCvNp062Vs axE1gMzelh83+u5vO7GtP4eg= X-Received: by 127.0.0.2 with SMTP id lTfzYY7687511xXuRVHCF9K8; Fri, 23 Feb 2024 02:56:52 -0800 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.8117.1708685810838967059 for ; Fri, 23 Feb 2024 02:56:51 -0800 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id A4657260080; Fri, 23 Feb 2024 11:56:48 +0100 (CET) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id AbmYb-pd5Gua; Fri, 23 Feb 2024 11:56:46 +0100 (CET) X-Received: from applejack.lan (83.11.7.224.ipv4.supernova.orange.pl [83.11.7.224]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 4F009260871; Fri, 23 Feb 2024 11:56:44 +0100 (CET) From: "Marcin Juszkiewicz" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Marcin Juszkiewicz Subject: [edk2-devel] [PATCH v2 2/2] ArmPkg/ArmLib: Add functions to read future system registers Date: Fri, 23 Feb 2024 11:56:34 +0100 Message-ID: <20240223105634.424149-3-marcin.juszkiewicz@linaro.org> In-Reply-To: <20240223105634.424149-1-marcin.juszkiewicz@linaro.org> References: <20240223105634.424149-1-marcin.juszkiewicz@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xCKNmL8kiTpROwN3Rb3VXlDBx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qMH0yOOy; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none) https://developer.arm.com/documentation/ddi0601/2023-12/ lists more system registers than EDK2 supports now. ISAR3, MMFR3, MMFR4, PFR2, FPFR0 were added. Signed-off-by: Marcin Juszkiewicz --- ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 34 ++++++++++++++++--- .../Library/ArmLib/AArch64/AArch64Support.S | 31 +++++++++++++++++ 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/= ArmLib/AArch64/AArch64Lib.h index 2fd256f4acc8..172b73f7acad 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h @@ -50,6 +50,12 @@ ArmReadIdAA64Dfr1 ( VOID ); =20 +UINTN +EFIAPI +ArmReadIdAA64Fpfr0 ( + VOID + ); + UINTN EFIAPI ArmReadIdAA64Isar0 ( @@ -68,6 +74,12 @@ ArmReadIdAA64Isar2 ( VOID ); =20 +UINTN +EFIAPI +ArmReadIdAA64Isar3 ( + VOID + ); + UINTN EFIAPI ArmReadIdAA64Mmfr0 ( @@ -80,16 +92,24 @@ ArmReadIdAA64Mmfr1 ( VOID ); =20 -/** Reads the ID_AA64MMFR2_EL1 register. - - @return The contents of the ID_AA64MMFR2_EL1 register. -**/ UINTN EFIAPI ArmReadIdAA64Mmfr2 ( VOID ); =20 +UINTN +EFIAPI +ArmReadIdAA64Mmfr3 ( + VOID + ); + +UINTN +EFIAPI +ArmReadIdAA64Mmfr4 ( + VOID + ); + UINTN EFIAPI ArmReadIdAA64Pfr0 ( @@ -102,6 +122,12 @@ ArmReadIdAA64Pfr1 ( VOID ); =20 +UINTN +EFIAPI +ArmReadIdAA64Pfr2 ( + VOID + ); + UINTN EFIAPI ArmReadIdAA64Smfr0 ( diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Libr= ary/ArmLib/AArch64/AArch64Support.S index 0e8e7b5cf0e6..b007aef67adf 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S @@ -485,6 +485,12 @@ ASM_FUNC(ArmReadIdAA64Dfr1) ret =20 =20 +ASM_FUNC(ArmReadIdAA64Fpfr0) + mrs x0, s3_0_c0_c4_7 +# mrs x0, ID_AA64FPFR0_EL1 + ret + + ASM_FUNC(ArmReadIdAA64Isar0) mrs x0, ID_AA64ISAR0_EL1 ret @@ -500,6 +506,12 @@ ASM_FUNC(ArmReadIdAA64Isar2) ret =20 =20 +ASM_FUNC(ArmReadIdAA64Isar3) + mrs x0, s3_0_c0_c6_3 +# mrs x0, ID_AA64ISAR3_EL1 + ret + + ASM_FUNC(ArmReadIdAA64Mmfr0) mrs x0, ID_AA64MMFR0_EL1 ret @@ -515,6 +527,18 @@ ASM_FUNC(ArmReadIdAA64Mmfr2) ret =20 =20 +ASM_FUNC(ArmReadIdAA64Mmfr3) + mrs x0, s3_0_c0_c7_3 +# mrs x0, ID_AA64MMFR3_EL1 + ret + + +ASM_FUNC(ArmReadIdAA64Mmfr4) + mrs x0, s3_0_c0_c7_4 +# mrs x0, ID_AA64MMFR4_EL1 + ret + + ASM_FUNC(ArmReadIdAA64Pfr0) mrs x0, ID_AA64PFR0_EL1 ret @@ -524,6 +548,13 @@ ASM_FUNC(ArmReadIdAA64Pfr1) mrs x0, ID_AA64PFR1_EL1 ret =20 + +ASM_FUNC(ArmReadIdAA64Pfr2) + mrs x0, s3_0_c0_c4_2 +# mrs x0, ID_AA64PFR2_EL1 + ret + + ASM_FUNC(ArmReadIdAA64Smfr0) mrs x0, ID_AA64SMFR0_EL1 ret -- 2.43.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115880): https://edk2.groups.io/g/devel/message/115880 Mute This Topic: https://groups.io/mt/104526094/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-