tee-supplicant: read rpmb dev info from sysfs

For now tee-supplicant retrieve RPMB informations by opening mmc dev
node and read data at the corresponding offset.
That is a problem on Android device with selinux enabled because the
access to this node is restricted to kernel/init.

All the necessary informations can instead be read from sysfs:
- RPMB partition size:
/sys/class/mmc_host/mmc%u/mmc%u:0001/raw_rpmb_size_mult
- Reliable write sector count:
/sys/class/mmc_host/mmc%u/mmc%u:0001/rel_sectors

Tests done on the following board: (Android build)
https://ologicinc.com/portfolio/mediatek-pumpkin-i350/

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (hikey-hikey)
1 file changed
tree: a1e7e9173ae220f8d0ff7ce3223b738a978f8445
  1. .github/
  2. libckteec/
  3. libseteec/
  4. libteec/
  5. public/
  6. scripts/
  7. tee-supplicant/
  8. .gitattributes
  9. .gitignore
  10. .travis.yml
  11. Android.mk
  12. android_flags.mk
  13. CMakeLists.txt
  14. CMakeToolchain.txt
  15. config.mk
  16. flags.mk
  17. LICENSE
  18. Makefile
  19. README.md
  20. typedefs.checkpatch
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers