1 /* ----------------------------------------------------------------------- *
3 * Copyright 2006 Erwan Velu - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
13 #ifndef DMI_PROCESSOR_H
14 #define DMI_PROCESSOR_H
18 #define PROCESSOR_SOCKET_DESIGNATION_SIZE 65
19 #define PROCESSOR_TYPE_SIZE 32
20 #define PROCESSOR_FAMILY_SIZE 32
21 #define PROCESSOR_MANUFACTURER_SIZE 65
22 #define PROCESSOR_VERSION_SIZE 65
23 #define PROCESSOR_VOLTAGE_SIZE 16
24 #define PROCESSOR_STATUS_SIZE 16
25 #define PROCESSOR_UPGRADE_SIZE 16
26 #define PROCESSOR_CACHE_SIZE 16
27 #define PROCESSOR_SERIAL_SIZE 65
28 #define PROCESSOR_ASSET_TAG_SIZE 65
29 #define PROCESSOR_PART_NUMBER_SIZE 65
30 #define PROCESSOR_ID_SIZE 32
32 #define PROCESSOR_FLAGS_ELEMENTS 32
33 /* Intel AP-485 revision 28, table 5 */
34 extern const char *cpu_flags_strings
[PROCESSOR_FLAGS_ELEMENTS
];
36 /* this struct have PROCESSOR_FLAGS_ELEMENTS */
37 /* each bool is associated to the relevant message above */
71 } __attribute__ ((__packed__
)) s_dmi_cpu_flags
;
78 uint8_t minor_stepping
;
79 } __attribute__ ((__packed__
)) s_signature
;
82 char socket_designation
[PROCESSOR_SOCKET_DESIGNATION_SIZE
];
83 char type
[PROCESSOR_TYPE_SIZE
];
84 char family
[PROCESSOR_FAMILY_SIZE
];
85 char manufacturer
[PROCESSOR_MANUFACTURER_SIZE
];
86 char version
[PROCESSOR_VERSION_SIZE
];
88 uint16_t external_clock
;
90 uint16_t current_speed
;
91 char status
[PROCESSOR_STATUS_SIZE
];
92 char upgrade
[PROCESSOR_UPGRADE_SIZE
];
93 char cache1
[PROCESSOR_CACHE_SIZE
];
94 char cache2
[PROCESSOR_CACHE_SIZE
];
95 char cache3
[PROCESSOR_CACHE_SIZE
];
96 char serial
[PROCESSOR_SERIAL_SIZE
];
97 char asset_tag
[PROCESSOR_ASSET_TAG_SIZE
];
98 char part_number
[PROCESSOR_PART_NUMBER_SIZE
];
99 char id
[PROCESSOR_ID_SIZE
];
101 uint16_t core_enabled
;
102 uint16_t thread_count
;
103 s_dmi_cpu_flags cpu_flags
;
104 s_signature signature
;
105 /* The filled field have to be set to true when the dmitable implement that item */
109 const char *dmi_processor_type(uint8_t code
);
110 const char *dmi_processor_family(uint8_t code
, char *manufacturer
);
111 const char *dmi_processor_status(uint8_t code
);
112 const char *dmi_processor_upgrade(uint8_t code
);
113 void dmi_processor_cache(uint16_t code
, const char *level
, uint16_t ver
,