ArmPkg/ArmPkg.dsc | 1 + MdeModulePkg/MdeModulePkg.dsc | 9 + ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf | 55 + MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf | 41 + ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h | 351 ++++ MdeModulePkg/Application/MpServicesTest/Options.h | 39 + ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 1774 ++++++++++++++++++++ MdeModulePkg/Application/MpServicesTest/MpServicesTest.c | 558 ++++++ MdeModulePkg/Application/MpServicesTest/Options.c | 215 +++ ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S | 57 + 10 files changed, 3100 insertions(+) create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.h create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.c create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.c create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S
This is the rework of the patches I sent out in late 2021, building on fixes done by Ard at https://github.com/ardbiesheuvel/edk2/tree/armpkg-mpservicesdxe-refactor. The most significant changes are the addition of code to enable the MMU and caches on the APs, and changing MpServicesTest to use commandline parameters to control its operation. Rebecca Cran (2): ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls MdeModulePkg: Add new Application/MpServicesTest application ArmPkg/ArmPkg.dsc | 1 + MdeModulePkg/MdeModulePkg.dsc | 9 + ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf | 55 + MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf | 41 + ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h | 351 ++++ MdeModulePkg/Application/MpServicesTest/Options.h | 39 + ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 1774 ++++++++++++++++++++ MdeModulePkg/Application/MpServicesTest/MpServicesTest.c | 558 ++++++ MdeModulePkg/Application/MpServicesTest/Options.c | 215 +++ ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S | 57 + 10 files changed, 3100 insertions(+) create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.h create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.c create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.c create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92915): https://edk2.groups.io/g/devel/message/92915 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Mon, 29 Aug 2022 at 18:00, Rebecca Cran <quic_rcran@quicinc.com> wrote: > > This is the rework of the patches I sent out in late 2021, > building on fixes done by Ard at > https://github.com/ardbiesheuvel/edk2/tree/armpkg-mpservicesdxe-refactor. > > The most significant changes are the addition of code to enable > the MMU and caches on the APs, and changing MpServicesTest to > use commandline parameters to control its operation. > IIRC, there were some issues with this code on bare metal. Which hardware did you use to test it? Any chance you could try it on a RPi4? > Rebecca Cran (2): > ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls > MdeModulePkg: Add new Application/MpServicesTest application > > ArmPkg/ArmPkg.dsc | 1 + > MdeModulePkg/MdeModulePkg.dsc | 9 + > ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf | 55 + > MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf | 41 + > ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h | 351 ++++ > MdeModulePkg/Application/MpServicesTest/Options.h | 39 + > ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 1774 ++++++++++++++++++++ > MdeModulePkg/Application/MpServicesTest/MpServicesTest.c | 558 ++++++ > MdeModulePkg/Application/MpServicesTest/Options.c | 215 +++ > ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S | 57 + > 10 files changed, 3100 insertions(+) > create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf > create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.inf > create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpServicesInternal.h > create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.h > create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c > create mode 100644 MdeModulePkg/Application/MpServicesTest/MpServicesTest.c > create mode 100644 MdeModulePkg/Application/MpServicesTest/Options.c > create mode 100644 ArmPkg/Drivers/ArmPsciMpServicesDxe/MpFuncs.S > > -- > 2.30.2 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93141): https://edk2.groups.io/g/devel/message/93141 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 9/5/22 04:57, Ard Biesheuvel wrote: > > IIRC, there were some issues with this code on bare metal. Which > hardware did you use to test it? Any chance you could try it on a > RPi4? Yes, there were. I've run this code on an Arm Juno R2, Synquacer Developer Box and SolidRun HoneyComb. I do have an RPi4 I can use, so I'll test it on that too. -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93165): https://edk2.groups.io/g/devel/message/93165 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Mon, 5 Sept 2022 at 17:52, Rebecca Cran <quic_rcran@quicinc.com> wrote: > > On 9/5/22 04:57, Ard Biesheuvel wrote: > > > > IIRC, there were some issues with this code on bare metal. Which > > hardware did you use to test it? Any chance you could try it on a > > RPi4? > > Yes, there were. I've run this code on an Arm Juno R2, Synquacer Developer Box and SolidRun HoneyComb. > I do have an RPi4 I can use, so I'll test it on that too. > I think you've got things covered: I suggested RPi4 because it uses A72, and I seem to remember the issues I observed were either on A57 or A72 (which are quite similar). But between Juno and HoneyComb, I don't think the RPi4 data point is that useful. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93166): https://edk2.groups.io/g/devel/message/93166 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 9/5/22 09:55, Ard Biesheuvel wrote: > I think you've got things covered: I suggested RPi4 because it uses > A72, and I seem to remember the issues I observed were either on A57 > or A72 (which are quite similar). But between Juno and HoneyComb, I > don't think the RPi4 data point is that useful. My only concern is about the call in MpServicesTest: WriteBackDataCacheRange ((VOID *)&ApFunction, 32); Obviously the '32' is a magic number and should be something based on the size of ApFunction. But I don't think there's a portable way to calculate what that value should be. -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93253): https://edk2.groups.io/g/devel/message/93253 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Tue, 6 Sept 2022 at 19:01, Rebecca Cran <quic_rcran@quicinc.com> wrote: > > On 9/5/22 09:55, Ard Biesheuvel wrote: > > I think you've got things covered: I suggested RPi4 because it uses > > A72, and I seem to remember the issues I observed were either on A57 > > or A72 (which are quite similar). But between Juno and HoneyComb, I > > don't think the RPi4 data point is that useful. > > My only concern is about the call in MpServicesTest: > > WriteBackDataCacheRange ((VOID *)&ApFunction, 32); > > Obviously the '32' is a magic number and should be something based on the size of ApFunction. > But I don't think there's a portable way to calculate what that value should be. > Why exactly do we need that call? I understand that some of the code needs to be clean to the PoC (on ARM) so that the AP can fetch instructions with the MMU and caches disabled. But the actual routine passed into the API is called with the MMU and caches on, right? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93293): https://edk2.groups.io/g/devel/message/93293 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 9/6/22 11:53, Ard Biesheuvel wrote: > On Tue, 6 Sept 2022 at 19:01, Rebecca Cran <quic_rcran@quicinc.com> wrote: >> My only concern is about the call in MpServicesTest: >> >> WriteBackDataCacheRange ((VOID *)&ApFunction, 32); >> >> Obviously the '32' is a magic number and should be something based on the size of ApFunction. >> But I don't think there's a portable way to calculate what that value should be. >> > Why exactly do we need that call? > > I understand that some of the code needs to be clean to the PoC (on > ARM) so that the AP can fetch instructions with the MMU and caches > disabled. But the actual routine passed into the API is called with > the MMU and caches on, right? It's a leftover from the work you did on the code, before I changed it to have the MMU and caches enabled on the APs. I'll go through and remove it and any others for the v2 patch which I'll send out later today (which will also fix the Usage text for MpServicesTest). -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93295): https://edk2.groups.io/g/devel/message/93295 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Mon, 5 Sept 2022 at 17:55, Ard Biesheuvel <ardb@kernel.org> wrote: > > On Mon, 5 Sept 2022 at 17:52, Rebecca Cran <quic_rcran@quicinc.com> wrote: > > > > On 9/5/22 04:57, Ard Biesheuvel wrote: > > > > > > IIRC, there were some issues with this code on bare metal. Which > > > hardware did you use to test it? Any chance you could try it on a > > > RPi4? > > > > Yes, there were. I've run this code on an Arm Juno R2, Synquacer Developer Box and SolidRun HoneyComb. > > I do have an RPi4 I can use, so I'll test it on that too. > > > > I think you've got things covered: I suggested RPi4 because it uses > A72, and I seem to remember the issues I observed were either on A57 > or A72 (which are quite similar). But between Juno and HoneyComb, I > don't think the RPi4 data point is that useful. For the series, Reviewed-by: Ard Biesheuvel <ardb@kernel.org> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93243): https://edk2.groups.io/g/devel/message/93243 Mute This Topic: https://groups.io/mt/93329491/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.