diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-02-26 23:11:51 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-04 12:22:07 +0000 |
commit | 63c89da242f3a49e0dbdfac0d2a29ae0daa73970 (patch) | |
tree | 24783319cf8c70a91bdece78dfb6b9df28363d2a /OvmfPkg/CpuHotplugSmm/Smbase.h | |
parent | 17cb8ddba39b58e008a58aa6d502856d61f82dc9 (diff) | |
download | edk2-63c89da242f3a49e0dbdfac0d2a29ae0daa73970.tar.gz edk2-63c89da242f3a49e0dbdfac0d2a29ae0daa73970.tar.bz2 edk2-63c89da242f3a49e0dbdfac0d2a29ae0daa73970.zip |
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>
Diffstat (limited to 'OvmfPkg/CpuHotplugSmm/Smbase.h')
-rw-r--r-- | OvmfPkg/CpuHotplugSmm/Smbase.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OvmfPkg/CpuHotplugSmm/Smbase.h b/OvmfPkg/CpuHotplugSmm/Smbase.h new file mode 100644 index 0000000000..cb5aed98cd --- /dev/null +++ b/OvmfPkg/CpuHotplugSmm/Smbase.h @@ -0,0 +1,32 @@ +/** @file
+ SMBASE relocation for hot-plugged CPUs.
+
+ Copyright (c) 2020, Red Hat, Inc.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef SMBASE_H_
+#define SMBASE_H_
+
+#include <Uefi/UefiBaseType.h> // EFI_STATUS
+#include <Uefi/UefiSpec.h> // EFI_BOOT_SERVICES
+
+EFI_STATUS
+SmbaseAllocatePostSmmPen (
+ OUT UINT32 *PenAddress,
+ IN CONST EFI_BOOT_SERVICES *BootServices
+ );
+
+VOID
+SmbaseReinstallPostSmmPen (
+ IN UINT32 PenAddress
+ );
+
+VOID
+SmbaseReleasePostSmmPen (
+ IN UINT32 PenAddress,
+ IN CONST EFI_BOOT_SERVICES *BootServices
+ );
+
+#endif // SMBASE_H_
|