mocked_rollback_index.c 855 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file.
  4. *
  5. * Functions for querying, manipulating and locking rollback indices
  6. * stored in the TPM NVRAM.
  7. */
  8. #include "sysincludes.h"
  9. #include "utility.h"
  10. #include "rollback_index.h"
  11. #include "tss_constants.h"
  12. uint32_t SetVirtualDevMode(int val)
  13. {
  14. return TPM_SUCCESS;
  15. }
  16. uint32_t TPMClearAndReenable(void)
  17. {
  18. return TPM_SUCCESS;
  19. }
  20. uint32_t RollbackKernelRead(uint32_t *version)
  21. {
  22. *version = 0;
  23. return TPM_SUCCESS;
  24. }
  25. uint32_t RollbackKernelWrite(uint32_t version)
  26. {
  27. return TPM_SUCCESS;
  28. }
  29. uint32_t RollbackKernelLock(int recovery_mode)
  30. {
  31. return TPM_SUCCESS;
  32. }
  33. uint32_t RollbackFwmpRead(struct RollbackSpaceFwmp *fwmp)
  34. {
  35. memset(fwmp, 0, sizeof(*fwmp));
  36. return TPM_SUCCESS;
  37. }