pinweaver/ti50: workaround to build with Clang-15 in Ti50 SDK

LIBCLANG_PATH cause weird issues that types from stdint.h not found:
  pinweaver_types.h:100:2: error: unknown type name 'uint8_t'
  pinweaver_types.h:105:2: error: unknown type name 'uint8_t'
  pinweaver_types.h:110:2: error: unknown type name 'uint8_t'
  ...

Commenting out LIBCLANG_PATH helps, but in general this is not a correct
behavior. Updating bindgen to 0.62 also didn't make a difference.

BUG=b:259282140
TEST=make, manually check that RISC-V target is correctly handled

Cq-Depend: chrome-internal:5146615
Change-Id: I9778afa3fb0f6c134e9f599f0bdb594ab6f36aea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/pinweaver/+/4049022
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Owners-Override: Brad McKee <bradmckee@google.com>
Reviewed-by: Alyssa Haroldsen <kupiakos@google.com>
Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
1 file changed
tree: a52addfedb7943d6a8fbca8469c3f7aa4c934b6a
  1. eal/
  2. fuzzer/
  3. BUILD.gn
  4. DIR_METADATA
  5. LICENSE
  6. OWNERS
  7. pinweaver.c
  8. pinweaver.h
  9. pinweaver_eal.h
  10. pinweaver_types.h
  11. PRESUBMIT.cfg
  12. README.md
README.md

Common PinWeaver Code

This directory contains reference PinWeaver code that can be used across implementation platforms.

It consists of:

  • PinWeaver reference code:
    • pinweaver.h - PinWeaver embedded API definition
    • pinweaver.c - implementation
    • pinweaver_eal.h - API for Environment Abstraction Layer (EAL) used by PinWeaver
      • note that some types used in this API are platform-specific and are defined in eal/**/pinweaver_eal_types.h
    • pinweaver_types.h - header that is shared by PinWeaver implementation and PinWeaver clients that call it through platform-specific interface.
  • Environment Abstraction Layer (EAL) implementations - in eal/ folder
    • eal/cr50 - implementation for cr50
      • pinweaver_eal_types.h - cr50-specific EAL API types
      • pinweaver_eal.c - cr50 implementation of EAL
    • eal/tpm_storage - implementation for platforms that use TPM as PinWeaver data storage
      • pinweaver_eal_types.h - TPM-storage-specific EAL API types
      • pinweaver_eal_tpm.h - additional EAL functions required by TPM storage
      • pinweaver_eal_linux.c - implementation of non-storage EAL methods for Linux case
      • tpm_storage_stubs.c - empty implementation of storage EAL methods
      • tpm_storage.c - implementation of storage EAL methods on top of TSS
      • mini_trunks/ - mini-TSS (TPM client software stack) used by TPM storage implementation
        • created from trunks TSS used by ChromeOS reduced to the minimal required set of TPM commands and ported from C++ to C
        • relies on pinweaver_eal.h + pinweaver_eal_tpm.h EAL methods
        • TSS API is defined in tss.h + *authorization_delegate.h

A platform implementation that uses TPM storage EAL option needs to implement all EAL methods implemented in pinweaver_eal_linux.c (or use it as-is, if Linux compatible).