mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 01:26:34 +00:00
b7a370b156
subrepo: subdir: "emummc" merged: "e72e8f1c" upstream: origin: "https://github.com/m4xw/emuMMC" branch: "develop" commit: "e72e8f1c" git-subrepo: version: "0.4.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "5d6aba9"
41 lines
1.5 KiB
C
Vendored
41 lines
1.5 KiB
C
Vendored
/**
|
|
* @file cache.h
|
|
* @brief AArch64 cache operations.
|
|
* @author plutoo
|
|
* @copyright libnx Authors
|
|
*/
|
|
#pragma once
|
|
#include "../utils/types.h"
|
|
|
|
/**
|
|
* @brief Performs a data cache flush on the specified buffer.
|
|
* @param addr Address of the buffer.
|
|
* @param size Size of the buffer, in bytes.
|
|
* @remarks Cache flush is defined as Clean + Invalidate.
|
|
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
|
|
*/
|
|
void armDCacheFlush(void* addr, size_t size);
|
|
|
|
/**
|
|
* @brief Performs a data cache clean on the specified buffer.
|
|
* @param addr Address of the buffer.
|
|
* @param size Size of the buffer, in bytes.
|
|
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
|
|
*/
|
|
void armDCacheClean(void* addr, size_t size);
|
|
|
|
/**
|
|
* @brief Performs an instruction cache invalidation clean on the specified buffer.
|
|
* @param addr Address of the buffer.
|
|
* @param size Size of the buffer, in bytes.
|
|
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
|
|
*/
|
|
void armICacheInvalidate(void* addr, size_t size);
|
|
|
|
/**
|
|
* @brief Performs a data cache zeroing operation on the specified buffer.
|
|
* @param addr Address of the buffer.
|
|
* @param size Size of the buffer, in bytes.
|
|
* @note The start and end addresses of the buffer are forcibly rounded to cache line boundaries (read from CTR_EL0 system register).
|
|
*/
|
|
void armDCacheZero(void* addr, size_t size);
|