Commit Graph

174 Commits

Author SHA1 Message Date
Vilvaraj, T J Vivek 4852bca7c3 sysman: fix issues in firmware utility code
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-07-08 12:58:57 +02:00
John Falkowski dc77174255 TimerResolution Device Properties 1.2
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2021-07-06 11:37:07 +02:00
Grzegorz Choinski 590b0c8ed1 include libigsc component
Related-To: NEO-5663
Signed-off-by: Grzegorz Choinski <grzegorz.choinski@intel.com>
2021-06-25 11:51:32 +02:00
lgotszal 5c43c6fd94 Update MIT copyright headers to always use SPDX
Related-to: IGC-4296

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-06-23 14:00:21 +02:00
Mayank Raghuwanshi 6436714987 Update sysfs path for sysman freq module
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-06-22 18:48:15 +02:00
Jitendra Sharma 18e95c51f5 Add support for Sysman Fabric port health event
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-06-16 11:47:54 +02:00
Jitendra Sharma 52f736c048 In PMT init, check for validity of every Telem node
In PMT init, check if telem sysfs directory entry belong to the
GPU device.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-06-09 09:21:33 +02:00
Vilvaraj, T J Vivek d1e8f859d4 sysman: add multi-Device Support for diagnostics
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-05-27 11:48:16 +02:00
Jaroslaw Chodor 0e9aa45e46 Improving OS abstraction
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-23 21:40:37 +02:00
Jitendra Sharma e1458fc95c To avoid seg fault, add null check before deleting PMT objects
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-05-18 12:37:15 +02:00
lgotszal 3bd4bca911 Copyright header update
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-05-17 20:38:19 +02:00
Jitendra Sharma 5f41e00909 In PMT telem directory ignore entry whose suffix is not "telem"
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-05-14 16:08:42 +02:00
Vilvaraj, T J Vivek 24a745f4bd sysman:add support for Diagnostis API.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-05-04 20:37:38 +02:00
T J Vivek Vilvaraj 8bdf9828b0 sysman fix cmakeList error
Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-04-28 07:44:17 +02:00
Mayank Raghuwanshi a92798ec4f Improve Pmu Ult's such that syscalls are not called directly
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-04-23 20:02:40 +02:00
Vilvaraj, T J Vivek 699b504378 sysman: add support to enable IFR status.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-04-20 15:27:09 +02:00
Jitendra Sharma 46c51cb8a9 Sysman device reset stability fix
Close PMT, and PMU fds created during Sysman's init before calling
device reset.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-04-15 11:53:10 +02:00
Mateusz Hoppe a24735b4fd Revert "sysman: add basic steps for IFR status"
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-04-08 20:35:15 +02:00
Vilvaraj, T J Vivek b56b204f3e sysman: add basic steps for IFR status.
In field repair status information is needed as part of Device
reset status

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-04-07 16:21:26 +02:00
Jitendra Sharma b0f2c76434 In Sysman PMT Fix telemetry node sort logic
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-04-02 07:21:07 +02:00
Jitendra Sharma 022f139bd5 Add ult for uncovered branches in Sysman memory API and PMT interface
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-03-30 20:29:32 +02:00
Mayank Raghuwanshi 027a916107 Improve code coverage for Pmu Interface
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-03-26 09:08:52 +01:00
Mayank Raghuwanshi faac0a82ef Update pmu interface
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-03-22 14:31:31 +01:00
Jitendra Sharma 249f7e45cc Adding more features to Sysman's memory and Temperature APIs
This change -
 - Add support for memoryGetBandwidth API
 - Update temperature offsets
 - Update ULTs accordingly

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-03-15 18:01:52 +01:00
Mayank Raghuwanshi 0f973f146e Implement zesRasGetConfig and zesRasSetConfig
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-03-02 16:07:01 +01:00
Mayank Raghuwanshi 0cc71827ee Update pmt telemetry node
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-02-19 07:14:13 +01:00
T J Vivek Vilvaraj 31a04b4708 sysman: add support to handle multiple firmwares
Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-02-08 20:32:47 +01:00
Jitendra Sharma 3597093758 Update Temperature APIs to get correct temperature
This change updates Temperature APIs to get correct current
temperature based on updated PMT interface.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-02-06 18:39:58 +01:00
Vilvaraj, T J Vivek b41a8d29dd
Sysman: add firmware flash API (#1368)
* Sysman: add firmware flash API

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>

* Sysman: fixed windows implementation of firmware flash API.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>

* add unit tests to test flashing.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>

* sysman: add firmware flashing support to zello sysman

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>

* sysman: added progress update function to firmware flash API

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-01-22 19:55:40 +01:00
Jitendra Sharma a2eeeff880 Update sysfs path for pmt telemetry
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-01-12 18:33:45 +01:00
Vilvaraj, T J Vivek bddc63e8bd add firmware flashing utility interface
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-12-22 09:10:11 +01:00
William Jordan b04cd08cc8 Add netlink and gen netlink library loader.
Netlink and generic netlink are standard linux
interfaces to allow management traffic between
user space and kernel subsystems over sockets.
This patch adds a loader for the generic netlink
library to allow Level 0 Sysman to manage
linux hardware that implements the generic
netlink interface. ULTs updated.

Signed-off-by: William Jordan <bill.jordan@intel.com>
2020-12-18 22:19:27 +01:00
wpjordan ab14df5aa6 Revert "Add netlink and gen netlink library loader."
This reverts commit 864f069b8f.
2020-12-08 20:41:09 +01:00
William Jordan 864f069b8f Add netlink and gen netlink library loader.
Netlink and generic netlink are standard linux
interfaces to allow management traffic between
user space and kernel subsystems over sockets.
This patch adds a loader for the generic netlink
library to allow Level 0 Sysman to manage
linux hardware that implements the generic
netlink interface. ULTs updated.

Signed-off-by: William Jordan <bill.jordan@intel.com>
2020-12-08 01:40:25 +01:00
Artur Harasimiuk 294624e03b Revert "Add netlink and gen netlink library loader."
This reverts commit 660ad6a1f3.
2020-12-01 17:52:52 +01:00
William Jordan 660ad6a1f3 Add netlink and gen netlink library loader.
Netlink and generic netlink are standard linux
interfaces to allow management traffic between
user space and kernel subsystems over sockets.
This patch adds a loader for the generic netlink
library to allow Level 0 Sysman to manage
linux hardware that implements the generic
netlink interface.

Signed-off-by: William Jordan <bill.jordan@intel.com>
2020-11-30 20:18:25 +01:00
Jitendra Sharma f4158e10ff Add support for DEVICE_DETACH and DEVICE_ATTACH sysman events
Change-Id: I2da57ec50a0f3e87499660d37fa248a06f9fdb08
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-11-04 03:31:32 +01:00
Bill Jordan ccd5abfbfd Add zesDeviceReset ULTs.
This patch adds two ULTs.

Verify that an IN USE error is returned if the device is open by another
process.

Verify that reset succeeds if device is not in use.

Verify that reset with force succeeds if device is in use.

Verify that reset without force succeeds if device is opened during
reset, and process is killed.

Verify that reset with force fails with device in use
if device is opened during reset, and process will not die

Change-Id: I232572c192bc481d8d63ef39c7494976100325ff
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-10-19 15:01:19 +02:00
Vilvaraj, T J Vivek 113a5170b1 Implement zesDeviceGetState() API
Change-Id: I035bdd0ddd7b8bdf6054c743a9f2723ee292a897
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-10-12 14:27:19 +02:00
mraghuwa 2643346b48 Update Sysman RAS Module
Change-Id: I2b99dae4336811ea4b539da48c1434657a9cf62a
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
2020-10-09 08:23:19 +02:00
Jitendra Sharma 1962a89b05 In Sysman fix C++ programming warnings
Fix warnings related to unused/uninitialized variables etc.

Change-Id: I2e75ede434442d7b99d6e28253e7811aac205323
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-10-06 16:35:53 +02:00
Bill Jordan 909107cab6 Fix zesDeviceReset for Spec version 1.
This patch does the following:
- Fixes a bug in FsAccess::listDirectory that could return
ZE_RESULT_UNKNOWN_ERROR when no error has occurred.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false, even if the device was in use.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false without closing the file descriptor.
- Added a releaseResources method method to Device object.
This method does the same thing as the DeviceImp
destructor except it does not free the DeviceImp object
and it does not free the SysmanDeviceImp object.
- Added the releaseResources methods to Mock<Device> object.
- Moved the reset of the debugger out of DriverHandleImp
destructor and into DeviceImp releaseResources.
- Added a releaseEngine method to the EngineHandleContext. This
method frees all the Engine handles.
- On reset, I call the Devcie->releaseResources and
EngineHandleContext->releaseEngines before resetting the device.
- Added a -r (--reset) option to zello_sysman so I
could easily test resets.

With these patches, the L0 Sysman CTS for zesDeviceReset
both pass.

Change-Id: I31fad1b27bc5cc6befe31cd6f9319748e2683424
2020-10-05 19:55:14 +02:00
Jitendra Sharma 38ecb25ee6 Add support to query PMU counters
This change adds support to get engine active time and timestamp
from PMU interface.

Change-Id: I486dcce9fef3c7dc3f73fb8c7ea4c0bd020a6807
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-09-07 16:15:21 +02:00
Pawel Cieslak fb821f21f5 Cmake format script
Related-To: NEO-1157

Change-Id: Ie1b907e838cfb9ad0d75cc8971d415f7c77103c9
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
2020-08-19 16:36:30 +02:00
mraghuwa 4b8d4285d7 add getDeviceHandle() at OS specific level
Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
2020-08-18 17:11:22 +02:00
Daniel Enriquez 2fa30d7d6c Update memory component to latest spec.
Change-Id: I766a3b87d240d26118cf72ea0717bc504784e764
2020-08-12 11:47:04 +02:00
Vilvaraj, T J Vivek a6ea7ab7db update Sysman PCI APIs to lastest Spec
Change-Id: Ie4daf2eb3596f05f824579eff3fe811ebb2f2032
2020-08-05 18:01:37 +02:00
Jaime Arteaga 902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00
Vilvaraj, T J Vivek 7bc405a9b3 Update sysman standby APIs to support latest spec.
Change-Id: I7a605c538432b2117ba968f155e4665078abc94f
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-07-30 20:33:15 +02:00
Bill Jordan 6e20dfafab Added limited XML parsing capability to L0 Sysman using libxml2.
XML parsing for linux only, hanging off the OsSysmanImp object.

Change-Id: I473dc8dde0611cc13f38a2c0b59e839fced2e59e
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-07-16 12:12:45 -07:00
T.J. Vivek Vilvaraj 6224db771a PCI driver fix for Discrete devices
Change-Id: I91e444c88b5e72463c7f181ece535da4150a2665
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-07-15 23:33:59 +02:00
Jitendra Sharma 146fc900c3 Add initial sysman stub as per latest spec
Change-Id: I6f36b9faa21e05a6954de0b50ea01240539441d1
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-07-11 06:54:08 +05:30
Bill Jordan e8bd440773 Don't allow copy or moving Sysman related objects.
Change-Id: I70dd97bffa1c4d08f05eb796c6d6a2eb66f06f4b
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-07-10 21:05:15 +02:00
mraghuwa 357fef0ff0 Refactor file access in sysman
Change-Id: I9603c96658430064a1d68b901586171c8ba52803
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
2020-07-08 08:32:02 +02:00
macabral e08022e9c7 Support for Platform Monitoring Technology
Add support for Platform Monitoring Technology,
and read temperature and energy counters.

Change-Id: Ic2c79e902400148cc538267c498fc1d0185c81f8
Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2020-07-02 19:41:06 +02:00
Jitendra Sharma c43759cc48 Cleanup and fixes in sysman source
In this Change:
 - Initialize local variables used in pci source.
 - Move setting of temperature handle's type to constructor of
   TemperatureImp class as temperature handle's type is used in
   init() of TemperatureImp class.
 - Allow only ENOENT  errno at the end of FsAccess::listDirectory function.
   Because in this function all directory entries will be read in a
   loop. And loop will exit only after readdir() finished reading
   all entries in directory and thus readdir() will exit, when it fails
   reading any further entry. Thus system will return ENOENT for readdir.

Change-Id: Ibd3ac3f841b114fd87edea1410750b33f3a14e5b
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-06-25 18:32:33 +02:00
Vilvaraj, T J Vivek 0c9c55cd17 add counter support for RAS.
- added dual handle support for RAS Correctable and Uncorrectable Errors.
- added reset counter for RAS.
- added Os Specific ULT for RAS

Change-Id: Ia10115bf6720ab211f549571e810ec0d6c0801ec
2020-06-25 08:48:11 +02:00
Jitendra Sharma 251994149a Expose DRM interface to sysman APIs
Change-Id: Iab4d42cf90c9804c2b036045f3990aedd31efa91
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-06-24 16:40:49 +02:00
Jitendra Sharma 1618a25d71 Fix error returning to user from zetSysmanProcessesGetState API
If after reading clients directory, while actually trying to
access the individual clients file, we receive a error
ZET_RESULT_ERROR_NOT_AVAILABLE, then it means that this process/client
might be killed/removed. Hence dont return error to user.
Instead simply skip that client's traversal further and move on
to next available client.

Change-Id: If86610a89d7b2421fd85560e5a223391b76d78a0
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-06-17 07:02:35 +02:00
Mraghuwa b6ccfed471 Redesign ULT by mocking sysfs and implementing for pci
Change-Id: I5ee2219208d05c125d1fce1a4a5b992bc8c4646e
2020-06-02 08:46:10 +02:00
macabral 86105d7e77 Disable copying Linux OS sysman class
Update the Linux os class not allow copying
by usage of  NEO::NonCopyableClass.

Change-Id: Icc0d40eaa83d7a46ec0d48a5fc9deb5c57c0e3f8
Signed-off-by: macabral <matias.a.cabral@intel.com>
2020-05-26 11:37:52 -07:00
Mraghuwa b9b34659c8 Redesign ULT by mocking sysfs and implementing for frequency
Change-Id: I5979132fc775fe227ed83f4d49f932f4ce2800cc
2020-05-15 22:36:40 +02:00
Mraghuwa 070c9b060b Redesign ULT by mocking sysfs and implementing for standby
Change-Id: Id2558122406f23e96e3115d57e7b82d04463bfc4
2020-05-14 19:41:28 +02:00
Jitendra Sharma 596c1a8e70 Implement zetSysmanProcessesGetState API
This change does the following:
 - Implement API zetSysmanProcessesGetState.
 - Implement ULT to validate zetSysmanProcessesGetState's implementation
 - Redesign ULTs for zetSysmanDeviceGetProperties to mock only OS specific
   classes, and validate zetSysmanDeviceGetProperties's implementation end
   to end.
 - Some bug fixes in code that are caught by these new ULTs

Change-Id: I4a83789771d32978576ff62859628df2c0c795ad
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-05-14 19:33:46 +02:00
Jitendra Sharma fe719f2665 Redesign ULT by mocking sysfs and implementing for scheduler
- Redesign the ULT to implement OSSpecific ULT by mocking only sysfs
- Fixing the Engine type "RCS" to use by default

Change-Id: I551374ab02da03fe2e4168fd6a30aa8ccaf3dd3e
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-05-12 21:02:45 +02:00
SaiKishore Konda 7c1eaadf50 Engine Sysman APIs using RCS Engine
- Fixing the engine sysfs node path
- Using default engine as RCS (compute) engine for engine APIs
- Updating the ULT for the same

Change-Id: If11aea422ac7e73b7f5fd0bc30d0918915d73848
Signed-off-by: SaiKishore Konda <saikishore.konda@intel.com>
2020-05-08 18:15:24 +02:00
Vilvaraj, T J Vivek 5c029b4471 Implement RAS APIs
- Implemented zetSysmanGetProperties
- Implemented zetSysmanGetState

Change-Id: Id40a1cb036693156c31c6e9ee78c3113ef35e5c2
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-04-29 18:03:05 +02:00
Jitendra Sharma 5374a0ffc1 Implement scheduler APIs
Add logic to implement following scheduler APIs
-zetSysmanSchedulerGetCurrentMode
-zetSysmanSchedulerGetTimeoutModeProperties
-zetSysmanSchedulerGetTimesliceModeProperties
-zetSysmanSchedulerSetTimeoutMode
-zetSysmanSchedulerSetTimesliceMode
-zetSysmanSchedulerSetExclusiveMode

Change-Id: I134b200ffd6b13bc50b1f38e955dd584455b4b38
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-04-22 20:26:57 +05:30
Bill Jordan 5d756b7b15 Add FsAccess::getFileMode and SysfsAccess::getFileMode methods
Change-Id: I4dddf1b3983e63ef6ad664009ebd20d474c8cc17
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-04-01 09:14:40 +02:00
Jaime Arteaga d96e462754 Reorganize Level Zero Core API files
Change-Id: I95750b90748dd65310fa72b030ea3ab2f72d3f24
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-03-25 11:21:43 +01:00
Bill Jordan 7c489ac60d Implement zetSysmanDeviceReset
Implemented function level reset.

Implementation is:
Make sure we are root (otherwise, return insufficient permissions)
Make sure no one has the device open
    (otherwise, return hande object in use)
Close our file handle
Unbind the device from the kernel driver
Make sure no one still has the device open
    (otherwise, kill them)
Perform function level reset (FLR)
Rebind the device to the kernel driver

Change-Id: Ic57b95487e73b5a5f2d03e619d813bf4199adf40
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-03-24 18:26:45 +01:00
Mateusz Hoppe 307a5cb822 Link tools and experimental sources to object library
Related-To: NEO-4480

Change-Id: I16da4434ec24753eabdb1bce9e38ed2e1e83ed6c
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-03-23 08:57:19 +01:00
Jitendra Sharma a5082656ca Remove systemCmd from sysman
Change-Id: I8821d5a9712984076264f6521a9b7fe9cac5cd8e
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-03-17 17:07:14 +01:00
Brandon Fliflet 27f4bce42f Initial support for oneAPI Level Zero
Change-Id: I221df8427b1844237a4d9d900c58512706b0be0f
2020-03-06 14:53:29 +01:00