/*
 * Copyright (c) [2022], MediaTek Inc. All rights reserved.
 *
 * This software/firmware and related documentation ("MediaTek Software") are
 * protected under relevant copyright laws.
 * The information contained herein is confidential and proprietary to
 * MediaTek Inc. and/or its licensors.
 * Except as otherwise provided in the applicable licensing terms with
 * MediaTek Inc. and/or its licensors, any reproduction, modification, use or
 * disclosure of MediaTek Software, and information contained herein, in whole
 * or in part, shall be strictly prohibited.
*/

#ifndef	_AVB_PROGRAM_EFUSE_VERSION_H
#define _AVB_PROGRAM_EFUSE_VERSION_H

#include <../drivers/driver/efuse/drv/drv_efuse.h>
#include <../lib/libavb/libavb.h>
#include <malloc.h>
#include <tee.h>
#include "efuse_rbi.h"

AvbIOResult read_rollback_index_by_efuse(size_t rollback_index_slot, u64 *out_rollback_index);
u64 read_pmu_rollback_index_by_efuse(void);
void set_pmu_rollback_index_by_efuse(u64 rollback_index);
bool is_slot_in_efuse(size_t rollback_index_slot);
int rollbackindexes_to_efuse(AvbSlotVerifyData* AvbData);

#endif /* _AVB_PROGRAM_EFUSE_VERSION_H */
