2016-06-13 21:14:53 +02:00
|
|
|
/*
|
|
|
|
|
* cache.h
|
|
|
|
|
* by TuxSH
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
The following functions flush the data cache, then waits for all memory transfers to be finished.
|
2016-06-14 19:50:38 +02:00
|
|
|
The data cache and/or the instruction cache MUST be flushed before doing one of the following:
|
2016-06-13 21:14:53 +02:00
|
|
|
- rebooting
|
|
|
|
|
- powering down
|
|
|
|
|
- setting the ARM11 entrypoint to execute a function
|
2016-06-14 19:50:38 +02:00
|
|
|
- jumping to a payload
|
2016-06-13 21:14:53 +02:00
|
|
|
***/
|
|
|
|
|
|
2016-06-14 19:50:38 +02:00
|
|
|
void flushEntireDCache(void); //actually: "clean and flush"
|
|
|
|
|
void flushDCacheRange(void *startAddress, u32 size);
|
|
|
|
|
|
|
|
|
|
void flushEntireICache(void);
|
|
|
|
|
void flushICacheRange(void *startAddress, u32 size);
|