1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-13 11:10:39 +00:00

Reorganize library a bit.

- Expose intel_code_t and amd_code_t enums - they are no longer
  limited to just recog_{intel,amd}.c.
- Add libcpuid_internal.h lists those enums and provides the,
  cpu_ident_internal() function, which is the same as cpu_identify(),
  but also has a third parameter - a internal_id_info_t structure,
  which holds detection internals.

All of this is intended to be used in rdmsr, which needs to know
specifics on what CPU it is running.
This commit is contained in:
Veselin Georgiev 2016-06-03 03:30:36 +03:00
commit a2550463a9
10 changed files with 98 additions and 39 deletions

View file

@ -91,7 +91,7 @@ static int score(const struct match_entry_t* entry, const struct cpu_id_t* data,
return res;
}
void match_cpu_codename(const struct match_entry_t* matchtable, int count,
int match_cpu_codename(const struct match_entry_t* matchtable, int count,
struct cpu_id_t* data, int brand_code, int model_code)
{
int bestscore = -1;
@ -112,6 +112,7 @@ void match_cpu_codename(const struct match_entry_t* matchtable, int count,
}
}
strcpy(data->cpu_codename, matchtable[bestindex].name);
return bestscore;
}
void generic_get_cpu_list(const struct match_entry_t* matchtable, int count,