This series patchset try to implement Mp Service protocol in UefiCpuPkg,
Jordan had implemented the startup APs code, and I try to add more
initialization code to let all APs work up, this Mp Service protocol's
implementation used EmulatorPkg/MpService for reference.
this patches works on my github:
https://github.com/ChenFanFnst/edk2/tree/cpu-mp-service
v3-v4:
1. change the order of the patches.
2. update some minor format suggested by Jeff.
3. add a PCD value to configure StackSize.
4. the last patch add assembly code for MSFT, but didn't
test.
V3-V3.1:
1. use AcquireSpinLockOrFail() intead of AcquireSpinLock()
to avoid ASSERT sugguested by Jeff.
V2-V3:
1. rebase codes due to Jordan'tree updated:
https://github.com/jljusten/edk2/tree/ap-startup-example
2. add supported on Ia32 arch
3. add a new Lock to replace present SpinLock mechanisms in mutilple
processors, maybe the SpinLock mechanisms is not MP safe.
4. add function header
5. add StartupAllAPs() supported
6. add SwitchBSP() function, which is unsupported.
V1-V2:
1. do not call anything EFI API from APs.
2. add AP busy-wait for task assignment from BSP and get rid of
IPI sent mechanism.
TODO:
1) StartupThisAP/StartAllAps: when Timeout expires before AP returns
from Procedure, constrainedly terminate the executed Procedure.
Any Comment is welcome.
Chen Fan (17):
UefiCpuPkg/CpuDxe: gather the APs amount
UefiCpuPkg/CpuDxe: introduce PCD value PcdCpuApStackSize
UefiCpuPkg/CpuDxe: introduce EFI_MP_SERVICES_PROTOCOL
UefiCpuPkg/CpuDxe: introduce MP_SYSTEM_DATA for Mp Service Protocol
UefiCpuPkg/CpuDxe: implement Mp Protocol: WhoAmI()
UefiCpuPkg/CpuDxe: implement Mp Protocol:GetNumberOfProcessors()
UefiCpuPkg/CpuDxe: implement Mp Services:GetProcessorInfo()
UefiCpuPkg/CpuDxe: implement Mp Protocol:EnableDisableAP()
UefiCpuPkg/CpuDxe: implement Mp Protocol:StartupThisAP()
UefiCpuPkg/CpuDxe: implement Mp Services:StartupAllAPs()
UefiCpuPkg/CpuDxe: implement Mp Services:SwitchBSP()
UefiCpuPkg/CpuDxe: Switch Ap CommonStack with NewStack
UefiCpuPkg/CpuDxe: Ap do loop routine to execute procedure
UefiCpuPkg/CpuDxe: part of APs hung when AP amount > 4
UefiCpuPkg/CpuDxe: install Mp Service protocol
UefiCpuPkg/CpuDxe: add Mp Service TestCase (!upstream)
UefiCpuPkg/CpuDxe: assembly code for MSFT
Jordan Justen (6):
UefiCpuPkg/CpuDxe: Add no-op InitializeMpSupport
UefiCpuPkg/CpuDxe: Add ApEntryPointInC
UefiCpuPkg/CpuDxe: Add stackless assembly AP entry points
UefiCpuPkg/CpuDxe: Move GDT structures into CpuGdt.h
UefiCpuPkg/CpuDxe: Add StartApsStackless routine
UefiCpuPkg/CpuDxe: Startup APs
UefiCpuPkg/CpuDxe/ApStartup.asm | 111 +++
UefiCpuPkg/CpuDxe/ApStartup.c | 209 ++++++
UefiCpuPkg/CpuDxe/CpuDxe.c | 5 +
UefiCpuPkg/CpuDxe/CpuDxe.h | 1 +
UefiCpuPkg/CpuDxe/CpuDxe.inf | 17 +
UefiCpuPkg/CpuDxe/CpuGdt.c | 52 +-
UefiCpuPkg/CpuDxe/CpuGdt.h | 72 ++
UefiCpuPkg/CpuDxe/CpuMp.c | 1425 +++++++++++++++++++++++++++++++++++++
UefiCpuPkg/CpuDxe/CpuMp.h | 616 ++++++++++++++++
UefiCpuPkg/CpuDxe/CpuMpTest.c | 76 ++
UefiCpuPkg/CpuDxe/Ia32/MpAsm.asm | 124 ++++
UefiCpuPkg/CpuDxe/Ia32/MpAsm.nasm | 113 +++
UefiCpuPkg/CpuDxe/X64/MpAsm.asm | 121 ++++
UefiCpuPkg/CpuDxe/X64/MpAsm.nasm | 113 +++
UefiCpuPkg/UefiCpuPkg.dec | 4 +
UefiCpuPkg/UefiCpuPkg.dsc | 1 +
16 files changed, 3009 insertions(+), 51 deletions(-)
create mode 100644 UefiCpuPkg/CpuDxe/ApStartup.asm
create mode 100644 UefiCpuPkg/CpuDxe/ApStartup.c
create mode 100644 UefiCpuPkg/CpuDxe/CpuGdt.h
create mode 100644 UefiCpuPkg/CpuDxe/CpuMp.c
create mode 100644 UefiCpuPkg/CpuDxe/CpuMp.h
create mode 100644 UefiCpuPkg/CpuDxe/CpuMpTest.c
create mode 100644 UefiCpuPkg/CpuDxe/Ia32/MpAsm.asm
create mode 100644 UefiCpuPkg/CpuDxe/Ia32/MpAsm.nasm
create mode 100644 UefiCpuPkg/CpuDxe/X64/MpAsm.asm
create mode 100644 UefiCpuPkg/CpuDxe/X64/MpAsm.nasm
--
1.9.3
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel