[roll] Roll fuchsia [tee] Introduce idiomatic TEE internal data type bindings

This change introduces richer, more idiomatic, more ergonomic,
layout-compatible bindings for the TEE internal data types, which are
exported top-level within the tee_internal_api crate. Groups of
constants that are morally enums and bitflags are defined as Rust enums
and bitflags, respectively; TEE_ERROR_* constants are made to comprise a
proper error type implementing std::error:Error; further, each
tee_internal_api::binding::TEE_Foo type is made to correspond to a
tee_internal_api::Foo enriched with those enum/bitflag abstraction when
possible and stripped of FFI awkwardness. APIs that wrap this crate
should opt to to use the tee_internal_api::Foo definitions over the
tee_internal_api::TEE_Foo ones (except of course the implementations
of the extern C API).

We introduce here as well the convention to use the
tee_internal_api::Foo definitions over the tee_internal_api::TEE_Foo
ones in the APIs that wrap this crate (except for the extern C
implementations of the API, of course).

The layout compatibility between the bindings is checked via tests, and
the enums and bitflag values make direct use of the bindgen-generated
values - and so drift between these representations is not possible.

Original-Bug: 360942417, 370767155
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1128458
Original-Revision: b01b32d90d1ce48f2c18073e221e0d7b42e47b8a
GitOrigin-RevId: dae7f24055bdd39c1b039a889119893c19138bf5
Change-Id: I290d17458f8020936df73d69883ea177afc86fcc
1 file changed
tree: 51b73db67334b272eb9e7310381901c8918eebfb
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.