flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Multiprocessor support in UEFI |
Author |
|
Feryno 10 Jan 2014, 13:10
MP = multiprocessor
BSP = bootstrap CPU AP = application CPU UEFI runs at single CPU, it is usually initial BSP if it is healthy (UEFI has a capability to switch to different healthy CPU and make it BSP if the intial BSP is unhealthy). The BSP is allowed to call UEFI services. At the time of executing our UEFI applications / bootloaders / drivers (e.g. from UEFI shell or as a boot menu = after UEFI is already initialized but OS is not yet loaded) APs are already activated (at least because UEFI had to know how much CPUs are present) but aren't executing anything. It is possible to use APs in a limited way. It is possible to post a work to them, but they are not allowed to call almost any UEFI service (they are allowed to call only MP WhoAmI). Studying more about 2 MultiProcessor protocols: ftp://ftp.heanet.ie/mirrors/sourceforge/e/ed/edk2-startcore/UEFI_Plugfest_2010.pdf http://www.uefi.org/sites/default/files/resources/PI_Spec_1.3.zip (MP Protocol is in Vol2 - chapters 13.3, 13.4 - Multiprocessor Services Protocol) 2 slightly different MP protocols exist. Even if none of them is present in your UEFI then it is still possible to activate all APs by own way (sending INIT-SIPI from BSP to APs). This example attempts to use the suggested newer MP protocol, if it is not found, then the older one (Framework MP Protocol). If none of them found, then send INIT-SIPI from BSP to APs and activate them anyway (in a way like every MP capable OS is doing that). The example measures CPUID cycles at every CPU in the system (100h iterations at every CPU and taking the best one as a result). CPU number shown in result is obtained from APIC_ID. For Intel, I didn't implement x2APIC, so the last possible way (INIT-SIPI) is limited upto max. 256 CPUs. Using x2APIC it is possible to handle much more CPUs than 256 (if anyone needs that I may add it).
|
|||||||||||
10 Jan 2014, 13:10 |
|
sid123 11 Jan 2014, 16:01
If I understand correctly this example turns on all the possible CPU Processors?
It's interesting to see that UEFI can change the BSP if it's damaged. Nice examples, would use them when EFI/UEFI will finally take over. _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
11 Jan 2014, 16:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.