audk/OvmfPkg/CpuHotplugSmm
Laszlo Ersek bc498ac4ca OvmfPkg/CpuHotplugSmm: complete root MMI handler for CPU hotplug
With the help of the Post-SMM Pen and the SMBASE relocation functions
added in the previous patches, we can now complete the root MMI handler
for CPU hotplug.

In the driver's entry point function:

- allocate the pen (in a reserved page in normal RAM),

- install the default ("first") SMI handler for hot-added CPUs (which
  includes priming the exchange area between the MM Monarch and the
  hot-added CPUs, i.e., shutting the APIC ID gate).

In the root MMI handler, for each hot-added CPU:

- record the APIC ID of the new CPU in CPU_HOT_PLUG_DATA,

- relocate the SMBASE of the new CPU,

- inform PiSmmCpuDxeSmm by calling
  EFI_SMM_CPU_SERVICE_PROTOCOL.AddProcessor().

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1512
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200226221156.29589-14-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2020-03-04 12:22:07 +00:00
..
ApicId.h OvmfPkg/CpuHotplugSmm: add function for collecting CPUs with events 2020-03-04 12:22:07 +00:00
CpuHotplug.c OvmfPkg/CpuHotplugSmm: complete root MMI handler for CPU hotplug 2020-03-04 12:22:07 +00:00
CpuHotplugSmm.inf OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs 2020-03-04 12:22:07 +00:00
FirstSmiHandler.nasm OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs 2020-03-04 12:22:07 +00:00
FirstSmiHandlerContext.h OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs 2020-03-04 12:22:07 +00:00
PostSmmPen.nasm OvmfPkg/CpuHotplugSmm: introduce Post-SMM Pen for hot-added CPUs 2020-03-04 12:22:07 +00:00
QemuCpuhp.c OvmfPkg/CpuHotplugSmm: add function for collecting CPUs with events 2020-03-04 12:22:07 +00:00
QemuCpuhp.h OvmfPkg/CpuHotplugSmm: add function for collecting CPUs with events 2020-03-04 12:22:07 +00:00
Smbase.c OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs 2020-03-04 12:22:07 +00:00
Smbase.h OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs 2020-03-04 12:22:07 +00:00