added support for 2 stages write memory of aub_manager

1. write ppgtt pages only by calling write memory with pagesOnly set to true
2. write the actual memory pages by calling writePhysicalMemoryPages

Change-Id: Id3766704e4b8f84f77336f78da6b9270bfd44b70
This commit is contained in:
Klein, Yaniv
2019-11-01 11:00:26 -07:00
committed by sys_ocldev
parent 5a8f455a84
commit 340e80bb1a
3 changed files with 35 additions and 1 deletions

View File

@ -8,6 +8,8 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
#include "page_info.h"
namespace aub_stream {
@ -26,7 +28,11 @@ class AubManager {
virtual void pause(bool onoff) = 0;
virtual void addComment(const char *message) = 0;
virtual void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint, size_t pageSize) = 0;
virtual void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks,int hint, size_t pageSize) = 0;
virtual void writePageTableEntries(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint,
std::vector<PageInfo> &lastLevelPages, size_t pageSize) = 0;
virtual void writePhysicalMemoryPages(const void *memory, std::vector<PageInfo> &pages, size_t size, int hint) = 0;
virtual void freeMemory(uint64_t gfxAddress, size_t size) = 0;
static AubManager *create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode);

View File

@ -0,0 +1,16 @@
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
namespace aub_stream {
struct PageInfo {
uint64_t physicalAddress;
size_t size;
bool isLocalMemory;
uint32_t memoryBank;
};
} // namespace aub_stream