]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/SmmAccess2OnSmmAccessThunk/SmmAccess2OnSmmAccessThunk.h
Program SD Cards into 4-bit mode (support for this is required in the spec). This...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / SmmAccess2OnSmmAccessThunk / SmmAccess2OnSmmAccessThunk.h
CommitLineData
9e620719 1/** @file\r
2 Include file for SMM Access2 Protocol on SMM Access Protocol Thunk driver.\r
3 \r
584d5652
HT
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
9e620719 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _SMM_ACCESS2_ON_SMM_ACCESS_THUNK_H_\r
16#define _SMM_ACCESS2_ON_SMM_ACCESS_THUNK_H_\r
17\r
18#include <PiDxe.h>\r
19#include <FrameworkSmm.h>\r
20#include <Library/DebugLib.h>\r
21#include <Library/UefiBootServicesTableLib.h>\r
22#include <Library/UefiDriverEntryPoint.h>\r
23#include <Protocol/SmmAccess2.h>\r
24#include <Protocol/SmmAccess.h>\r
25\r
26/**\r
27 Opens the SMRAM area to be accessible by a boot-service driver.\r
28\r
29 This function "opens" SMRAM so that it is visible while not inside of SMM. The function should \r
30 return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function \r
31 should return EFI_DEVICE_ERROR if the SMRAM configuration is locked.\r
32\r
33 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.\r
34\r
35 @retval EFI_SUCCESS The operation was successful.\r
36 @retval EFI_UNSUPPORTED The system does not support opening and closing of SMRAM.\r
37 @retval EFI_DEVICE_ERROR SMRAM cannot be opened, perhaps because it is locked.\r
38**/\r
39EFI_STATUS\r
40EFIAPI\r
41SmmAccess2Open (\r
42 IN EFI_SMM_ACCESS2_PROTOCOL *This\r
43 );\r
44\r
45/**\r
46 Inhibits access to the SMRAM.\r
47\r
48 This function "closes" SMRAM so that it is not visible while outside of SMM. The function should \r
49 return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM.\r
50\r
51 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.\r
52\r
53 @retval EFI_SUCCESS The operation was successful.\r
54 @retval EFI_UNSUPPORTED The system does not support opening and closing of SMRAM.\r
55 @retval EFI_DEVICE_ERROR SMRAM cannot be closed.\r
56**/\r
57EFI_STATUS\r
58EFIAPI\r
59SmmAccess2Close (\r
60 IN EFI_SMM_ACCESS2_PROTOCOL *This\r
61 );\r
62\r
63/**\r
64 Inhibits access to the SMRAM.\r
65\r
66 This function prohibits access to the SMRAM region. This function is usually implemented such \r
67 that it is a write-once operation. \r
68\r
69 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.\r
70\r
71 @retval EFI_SUCCESS The device was successfully locked.\r
72 @retval EFI_UNSUPPORTED The system does not support locking of SMRAM.\r
73**/\r
74EFI_STATUS\r
75EFIAPI\r
76SmmAccess2Lock (\r
77 IN EFI_SMM_ACCESS2_PROTOCOL *This\r
78 );\r
79\r
80/**\r
81 Queries the memory controller for the possible regions that will support SMRAM.\r
82\r
83 @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance.\r
26a76fbc
LG
84 @param[in, out] SmramMapSize A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
85 @param[in, out] SmramMap A pointer to the buffer in which firmware places the current memory map.\r
9e620719 86\r
87 @retval EFI_SUCCESS The chipset supported the given resource.\r
88 @retval EFI_BUFFER_TOO_SMALL The SmramMap parameter was too small. The current buffer size \r
89 needed to hold the memory map is returned in SmramMapSize.\r
90**/\r
91EFI_STATUS\r
92EFIAPI\r
93SmmAccess2GetCapabilities (\r
94 IN CONST EFI_SMM_ACCESS2_PROTOCOL *This,\r
95 IN OUT UINTN *SmramMapSize,\r
96 IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap\r
97 );\r
98\r
99#endif \r