]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c
UefiCpuPkg/SmmCpuFeaturesLib: Fix coding style issues
[mirror_edk2.git] / UefiCpuPkg / Library / SmmCpuFeaturesLib / SmmCpuFeaturesLibNoStm.c
1 /** @file
2 The CPU specific programming for PiSmmCpuDxeSmm module when STM support
3 is not included.
4
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
10
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.
13
14 **/
15
16 #include <PiSmm.h>
17 #include <Library/SmmCpuFeaturesLib.h>
18
19 /**
20 Internal worker function that is called to complete CPU initialization at the
21 end of SmmCpuFeaturesInitializeProcessor().
22
23 **/
24 VOID
25 FinishSmmCpuFeaturesInitializeProcessor (
26 VOID
27 )
28 {
29 }
30
31 /**
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.
35
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.
40 **/
41 UINTN
42 EFIAPI
43 SmmCpuFeaturesGetSmiHandlerSize (
44 VOID
45 )
46 {
47 return 0;
48 }
49
50 /**
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.
55
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.
74 **/
75 VOID
76 EFIAPI
77 SmmCpuFeaturesInstallSmiHandler (
78 IN UINTN CpuIndex,
79 IN UINT32 SmBase,
80 IN VOID *SmiStack,
81 IN UINTN StackSize,
82 IN UINTN GdtBase,
83 IN UINTN GdtSize,
84 IN UINTN IdtBase,
85 IN UINTN IdtSize,
86 IN UINT32 Cr3
87 )
88 {
89 }