Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CR-1149626 Backport SC warning (#7304) #7310

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

dbenusov
Copy link
Contributor

@dbenusov dbenusov commented Jan 27, 2023

  • CR-1149626 Add warning for SC mismatch

Signed-off-by: Daniel Benusovich dbenusov@xilinx.com

  • CR-1149626 Add default option to prevent failures due to warning queries

Signed-off-by: Daniel Benusovich dbenusov@xilinx.com

  • CR-1149626 Update error message to remove 0.0.0 and replace with NA

Signed-off-by: Daniel Benusovich dbenusov@xilinx.com

Signed-off-by: Daniel Benusovich dbenusov@xilinx.com
(cherry picked from commit a722d40)

Backport of #7304

https://jira.xilinx.com/browse/CR-1147768
There is not a CLEAN way that customers can flash a shell on a Versal platform without warnings or errors. After flashing the shell the users are expected to flash the device again to update the SC, but, we make no mention of that requirement in the tooling. As a result, users are confused when their shells fail due to interacting the with incorrect SC.

To deal with this problem we would like to add three features:

  1. Add a message when the user flashes a device with xbmgmt program -d <BDF> -b to output a warning stating to program again to change the SC (Versal devices only)
  2. Update the messages being displayed when programming to device to reflect that either the shell or the SC are being flashed (Versal devices only)
  3. Display a more substantial warning then the current xbmgmt examine -b <BDF> -r platform warning if the SC version does not match the expected SC version from the shell

There will be 2 PRs for this change.
The first deals with the flashing behavior (Already done)
The second deals with the additional warning message (This PR)

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

Users do not see if their SC version is not aligned with their installed shell. This can cause problems when attempting to run programs.

How problem was solved, alternative solutions (if any) and why they were rejected

Added a warning message after comparing the expected and the target SC version.

Risks (if any) associated the changes in the commit

If there is a fault with the hardware and neither sysfs node appears the following message will be displayed:
Missing sysfs nodes will display N/A

***********************************************************
*        WARNING          WARNING          WARNING        *
*  SC version data missing. Expected: N/A Current: 4.4.35 *
***********************************************************

What has been tested and how, request additional testing if necessary

Ubuntu 20.04 VCK5000
Bad SC Version warning

dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov$ xbutil examine -d 17:00
WARNING: Unexpected xocl version (2.14.0) was found. Expected 2.15.0, to match XRT tools.
***********************************************************
*        WARNING          WARNING          WARNING        *
*    Invalid SC version. Expected: 1.2.3 Current 4.4.35   *
***********************************************************

---------------------------------------------------
[0000:17:00.1] : xilinx_vck5000_gen4x8_qdma_base_2
---------------------------------------------------
Platform
  XSA Name               : xilinx_vck5000_gen4x8_qdma_base_2
  Platform UUID          : 05DCA096-76CB-730B-8D19-EC1192FBAE3F
  FPGA Name              :
  JTAG ID Code           : 0x0
  DDR Size               : 0 Bytes
  DDR Count              : 0
  Revision               : A
  MFG Date               : 0xcc344c
  Mig Calibrated         : false
  P2P Status             : not supported

Mac Addresses            : 00:0A:35:0A:7F:AE
                         : 00:0A:35:0A:7F:AF

Xclbin UUID
  00000000-0000-0000-0000-000000000000

Compute Units
  PL Compute Units
    Index   Name                                              Base_Address    Usage   Status

  PS Compute Units
    Index   Name                                              Base_Address    Usage   Status

Documentation impact (if any)

Platform team needs to notate what the warnings mean.

* CR-1149626 Add warning for SC mismatch

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>

* CR-1149626 Add default option to prevent failures due to warning queries

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>

* CR-1149626 Update error message to remove 0.0.0 and replace with NA

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>

Signed-off-by: Daniel Benusovich <dbenusov@xilinx.com>
(cherry picked from commit a722d40)
@gbuildx
Copy link
Collaborator

gbuildx commented Jan 27, 2023

Build Passed!

@xdavidz
Copy link
Collaborator

xdavidz commented Jan 27, 2023

@dbenusov-xilinx I suppose the backport was clean, thus approved.

@chvamshi-xilinx chvamshi-xilinx merged commit 523e164 into Xilinx:2022.2 Jan 29, 2023
@michaellass
Copy link

Risks (if any) associated the changes in the commit

If there is a fault with the hardware and neither sysfs node appears the following message will be displayed: Missing sysfs nodes will display N/A

***********************************************************
*        WARNING          WARNING          WARNING        *
*  SC version data missing. Expected: N/A Current: 4.4.35 *
***********************************************************

We are seeing this with all our VCK5000 boards on RHEL 8.8 running a slightly patched XRT 2.14 (https://github.com/pc2/XRT/commits/2022.2_RHEL8.8).

However, xbmgmt can properly report SC versions installed on the board and on the system (I would assume the latter one is the target SC version?):

$ /opt/xilinx/xrt/bin/xbmgmt examine --verbose -d 0000:e1:00.0
Verbose: Enabling Verbosity
Verbose: SubCommand: examine
***********************************************************
*        WARNING          WARNING          WARNING        *
*  SC version data missing. Expected: N/A Current: 4.4.35 *
***********************************************************

---------------------------------------------------
[0000:e1:00.0] : xilinx_vck5000_gen4x8_qdma_base_2
---------------------------------------------------
Flash properties
  Type                 : ospi_xgq
  Serial Number        : --redacted--

Device properties
  Type                 : vck5000
  Name                 : VCK5000-P

Flashable partitions running on FPGA
  Platform             : xilinx_vck5000_gen4x8_qdma_base_2
  SC Version           : 4.4.35
  Platform UUID        : 05DCA096-76CB-730B-8D19-EC1192FBAE3F
  Interface UUID       : EAAE3FB8-B262-B65B-21FE-C0676792EBFC

Flashable partitions installed in system
  Platform             : xilinx_vck5000_gen4x8_qdma_base_2
  SC Version           : 4.4.35
  Platform UUID        : 05DCA096-76CB-730B-8D19-EC1192FBAE3F

Bootable Partitions:
  Default              : ACTIVE
  Backup               : INACTIVE


  Mac Address          : --redacted--
                       : --redacted--

Indeed, the sdm hwmon reports 0.0.0 as target_msp_ver:

$ cat /sys/devices/pci0000:e0/0000:e0:03.1/0000:e1:00.0/hwmon_sdm*/active_msp_ver
4.4.35
$ cat /sys/devices/pci0000:e0/0000:e0:03.1/0000:e1:00.0/hwmon_sdm*/target_msp_ver
0.0.0

michaellass added a commit to pc2/XRT that referenced this pull request Oct 30, 2023
The change causes the following warning for all of our VCK5000 boards
for no good reason:
***********************************************************
*        WARNING          WARNING          WARNING        *
*  SC version data missing. Expected: N/A Current: 4.4.35 *
***********************************************************

See: Xilinx#7310 (comment)

This reverts commit 523e164.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants