Index: source/lib/sysdep/arch/x86_x64/cache.h =================================================================== --- source/lib/sysdep/arch/x86_x64/cache.h +++ source/lib/sysdep/arch/x86_x64/cache.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2020 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -85,6 +85,11 @@ bool Validate() const { + // TODO: The cache detection for Ryzen CPUs isn't implemented yet. + // Returning true is a workaround, to protect the system from crash. + // For a correct implementation please look here: https://community.amd.com/thread/244207 + return true; + if(!(1 <= m_Level && m_Level <= maxLevels)) return false; Index: source/lib/sysdep/arch/x86_x64/cache.cpp =================================================================== --- source/lib/sysdep/arch/x86_x64/cache.cpp +++ source/lib/sysdep/arch/x86_x64/cache.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2020 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -89,8 +89,7 @@ static const size_t associativityTable[16] = { 0, 1, 2, 0, 4, 0, 8, 0, - // TODO: The second '16' does not obey to the specifications and is only a workaround. For a correct implementation please look here: https://community.amd.com/thread/244207 - 16, 16, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative + 16, 0, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative }; static x86_x64::Cache L2Cache(u32 reg, x86_x64::Cache::Type type)