示例#1
0
uint32_t safe_write(uint32_t index, const void *data, uint32_t length)
{
	uint32_t result = tlcl_write(index, data, length);
	if (result == TPM_E_MAXNVWRITES) {
		RETURN_ON_FAILURE(tpm_clear_and_reenable());
		return tlcl_write(index, data, length);
	} else {
		return result;
	}
}
示例#2
0
文件: tlcl.c 项目: AdriDlu/coreboot
uint32_t tlcl_set_global_lock(void)
{
	uint32_t x;
	VBDEBUG("TPM: Set global lock\n");
	return tlcl_write(TPM_NV_INDEX0, (uint8_t*) &x, 0);
}