Add a new SMM driver skeleton that registers a root SMI handler, and checks if the SMI control value (written to 0xB2) indicates a CPU hotplug SMI. QEMU's ACPI payload will cause the OS to raise a broadcast SMI when a CPU hotplug event occurs, namely by writing value 4 to IO Port 0xB2. In other words, control value 4 is now allocated for this purpose; introduce the ICH9_APM_CNT_CPU_HOTPLUG macro for it. The standard identifiers in this driver use the new MM (Management Mode) terminology from the PI spec, not the earlier SMM (System Management Mode) terms. 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-7-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
49 lines
1.1 KiB
INI
49 lines
1.1 KiB
INI
## @file
|
|
# Root SMI handler for VCPU hotplug SMIs.
|
|
#
|
|
# Copyright (c) 2020, Red Hat, Inc.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 1.29
|
|
PI_SPECIFICATION_VERSION = 0x00010046 # PI-1.7.0
|
|
BASE_NAME = CpuHotplugSmm
|
|
FILE_GUID = 84EEA114-C6BE-4445-8F90-51D97863E363
|
|
MODULE_TYPE = DXE_SMM_DRIVER
|
|
ENTRY_POINT = CpuHotplugEntry
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build
|
|
# tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
CpuHotplug.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
DebugLib
|
|
MmServicesTableLib
|
|
PcdLib
|
|
UefiDriverEntryPoint
|
|
|
|
[Protocols]
|
|
gEfiMmCpuIoProtocolGuid ## CONSUMES
|
|
|
|
[Pcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase ## CONSUMES
|
|
|
|
[FeaturePcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire ## CONSUMES
|
|
|
|
[Depex]
|
|
gEfiMmCpuIoProtocolGuid
|