UefiCpuPkg/CpuDxe: Introduce AsmApDoneWithCommonStack

when Ap graps a lock and call CpuMp.c:ApEntryPointInC,
it should switch to stack of its' own and release the
lock to let others Ap call CpuMp.c:ApEntryPointInC
sequential. and StartCode should be not freed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: Waiting for Aps initialization done

BSP should detect the AP COUNT to know the AP presence.
So in AP initialization code, AP increased the COUNT,
and BSP waited 100ms to get the COUNT. then BSP could
allocate stack spaces for the APs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: Switch Ap CommonStack with NewStack

All APs use the same common stack to initialization. after
initialization, APs should switch to the stack of its own.
the sequences are:
  1. BSP detects AP count
  2. BSP allocates AP stack spaces
  3. AP grabs a lock
  4. AP SwitchStack
  5. AP releases lock

  Contributed-under: TianoCore Contribution Agreement 1.0
  Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: install Mp Service protocol

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: implement Mp Protocol: GetNumberOfProcessors()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: implement Mp Protocol: WhoAmI()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: implement Mp Services: GetProcessorInfo()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: implement Mp Protocol: EnableDisableAP()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
UefiCpuPkg/CpuDxe: implement Mp Protocol: StartupThisAP()

Note:
  the Ap run loop will cause IoRead32() assert in
  MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c: (163)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>