]>
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>
12 #include "CpuFeaturesLib.h"
15 Internal worker function that is called to complete CPU initialization at the
16 end of SmmCpuFeaturesInitializeProcessor().
20 FinishSmmCpuFeaturesInitializeProcessor (
27 Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is
28 returned, then a custom SMI handler is not provided by this library,
29 and the default SMI handler must be used.
31 @retval 0 Use the default SMI handler.
32 @retval > 0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler()
33 The caller is required to allocate enough SMRAM for each CPU to
34 support the size of the custom SMI handler.
38 SmmCpuFeaturesGetSmiHandlerSize (
46 Install a custom SMI handler for the CPU specified by CpuIndex. This function
47 is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater
48 than zero and is called by the CPU that was elected as monarch during System
49 Management Mode initialization.
51 @param[in] CpuIndex The index of the CPU to install the custom SMI handler.
52 The value must be between 0 and the NumberOfCpus field
53 in the System Management System Table (SMST).
54 @param[in] SmBase The SMBASE address for the CPU specified by CpuIndex.
55 @param[in] SmiStack The stack to use when an SMI is processed by the
56 the CPU specified by CpuIndex.
57 @param[in] StackSize The size, in bytes, if the stack used when an SMI is
58 processed by the CPU specified by CpuIndex.
59 @param[in] GdtBase The base address of the GDT to use when an SMI is
60 processed by the CPU specified by CpuIndex.
61 @param[in] GdtSize The size, in bytes, of the GDT used when an SMI is
62 processed by the CPU specified by CpuIndex.
63 @param[in] IdtBase The base address of the IDT to use when an SMI is
64 processed by the CPU specified by CpuIndex.
65 @param[in] IdtSize The size, in bytes, of the IDT used when an SMI is
66 processed by the CPU specified by CpuIndex.
67 @param[in] Cr3 The base address of the page tables to use when an SMI
68 is processed by the CPU specified by CpuIndex.
72 SmmCpuFeaturesInstallSmiHandler (