Search
lxdream.org :: lxdream/src/xlat/xltcache.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/xlat/xltcache.h
changeset 1149:da6124fceec6
prev1091:186558374345
next1182:b38a327ad8fa
author nkeynes
date Wed Nov 10 08:37:42 2010 +1000 (12 years ago)
permissions -rw-r--r--
last change Add chain pointer to the xlat cache, so that we can maintain multiple blocks
for the same address. This prevents thrashing in cases where we would other
keep retranslating the same blocks over and over again due to varying
xlat_sh4_mode values
file annotate diff log raw
1.1 --- a/src/xlat/xltcache.h Tue Dec 15 08:46:37 2009 +1000
1.2 +++ b/src/xlat/xltcache.h Wed Nov 10 08:37:42 2010 +1000
1.3 @@ -41,6 +41,7 @@
1.4 int active; /* 0 = deleted, 1 = normal. 2 = accessed (temp-space only) */
1.5 uint32_t size;
1.6 void **lut_entry; /* For deletion */
1.7 + void *chain;
1.8 uint32_t xlat_sh4_mode; /* comparison with sh4r.xlat_sh4_mode */
1.9 uint32_t recover_table_offset; // Offset from code[0] of the recovery table;
1.10 uint32_t recover_table_size;
1.11 @@ -52,6 +53,7 @@
1.12 #define XLAT_BLOCK_FOR_CODE(code) (((xlat_cache_block_t)code)-1)
1.13
1.14 #define XLAT_BLOCK_MODE(code) (XLAT_BLOCK_FOR_CODE(code)->xlat_sh4_mode)
1.15 +#define XLAT_BLOCK_CHAIN(code) (XLAT_BLOCK_FOR_CODE(code)->chain)
1.16 #define XLAT_RECOVERY_TABLE(code) ((xlat_recovery_record_t)(((char *)code) + XLAT_BLOCK_FOR_CODE(code)->recover_table_offset))
1.17
1.18 /**
1.19 @@ -74,7 +76,6 @@
1.20
1.21 /**
1.22 * Commit the current translation block
1.23 - * @param addr target address (for the lookup table)
1.24 * @param destsize final size of the translation in bytes.
1.25 * @param srcsize size of the original data that was translated in bytes
1.26 */
.