Lines Matching refs:rsk
28 uint32_t ReadSpaceKernel(RollbackSpaceKernel *rsk);
29 uint32_t WriteSpaceKernel(RollbackSpaceKernel *rsk);
181 uint32_t ReadSpaceKernel(RollbackSpaceKernel *rsk) in ReadSpaceKernel() argument
187 r = TlclRead(KERNEL_NV_INDEX, rsk, sizeof(RollbackSpaceKernel)); in ReadSpaceKernel()
198 if (rsk->struct_version < 2) { in ReadSpaceKernel()
200 rsk->struct_version = 2; in ReadSpaceKernel()
209 if (rsk->crc8 == Crc8(rsk, offsetof(RollbackSpaceKernel, crc8))) in ReadSpaceKernel()
219 uint32_t WriteSpaceKernel(RollbackSpaceKernel *rsk) in WriteSpaceKernel() argument
226 if (rsk->struct_version < 2) in WriteSpaceKernel()
227 rsk->struct_version = 2; in WriteSpaceKernel()
228 rsk->crc8 = Crc8(rsk, offsetof(RollbackSpaceKernel, crc8)); in WriteSpaceKernel()
231 r = SafeWrite(KERNEL_NV_INDEX, rsk, in WriteSpaceKernel()
251 RollbackSpaceKernel *rsk) in OneTimeInitializeTPM() argument
309 Memcpy(rsk, &rsk_init, sizeof(RollbackSpaceKernel)); in OneTimeInitializeTPM()
318 RETURN_ON_FAILURE(WriteSpaceKernel(rsk)); in OneTimeInitializeTPM()
423 RollbackSpaceKernel rsk; in SetupTPM() local
430 RETURN_ON_FAILURE(OneTimeInitializeTPM(rsf, &rsk)); in SetupTPM()
611 RollbackSpaceKernel rsk; in RollbackKernelRead() local
622 RETURN_ON_FAILURE(ReadSpaceKernel(&rsk)); in RollbackKernelRead()
624 Memcpy(&uid, &rsk.uid, sizeof(uid)); in RollbackKernelRead()
628 Memcpy(version, &rsk.kernel_versions, sizeof(*version)); in RollbackKernelRead()
635 RollbackSpaceKernel rsk; in RollbackKernelWrite() local
637 RETURN_ON_FAILURE(ReadSpaceKernel(&rsk)); in RollbackKernelWrite()
638 Memcpy(&old_version, &rsk.kernel_versions, sizeof(old_version)); in RollbackKernelWrite()
641 Memcpy(&rsk.kernel_versions, &version, sizeof(version)); in RollbackKernelWrite()
642 return WriteSpaceKernel(&rsk); in RollbackKernelWrite()