OvmfPkg/CpuHotplugSmm: introduce Post-SMM Pen for hot-added CPUs

Once a hot-added CPU finishes the SMBASE relocation, we need to pen it in
a HLT loop. Add the NASM implementation (with just a handful of
instructions, but much documentation), and some C language helper
functions.

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-12-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
This commit is contained in:
Laszlo Ersek
2020-02-26 23:11:51 +01:00
committed by mergify[bot]
parent 17cb8ddba3
commit 63c89da242
4 changed files with 297 additions and 0 deletions

View File

@@ -24,8 +24,11 @@
[Sources]
ApicId.h
CpuHotplug.c
PostSmmPen.nasm
QemuCpuhp.c
QemuCpuhp.h
Smbase.c
Smbase.h
[Packages]
MdePkg/MdePkg.dec
@@ -34,6 +37,7 @@
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MmServicesTableLib
PcdLib