def __init__(self, device_name):
     self._sequence_number = ResourceDumpFetcher._sequence_incrementor()
     self._device_name = device_name
     self._start_seq_number = 0
     try:
         mst_device = mtcr.MstDevice(self._device_name)
         self.reg_access_obj = regaccess.RegAccess(mst_device)
     except Exception as e:
         raise Exception("failed with exception: {0}".format(e))
Ejemplo n.º 2
0
 def __init__(self, device_name):
     self._sequence_number = ResourceDumpFetcher._sequence_incrementor()
     self._device_name = device_name
     self._start_seq_number = 0
     try:
         mst_device = mtcr.MstDevice(self._device_name)
         if mst_device.is_cable() or mst_device.is_linkx():
             raise Exception("Device is not supported")
         self.reg_access_obj = regaccess.RegAccess(mst_device)
     except Exception as e:
         raise Exception("{0}".format(e))
Ejemplo n.º 3
0
    def is_secure_fw(mst_device):
        """
        Check if the firmware is secure or not
        If secure return True, otherwise return False
        """
        is_secure = False
        if mst_device is None:
            return  is_secure

        # in case that reg access fail, we cant determain a secure fw and return false
        try:
            reg_access_obj = regaccess.RegAccess(mst_device)
            is_secure = reg_access_obj.getSecureFWStatus()
        except:
            is_secure = False

        return is_secure