public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Cc: <devel@edk2.groups.io>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Rebecca Cran <rebecca@bsdio.com>,
	Pedro Falcato <pedro.falcato@gmail.com>
Subject: Re: [PATCH v5 1/2] ArmLib: add functions to read system registers
Date: Thu, 20 Apr 2023 11:54:21 +0100	[thread overview]
Message-ID: <ZEEZ3XtyjusOvYEU@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <20230407152957.157494-2-marcin.juszkiewicz@linaro.org>

On Fri, Apr 07, 2023 at 17:29:56 +0200, Marcin Juszkiewicz wrote:
> ArmCpuInfo uses those to read system registers and other parts of EDK2
> may find them useful.

This is excellent, thanks!
Sorry for nitpicking, but could you please sort the function
declarations and definitions alphabetically?

/
    Leif

> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>  ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h    | 48 +++++++++++++++++++
>  .../Library/ArmLib/AArch64/AArch64Support.S   | 32 +++++++++++++
>  2 files changed, 80 insertions(+)
> 
> diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
> index 330481fc50db..d9744a66cdcf 100644
> --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
> +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h
> @@ -44,6 +44,54 @@ ArmReadIdAA64Pfr0 (
>    VOID
>    );
>  
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Pfr1 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Dfr0 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Dfr1 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Isar0 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Isar1 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Isar2 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Mmfr0 (
> +  VOID
> +  );
> +
> +UINTN
> +EFIAPI
> +ArmReadIdAA64Mmfr1 (
> +  VOID
> +  );
> +
>  /** Reads the ID_AA64MMFR2_EL1 register.
>  
>     @return The contents of the ID_AA64MMFR2_EL1 register.
> diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
> index d3cc1e86716b..3e8d461bc819 100644
> --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
> +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
> @@ -482,4 +482,36 @@ ASM_FUNC(ArmWriteCntHctl)
>    msr   cnthctl_el2, x0
>    ret
>  
> +ASM_FUNC(ArmReadIdAA64Pfr1)
> +  mrs   x0, ID_AA64PFR1_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Dfr0)
> +  mrs   x0, ID_AA64DFR0_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Dfr1)
> +  mrs   x0, ID_AA64DFR1_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Isar0)
> +  mrs   x0, ID_AA64ISAR0_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Isar1)
> +  mrs   x0, ID_AA64ISAR1_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Isar2)
> +  mrs   x0, ID_AA64ISAR2_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Mmfr0)
> +  mrs   x0, ID_AA64MMFR0_EL1
> +  ret
> +
> +ASM_FUNC(ArmReadIdAA64Mmfr1)
> +  mrs   x0, ID_AA64MMFR1_EL1
> +  ret
> +
>  ASM_FUNCTION_REMOVE_IF_UNREFERENCED
> -- 
> 2.40.0
> 

  reply	other threads:[~2023-04-20 10:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 18:02 [PATCH] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-06 21:05 ` [edk2-devel] " Rebecca Cran
2023-04-07 10:39   ` [PATCH v2] " Marcin Juszkiewicz
2023-04-07 10:55     ` [edk2-devel] " Ard Biesheuvel
2023-04-07 12:46       ` Marcin Juszkiewicz
2023-04-07 13:07         ` Ard Biesheuvel
2023-04-07 12:47       ` [PATCH v3] " Marcin Juszkiewicz
2023-04-07 13:02         ` [edk2-devel] " Pedro Falcato
2023-04-07 13:05           ` Pedro Falcato
2023-04-07 13:29           ` Marcin Juszkiewicz
2023-04-07 13:40             ` Pedro Falcato
2023-04-07 13:41               ` Pedro Falcato
2023-04-07 13:42               ` Marcin Juszkiewicz
2023-04-07 14:02           ` [PATCH v4] " Marcin Juszkiewicz
     [not found]           ` <1753ABF1A296B040.11304@groups.io>
2023-04-07 15:11             ` [edk2-devel] " Marcin Juszkiewicz
2023-04-07 15:29             ` [PATCH v5 0/2] add ArmCpuInfo application Marcin Juszkiewicz
2023-04-07 15:29               ` [PATCH v5 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-20 10:54                 ` Leif Lindholm [this message]
2023-04-07 15:29               ` [PATCH v5 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-20 12:43                 ` Leif Lindholm
2023-04-20 14:42                   ` [edk2-devel] " Marcin Juszkiewicz
2023-04-20 14:44                   ` [PATCH v6 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-20 14:44                     ` [PATCH v6 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-20 17:29                       ` Leif Lindholm
2023-04-21 14:37                         ` [edk2-devel] " Rebecca Cran
2023-04-21 14:59                           ` Marcin Juszkiewicz
2023-04-21 15:15                             ` Rebecca Cran
2023-04-21 15:51                               ` [PATCH v7 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-21 15:51                                 ` [PATCH v7 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-21 20:18                                   ` Leif Lindholm
2023-04-21 16:33                           ` [edk2-devel] [PATCH v6 " Leif Lindholm
2023-04-13  9:31               ` [PATCH v5 0/2] add ArmCpuInfo application Marcin Juszkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEEZ3XtyjusOvYEU@qc-i7.hemma.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox