]>
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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/SmmCpuFeaturesLib.h>
20 Internal worker function that is called to complete CPU initialization at the
21 end of SmmCpuFeaturesInitializeProcessor().
25 FinishSmmCpuFeaturesInitializeProcessor (
32 Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is
33 returned, then a custom SMI handler is not provided by this library,
34 and the default SMI handler must be used.
36 @retval 0 Use the default SMI handler.
37 @retval > 0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler()
38 The caller is required to allocate enough SMRAM for each CPU to
39 support the size of the custom SMI handler.
43 SmmCpuFeaturesGetSmiHandlerSize (
51 Install a custom SMI handler for the CPU specified by CpuIndex. This function
52 is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater
53 than zero and is called by the CPU that was elected as monarch during System
54 Management Mode initialization.
56 @param[in] CpuIndex The index of the CPU to install the custom SMI handler.
57 The value must be between 0 and the NumberOfCpus field
58 in the System Management System Table (SMST).
59 @param[in] SmBase The SMBASE address for the CPU specified by CpuIndex.
60 @param[in] SmiStack The stack to use when an SMI is processed by the
61 the CPU specified by CpuIndex.
62 @param[in] StackSize The size, in bytes, if the stack used when an SMI is
63 processed by the CPU specified by CpuIndex.
64 @param[in] GdtBase The base address of the GDT to use when an SMI is
65 processed by the CPU specified by CpuIndex.
66 @param[in] GdtSize The size, in bytes, of the GDT used when an SMI is
67 processed by the CPU specified by CpuIndex.
68 @param[in] IdtBase The base address of the IDT to use when an SMI is
69 processed by the CPU specified by CpuIndex.
70 @param[in] IdtSize The size, in bytes, of the IDT used when an SMI is
71 processed by the CPU specified by CpuIndex.
72 @param[in] Cr3 The base address of the page tables to use when an SMI
73 is processed by the CPU specified by CpuIndex.
77 SmmCpuFeaturesInstallSmiHandler (