| 1 |
|
| 2 |
|
| 3 |
#include <arch/cpu.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <intelblocks/car_lib.h> |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
void car_report_cache_info(void) |
| 21 |
{ |
| 22 |
int cache_level = CACHE_L3; |
| 23 |
struct cpu_cache_info info; |
| 24 |
|
| 25 |
if (!fill_cpu_cache_info(cache_level, &info)) |
| 26 |
return; |
| 27 |
|
| 28 |
printk(BIOS_INFO, "Cache: Level %d: ", cache_level); |
| 29 |
printk(BIOS_INFO, "Associativity = %zd Partitions = %zd Line Size = %zd Sets = %zd\n", |
| 30 |
info.num_ways, info.physical_partitions, info.line_size, info.num_sets); |
| 31 |
|
| 32 |
printk(BIOS_INFO, "Cache size = %zu MiB\n", get_cache_size(&info)/MiB); |
| 33 |
} |