2 Include file for SMM Access2 Protocol on SMM Access Protocol Thunk driver.
4 Copyright (c) 2009 - 2010, 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.
15 #ifndef _SMM_ACCESS2_ON_SMM_ACCESS_THUNK_H_
16 #define _SMM_ACCESS2_ON_SMM_ACCESS_THUNK_H_
19 #include <FrameworkSmm.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiBootServicesTableLib.h>
22 #include <Library/UefiDriverEntryPoint.h>
23 #include <Protocol/SmmAccess2.h>
24 #include <Protocol/SmmAccess.h>
27 Opens the SMRAM area to be accessible by a boot-service driver.
29 This function "opens" SMRAM so that it is visible while not inside of SMM. The function should
30 return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function
31 should return EFI_DEVICE_ERROR if the SMRAM configuration is locked.
33 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.
35 @retval EFI_SUCCESS The operation was successful.
36 @retval EFI_UNSUPPORTED The system does not support opening and closing of SMRAM.
37 @retval EFI_DEVICE_ERROR SMRAM cannot be opened, perhaps because it is locked.
42 IN EFI_SMM_ACCESS2_PROTOCOL
*This
46 Inhibits access to the SMRAM.
48 This function "closes" SMRAM so that it is not visible while outside of SMM. The function should
49 return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM.
51 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.
53 @retval EFI_SUCCESS The operation was successful.
54 @retval EFI_UNSUPPORTED The system does not support opening and closing of SMRAM.
55 @retval EFI_DEVICE_ERROR SMRAM cannot be closed.
60 IN EFI_SMM_ACCESS2_PROTOCOL
*This
64 Inhibits access to the SMRAM.
66 This function prohibits access to the SMRAM region. This function is usually implemented such
67 that it is a write-once operation.
69 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.
71 @retval EFI_SUCCESS The device was successfully locked.
72 @retval EFI_UNSUPPORTED The system does not support locking of SMRAM.
77 IN EFI_SMM_ACCESS2_PROTOCOL
*This
81 Queries the memory controller for the possible regions that will support SMRAM.
83 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.
84 @param[in, out] SmramMapSize A pointer to the size, in bytes, of the SmramMemoryMap buffer.
85 @param[in, out] SmramMap A pointer to the buffer in which firmware places the current memory map.
87 @retval EFI_SUCCESS The chipset supported the given resource.
88 @retval EFI_BUFFER_TOO_SMALL The SmramMap parameter was too small. The current buffer size
89 needed to hold the memory map is returned in SmramMapSize.
93 SmmAccess2GetCapabilities (
94 IN CONST EFI_SMM_ACCESS2_PROTOCOL
*This
,
95 IN OUT UINTN
*SmramMapSize
,
96 IN OUT EFI_SMRAM_DESCRIPTOR
*SmramMap