2 The definition for DMA access Library.
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.
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 __DMA_ACCESS_LIB_H__
16 #define __DMA_ACCESS_LIB_H__
19 UINT8 HostAddressWidth
;
21 UINT64 VTdEngineAddress
[1];
25 Set DMA protected region.
27 @param EngineMask The mask of the VTd engine to be accessed.
28 @param LowMemoryBase The protected low memory region base.
29 @param LowMemoryLength The protected low memory region length.
30 @param HighMemoryBase The protected high memory region base.
31 @param HighMemoryLength The protected high memory region length.
33 @retval EFI_SUCCESS The DMA protection is set.
34 @retval EFI_UNSUPPORTED The DMA protection is not set.
37 SetDmaProtectedRange (
39 IN UINT32 LowMemoryBase
,
40 IN UINT32 LowMemoryLength
,
41 IN UINT64 HighMemoryBase
,
42 IN UINT64 HighMemoryLength
46 Diable DMA protection.
48 @param EngineMask The mask of the VTd engine to be accessed.
50 @retval DMA protection is disabled.
53 DisableDmaProtection (
58 Get protected low memory alignment.
60 @param EngineMask The mask of the VTd engine to be accessed.
62 @return protected low memory alignment.
65 GetLowMemoryAlignment (
70 Get protected high memory alignment.
72 @param EngineMask The mask of the VTd engine to be accessed.
74 @return protected high memory alignment.
77 GetHighMemoryAlignment (