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:
committed by
mergify[bot]
parent
17cb8ddba3
commit
63c89da242
32
OvmfPkg/CpuHotplugSmm/Smbase.h
Normal file
32
OvmfPkg/CpuHotplugSmm/Smbase.h
Normal file
@@ -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_
|
Reference in New Issue
Block a user