]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c
UefiCpuPkg/SmmCpuFeaturesLib: Move multi-instance function decl to header
[mirror_edk2.git] / UefiCpuPkg / Library / SmmCpuFeaturesLib / SmmCpuFeaturesLibNoStm.c
CommitLineData
4c6351db
MK
1/** @file\r
2The CPU specific programming for PiSmmCpuDxeSmm module when STM support\r
3is not included.\r
4\r
5Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
0acd8697 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
4c6351db
MK
7\r
8**/\r
9\r
10#include <PiSmm.h>\r
11#include <Library/SmmCpuFeaturesLib.h>\r
3e062ea4 12#include "CpuFeaturesLib.h"\r
4c6351db
MK
13\r
14/**\r
15 Internal worker function that is called to complete CPU initialization at the\r
d0c80b8a 16 end of SmmCpuFeaturesInitializeProcessor().\r
4c6351db
MK
17\r
18**/\r
19VOID\r
20FinishSmmCpuFeaturesInitializeProcessor (\r
21 VOID\r
22 )\r
23{\r
24}\r
25\r
26/**\r
27 Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is\r
28 returned, then a custom SMI handler is not provided by this library,\r
29 and the default SMI handler must be used.\r
30\r
31 @retval 0 Use the default SMI handler.\r
32 @retval > 0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler()\r
33 The caller is required to allocate enough SMRAM for each CPU to\r
34 support the size of the custom SMI handler.\r
35**/\r
36UINTN\r
37EFIAPI\r
38SmmCpuFeaturesGetSmiHandlerSize (\r
39 VOID\r
40 )\r
41{\r
42 return 0;\r
43}\r
44\r
45/**\r
46 Install a custom SMI handler for the CPU specified by CpuIndex. This function\r
47 is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater\r
48 than zero and is called by the CPU that was elected as monarch during System\r
49 Management Mode initialization.\r
50\r
51 @param[in] CpuIndex The index of the CPU to install the custom SMI handler.\r
52 The value must be between 0 and the NumberOfCpus field\r
53 in the System Management System Table (SMST).\r
54 @param[in] SmBase The SMBASE address for the CPU specified by CpuIndex.\r
55 @param[in] SmiStack The stack to use when an SMI is processed by the\r
56 the CPU specified by CpuIndex.\r
57 @param[in] StackSize The size, in bytes, if the stack used when an SMI is\r
58 processed by the CPU specified by CpuIndex.\r
59 @param[in] GdtBase The base address of the GDT to use when an SMI is\r
60 processed by the CPU specified by CpuIndex.\r
61 @param[in] GdtSize The size, in bytes, of the GDT used when an SMI is\r
62 processed by the CPU specified by CpuIndex.\r
63 @param[in] IdtBase The base address of the IDT to use when an SMI is\r
64 processed by the CPU specified by CpuIndex.\r
65 @param[in] IdtSize The size, in bytes, of the IDT used when an SMI is\r
66 processed by the CPU specified by CpuIndex.\r
67 @param[in] Cr3 The base address of the page tables to use when an SMI\r
68 is processed by the CPU specified by CpuIndex.\r
69**/\r
70VOID\r
71EFIAPI\r
72SmmCpuFeaturesInstallSmiHandler (\r
73 IN UINTN CpuIndex,\r
74 IN UINT32 SmBase,\r
75 IN VOID *SmiStack,\r
76 IN UINTN StackSize,\r
77 IN UINTN GdtBase,\r
78 IN UINTN GdtSize,\r
79 IN UINTN IdtBase,\r
80 IN UINTN IdtSize,\r
81 IN UINT32 Cr3\r
82 )\r
83{\r
84}\r