public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC] [PATCH 0/2] Proposal to add EFI_MP_SERVICES_PROTOCOL support for AARCH64
@ 2021-09-25  2:17 Rebecca Cran
  2021-09-25  2:17 ` [RFC] [PATCH 1/2] ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct Rebecca Cran
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Rebecca Cran @ 2021-09-25  2:17 UTC (permalink / raw)
  To: devel, Sami Mujawar, Leif Lindholm, Ard Biesheuvel, Gerd Hoffmann,
	rfc
  Cc: Rebecca Cran

I'd like to propose adding EFI_MP_SERVICES_PROTOCOL support for
AARCH64 systems. I've attached two patches to implement support for it
in the DXE phase, based on code in EmulatorPkg and UefiCpuPkg. It's added
under ArmPkg for now, but longer term it should probably be moved into
UefiCpuPkg.

Patch 1/2 is the start of addressing the issue that the Aff0 field of
the MPIDR is no longer guaranteed to be the core, and should be referred
to in a more generic way: for example it could be the thread, with Aff1
being the core and Aff2 the cluster. Clearly much more work is needed 
to fully remove that assumption.

Patch 2/2 implements the EFI_MP_SERVICES_PROTOCOL for DXE in Library/MpInitLib.
CpuDxe initializes the MP support, and as a result gains a dependency on
MpInitLib. ArmVirt.dsc.inc needs updated to add the new library, as will
all AARCH64 platforms.

I sent out a patch for MdeModulePkg last week to add a corresponding test
application, MpServicesTest (see https://edk2.groups.io/g/devel/message/80878).

Rebecca Cran (2):
  ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO
    struct
  ArmPkg: Add Library/MpInitLib to support EFI_MP_SERVICES_PROTOCOL

 ArmPkg/ArmPkg.dec                                              |    4 +
 ArmPkg/ArmPkg.dsc                                              |    4 +
 ArmPkg/Drivers/CpuDxe/AArch64/Arch.c                           |   22 +
 ArmPkg/Drivers/CpuDxe/Arm/Arch.c                               |   22 +
 ArmPkg/Drivers/CpuDxe/CpuDxe.c                                 |    2 +
 ArmPkg/Drivers/CpuDxe/CpuDxe.h                                 |   10 +
 ArmPkg/Drivers/CpuDxe/CpuDxe.inf                               |    6 +
 ArmPkg/Drivers/CpuDxe/CpuMpInit.c                              |  604 ++++++++
 ArmPkg/Include/Guid/ArmMpCoreInfo.h                            |    3 +-
 ArmPkg/Include/Library/ArmLib.h                                |    4 +
 ArmPkg/Include/Library/MpInitLib.h                             |  366 +++++
 ArmPkg/Library/MpInitLib/AArch64/MpFuncs.S                     |   61 +
 ArmPkg/Library/MpInitLib/DxeMpInitLib.inf                      |   53 +
 ArmPkg/Library/MpInitLib/DxeMpLib.c                            | 1498 ++++++++++++++++++++
 ArmPkg/Library/MpInitLib/InternalMpInitLib.h                   |  358 +++++
 ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c |    8 +-
 ArmPlatformPkg/PrePeiCore/MainMPCore.c                         |    2 +-
 ArmPlatformPkg/PrePi/MainMPCore.c                              |    2 +-
 ArmVirtPkg/ArmVirt.dsc.inc                                     |    3 +
 19 files changed, 3024 insertions(+), 8 deletions(-)
 create mode 100644 ArmPkg/Drivers/CpuDxe/AArch64/Arch.c
 create mode 100644 ArmPkg/Drivers/CpuDxe/Arm/Arch.c
 create mode 100644 ArmPkg/Drivers/CpuDxe/CpuMpInit.c
 create mode 100644 ArmPkg/Include/Library/MpInitLib.h
 create mode 100644 ArmPkg/Library/MpInitLib/AArch64/MpFuncs.S
 create mode 100644 ArmPkg/Library/MpInitLib/DxeMpInitLib.inf
 create mode 100644 ArmPkg/Library/MpInitLib/DxeMpLib.c
 create mode 100644 ArmPkg/Library/MpInitLib/InternalMpInitLib.h

-- 
2.31.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-01-19 10:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-25  2:17 [RFC] [PATCH 0/2] Proposal to add EFI_MP_SERVICES_PROTOCOL support for AARCH64 Rebecca Cran
2021-09-25  2:17 ` [RFC] [PATCH 1/2] ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct Rebecca Cran
2021-09-25  2:17 ` [RFC] [PATCH 2/2] ArmPkg: Add Library/MpInitLib to support EFI_MP_SERVICES_PROTOCOL Rebecca Cran
2021-09-28 11:14 ` [RFC] [PATCH 0/2] Proposal to add EFI_MP_SERVICES_PROTOCOL support for AARCH64 Leif Lindholm
2021-10-07  9:41   ` Leif Lindholm
2021-10-07 10:03     ` Ard Biesheuvel
2021-10-07 11:02       ` Leif Lindholm
2021-10-08 14:51         ` Ard Biesheuvel
2021-10-11 12:28           ` Leif Lindholm
2021-10-11 14:20             ` Samer El-Haj-Mahmoud
2021-10-11 15:01               ` [edk2-rfc] " Leif Lindholm
2021-10-11 21:52                 ` Samer El-Haj-Mahmoud
2021-10-14 13:14                   ` Leif Lindholm
2021-10-18  9:21                     ` Sami Mujawar
2021-10-18 11:54                       ` Leif Lindholm
2022-01-19 10:28                         ` [edk2-devel] " Sami Mujawar
2021-10-14 12:41   ` Rebecca Cran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox