4 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include <Protocol/SmMonitorInit.h>
16 Create 4G page table for STM.
17 2M PAE page table in X64 version.
19 @param PageTableBase The page table base in MSEG
24 IN UINTN PageTableBase
28 This is SMM exception handle.
29 Consumed by STM when exception happen.
31 @param Context STM protection exception stack frame
33 @return the EBX value for STM reference.
34 EBX = 0: resume SMM guest using register state found on exception stack.
35 EBX = 1 to 0x0F: EBX contains a BIOS error code which the STM must record in the
36 TXT.ERRORCODE register and subsequently reset the system via
37 TXT.CMD.SYS_RESET. The value of the TXT.ERRORCODE register is calculated as
38 follows: TXT.ERRORCODE = (EBX & 0x0F) | STM_CRASH_BIOS_PANIC
39 EBX = 0x10 to 0xFFFFFFFF - reserved, do not use.
44 SmmStmExceptionHandler (
45 IN OUT STM_PROTECTION_EXCEPTION_STACK_FRAME Context
64 Load STM image to MSEG.
66 @param StmImage STM image
67 @param StmImageSize STM image size
69 @retval EFI_SUCCESS Load STM to MSEG successfully
70 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
76 IN EFI_PHYSICAL_ADDRESS StmImage
,
82 Add resources in list to database. Allocate new memory areas as needed.
84 @param ResourceList A pointer to resource list to be added
85 @param NumEntries Optional number of entries.
86 If 0, list must be terminated by END_OF_RESOURCES.
88 @retval EFI_SUCCESS If resources are added
89 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
90 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
96 IN STM_RSC
*ResourceList
,
97 IN UINT32 NumEntries OPTIONAL
102 Delete resources in list to database.
104 @param ResourceList A pointer to resource list to be deleted
105 NULL means delete all resources.
106 @param NumEntries Optional number of entries.
107 If 0, list must be terminated by END_OF_RESOURCES.
109 @retval EFI_SUCCESS If resources are deleted
110 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
116 IN STM_RSC
*ResourceList
,
117 IN UINT32 NumEntries OPTIONAL
124 @param ResourceList A pointer to resource list to be filled
125 @param ResourceSize On input it means size of resource list input.
126 On output it means size of resource list filled,
127 or the size of resource list to be filled if size of too small.
129 @retval EFI_SUCCESS If resources are returned.
130 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
136 OUT STM_RSC
*ResourceList
,
137 IN OUT UINT32
*ResourceSize
141 This functin initialize STM configuration table.
144 StmSmmConfigurationTableInit (
149 This function notify STM resource change.
151 @param StmResource BIOS STM resource
155 NotifyStmResourceChange (
160 This function return BIOS STM resource.
162 @return BIOS STM resource
171 This function fixes up the address of the global variable or function
172 referred in SmiEntry assembly files to be the absoute address.
176 SmmCpuFeaturesLibStmSmiEntryFixupAddress (