tpm2_errata.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: BSD-3-Clause */
  2. #ifndef TPM2_ERRATA_H
  3. #define TPM2_ERRATA_H
  4. #include <tss2/tss2_esys.h>
  5. #include <stdbool.h>
  6. /*
  7. * Errata index pattern:
  8. * spec version + the section number in the errata doc
  9. *
  10. * Note that it is unnecessary to describe errata version
  11. * because the section number should be kept consistent
  12. * across all errata versions for a specific spec revision.
  13. */
  14. typedef enum {
  15. SPEC_116_ERRATA_2_7,
  16. } tpm2_errata_index_t;
  17. /**
  18. * Initialize errata subsystem
  19. *
  20. * @param ctx
  21. * ESAPI context to be queried.
  22. */
  23. void tpm2_errata_init(ESYS_CONTEXT *ctx);
  24. /**
  25. * Request an errata correction for a specific errata version.
  26. * @param index
  27. * the errata to be queried.
  28. *
  29. * This function requests an errata correction to work
  30. * around a known issue well documented in errata doc.
  31. * If the request is valid and known, the queried errata
  32. * will be applied by the corresponding pre-defined errata
  33. * correction handler. The fixup process is transparent to
  34. * the callers so there is no return values. Any tools can
  35. * call this function to apply an errata if necessary.
  36. */
  37. void tpm2_errata_fixup(tpm2_errata_index_t index, ...);
  38. #endif /* TPM2_ERRATA_H */