]>
git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c
2 The CPU specific programming for PiSmmCpuDxeSmm module when STM support
5 Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/SmmCpuFeaturesLib.h>
14 Internal worker function that is called to complete CPU initialization at the
15 end of SmmCpuFeaturesInitializeProcessor().
19 FinishSmmCpuFeaturesInitializeProcessor (
26 Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is
27 returned, then a custom SMI handler is not provided by this library,
28 and the default SMI handler must be used.
30 @retval 0 Use the default SMI handler.
31 @retval > 0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler()
32 The caller is required to allocate enough SMRAM for each CPU to
33 support the size of the custom SMI handler.
37 SmmCpuFeaturesGetSmiHandlerSize (
45 Install a custom SMI handler for the CPU specified by CpuIndex. This function
46 is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater
47 than zero and is called by the CPU that was elected as monarch during System
48 Management Mode initialization.
50 @param[in] CpuIndex The index of the CPU to install the custom SMI handler.
51 The value must be between 0 and the NumberOfCpus field
52 in the System Management System Table (SMST).
53 @param[in] SmBase The SMBASE address for the CPU specified by CpuIndex.
54 @param[in] SmiStack The stack to use when an SMI is processed by the
55 the CPU specified by CpuIndex.
56 @param[in] StackSize The size, in bytes, if the stack used when an SMI is
57 processed by the CPU specified by CpuIndex.
58 @param[in] GdtBase The base address of the GDT to use when an SMI is
59 processed by the CPU specified by CpuIndex.
60 @param[in] GdtSize The size, in bytes, of the GDT used when an SMI is
61 processed by the CPU specified by CpuIndex.
62 @param[in] IdtBase The base address of the IDT to use when an SMI is
63 processed by the CPU specified by CpuIndex.
64 @param[in] IdtSize The size, in bytes, of the IDT used when an SMI is
65 processed by the CPU specified by CpuIndex.
66 @param[in] Cr3 The base address of the page tables to use when an SMI
67 is processed by the CPU specified by CpuIndex.
71 SmmCpuFeaturesInstallSmiHandler (