From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::d2e; helo=mail-io1-xd2e.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 33361211D56C9 for ; Wed, 6 Mar 2019 05:22:37 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id 9so10162280iog.8 for ; Wed, 06 Mar 2019 05:22:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9gNLbZ/V+hWc9WSyD/IFkWaIitRUN6YeNp3uzLxDpB0=; b=C2HenZkXS46jbpxyK4MBG3A5NHuC6THJaOmSu2kdZfg4bkcj9AowKIenio3t2nBwO2 m9mKZX3MWHkt+r6W7LENAiFvCWongorsDDW5C9zIJ395iIHqbcg5f6U3/1d+CkxmIczO +G4SqVZdEw4itiwNug3QWZozrfDv0LGo7XzyQNj2gbZpq8EFLfAVn4dqzwGZq25coztQ Pw0gHZurfLTd6x6VFpT0E6zl6GU7Jjcb4RjjoRahZt2CqrMAdV31K7lKoyLQMci8MKsJ 0+3ViV+MYUXzsjXnbMiheJDoJGgQdWQRHe4mV9b7sq/Lh+i8unDb5qZXfeUQL6EStUyW mNuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9gNLbZ/V+hWc9WSyD/IFkWaIitRUN6YeNp3uzLxDpB0=; b=bHpcjgtT4GDKHwHuWULTzGe+fdhRocLoXyCfa/YN/z67KAbYS0h3HZ8Vi4bsF1lbqe ZmJ/L03qG/rNb5Hl8A0U8YxnFNy1IYRPH427mikycqGp8ET8GyRxxEd/6rkziLMun738 O9epfN/0uhvwzTjSCwEBazhIQ7Hcgz2rf6zFYl/ZnF18jHstOloK72/7aT2drVDeqe4t mHfeC9NrVix9EcKiUF2iFiu69WbC9EQul6yWe5pU3OPIRKNtOt2xuCqaGSkH7oPvDBhL 5PPZVQQuPAycQ0xRupPjIZ2b5GJh0iFVqKH/udrlOUS81l0qGHDMi7FwEkBaPxIbJ0ri 91bg== X-Gm-Message-State: APjAAAX6gkMvZMP7gxWWJv6IxALhHldsWJiXOF79lUxh3XZW3xKrIjjq ZiEJHN+ukf5PVW7YFNwSO1dv3St7yudnGA49rkEe0g== X-Google-Smtp-Source: APXvYqzu4xRIr2yHUMbt4g5Xol6YVim7ex3fAJpcIHDCNTkgVGbZhtYZ+LnTPNNv58gqLZYomaaJMVHnQ3GWkzo7+z0= X-Received: by 2002:a6b:7b02:: with SMTP id l2mr3237634iop.60.1551878556664; Wed, 06 Mar 2019 05:22:36 -0800 (PST) MIME-Version: 1.0 References: <734D49CCEBEEF84792F5B80ED585239D5C060382@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C060A85@SHSMSX104.ccr.corp.intel.com> <20190306124125.GJ21602@mac-ubuntu-vm> In-Reply-To: <20190306124125.GJ21602@mac-ubuntu-vm> From: Ard Biesheuvel Date: Wed, 6 Mar 2019 14:22:25 +0100 Message-ID: To: Achin Gupta Cc: "ray.ni@intel.com" , Charles Garcia-Tobin , "edk2-devel@lists.01.org" Subject: Re: Does ARM platform produce MP protocol? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 13:22:38 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 6 Mar 2019 at 13:41, Achin Gupta wrote: > > On Wed, Mar 06, 2019 at 10:37:58AM +0100, Ard Biesheuvel wrote: > > (adding Achin and Charles) > > > > On Wed, 6 Mar 2019 at 10:16, Ni, Ray wrote: > > > > > > > -----Original Message----- > > > > From: edk2-devel On Behalf Of Ard > > > > Biesheuvel > > > > Sent: Wednesday, March 6, 2019 3:38 PM > > > > To: Ni, Ray > > > > Cc: edk2-devel@lists.01.org > > > > Subject: Re: [edk2] Does ARM platform produce MP protocol? > > > > > > > > On Wed, 6 Mar 2019 at 06:44, Ni, Ray wrote: > > > > > > > > > > Ard, Leif, > > > > > I am a bit interested in how ARM platform supports the MP? > > > > > PI Spec defines below protocol but I failed to find a driver in A= RM platform > > > > producing this protocol. > > > > > Or did I miss anything? > > > > > > > > > > > > > No you are right. We don't expose that on ARM, since UEFI only runs= on a > > > > single core. Bringing up and taking down cores is done via a protoc= ol called > > > > PSCI, which is implemented by firmware running at a higher privileg= e level. > > > > > > > > So while it would be possible to implement the MP protocol on top o= f PSCI, > > > > we haven't identified a use case for it yet. (The OS calls PSCI dir= ectly to boot > > > > the secondary cores) > > IIUC, the MP protocol enables communication between processors that are a= lready > up instead of bringing them up or taking them down. So, it is orthogonal = to > PSCI. Is that what you meant? > Surely, StartupThisAP starts up the AP, no? In any case, I didn't dig any deeper, but I know that PSCI can be used (even in the UEFI context) to execute pieces of code on another core (ACS uses this IIRC) > > > > > > Is below EFI_MM_MP_PROTOCOL (added in PI spec 1.6) implemented in ARM= ? > > > Or will it be implemented by an ARM module? > > > > No it is currently not implemented, and I am not aware of any plans to = do so. > > +1. There is no need to do this until UEFI runs on a single core on Arm. > until -> as long as ?? > > > > > I am asking this because MP_SERVICES protocol exposes CPU location in= formation > > > (Package/Core/Thread) through *GetProcessorInfo*, but MM_MP protocol = doesn't > > > have a way to expose that information. > > > If such location information isn't exposed by MM_MP, is that because = ARM doesn't > > > care about the location information? Or because ARM cares but forgot = to add similar > > > *GetProcessorInfo* interface to MM_MP when changing the PI spec? > > > Or ARM doesn't use the MM_MP at all? > > Even if Arm used this protocol, it can work with the logical processor nu= mber. I > don't see a need to expose the location information to the caller. It see= ms very > Intel specific. Is the EFI_MP_SERVICES_PROTOCOL used on Arm? > No, that is what started the discussion. > > > > > > > I don't know the history of this protocol and who proposed it, but > > today, we don't have a need for running per-CPU initialization code in > > the context of MM. Even if MM is a component of the more privileged > > firmware running on an ARM system, it is running in a sandbox that was > > primarily designed around exposing MM services to UEFI code running at > > the same privilege level as the OS (such as the authenticated variable > > store). Platform initialization code (which is more likely to require > > dispatch to each core) runs in the secure world as well, but not in > > the context of MM. > > > > I will let Achin chime in here as well. > > +1. > > I will let Charles comment on the history. Maybe this protocol was design= ed > for Arm systems where MM is the most privileged firmware. The upstream > implementation runs MM in the lowest privilege level. Either way, this pr= otocol > sense only when MM on Arm is MP capable. > > cheers, > Achin > > > > > > > > > typedef struct _EFI_MM_MP_PROTOCOL { > > > UINT32 Revision, > > > UINT32 Attributes, > > > EFI_MM_ GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors, > > > EFI_MM_DISPATCH_PROCEDURE DispatchProcedure, > > > EFI_MM_BROADCAST_PROCEDURE BroadcastProcedure, > > > EFI_MM_SET_STARTUP_PROCEDURE SetStartupProcedure, > > > EFI_CHECK_FOR_PROCEDURE CheckOnProcedure, > > > EFI_WAIT_FOR_PROCEDURE WaitForProcedure, > > > }EFI_MM_MP_PROTOCOL; > > > > > > > > > typedef struct _EFI_MP_SERVICES_PROTOCOL { > > > > > EFI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS > > > > GetNumberOfProcessors; > > > > > EFI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; > > > > > EFI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; > > > > > EFI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; > > > > > EFI_MP_SERVICES_SWITCH_BSP SwitchBSP; > > > > EFI_MP_SERVICES_ENABLEDISABLEAP > > > > > EnableDisableAP; EFI_MP_SERVICES_WHOAMI WhoAmI; } > > > > > EFI_MP_SERVICES_PROTOCOL; > > > > > > > > > > Thanks, > > > > > Ray > > > > _______________________________________________ > > > > edk2-devel mailing list > > > > edk2-devel@lists.01.org > > > > https://lists.01.org/mailman/listinfo/edk2-devel > IMPORTANT NOTICE: The contents of this email and any attachments are conf= idential and may also be privileged. If you are not the intended recipient,= please notify the sender immediately and do not disclose the contents to a= ny other person, use it for any purpose, or store or copy the information i= n any medium. Thank you.