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
63 Load STM image to MSEG.
65 @param StmImage STM image
66 @param StmImageSize STM image size
68 @retval EFI_SUCCESS Load STM to MSEG successfully
69 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
75 IN EFI_PHYSICAL_ADDRESS StmImage
,
81 Add resources in list to database. Allocate new memory areas as needed.
83 @param ResourceList A pointer to resource list to be added
84 @param NumEntries Optional number of entries.
85 If 0, list must be terminated by END_OF_RESOURCES.
87 @retval EFI_SUCCESS If resources are added
88 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
89 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
95 IN STM_RSC
*ResourceList
,
96 IN UINT32 NumEntries OPTIONAL
101 Delete resources in list to database.
103 @param ResourceList A pointer to resource list to be deleted
104 NULL means delete all resources.
105 @param NumEntries Optional number of entries.
106 If 0, list must be terminated by END_OF_RESOURCES.
108 @retval EFI_SUCCESS If resources are deleted
109 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
115 IN STM_RSC
*ResourceList
,
116 IN UINT32 NumEntries OPTIONAL
123 @param ResourceList A pointer to resource list to be filled
124 @param ResourceSize On input it means size of resource list input.
125 On output it means size of resource list filled,
126 or the size of resource list to be filled if size of too small.
128 @retval EFI_SUCCESS If resources are returned.
129 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
135 OUT STM_RSC
*ResourceList
,
136 IN OUT UINT32
*ResourceSize
140 This function initialize STM configuration table.
143 StmSmmConfigurationTableInit (
148 This function notify STM resource change.
150 @param StmResource BIOS STM resource
154 NotifyStmResourceChange (
159 This function return BIOS STM resource.
161 @return BIOS STM resource
170 This function fixes up the address of the global variable or function
171 referred in SmiEntry assembly files to be the absolute address.
175 SmmCpuFeaturesLibStmSmiEntryFixupAddress (