]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | The CPU specific programming for PiSmmCpuDxeSmm module when STM support\r | |
3 | is not included.\r | |
4 | \r | |
5 | Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include <PiSmm.h>\r | |
17 | #include <Library/SmmCpuFeaturesLib.h>\r | |
18 | \r | |
19 | /**\r | |
20 | Internal worker function that is called to complete CPU initialization at the\r | |
21 | end of SmmCpuFeaturesInitializeProcessor().\r | |
22 | \r | |
23 | **/\r | |
24 | VOID\r | |
25 | FinishSmmCpuFeaturesInitializeProcessor (\r | |
26 | VOID\r | |
27 | )\r | |
28 | {\r | |
29 | }\r | |
30 | \r | |
31 | /**\r | |
32 | Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is\r | |
33 | returned, then a custom SMI handler is not provided by this library,\r | |
34 | and the default SMI handler must be used.\r | |
35 | \r | |
36 | @retval 0 Use the default SMI handler.\r | |
37 | @retval > 0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler()\r | |
38 | The caller is required to allocate enough SMRAM for each CPU to\r | |
39 | support the size of the custom SMI handler.\r | |
40 | **/\r | |
41 | UINTN\r | |
42 | EFIAPI\r | |
43 | SmmCpuFeaturesGetSmiHandlerSize (\r | |
44 | VOID\r | |
45 | )\r | |
46 | {\r | |
47 | return 0;\r | |
48 | }\r | |
49 | \r | |
50 | /**\r | |
51 | Install a custom SMI handler for the CPU specified by CpuIndex. This function\r | |
52 | is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater\r | |
53 | than zero and is called by the CPU that was elected as monarch during System\r | |
54 | Management Mode initialization.\r | |
55 | \r | |
56 | @param[in] CpuIndex The index of the CPU to install the custom SMI handler.\r | |
57 | The value must be between 0 and the NumberOfCpus field\r | |
58 | in the System Management System Table (SMST).\r | |
59 | @param[in] SmBase The SMBASE address for the CPU specified by CpuIndex.\r | |
60 | @param[in] SmiStack The stack to use when an SMI is processed by the\r | |
61 | the CPU specified by CpuIndex.\r | |
62 | @param[in] StackSize The size, in bytes, if the stack used when an SMI is\r | |
63 | processed by the CPU specified by CpuIndex.\r | |
64 | @param[in] GdtBase The base address of the GDT to use when an SMI is\r | |
65 | processed by the CPU specified by CpuIndex.\r | |
66 | @param[in] GdtSize The size, in bytes, of the GDT used when an SMI is\r | |
67 | processed by the CPU specified by CpuIndex.\r | |
68 | @param[in] IdtBase The base address of the IDT to use when an SMI is\r | |
69 | processed by the CPU specified by CpuIndex.\r | |
70 | @param[in] IdtSize The size, in bytes, of the IDT used when an SMI is\r | |
71 | processed by the CPU specified by CpuIndex.\r | |
72 | @param[in] Cr3 The base address of the page tables to use when an SMI\r | |
73 | is processed by the CPU specified by CpuIndex.\r | |
74 | **/\r | |
75 | VOID\r | |
76 | EFIAPI\r | |
77 | SmmCpuFeaturesInstallSmiHandler (\r | |
78 | IN UINTN CpuIndex,\r | |
79 | IN UINT32 SmBase,\r | |
80 | IN VOID *SmiStack,\r | |
81 | IN UINTN StackSize,\r | |
82 | IN UINTN GdtBase,\r | |
83 | IN UINTN GdtSize,\r | |
84 | IN UINTN IdtBase,\r | |
85 | IN UINTN IdtSize,\r | |
86 | IN UINT32 Cr3\r | |
87 | )\r | |
88 | {\r | |
89 | }\r |