* - IO Cache
*
* By thePowersGang (John Hodge)
+ *
+ * TODO: Convert to use spare physical pages instead
*/
#define DEBUG 0
#include <acess.h>
// === TYPES ===
typedef struct sIOCache_Ent tIOCache_Ent;
+typedef struct sIOCache_PageInfo tIOCache_PageInfo;
// === STRUCTURES ===
struct sIOCache_Ent
Uint8 Data[];
};
+struct sIOCache_PageInfo
+{
+ tIOCache_PageInfo *GlobalNext;
+ tIOCache_PageInfo *CacheNext;
+ tIOCache *Owner;
+ tPAddr BasePhys;
+ Uint64 BaseOffset;
+};
+
struct sIOCache
{
tIOCache *Next;
tShortSpinlock glIOCache_Caches;
tIOCache *gIOCache_Caches = NULL;
int giIOCache_NumCaches = 0;
+tIOCache_PageInfo *gIOCache_GlobalPages;
// === CODE ===
/**