public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nhi Pham" <nhi@os.amperecomputing.com>
To: Rebecca Cran <rebecca@quicinc.com>,
	devel@edk2.groups.io, nhi@os.amperecomputing.com
Cc: patches@amperecomputing.com, quic_llindhol@quicinc.com,
	ardb+tianocore@kernel.org,
	Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/1] AmpereAltraPkg: Update ArmPlatformLib to work with changed ARM_CORE_INFO
Date: Tue, 17 Jan 2023 16:53:49 +0700	[thread overview]
Message-ID: <a2b41f26-a90e-7e0f-8fd8-c551fc940490@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <7d401f29-56d9-d754-88a6-684ce329a727@quicinc.com>

Hi Rebecca,

That's Ampere Altra Family specific MPIDR encoding. So, we could not 
leverage the definitions in the ArmPkg/Include/Library/ArmLib.h.

-Nhi

On 1/13/2023 9:40 PM, Rebecca Cran wrote:
> On 1/12/23 21:21, Nhi Pham via groups.io wrote:
>
>> +//
>> +// MPIDR manipulation
>> +//
>> +#define AC01_GET_MPIDR(SocketId, ClusterId, CoreId) \
>> +          (((SocketId) << 32) | ((ClusterId) << 16) | ((CoreId) << 8))
>> +#define AC01_GET_SOCKET_ID(Mpidr)  (((Mpidr) & ARM_CORE_AFF3) >> 32)
>> +#define AC01_GET_CLUSTER_ID(Mpidr) (((Mpidr) & ARM_CORE_AFF2) >> 16)
>> +#define AC01_GET_CORE_ID(Mpidr)    (((Mpidr) & ARM_CORE_AFF1) >> 8)
>> +
>
> Ideally, this should go in ArmPkg/Include/Library/ArmLib.h, but I'm 
> not sure how we should handle the older format where the the core was 
> in the first 8 bits.
>

  reply	other threads:[~2023-01-17  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13  4:21 [edk2-platforms][PATCH 1/1] AmpereAltraPkg: Update ArmPlatformLib to work with changed ARM_CORE_INFO Nhi Pham
2023-01-13 14:40 ` [edk2-devel] " Rebecca Cran
2023-01-17  9:53   ` Nhi Pham [this message]
2023-01-17 12:55     ` Rebecca Cran
2023-01-17 16:40       ` Ard Biesheuvel
2023-01-17 18:21         ` Rebecca Cran
2023-01-31  6:35           ` Nhi Pham
2023-02-15 11:28             ` Leif Lindholm

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=a2b41f26-a90e-7e0f-8fd8-c551fc940490@amperemail.onmicrosoft.com \
    --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