Compare commits

...

3 Commits
ald ... v1.03

Author SHA1 Message Date
Dr-Noob
49941b1717 [v1.03] Bump version 2023-01-05 11:17:49 +01:00
Dr-Noob
a4c0bb1aae [v1.02] Merge Alder Lake into master branch 2023-01-05 11:17:16 +01:00
Dr-Noob
ea29507b62 [v1.02] Added basic support for Zen4 2022-12-03 16:29:53 +00:00
2 changed files with 6 additions and 3 deletions

View File

@@ -33,7 +33,7 @@
static const char* OS_STR = "Unknown OS";
#endif
static const char* VERSION = "1.02";
static const char* VERSION = "1.03";
void print_help(char *argv[]) {
const char **t = args_str;

View File

@@ -110,7 +110,8 @@ enum {
UARCH_ZEN_PLUS,
UARCH_ZEN2,
UARCH_ZEN3,
UARCH_ZEN3_PLUS
UARCH_ZEN3_PLUS,
UARCH_ZEN4
};
struct uarch {
@@ -258,7 +259,7 @@ struct uarch* get_uarch_from_cpuid_intel(uint32_t ef, uint32_t f, uint32_t em, u
return arch;
}
// iNApired in Todd Allen's decode_uarch_amd
// Inspired in Todd Allen's decode_uarch_amd
struct uarch* get_uarch_from_cpuid_amd(uint32_t ef, uint32_t f, uint32_t em, uint32_t m, int s) {
struct uarch* arch = emalloc(sizeof(struct uarch));
@@ -364,6 +365,7 @@ struct uarch* get_uarch_from_cpuid_amd(uint32_t ef, uint32_t f, uint32_t em, uin
CHECK_UARCH(arch, 10, 15, 2, 1, NA, "Zen 3", UARCH_ZEN3, 7) // instlatx64
CHECK_UARCH(arch, 10, 15, 4, 4, NA, "Zen 3+", UARCH_ZEN3_PLUS, 6) // instlatx64 (they say it is Zen3...)
CHECK_UARCH(arch, 10, 15, 5, 0, NA, "Zen 3", UARCH_ZEN3, 7) // instlatx64
CHECK_UARCH(arch, 10, 15, 6, 1, 2, "Zen 4", UARCH_ZEN4, 5) // instlatx64
UARCH_END
return arch;
@@ -425,6 +427,7 @@ int get_number_of_vpus(struct cpuInfo* cpu) {
case UARCH_ZEN2:
case UARCH_ZEN3:
case UARCH_ZEN3_PLUS:
case UARCH_ZEN4:
return 2;
default:
return 1;