Commit Graph

118 Commits

Author SHA1 Message Date
Vilvaraj, T J Vivek 894f90f89e SysMan:fix device reset
The distance from the SGUnit to the  Root port is constant.
calculating the Rootport and Cardbus based on this observation.
the root port and card bus are used by Warmreset function to
preserve the PCI config space.

Resolves: LOCI-2899

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-06-25 03:13:52 +02:00
Mayank Raghuwanshi 281c98dcf9 Add firmware util interface for sysman windows
Related-To: LOCI-3132

Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2022-06-24 08:42:48 +02:00
Vilvaraj, T J Vivek c0121eb824 SysMan: fix issues in execution environment restoration.
the scpoe of the restorer is till the LinuxSysmanImp is deleted.
Ideally the scope of restorer needs to be function level.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-06-15 11:38:23 +02:00
Daniel Chabrowski c303c218be Add missing pragma once in header files
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-06-07 16:19:11 +02:00
Vilvaraj, T J Vivek 973bcb9dbc Sysman: cleanup execution env referrals
convert the present system of calling Inc/Dec of
execution environment to a more elegant solution

Resolves: LOCI-3165

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-06-06 18:40:23 +02:00
Vilvaraj, T J Vivek da52303e6e SysMan: Diagnostics warm reset fix.
The following modifications were done as part of the fix
for warm reset.
1. Release sysman resources before quiscenting the GPU.
2. Add additional checks to confirm quiscenting of the GPU
before launching the diagnostics tests.
3. Fixed warm reset with wait time to allow the changes to be
propagated to the entire GPU PCI tree.
4. Modified the ULT's completely to avoid the usage of MOCKS.
5. Made Diagnostics handle creation per-device from per-SubDevice.

Related-To: LOCI-3053

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-06-06 10:09:47 +02:00
Mateusz Jablonski 747c2d3d83 Cleanup includes in cmdlist, cmdqueue, context, device, driver and module
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-06-03 02:54:41 +02:00
Mateusz Jablonski 2a4c68dc38 Remove not needed dependencies from device_imp.h
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-06-02 18:35:34 +02:00
Bellekallu Rajkiran 3efdfba41e Add support for error correction codes
Implement ECC API.
Add ULTs to validate error correction codes.
Integrate sysman ecc with igsc.

Related-To: LOCI-2782

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2022-05-24 11:03:16 +02:00
Artur Harasimiuk 819e0f5515 style: configure readability-identifier-naming.LocalVariableCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-16 12:39:44 +02:00
Artur Harasimiuk e9be9b64c6 clang-tidy configuration cleanup
Define single .clang-tidy configuration with all used checks and use
NOLINT to selectively silence tool. That way cleanup should be easier.
third_part/ has its own configuration that disables clang-tidy for this
folder.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-11 14:02:04 +02:00
Mayank Raghuwanshi bcc543f949 Add zesMemoryGetBandwidth support for DG2 and ATS-M
Related-To: LOCI-2574
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2022-05-07 02:43:00 +02:00
Bellekallu Rajkiran 51988148de Sysman: Remove redundant files
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2022-04-11 18:32:57 +02:00
Mayank Raghuwanshi 5a804841cb Add pmt xml offsets for ATS-M
Related-To: LOCI-2960
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2022-04-11 07:29:44 +02:00
Vilvaraj, T J Vivek 47f7b4f509 sysman: clean up code duplication for reset
warm and cold reset are common functionality,
the code is being moved to the common sysman implementation
from diagnostics specific files.

Related-To: LOCI-1908
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-03-31 14:10:39 +02:00
Bellekallu Rajkiran 922a224cc9 Add prelim support for temperature, power and global operations
Related-To: LOCI-2864

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2022-03-03 18:11:34 +01:00
T.J.Vivek Vilvaraj 1e6a38035e sysman: serialize access to libigsc.
In a multi thread environment the access to the external
library needs to be synchronized.

Resolves: LOCI-2871, LOCI-2873

Signed-off-by: T.J.Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2022-02-15 08:08:44 +01:00
Bellekallu Rajkiran 0bd60e524a Initialize telemetry device entry variable
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2022-01-31 20:33:53 +01:00
Mayank Raghuwanshi 90963b95ad Update mechanism for getting subdeviceId and onSubdevice for memory
Earlier sysman memory module was using logical subdeviceId
exposed by core to retrieve memory telmetry data, replace
the logical subdeviceId with actual subdeviceId for collecting
telemetry data.

Related-To: LOCI-2828

Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2022-01-28 07:52:47 +01:00
Ayush Pandey 715b9d31d2 Find sscanf alternative.
Used strtol() to write sscanfUtil to extraxt info of BDF pcipath.

Related-To: LOCI-1002

Signed-off-by: Ayush Pandey <ayush.pandey@intel.com>
2022-01-21 09:02:48 +01:00
Vilvaraj, T J Vivek 15f102a7cb sysman:modify diagnostics tests
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-12-22 14:53:38 +01:00
T J Vivek Vilvaraj b95428078e sysman: filter diagnostics related accesses
prevent diagnostics related calls on unsupported platforms


Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-12-20 12:49:49 +01:00
Ranjan, Joshua Santhosh 5a2a19fa1a Sysman Fix FirmwareUtil Cleanup
Fixed by avoiding library function access if library is unavailable.


Related-To: LOCI-2719

Signed-off-by: Ranjan, Joshua Santhosh <joshua.santosh.ranjan@intel.com>
2021-12-15 09:18:18 +01:00
Mayank Raghuwanshi 94d09f75b7 Get RAS HBM errors count using firmware interface
-- master-commit
Add functionality to retrieve memory errors from Firmware
-- master-commit

Related-To: LOCI-2491, LOCI-2726

Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-12-08 18:57:24 +01:00
Joshua Santosh Ranjan feae44bce8 Added Fabric RAS error support
fabric error counts are read from sysfs nodes

Related-To: LOCI-2613

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2021-12-08 07:00:39 +01:00
Bellekallu Rajkiran a1121ccb6b Sysman: Replace mmap with pread
Use pread sys call instead of mmap and munmap
to get telemetry info.

Related-To: LOCI-2634


Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2021-12-06 17:44:29 +01:00
Pichika Uday Kiran 7764924387 sysman: Avoid creating the IGSC libary handle in ULTs
- Contains the changes to avoid invoking IGSC library
during ULT execution.


Related-To: LOCI-2719
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-12-02 19:30:35 +01:00
Vilvaraj, T J Vivek b91cec5655 sysman: mock firmware utility in sysman
firmware utility needs to be mocked to prevent file access while
executing ULT's


Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-11-17 07:57:46 +01:00
T J Vivek Vilvaraj e1a1e96110 sysman:close diagnostics handles before reset
Relates-to:LOCI-2650

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-11-15 21:30:13 +01:00
Jitendra Sharma 1186c1aae3 zesSysmanDeviceReset: Reinitialize device after device reset
Before performing gpu device reset, first all level zero resources
and gpu device specific resources have to be cleaned up. Also as
after device reset, state of gpu device would be lost.
Hence after performing gpu device reset, level zero device have
to be reinitialized by querying gpu device again.
This change is aimed at reinitializing the level zero resources
after gpu device reset, so that user could continue using level zero
devices after device reset.

Related-To: LOCI-2627

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-11-07 23:43:48 +01:00
Pichika Uday Kiran 52cf6bf383 firmware: Enhance the firmware utility module
- There are functions exposed through Firmware Util interface to get
the firmware version and perform firmware flash based on firmware type.
Instead this functionality is being handled with generic functions. Hence
this commit removes the redundant code.

Related-To: LOCI-2568
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-11-02 11:42:18 +01:00
T J Vivek Vilvaraj a9aa472b50 SysMan: close igsc context in destructor
igsc context is intialized by the device init call to igsc library.
When resources are freed, the context needs to be closed explicitly
by sysman to force igsc library to free and release the context
within the igsc library.

Related-To:LOCI-2695

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-10-29 15:35:13 +02:00
Pichika Uday Kiran 3357b8b916 firmware: Add support for new firmware type
- This commit adds the support of new firmware flashing
- And also added the support in ULTs for the new firmware
flash APIs.

Related-To: LOCI-2381
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-10-22 23:13:23 +02:00
Pichika Uday Kiran e063b120de Revert "firmware: Add support for new firmware type"
This reverts commit 3c739cf687b9d47185c131231316e51a71cbefa0.

Related-To: LOCI-2381
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-10-18 17:45:02 +02:00
Pichika Uday Kiran 5ec0833fa8 firmware: Add support for new firmware type
- This commit adds the support of new firmware flashing
- And also added the support in ULTs for the new firmware
flash APIs

Related-To: LOCI-2381
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-10-18 06:23:03 +02:00
T J Vivek Vilvaraj f27f430429 sysman: fix firmware device enumeration in firmware Utils
firmware Utils was always enumerating the same firmware
device handle for all sysman devices.

Related-To:LOCI-2609

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-10-14 18:02:55 +02:00
Mayank Raghuwanshi 52e9dd26a6 Modify canRead and CanWrite functions of fsaccess class
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-10-05 10:52:17 +02:00
Jitendra Sharma 135ec380fc Dont initialize sysman for linux if Driver Model is not DRM
Related-To: LOCI-2533

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-10-04 12:15:21 +02:00
Pichika Uday Kiran 27bf56ee5a firmware-utils: Read IGSC version from IGSC config
- This commit reads the IGSC version from the IGSC config
rather parsing the igsc library path.

Related-To: LOCI-2527
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-10-01 07:12:43 +02:00
Jitendra Sharma c46f591a99 Do not initialize Sysman if OsSysman Init failed
Related-To: LOCI-2552

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-09-30 09:11:55 +02:00
T J Vivek Vilvaraj aba7d74bcd remove unused libxml module from sysman
Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-09-30 09:01:35 +02:00
Kamil Kopryk 9ccf43e441 Correct branch_dir_suffix in cmake
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6245
2021-09-14 16:00:20 +02:00
Jitendra Sharma 478edfc0e4 Sysman: Add support to check if resizable Bar supported
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-07-27 08:13:08 +02:00
Mayank Raghuwanshi f592a82fea Modify directoryExists function of FsAccess class
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-07-19 13:26:02 +02:00
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