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