]> git.proxmox.com Git - mirror_edk2.git/blob - IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.h
IntelSiliconPkg: Add IntelVTdPmrPei.
[mirror_edk2.git] / IntelSiliconPkg / IntelVTdPmrPei / IntelVTdPmrPei.h
1 /** @file
2 The definition for DMA access Library.
3
4 Copyright (c) 2017, 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.
9
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.
12
13 **/
14
15 #ifndef __DMA_ACCESS_LIB_H__
16 #define __DMA_ACCESS_LIB_H__
17
18 /**
19 Set DMA protected region.
20
21 @param LowMemoryBase The protected low memory region base.
22 @param LowMemoryLength The protected low memory region length.
23 @param HighMemoryBase The protected high memory region base.
24 @param HighMemoryLength The protected high memory region length.
25
26 @retval EFI_SUCCESS The DMA protection is set.
27 @retval EFI_UNSUPPORTED The DMA protection is not set.
28 **/
29 EFI_STATUS
30 SetDmaProtectedRange (
31 IN UINT32 LowMemoryBase,
32 IN UINT32 LowMemoryLength,
33 IN UINT64 HighMemoryBase,
34 IN UINT64 HighMemoryLength
35 );
36
37 /**
38 Diable DMA protection.
39
40 @retval DMA protection is disabled.
41 **/
42 EFI_STATUS
43 DisableDmaProtection (
44 VOID
45 );
46
47 /**
48 Get protected low memory alignment.
49
50 @return protected low memory alignment.
51 **/
52 UINT32
53 GetLowMemoryAlignment (
54 VOID
55 );
56
57 /**
58 Get protected high memory alignment.
59
60 @return protected high memory alignment.
61 **/
62 UINT64
63 GetHighMemoryAlignment (
64 VOID
65 );
66
67 #endif
68