File: gmm_callbacks_base.inl

package info (click to toggle)
intel-compute-runtime 25.35.35096.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 79,324 kB
  • sloc: cpp: 926,243; lisp: 3,433; sh: 715; makefile: 162; python: 21
file content (33 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (C) 2025 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/gmm_helper/gmm_callbacks.h"
#include "shared/source/helpers/gfx_core_helper.h"

namespace NEO {

template <typename GfxFamily>
int __stdcall GmmCallbacks<GfxFamily>::writeL3Address(void *queueHandle, uint64_t l3GfxAddress, uint64_t regOffset) {
    auto csr = reinterpret_cast<CommandStreamReceiver *>(queueHandle);

    LriHelper<GfxFamily>::program(&csr->getCS(0),
                                  static_cast<uint32_t>(regOffset & 0xFFFFFFFF),
                                  static_cast<uint32_t>(l3GfxAddress & 0xFFFFFFFF),
                                  true,
                                  false);

    LriHelper<GfxFamily>::program(&csr->getCS(0),
                                  static_cast<uint32_t>(regOffset >> 32),
                                  static_cast<uint32_t>(l3GfxAddress >> 32),
                                  true,
                                  false);

    return 1;
}

} // namespace NEO