Prepare cache setup and reservation logic to be extended w.r.t other
cache-levels.
Conceptually this change is like adding a switch-statement, in several
places, in which existing code makes a single (and only) case. This is
caused by splitting larger development to ease the review. Further cases
will be added in following steps. Such approach sometimes creates code
which may seem redundant but it is meant to simplify plugging following
extensions in an easy way.
Related-To: NEO-12837
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
on Windows setup ReadOnly flag, it makes there is no ProbeForWrite call within
CreateAllocation2 function call
it doesn't force read-only access from GPU perspective, that access it
defined in MapGpuVa function
Related-To: NEO-12986, HSD-15016952776
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
setting ReadOnly flag makes there is no ProbeForWrite call within
CreateAllocation2 function call
it doesn't make read-only access from GPU perspective, that access it
defined in MapGpuVa function
Related-To: NEO-12986, HSD-15016952776
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
getLoadedLibVersion is intended for reading version of a library that was
already loaded into the process prior to this call (i.e. new instance of
the library willnot be loaded).
Note: Currently, only windows version of this functionality is implemented.
Related-To: GSD-10248
Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
eudebug interface is now hidden under EuDebugInterface class
shared code uses generic object and param values
layout of structs is guarded by static asserts
eudebug support is guarded by cmake flags:
- NEO_ENABLE_XE_EU_DEBUG_SUPPORT - enables eudebug in general
- NEO_USE_XE_EU_DEBUG_EXP_UPSTREAM - registers exp upstream uAPI support
- NEO_ENABLE_XE_PRELIM_DETECTION - registers prelim uAPI support
This way we can support two different xe-eudebug interfaces within
single binary.
In unit tests there is mock eudebug interface enabled (even if no
eudebug support is enabled by cmake flag).
Related-To: NEO-13472
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Leverage features of the mechanism to simplify implementation:
- The maximum number of possible cache-region reservations is a small
value known at compile-time
- Each reservation is unique (described by `CacheRegion`) so can have
a dedicated entry with either zero (free) or non-zero (reserved) value
So, there is no need for a dynamic collection (unordered_map here) to
keep track of reservations. A simple array is enough for that purpose.
Also, add some helper-code to enable array-indexing with the values of
`CacheRegion` enum.
Related-To: NEO-12837
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Request higher resolution for windows periodic timers for ulls
controller sleep.
Allows for controller thread to sleep with granularity of 1ms.
Related-To: NEO-10800
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- don't load ze_loader.dll from file system
- to perform self-open on Windows use getModuleHandleA with proper module name
- don't free library loaded with getModuleHandleA
- as loader may be not available during runtime teardown:
- load translate handle function during global setup
- load setDriverTeardown function during global teardown
- when loader is not available during teardown, unset translate handle
function
Related-To: GSD-10147
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
on Windows use getModuleHandleA with proper module name
don't load ze_loader.dll from file system
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
rename i915 flag to uppercase, for consistency
disable i915 / xe prelim by default in package scripts
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Moved pathExists from SysCalls to path.h.
In ULTs, use unchanged pathExists and mock stat, getFileAttributesA instead.
Add Windows and Linux ULTs for pathExists.
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
Request higher resolution for windows periodic timers for ulls
controller sleep.
Allows for controller thread to sleep with granularity of 1ms.
Related-To: NEO-10800
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
The dependency towards `Drm` is unnecessary and only makes testing more
difficult. Instead, dependency towards `IoctlHelper` alone only is
sufficient.
Related-To: NEO-10158
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>