1 /* Copyright (C) 2007-2008 The Android Open Source Project 2 ** 3 ** This software is licensed under the terms of the GNU General Public 4 ** License version 2, as published by the Free Software Foundation, and 5 ** may be copied, distributed, and modified under those terms. 6 ** 7 ** This program is distributed in the hope that it will be useful, 8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 ** GNU General Public License for more details. 11 */ 12 #ifndef DCACHE_H 13 #define DCACHE_H 14 15 #include <inttypes.h> 16 17 // Define constants for the replacement policies 18 #define kPolicyRoundRobin 1 19 #define kPolicyRandom 2 20 21 extern int dcache_size; 22 extern int dcache_ways; 23 extern int dcache_line_size; 24 extern int dcache_replace_policy; 25 extern int dcache_load_miss_penalty; 26 extern int dcache_store_miss_penalty; 27 28 extern void dcache_init(int size, int ways, int line_size, int replace_policy, 29 int load_miss_penalty, int store_miss_penalty); 30 31 #endif /* DCACHE_H */ 32