4 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <Protocol/SmMonitorInit.h>
22 Create 4G page table for STM.
23 2M PAE page table in X64 version.
25 @param PageTableBase The page table base in MSEG
30 IN UINTN PageTableBase
34 This is SMM exception handle.
35 Consumed by STM when exception happen.
37 @param Context STM protection exception stack frame
39 @return the EBX value for STM reference.
40 EBX = 0: resume SMM guest using register state found on exception stack.
41 EBX = 1 to 0x0F: EBX contains a BIOS error code which the STM must record in the
42 TXT.ERRORCODE register and subsequently reset the system via
43 TXT.CMD.SYS_RESET. The value of the TXT.ERRORCODE register is calculated as
44 follows: TXT.ERRORCODE = (EBX & 0x0F) | STM_CRASH_BIOS_PANIC
45 EBX = 0x10 to 0xFFFFFFFF - reserved, do not use.
50 SmmStmExceptionHandler (
51 IN OUT STM_PROTECTION_EXCEPTION_STACK_FRAME Context
70 Load STM image to MSEG.
72 @param StmImage STM image
73 @param StmImageSize STM image size
75 @retval EFI_SUCCESS Load STM to MSEG successfully
76 @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
82 IN EFI_PHYSICAL_ADDRESS StmImage
,
88 Add resources in list to database. Allocate new memory areas as needed.
90 @param ResourceList A pointer to resource list to be added
91 @param NumEntries Optional number of entries.
92 If 0, list must be terminated by END_OF_RESOURCES.
94 @retval EFI_SUCCESS If resources are added
95 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
96 @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
102 IN STM_RSC
*ResourceList
,
103 IN UINT32 NumEntries OPTIONAL
108 Delete resources in list to database.
110 @param ResourceList A pointer to resource list to be deleted
111 NULL means delete all resources.
112 @param NumEntries Optional number of entries.
113 If 0, list must be terminated by END_OF_RESOURCES.
115 @retval EFI_SUCCESS If resources are deleted
116 @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
122 IN STM_RSC
*ResourceList
,
123 IN UINT32 NumEntries OPTIONAL
130 @param ResourceList A pointer to resource list to be filled
131 @param ResourceSize On input it means size of resource list input.
132 On output it means size of resource list filled,
133 or the size of resource list to be filled if size of too small.
135 @retval EFI_SUCCESS If resources are returned.
136 @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
142 OUT STM_RSC
*ResourceList
,
143 IN OUT UINT32
*ResourceSize
147 This functin initialize STM configuration table.
150 StmSmmConfigurationTableInit (
155 This function notify STM resource change.
157 @param StmResource BIOS STM resource
161 NotifyStmResourceChange (
166 This function return BIOS STM resource.
168 @return BIOS STM resource