Home | History | Annotate | Download | only in dmi

Lines Matching refs:code

22  *   For the avoidance of doubt the "preferred form" of this code is one which
26 * are deemed to be part of the source code.
32 void dmi_memory_array_error_handle(uint16_t code, char *array)
34 if (code == 0xFFFE)
36 else if (code == 0xFFFF)
39 sprintf(array, "0x%04X", code);
42 void dmi_memory_device_width(uint16_t code, char *width)
48 if (code == 0xFFFF || code == 0)
51 sprintf(width, "%u bits", code);
54 void dmi_memory_device_size(uint16_t code, char *size)
56 if (code == 0)
58 else if (code == 0xFFFF)
61 if (code & 0x8000)
62 sprintf(size, "%u kB", code & 0x7FFF);
64 sprintf(size, "%u MB", code);
68 const char *dmi_memory_device_form_factor(uint8_t code)
89 if (code >= 0x01 && code <= 0x0F)
90 return form_factor[code - 0x01];
94 void dmi_memory_device_set(uint8_t code, char *set)
96 if (code == 0)
98 else if (code == 0xFF)
101 sprintf(set, "%u", code);
104 const char *dmi_memory_device_type(uint8_t code)
135 if (code >= 0x01 && code <= 0x19)
136 return type[code - 0x01];
140 void dmi_memory_device_type_detail(uint16_t code, char *type_detail, int sizeof_type_detail)
158 if ((code & 0x1FFE) == 0)
164 if (code & (1 << i))
169 void dmi_memory_device_speed(uint16_t code, char *speed)
171 if (code == 0)
174 sprintf(speed, "%u MHz", code);
181 void dmi_memory_module_types(uint16_t code, const char *sep, char *type, int sizeof_type)
198 if ((code & 0x07FF) == 0)
204 if (code & (1 << i))
209 void dmi_memory_module_connections(uint8_t code, char *connection, int sizeof_connection)
211 if (code == 0xFF)
214 if ((code & 0xF0) != 0xF0)
215 sprintf(connection, "%u ", code >> 4);
216 if ((code & 0x0F) != 0x0F)
217 snprintf(connection, sizeof_connection, "%s%u", connection, code & 0x0F);
221 void dmi_memory_module_speed(uint8_t code, char *speed)
223 if (code == 0)
226 sprintf(speed, "%u ns", code);
229 void dmi_memory_module_size(uint8_t code, char *size, int sizeof_size)
232 switch (code & 0x7F) {
243 sprintf(size, "%u MB", 1 << (code & 0x7F));
246 if (code & 0x80)
252 void dmi_memory_module_error(uint8_t code, const char *prefix, char *error)
254 if (code & (1 << 2))
257 if ((code & 0x03) == 0)
259 if (code & (1 << 0))
261 if (code & (1 << 1))