![]() Where dmi_base is address (remapped to virtual memory obviously) of DMI table, and 7 corresponds to DMI_PRODUCT_SERIAL constant. It boils down to code like this: (struct dmi_header *)(dmi_base) Product_serial is generated in dmi_save_ident() function. Just read its code to understand how it's done. ![]() So product_uuid is generated in dmi_save_uuid() function. This table is populated in dmi_decode() routine: dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7) So, product_uuid and product_serial sysfs nodes are created in drivers/firmware/dmi-id.c: DEFINE_DMI_ATTR_WITH_SHOW(product_serial, 0400, DMI_PRODUCT_SERIAL) ĭEFINE_DMI_ATTR_WITH_SHOW(product_uuid, 0400, DMI_PRODUCT_UUID) įrom DEFINE_DMI_ATTR_WITH_SHOW definition you can see that both attributes are accessed via sys_dmi_field_show() function, which in turn calls dmi_get_system_info(), which just returns corresponding element from dmi_ident array. You can find them pretty easily using git grep command (with keywords you are interested in) in your kernel source directory: $ git grep -all-match -n -e '\bdmi\b' -e product_uuid -e product_serial ![]() Those values are generated in kernel code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |