#include <stdint.h> #include <cpuinfo.h> #include <cpuinfo/log.h> #include <cpuinfo/utils.h> #include <x86/api.h> #include <x86/cpuid.h> cpuinfo_x86_cache_descriptors; enum cache_type { … }; void cpuinfo_x86_detect_cache( uint32_t max_base_index, uint32_t max_extended_index, bool amd_topology_extensions, enum cpuinfo_vendor vendor, const struct cpuinfo_x86_model_info* model_info, struct cpuinfo_x86_caches* cache, struct cpuinfo_tlb* itlb_4KB, struct cpuinfo_tlb* itlb_2MB, struct cpuinfo_tlb* itlb_4MB, struct cpuinfo_tlb* dtlb0_4KB, struct cpuinfo_tlb* dtlb0_2MB, struct cpuinfo_tlb* dtlb0_4MB, struct cpuinfo_tlb* dtlb_4KB, struct cpuinfo_tlb* dtlb_2MB, struct cpuinfo_tlb* dtlb_4MB, struct cpuinfo_tlb* dtlb_1GB, struct cpuinfo_tlb* stlb2_4KB, struct cpuinfo_tlb* stlb2_2MB, struct cpuinfo_tlb* stlb2_1GB, uint32_t* log2_package_cores_max) { … }