This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Enable Streamline on Note 4

Samsung seem to have recently released open-source kernel for Lollipop for Note 4 with r5p0 driver.

I am using a free version of DS-5 v20.1

I am following instructions from links below to build gator library and kernel with support for Streamline -

Using DS-5 Streamline with Mali on Samsung Galaxy Note 3 & 10.1

ARM Information Center   (link points you to DS5 v14 documentation but I am referring to v20 doc

I build gator.ko is along with the kernel.

After flashing the newly built kernel - when I try to run gatord on it - I hit the following error

root@treltektt:/ # gatord&

gatord&

[1] 10584

root@treltektt:/ # Unable to load (insmod) gator.ko driver:

  >>> gator.ko must be built against the current kernel version & configuration

  >>> See dmesg for more details

Looking at dmesg I see following --

<6>[ 4608.789927] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 GAF structure checksum is invalid!

<6>[ 4608.789954] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 GAF structure checksum equals 0x00, please check if it is correctly

<6>[ 4608.789967] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 calculated in this kernel.

<6>[ 4608.789980] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 GAF checksum invalid

<6>[ 4608.789992] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000

<6>[ 4608.790003] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000

<6>[ 4608.794734] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 ===============================================================================

<6>[ 4608.794751] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 The kernel binary has been changed.

<6>[ 4608.794768] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 The platform/kernel binaries should be synchronized for running Secure Storage.

<6>[ 4608.794783] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 Please use the same version of platform/kernel binaries.

<6>[ 4608.794800] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000 ===============================================================================

<6>[ 4608.796053] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000

<6>[ 4608.796066] [c1] MobiCore mcd: b02|VALIDATOR [ERROR]: SPID - 0x00000000

<6>[ 4608.796078] [c1] MobiCore mcd: b02|VALIDATOR [WARN ]: SPID - 0x00000000 Sec Driver::set_config()

If needed - I can attach my .config file used to building the kernel.

I am using the gator.ko file built out of the same kernel which I have flashed onto my device - hence I dont know where this issue is coming from.

Any help in debugging this issue will be greatly appreciated.

Thanks

Parents
  • Hi sidxavier1,

    After investigating, we have discovered the reason.

    Samsung have enabled TIMA in this version of the kernel for this device... TIMA stands for TrustZone-base Integrity Measurement Architecture, and one of its roles is to authenticate kernel modules as they are loaded, so that devices are never vulnerable.

    Because of this, the only way to allow gator.ko is to disable TIMA in the kernel.

    I have tested on my setup and after disabling TIMA, I am now able to insmod gator.ko and run the daemon, connect streamline, and do some software based profiling using the activity counters enabled by default.

    There is an unfortunate part to this however, and that is the Mali hardware counters do not work, and always report back zero. This is an integration issue that Samsung have made. Both ARM and Samsung are aware of this problem with 4.4.4, and now it has been noted that 5.0.1 also exhibits this integration issue. Unfortunately, this is not something we can resolve as the integration of the driver is controlled by Samsung in this instance. We will continue to suggest to Samsung to provide a fix, but ultimately it is their decision whether to resolve this or not.

    I hope you still find DS-5 and Streamline useful, and hopefully it will be resolved by their next OTA update.

    Kind Regards,

    Michael McGeagh

Reply
  • Hi sidxavier1,

    After investigating, we have discovered the reason.

    Samsung have enabled TIMA in this version of the kernel for this device... TIMA stands for TrustZone-base Integrity Measurement Architecture, and one of its roles is to authenticate kernel modules as they are loaded, so that devices are never vulnerable.

    Because of this, the only way to allow gator.ko is to disable TIMA in the kernel.

    I have tested on my setup and after disabling TIMA, I am now able to insmod gator.ko and run the daemon, connect streamline, and do some software based profiling using the activity counters enabled by default.

    There is an unfortunate part to this however, and that is the Mali hardware counters do not work, and always report back zero. This is an integration issue that Samsung have made. Both ARM and Samsung are aware of this problem with 4.4.4, and now it has been noted that 5.0.1 also exhibits this integration issue. Unfortunately, this is not something we can resolve as the integration of the driver is controlled by Samsung in this instance. We will continue to suggest to Samsung to provide a fix, but ultimately it is their decision whether to resolve this or not.

    I hope you still find DS-5 and Streamline useful, and hopefully it will be resolved by their next OTA update.

    Kind Regards,

    Michael McGeagh

Children