/*
 * @file hv_vos_Cache.h
 * @brief Header file of vos cache.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-03-01
 */

/** @file vos_conn.h
 *  @brief VOS board connection functions
*/

#ifndef _HV_VOS_CACHE_H
#define _HV_VOS_CACHE_H

#include "hv_vos_Types.h"

void Hv_Vos_EnableICache(void);


/**
  \brief   Disable I-Cache
  \details Turns off I-Cache
  */
void Hv_Vos_DisableICache(void);


/**
  \brief   Invalidate I-Cache
  \details Invalidates I-Cache
  */
void Hv_Vos_InvalidAllICache(void);

/**
  \brief   Enable D-Cache
  \details Turns on D-Cache
  \note    I-Cache also turns on.
  */
void Hv_Vos_EnableDCache(void);
/**
  \brief   Disable D-Cache
  \details Turns off D-Cache
  \note    I-Cache also turns off.
  */
void Hv_Vos_DisableDCache (void);
/**
  \brief   Invalidate D-Cache
  \details Invalidates D-Cache
  \note    I-Cache also invalid
  */
void Hv_Vos_InvalidAllDCache (void);

void Hv_Vos_InvalidAllCache(void);
void Hv_Vos_InvalidICache(UINT32 vaddr, UINT32 size);
void Hv_Vos_InvalidDCache(UINT32 vaddr, UINT32 size);
void Hv_Vos_InvalidCache(UINT32 vaddr, UINT32 size);
void Hv_Vos_CACHE_WriteBackInvalidAllDCache(void);

#endif
