Lines Matching refs:dm
46 static const char * __init dmi_string_nosave(const struct dmi_header *dm, u8 s) in dmi_string_nosave() argument
48 const u8 *bp = ((u8 *) dm) + dm->length; in dmi_string_nosave()
66 static const char * __init dmi_string(const struct dmi_header *dm, u8 s) in dmi_string() argument
68 const char *bp = dmi_string_nosave(dm, s); in dmi_string()
102 const struct dmi_header *dm = (const struct dmi_header *)data; in dmi_decode_table() local
109 data += dm->length; in dmi_decode_table()
113 decode(dm, private_data); in dmi_decode_table()
126 if (!dmi_num && dm->type == DMI_ENTRY_END_OF_TABLE) in dmi_decode_table()
174 static void __init dmi_save_ident(const struct dmi_header *dm, int slot, in dmi_save_ident() argument
177 const char *d = (const char *) dm; in dmi_save_ident()
180 if (dmi_ident[slot] || dm->length <= string) in dmi_save_ident()
183 p = dmi_string(dm, d[string]); in dmi_save_ident()
190 static void __init dmi_save_release(const struct dmi_header *dm, int slot, in dmi_save_release() argument
197 if (dmi_ident[slot] || dm->length < index) in dmi_save_release()
200 minor = (u8 *) dm + index; in dmi_save_release()
201 major = (u8 *) dm + index - 1; in dmi_save_release()
218 static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, in dmi_save_uuid() argument
225 if (dmi_ident[slot] || dm->length < index + 16) in dmi_save_uuid()
228 d = (u8 *) dm + index; in dmi_save_uuid()
256 static void __init dmi_save_type(const struct dmi_header *dm, int slot, in dmi_save_type() argument
262 if (dmi_ident[slot] || dm->length <= index) in dmi_save_type()
269 d = (u8 *) dm + index; in dmi_save_type()
293 static void __init dmi_save_devices(const struct dmi_header *dm) in dmi_save_devices() argument
295 int i, count = (dm->length - sizeof(struct dmi_header)) / 2; in dmi_save_devices()
298 const char *d = (char *)(dm + 1) + (i * 2); in dmi_save_devices()
304 dmi_save_one_device(*d & 0x7f, dmi_string_nosave(dm, *(d + 1))); in dmi_save_devices()
308 static void __init dmi_save_oem_strings_devices(const struct dmi_header *dm) in dmi_save_oem_strings_devices() argument
313 if (dm->length < 0x05) in dmi_save_oem_strings_devices()
316 count = *(u8 *)(dm + 1); in dmi_save_oem_strings_devices()
318 const char *devname = dmi_string(dm, i); in dmi_save_oem_strings_devices()
335 static void __init dmi_save_ipmi_device(const struct dmi_header *dm) in dmi_save_ipmi_device() argument
340 data = dmi_alloc(dm->length); in dmi_save_ipmi_device()
344 memcpy(data, dm, dm->length); in dmi_save_ipmi_device()
384 static void __init dmi_save_extended_devices(const struct dmi_header *dm) in dmi_save_extended_devices() argument
387 const u8 *d = (u8 *)dm; in dmi_save_extended_devices()
389 if (dm->length < 0x0B) in dmi_save_extended_devices()
396 name = dmi_string_nosave(dm, d[0x4]); in dmi_save_extended_devices()
402 static void __init dmi_save_system_slot(const struct dmi_header *dm) in dmi_save_system_slot() argument
404 const u8 *d = (u8 *)dm; in dmi_save_system_slot()
407 if (dm->length < 0x11) in dmi_save_system_slot()
410 d[0x10], dmi_string_nosave(dm, d[0x4]), in dmi_save_system_slot()
414 static void __init count_mem_devices(const struct dmi_header *dm, void *v) in count_mem_devices() argument
416 if (dm->type != DMI_ENTRY_MEM_DEVICE) in count_mem_devices()
421 static void __init save_mem_devices(const struct dmi_header *dm, void *v) in save_mem_devices() argument
423 const char *d = (const char *)dm; in save_mem_devices()
428 if (dm->type != DMI_ENTRY_MEM_DEVICE || dm->length < 0x13) in save_mem_devices()
434 dmi_memdev[nr].handle = get_unaligned(&dm->handle); in save_mem_devices()
435 dmi_memdev[nr].device = dmi_string(dm, d[0x10]); in save_mem_devices()
436 dmi_memdev[nr].bank = dmi_string(dm, d[0x11]); in save_mem_devices()
446 else if (size != 0x7fff || dm->length < 0x20) in save_mem_devices()
469 static void __init dmi_decode(const struct dmi_header *dm, void *dummy) in dmi_decode() argument
471 switch (dm->type) { in dmi_decode()
473 dmi_save_ident(dm, DMI_BIOS_VENDOR, 4); in dmi_decode()
474 dmi_save_ident(dm, DMI_BIOS_VERSION, 5); in dmi_decode()
475 dmi_save_ident(dm, DMI_BIOS_DATE, 8); in dmi_decode()
476 dmi_save_release(dm, DMI_BIOS_RELEASE, 21); in dmi_decode()
477 dmi_save_release(dm, DMI_EC_FIRMWARE_RELEASE, 23); in dmi_decode()
480 dmi_save_ident(dm, DMI_SYS_VENDOR, 4); in dmi_decode()
481 dmi_save_ident(dm, DMI_PRODUCT_NAME, 5); in dmi_decode()
482 dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6); in dmi_decode()
483 dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7); in dmi_decode()
484 dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8); in dmi_decode()
485 dmi_save_ident(dm, DMI_PRODUCT_SKU, 25); in dmi_decode()
486 dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26); in dmi_decode()
489 dmi_save_ident(dm, DMI_BOARD_VENDOR, 4); in dmi_decode()
490 dmi_save_ident(dm, DMI_BOARD_NAME, 5); in dmi_decode()
491 dmi_save_ident(dm, DMI_BOARD_VERSION, 6); in dmi_decode()
492 dmi_save_ident(dm, DMI_BOARD_SERIAL, 7); in dmi_decode()
493 dmi_save_ident(dm, DMI_BOARD_ASSET_TAG, 8); in dmi_decode()
496 dmi_save_ident(dm, DMI_CHASSIS_VENDOR, 4); in dmi_decode()
497 dmi_save_type(dm, DMI_CHASSIS_TYPE, 5); in dmi_decode()
498 dmi_save_ident(dm, DMI_CHASSIS_VERSION, 6); in dmi_decode()
499 dmi_save_ident(dm, DMI_CHASSIS_SERIAL, 7); in dmi_decode()
500 dmi_save_ident(dm, DMI_CHASSIS_ASSET_TAG, 8); in dmi_decode()
503 dmi_save_system_slot(dm); in dmi_decode()
506 dmi_save_devices(dm); in dmi_decode()
509 dmi_save_oem_strings_devices(dm); in dmi_decode()
512 dmi_save_ipmi_device(dm); in dmi_decode()
515 dmi_save_extended_devices(dm); in dmi_decode()