Lines Matching full:dm
47 static const char * __init dmi_string_nosave(const struct dmi_header *dm, u8 s) in dmi_string_nosave() argument
49 const u8 *bp = ((u8 *) dm) + dm->length; in dmi_string_nosave()
67 static const char * __init dmi_string(const struct dmi_header *dm, u8 s) in dmi_string() argument
69 const char *bp = dmi_string_nosave(dm, s); in dmi_string()
103 const struct dmi_header *dm = (const struct dmi_header *)data; in dmi_decode_table() local
109 if (dm->length < sizeof(struct dmi_header)) { in dmi_decode_table()
121 data += dm->length; in dmi_decode_table()
125 decode(dm, private_data); in dmi_decode_table()
138 if (!dmi_num && dm->type == DMI_ENTRY_END_OF_TABLE) in dmi_decode_table()
186 static void __init dmi_save_ident(const struct dmi_header *dm, int slot, in dmi_save_ident() argument
189 const char *d = (const char *) dm; in dmi_save_ident()
192 if (dmi_ident[slot] || dm->length <= string) in dmi_save_ident()
195 p = dmi_string(dm, d[string]); in dmi_save_ident()
202 static void __init dmi_save_release(const struct dmi_header *dm, int slot, in dmi_save_release() argument
209 if (dmi_ident[slot] || dm->length < index) in dmi_save_release()
212 minor = (u8 *) dm + index; in dmi_save_release()
213 major = (u8 *) dm + index - 1; in dmi_save_release()
230 static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, in dmi_save_uuid() argument
237 if (dmi_ident[slot] || dm->length < index + 16) in dmi_save_uuid()
240 d = (u8 *) dm + index; in dmi_save_uuid()
268 static void __init dmi_save_type(const struct dmi_header *dm, int slot, in dmi_save_type() argument
274 if (dmi_ident[slot] || dm->length <= index) in dmi_save_type()
281 d = (u8 *) dm + index; in dmi_save_type()
305 static void __init dmi_save_devices(const struct dmi_header *dm) in dmi_save_devices() argument
307 int i, count = (dm->length - sizeof(struct dmi_header)) / 2; in dmi_save_devices()
310 const char *d = (char *)(dm + 1) + (i * 2); in dmi_save_devices()
316 dmi_save_one_device(*d & 0x7f, dmi_string_nosave(dm, *(d + 1))); in dmi_save_devices()
320 static void __init dmi_save_oem_strings_devices(const struct dmi_header *dm) in dmi_save_oem_strings_devices() argument
325 if (dm->length < 0x05) in dmi_save_oem_strings_devices()
328 count = *(u8 *)(dm + 1); in dmi_save_oem_strings_devices()
330 const char *devname = dmi_string(dm, i); in dmi_save_oem_strings_devices()
347 static void __init dmi_save_ipmi_device(const struct dmi_header *dm) in dmi_save_ipmi_device() argument
352 data = dmi_alloc(dm->length); in dmi_save_ipmi_device()
356 memcpy(data, dm, dm->length); in dmi_save_ipmi_device()
396 static void __init dmi_save_extended_devices(const struct dmi_header *dm) in dmi_save_extended_devices() argument
399 const u8 *d = (u8 *)dm; in dmi_save_extended_devices()
401 if (dm->length < 0x0B) in dmi_save_extended_devices()
408 name = dmi_string_nosave(dm, d[0x4]); in dmi_save_extended_devices()
414 static void __init dmi_save_system_slot(const struct dmi_header *dm) in dmi_save_system_slot() argument
416 const u8 *d = (u8 *)dm; in dmi_save_system_slot()
419 if (dm->length < 0x11) in dmi_save_system_slot()
422 d[0x10], dmi_string_nosave(dm, d[0x4]), in dmi_save_system_slot()
426 static void __init count_mem_devices(const struct dmi_header *dm, void *v) in count_mem_devices() argument
428 if (dm->type != DMI_ENTRY_MEM_DEVICE) in count_mem_devices()
433 static void __init save_mem_devices(const struct dmi_header *dm, void *v) in save_mem_devices() argument
435 const char *d = (const char *)dm; in save_mem_devices()
440 if (dm->type != DMI_ENTRY_MEM_DEVICE || dm->length < 0x13) in save_mem_devices()
446 dmi_memdev[nr].handle = get_unaligned(&dm->handle); in save_mem_devices()
447 dmi_memdev[nr].device = dmi_string(dm, d[0x10]); in save_mem_devices()
448 dmi_memdev[nr].bank = dmi_string(dm, d[0x11]); in save_mem_devices()
458 else if (size != 0x7fff || dm->length < 0x20) in save_mem_devices()
484 static void __init dmi_decode(const struct dmi_header *dm, void *dummy) in dmi_decode() argument
486 switch (dm->type) { in dmi_decode()
488 dmi_save_ident(dm, DMI_BIOS_VENDOR, 4); in dmi_decode()
489 dmi_save_ident(dm, DMI_BIOS_VERSION, 5); in dmi_decode()
490 dmi_save_ident(dm, DMI_BIOS_DATE, 8); in dmi_decode()
491 dmi_save_release(dm, DMI_BIOS_RELEASE, 21); in dmi_decode()
492 dmi_save_release(dm, DMI_EC_FIRMWARE_RELEASE, 23); in dmi_decode()
495 dmi_save_ident(dm, DMI_SYS_VENDOR, 4); in dmi_decode()
496 dmi_save_ident(dm, DMI_PRODUCT_NAME, 5); in dmi_decode()
497 dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6); in dmi_decode()
498 dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7); in dmi_decode()
499 dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8); in dmi_decode()
500 dmi_save_ident(dm, DMI_PRODUCT_SKU, 25); in dmi_decode()
501 dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26); in dmi_decode()
504 dmi_save_ident(dm, DMI_BOARD_VENDOR, 4); in dmi_decode()
505 dmi_save_ident(dm, DMI_BOARD_NAME, 5); in dmi_decode()
506 dmi_save_ident(dm, DMI_BOARD_VERSION, 6); in dmi_decode()
507 dmi_save_ident(dm, DMI_BOARD_SERIAL, 7); in dmi_decode()
508 dmi_save_ident(dm, DMI_BOARD_ASSET_TAG, 8); in dmi_decode()
511 dmi_save_ident(dm, DMI_CHASSIS_VENDOR, 4); in dmi_decode()
512 dmi_save_type(dm, DMI_CHASSIS_TYPE, 5); in dmi_decode()
513 dmi_save_ident(dm, DMI_CHASSIS_VERSION, 6); in dmi_decode()
514 dmi_save_ident(dm, DMI_CHASSIS_SERIAL, 7); in dmi_decode()
515 dmi_save_ident(dm, DMI_CHASSIS_ASSET_TAG, 8); in dmi_decode()
518 dmi_save_system_slot(dm); in dmi_decode()
521 dmi_save_devices(dm); in dmi_decode()
524 dmi_save_oem_strings_devices(dm); in dmi_decode()
527 dmi_save_ipmi_device(dm); in dmi_decode()
530 dmi_save_extended_devices(dm); in dmi_decode()