A uint8_t can't have values all the way up to 0x12e...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
const char *dmi_processor_family(uint8_t code, char *manufacturer)
{
/* 3.3.5.2 */
- static const char *family[] = {
+ static const char *family[256] = {
NULL, /* 0x00 */
"Other",
"Unknown",
NULL,
NULL,
NULL, /* 0xFF */
- NULL,
- NULL,
- NULL,
- NULL,
- "SH-3",
- "SH-4",
- NULL, /*0x106*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x110*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- "ARM",
- "StrongARM",
- NULL, /*0x19A*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x120*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x12A*/
- NULL,
- "6x86",
- "MediaGX",
- "MII" /*0x12E*/
- /* master.mif has values beyond that, but they can't be used for DMI */
};
/* Special case for ambiguous value 0xBE */
if (code == 0xBE) {
return "Core 2 or K7";
}
- if ((code<=0x12E) && (family[code] != NULL)) {
+ if (family[code] != NULL) {
return family[code];
}
return out_of_spec;