[Fw_Os_Forum] Support for EFI MP Services
Chen, Ming (Acan, DTD-SH)
ming.chen at hp.com
Sun Jul 17 21:34:44 EDT 2016
Hi Brett,
Just mention that there are two MP Service protocols: Framework MP Service Protocol, and (PI) MP Service Protocol.
Note sure if you have tried both when you BS->LocateProtocol()?
Thanks,
Acan
-----Original Message-----
From: fw_os_forum-bounces at mailman.uefi.org [mailto:fw_os_forum-bounces at mailman.uefi.org] On Behalf Of Brett Stahlman
Sent: Saturday, July 16, 2016 3:27 AM
To: fw_os_forum at mailman.uefi.org
Subject: Re: [Fw_Os_Forum] Support for EFI MP Services
Aaron,
So methods like GetNumberOfProcessors and StartupAllAPs (documented here http://www.uefi.org/sites/default/files/resources/Plugfest_Multiprocessing-with_UEFI-McDaniel.pdf)
are not meant to be called from a boot loader using Boot Services?
I will have a look at the other references. Hopefully the firmware's AP initialization obviates the need for some of the tedious, low-level real mode trampoline code I've seen in the kernel and other loader code performing AP bring up... If UEFI simplifies only the BSP side of things, it doesn't seem a very complete solution...
Thanks,
Brett S.
On Fri, Jul 15, 2016 at 11:28 AM, <Aaron.Pop at congatec.com> wrote:
> Hi Brett,
>
>>>1. Is there a way to add support for MP Services to firmware that
>>>doesn't have it natively? Is there a list somewhere documenting
>>>which firmware supports?
> If you platform doesn't support the MP services protocol, chances are
> that your platform is not compliant with the Platform Initialization
> specification. Additionally, the PI specification defines protocols
> that are intended for use by the firmware, not by boot loaders or the
> OS. I would highly recommend that your boot loader only use protocols
> that are defined in the UEFI specification.
>
>>>2. What is the best way to bring up the APs in an environment that
>>>doesn't support the MP Services Protocol? I've read something that
>>>suggests it might be easier with UEFI than with BIOS because the PI
>>>firmware does some pre-initialization of the APs even before handoff
>>>to the BSP - but I haven't found much documentation on this...
> X86/X86_64 operating systems follow intel's multi processor
> specification for waking APs when they are given control.
> (http://download.intel.com/design/archives/processors/pro/docs/2420160
> 6.pdf) All firmware (even legacy BIOSes) would initialize all
> processors in the system, and then would either halt the APs, or put
> the APs into a spin loop and only leave the BSP (boot strap processor)
> running when giving control to a bootloader.
>
> For more information, you can refer to
> http://wiki.osdev.org/Symmetric_Multiprocessing, or you can check out
> how the linux kernel performs multi processor bring up.
>
> -Aaron
>
>
>
>
>
>
> From: Brett Stahlman <brettstahlman at gmail.com>
> To: fw_os_forum at mailman.uefi.org
> Date: 07/15/2016 09:11 AM
> Subject: [Fw_Os_Forum] Support for EFI MP Services
> Sent by: fw_os_forum-bounces at mailman.uefi.org
> ________________________________
>
>
>
> I'm working on an x86_64 UEFI boot loader that runs on the BSP in
> 64-bit long mode, and must bring up APs (secondary processors) after
> some preliminary initialization. I've seen some documentation on EFI
> MP (multi-processor) Service Protocol, but the headers in gnu-efi
> don't appear to support it, and BS->LocateProtocol() reports status 14
> (EFI_NOT_FOUND). My questions are...
>
> 1. Is there a way to add support for MP Services to firmware that
> doesn't have it natively? Is there a list somewhere documenting which
> firmware supports?
> 2. What is the best way to bring up the APs in an environment that
> doesn't support the MP Services Protocol? I've read something that
> suggests it might be easier with UEFI than with BIOS because the PI
> firmware does some pre-initialization of the APs even before handoff
> to the BSP - but I haven't found much documentation on this...
>
> Any help would be greatly appreciated.
> Thanks,
> Brett S.
_______________________________________________
Fw_os_forum mailing list
Fw_os_forum at mailman.uefi.org
http://lists.mailman.uefi.org/mailman/listinfo/fw_os_forum
More information about the Fw_os_forum
mailing list