From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.1530.1639589902481660836 for ; Wed, 15 Dec 2021 09:38:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUby8rzu; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BAD3D61A07 for ; Wed, 15 Dec 2021 17:38:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E5B3C36AF6 for ; Wed, 15 Dec 2021 17:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639589900; bh=zLPwOTiqUJGxiL7k5z3FAZDwBJ3K+Z5Q9IhElLVPl90=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nUby8rzuWl960MJTF4/UCE9vklmom332dBZijvJGZOYOMs0bv3LuNVSYNrWX07Mnw mP+o06WYca64G/yDqoxBz1kn3XKkOv4xkRBSfN00ZBfLRT2ahxf+kwGn1T+HOFxp7n Ajvh6jOxfviZQtwFzUpt7fVDuhgkW7JdQcNzD+OHdma2mlfWvxsOqrKvRf3lI0xFqL b1ze5dG16Qg4PUG45wmYAYQ7YPGCNtSrho9oTF7uRo+jSJbCLZnU2hy5Jj9d7SatM2 qg+FhZfsSZIImJVDPaxFeaIue7NnHhsOeZ7T9qM4fekYQ9E0DWcRCfhBjakOezcbEW tz3JO51QZq4lw== Received: by mail-wr1-f47.google.com with SMTP id u17so39534228wrt.3 for ; Wed, 15 Dec 2021 09:38:20 -0800 (PST) X-Gm-Message-State: AOAM532ttRsRxFTKe/Xgqf91Rikq6s1sIMTGpFKfNvq/Lidj8izRkDRA PouuMuObk9UODuQ2qMkYiC+MYLQC1cEyc01f02E= X-Google-Smtp-Source: ABdhPJxYJCn4PUkZ2VPZh1PwPCux+FW1KL9GzW6Lq35bbFvATnrFjA0kUxgtel7YOBQ2wvks+176Gd7fhz1fzb46smc= X-Received: by 2002:adf:9bdb:: with SMTP id e27mr5414945wrc.417.1639589898550; Wed, 15 Dec 2021 09:38:18 -0800 (PST) MIME-Version: 1.0 References: <20211018153945.1690-1-rebecca@nuviainc.com> <20211018153945.1690-3-rebecca@nuviainc.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 15 Dec 2021 18:38:07 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] ArmPkg: Add Library/MpInitLib to support EFI_MP_SERVICES_PROTOCOL To: Rebecca Cran Cc: Sami Mujawar , Ard Biesheuvel , Gerd Hoffmann , Samer El-Haj-Mahmoud , Leif Lindholm , edk2-devel-groups-io , nd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 15 Dec 2021 at 18:18, Rebecca Cran wrote: > > Hi Sami, > > > I've been looking at this again to make sure I've addressed all the issue= s before sending out a v2 patch series. I'm stuck on one point though: I'm = not sure how it can be split into 2-3 patches without breaking bisecting. T= he CpuDxe and MpInitLib changes introduce a dependency on MpInitLib, so I d= on't see how I can put the ArmVirtPkg change into a separate commit without= breaking it? > No worries - just keep it as one patch in that case. > > > On 10/22/21 11:51 AM, Sami Mujawar wrote: > > Hi Rebecca, > > Thanks you for this patch. > > I think this patch could be split in 2 - 3 patches (CpuDxe & MpInitLib a= nd the ArmVirtPkg change should be a separate patch). > > Please find my feedback inline marked [SAMI]. > > I think the usage of MPIDR and CpuInfo->ProcessorId needs to be revisited= in this patch series. I have kept my feedback on usage of MPIDR and the MT= bit [24] to give the context. But, it will be good to only retain the affi= nity bits and mask all other bits of the MPIDR. > > Please let me know if you have any queries. > > Regards, > > Sami Mujawar > > > On 18/10/2021 04:39 PM, Rebecca Cran wrote: > > Add support for EFI_MP_SERVICES_PROTOCOL during the DXE phase under > AArch64. > > PSCI_CPU_ON is called to power on the core, the supplied procedure is > executed and PSCI_CPU_OFF is called to power off the core. > > Minimal setup is done before calling the supplied procedure: for example > the MMU and caches are not enabled. > > Signed-off-by: Rebecca Cran > --- > 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/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 +++++ > ArmVirtPkg/ArmVirt.dsc.inc | 3 + > 14 files changed, 3013 insertions(+)