From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.0.54; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=achin.gupta@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00054.outbound.protection.outlook.com [40.107.0.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3E1182194EB7A for ; Wed, 6 Mar 2019 04:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xYzzJs92KX679swIAYZ3CmtqcOF0HeKlzRRl4pXCBe4=; b=VWmaXfEywN+AWHXB/al48qOojW4v/0fGOY8+VdK20xKJE/fhesqmsh30aIt3do3QbviuqtTcgzvIEcVNCHCaTTe70UEe/pAFHM2UFc3Td7YQgLmG3ex7cvvsakdH5G6USz6f1eph+NsFzdA9D43fGUEGFxe9LHVhvAFDmKNNGMU= Received: from AM0PR08MB2980.eurprd08.prod.outlook.com (52.134.92.153) by AM0PR08MB3825.eurprd08.prod.outlook.com (20.178.23.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.17; Wed, 6 Mar 2019 12:41:32 +0000 Received: from AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6]) by AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6%5]) with mapi id 15.20.1665.020; Wed, 6 Mar 2019 12:41:32 +0000 From: Achin Gupta To: Ard Biesheuvel , "ray.ni@intel.com" CC: "Ni, Ray" , Charles Garcia-Tobin , "edk2-devel@lists.01.org" Thread-Topic: [edk2] Does ARM platform produce MP protocol? Thread-Index: AdTT37l+uf+kVpDOSDippkHRe/INcQAD8+GAAANymQAAAL0+AAAGaCyA Date: Wed, 6 Mar 2019 12:41:32 +0000 Message-ID: <20190306124125.GJ21602@mac-ubuntu-vm> References: <734D49CCEBEEF84792F5B80ED585239D5C060382@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C060A85@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.9.4 (2018-02-28) x-originating-ip: [95.146.138.15] x-clientproxiedby: LO2P265CA0205.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::25) To AM0PR08MB2980.eurprd08.prod.outlook.com (2603:10a6:208:5b::25) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7944e396-4289-44d9-5c5e-08d6a2310fc8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3825; x-ms-traffictypediagnostic: AM0PR08MB3825: x-ms-exchange-purlcount: 1 x-microsoft-exchange-diagnostics: 1; AM0PR08MB3825; 20:2rbrHS3a8fCtFobKGkPdrEHYSjaTxMERZ2uTIdFwGQacg3bm7MAi6yVOI8OuijYncn2+Ia50vjZvT7vxn9eDHIZWcRvC7q9npk7AJOG/Rn+vFfk+VuQ2itDuFgP5qFf4nwSMjeq1VvHogbXttQfXf8eK4AbBtTiFqlX8uGtz5mc= x-microsoft-antispam-prvs: x-forefront-prvs: 0968D37274 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(346002)(136003)(366004)(396003)(376002)(39860400002)(13464003)(40434004)(189003)(199004)(2906002)(97736004)(11346002)(256004)(1076003)(99286004)(71190400001)(71200400001)(33716001)(76176011)(52116002)(5024004)(25786009)(102836004)(14444005)(7736002)(305945005)(58126008)(106356001)(229853002)(6116002)(26005)(3846002)(68736007)(8676002)(6346003)(186003)(33656002)(9686003)(6306002)(6512007)(8936002)(81156014)(81166006)(386003)(6506007)(53546011)(93886005)(105586002)(316002)(110136005)(53936002)(54906003)(72206003)(44832011)(86362001)(4326008)(6486002)(478600001)(476003)(966005)(14454004)(6436002)(66066001)(486006)(6246003)(446003)(2501003)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3825; H:AM0PR08MB2980.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Achin.Gupta@arm.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UZTVn/FM3CXJFCknhEdD1yJw3JxyvqigcEAAFeg/pWlS4D2Osj1MyVnsxRvhP8s1oujANJ3CpvUdSMNOJ+MwGUsKYbZSoQ53sxZtdcpqCibw19UP9mkccu2MwGU4Q8x59WSsqRQI3XRVpCt1jgCzObyokAutMgQ5+QJFJd+YpMG+9Mqwovz35k0Y8e3OrK6hRkbzuaYVJ+sqskaM1/5Idper1Tyz66YpypbVGvGkwTA+tCZVflT8CL96xw4oof0RoW3ZGqbfjH1hLgimjK0HXsSCPvgYbToIRll24UNA7QiMSkCPuFZrW2+4pQa7xEua0eARQst4OtR238W+ULDgLhKO/LiseHK+Vp7e5k/Sd6WJmbB3qxWgkj6qHKxrCOfVB1vnOSpYJZ2eqnEh/DLgxZsjVH9ZpNZ+jEm7d5rJv+I= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7944e396-4289-44d9-5c5e-08d6a2310fc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2019 12:41:32.4152 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3825 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 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 X-List-Received-Date: Wed, 06 Mar 2019 12:41:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable 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 ARM= platform > > > producing this protocol. > > > > Or did I miss anything? > > > > > > > > > > No you are right. We don't expose that on ARM, since UEFI only runs o= n a > > > single core. Bringing up and taking down cores is done via a protocol= called > > > PSCI, which is implemented by firmware running at a higher privilege = level. > > > > > > So while it would be possible to implement the MP protocol on top of = PSCI, > > > we haven't identified a use case for it yet. (The OS calls PSCI direc= tly to boot > > > the secondary cores) IIUC, the MP protocol enables communication between processors that are alr= eady up instead of bringing them up or taking them down. So, it is orthogonal to PSCI. Is that what you meant? > > > > 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. > > > I am asking this because MP_SERVICES protocol exposes CPU location info= rmation > > (Package/Core/Thread) through *GetProcessorInfo*, but MM_MP protocol do= esn't > > have a way to expose that information. > > If such location information isn't exposed by MM_MP, is that because AR= M 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 numb= er. I don't see a need to expose the location information to the caller. It seems= very Intel specific. Is the EFI_MP_SERVICES_PROTOCOL used on Arm? > > > > 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 designed for Arm systems where MM is the most privileged firmware. The upstream implementation runs MM in the lowest privilege level. Either way, this prot= ocol 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 confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.