UINTN NumberOfBytes;\r
UINTN NumberOfPages;\r
EFI_PHYSICAL_ADDRESS HostAddress;\r
- EFI_PHYSICAL_ADDRESS DeviceAddress;\r
+ EFI_PHYSICAL_ADDRESS PlainTextAddress;\r
} MAP_INFO;\r
\r
#define NO_MAPPING (VOID *) (UINTN) -1\r
MapInfo->NumberOfBytes = *NumberOfBytes;\r
MapInfo->NumberOfPages = EFI_SIZE_TO_PAGES (MapInfo->NumberOfBytes);\r
MapInfo->HostAddress = PhysicalAddress;\r
- MapInfo->DeviceAddress = DmaMemoryTop;\r
+ MapInfo->PlainTextAddress = DmaMemoryTop;\r
\r
//\r
// Allocate a buffer to map the transfer to.\r
AllocateType,\r
EfiBootServicesData,\r
MapInfo->NumberOfPages,\r
- &MapInfo->DeviceAddress\r
+ &MapInfo->PlainTextAddress\r
);\r
if (EFI_ERROR (Status)) {\r
FreePool (MapInfo);\r
//\r
Status = MemEncryptSevClearPageEncMask (\r
0,\r
- MapInfo->DeviceAddress,\r
+ MapInfo->PlainTextAddress,\r
MapInfo->NumberOfPages,\r
TRUE\r
);\r
if (Operation == EdkiiIoMmuOperationBusMasterRead ||\r
Operation == EdkiiIoMmuOperationBusMasterRead64) {\r
CopyMem (\r
- (VOID *) (UINTN) MapInfo->DeviceAddress,\r
+ (VOID *) (UINTN) MapInfo->PlainTextAddress,\r
(VOID *) (UINTN) MapInfo->HostAddress,\r
MapInfo->NumberOfBytes\r
);\r
//\r
// The DeviceAddress is the address of the maped buffer below 4GB\r
//\r
- *DeviceAddress = MapInfo->DeviceAddress;\r
+ *DeviceAddress = MapInfo->PlainTextAddress;\r
\r
//\r
// Return a pointer to the MAP_INFO structure in Mapping\r
\r
DEBUG ((\r
DEBUG_VERBOSE,\r
- "%a Device 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%Lx\n",\r
+ "%a PlainText 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%Lx\n",\r
__FUNCTION__,\r
- MapInfo->DeviceAddress,\r
+ MapInfo->PlainTextAddress,\r
MapInfo->HostAddress,\r
MapInfo->NumberOfPages,\r
MapInfo->NumberOfBytes\r
MapInfo->Operation == EdkiiIoMmuOperationBusMasterWrite64) {\r
CopyMem (\r
(VOID *) (UINTN) MapInfo->HostAddress,\r
- (VOID *) (UINTN) MapInfo->DeviceAddress,\r
+ (VOID *) (UINTN) MapInfo->PlainTextAddress,\r
MapInfo->NumberOfBytes\r
);\r
}\r
\r
DEBUG ((\r
DEBUG_VERBOSE,\r
- "%a Device 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%Lx\n",\r
+ "%a PlainText 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%Lx\n",\r
__FUNCTION__,\r
- MapInfo->DeviceAddress,\r
+ MapInfo->PlainTextAddress,\r
MapInfo->HostAddress,\r
MapInfo->NumberOfPages,\r
MapInfo->NumberOfBytes\r
//\r
Status = MemEncryptSevSetPageEncMask (\r
0,\r
- MapInfo->DeviceAddress,\r
+ MapInfo->PlainTextAddress,\r
MapInfo->NumberOfPages,\r
TRUE\r
);\r
//\r
// Free the mapped buffer and the MAP_INFO structure.\r
//\r
- gBS->FreePages (MapInfo->DeviceAddress, MapInfo->NumberOfPages);\r
+ gBS->FreePages (MapInfo->PlainTextAddress, MapInfo->NumberOfPages);\r
FreePool (Mapping);\r
return EFI_SUCCESS;\r
}\r