/************** Cache Related Functions *****************/ void cache_init() { // Initialize the caches available on this system. // TODO: Should call out to something reading the acpi tables from // memory, or something similar. For now, just initialize them inline available_caches.l1 = SINIT(&l1); available_caches.l2 = SINIT(&l2); available_caches.l3 = SINIT(&l3); llc_cache = &l3; init_cache_properties(&l1, 32, 8, 64); init_cache_properties(&l2, 256, 8, 64); init_cache_properties(&l3, 8192, 16, 64); printk("Cache init successful\n"); }
/************** Cache Related Functions *****************/ void cache_init() { // Initialize the caches available on this system. // TODO: Should call out to something reading the acpi tables from // memory, or something similar. For now, just initialize them inline available_caches.l1 = &l1; available_caches.l2 = &l2; available_caches.l3 = &l3; llc_cache = &l3; #ifdef CONFIG_BOXBORO /* level (ignoring L1I), size, ways, CL size) */ init_cache_properties(&l1, 32, 8, 64); /* 1 color */ init_cache_properties(&l2, 256, 8, 64); /* 16 colors */ init_cache_properties(&l3, 24576, 24, 64); /* 256 colors */ #else /* Core i7 */ init_cache_properties(&l1, 32, 8, 64); /* 1 color */ init_cache_properties(&l2, 256, 8, 64); /* 16 colors */ init_cache_properties(&l3, 8192, 16, 64); /* 128 colors */ #endif /* CONFIG_E1000_ON_BOXBORO */ printk("Cache init successful\n"); }