From: John Hodge Date: Sun, 7 Aug 2011 03:53:49 +0000 (+0800) Subject: Kernel - Planning for IOCache to use pages for cache instead of heap X-Git-Tag: rel0.10~2 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=65c21ebcac30ca3c5a1303149f2c795bde5f990f;p=tpg%2Facess2.git Kernel - Planning for IOCache to use pages for cache instead of heap --- diff --git a/Kernel/drv/iocache.c b/Kernel/drv/iocache.c index 2b4755cf..ba822df8 100644 --- a/Kernel/drv/iocache.c +++ b/Kernel/drv/iocache.c @@ -3,6 +3,8 @@ * - IO Cache * * By thePowersGang (John Hodge) + * + * TODO: Convert to use spare physical pages instead */ #define DEBUG 0 #include @@ -10,6 +12,7 @@ // === TYPES === typedef struct sIOCache_Ent tIOCache_Ent; +typedef struct sIOCache_PageInfo tIOCache_PageInfo; // === STRUCTURES === struct sIOCache_Ent @@ -21,6 +24,15 @@ struct sIOCache_Ent Uint8 Data[]; }; +struct sIOCache_PageInfo +{ + tIOCache_PageInfo *GlobalNext; + tIOCache_PageInfo *CacheNext; + tIOCache *Owner; + tPAddr BasePhys; + Uint64 BaseOffset; +}; + struct sIOCache { tIOCache *Next; @@ -38,6 +50,7 @@ struct sIOCache tShortSpinlock glIOCache_Caches; tIOCache *gIOCache_Caches = NULL; int giIOCache_NumCaches = 0; +tIOCache_PageInfo *gIOCache_GlobalPages; // === CODE === /**