2017-07-06 15:28:40 +02:00
|
|
|
/** @file
|
|
|
|
|
2017-08-02 11:20:03 +02:00
|
|
|
The protocol provides support to allocate, free, map and umap a DMA buffer
|
|
|
|
for bus master (e.g PciHostBridge). When SEV is enabled, the DMA operations
|
|
|
|
must be performed on unencrypted buffer hence protocol clear the encryption
|
|
|
|
bit from the DMA buffer.
|
2017-07-06 15:28:40 +02:00
|
|
|
|
|
|
|
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
|
|
|
|
Copyright (c) 2017, AMD Inc. All rights reserved.<BR>
|
2017-08-04 22:28:17 +02:00
|
|
|
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
2019-04-04 01:06:33 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2017-07-06 15:28:40 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
2017-08-04 22:28:17 +02:00
|
|
|
#ifndef _AMD_SEV_IOMMU_H_
|
|
|
|
#define _AMD_SEV_IOMMU_H_
|
2017-07-06 15:28:40 +02:00
|
|
|
|
|
|
|
#include <Protocol/IoMmu.h>
|
|
|
|
|
|
|
|
#include <Library/BaseLib.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
2017-08-02 12:11:50 +02:00
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/MemEncryptSevLib.h>
|
2017-07-06 15:28:40 +02:00
|
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
Install IOMMU protocol to provide the DMA support for PciHostBridge and
|
|
|
|
MemEncryptSevLib.
|
|
|
|
|
|
|
|
**/
|
2017-08-02 12:20:14 +02:00
|
|
|
EFI_STATUS
|
2017-07-06 15:28:40 +02:00
|
|
|
EFIAPI
|
|
|
|
AmdSevInstallIoMmuProtocol (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|