2019-11-06 18:14:30 +01:00
|
|
|
/*
|
2025-10-24 09:53:03 +00:00
|
|
|
* Copyright (C) 2019-2025 Intel Corporation
|
2019-11-06 18:14:30 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2021-06-28 17:36:16 +00:00
|
|
|
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/gmm_helper/page_table_mngr.h"
|
2022-07-26 04:58:51 +00:00
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
2020-02-24 10:22:30 +01:00
|
|
|
|
2019-11-06 18:14:30 +01:00
|
|
|
namespace NEO {
|
2025-10-24 09:53:03 +00:00
|
|
|
GmmPageTableMngr::GmmPageTableMngr(GmmClientContext *gmmClientContext, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb, void *aubCsrHandle) {
|
|
|
|
|
auto clientContext = gmmClientContext->getHandle();
|
|
|
|
|
auto deleter = [=](GMM_PAGETABLE_MGR *pageTableManager) {
|
|
|
|
|
clientContext->DestroyPageTblMgrObject(pageTableManager);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
pageTableManager = {clientContext->CreatePageTblMgrObject(translationTableFlags), deleter};
|
2021-09-07 23:30:06 +00:00
|
|
|
DEBUG_BREAK_IF(pageTableManager == nullptr);
|
2019-11-06 18:14:30 +01:00
|
|
|
}
|
|
|
|
|
} // namespace NEO
|