~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/dmi.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __DMI_H__
  3 #define __DMI_H__
  4 
  5 #include <linux/list.h>
  6 #include <linux/kobject.h>
  7 #include <linux/mod_devicetable.h>
  8 
  9 /* enum dmi_field is in mod_devicetable.h */
 10 
 11 enum dmi_device_type {
 12         DMI_DEV_TYPE_ANY = 0,
 13         DMI_DEV_TYPE_OTHER,
 14         DMI_DEV_TYPE_UNKNOWN,
 15         DMI_DEV_TYPE_VIDEO,
 16         DMI_DEV_TYPE_SCSI,
 17         DMI_DEV_TYPE_ETHERNET,
 18         DMI_DEV_TYPE_TOKENRING,
 19         DMI_DEV_TYPE_SOUND,
 20         DMI_DEV_TYPE_PATA,
 21         DMI_DEV_TYPE_SATA,
 22         DMI_DEV_TYPE_SAS,
 23         DMI_DEV_TYPE_IPMI = -1,
 24         DMI_DEV_TYPE_OEM_STRING = -2,
 25         DMI_DEV_TYPE_DEV_ONBOARD = -3,
 26         DMI_DEV_TYPE_DEV_SLOT = -4,
 27 };
 28 
 29 enum dmi_entry_type {
 30         DMI_ENTRY_BIOS = 0,
 31         DMI_ENTRY_SYSTEM,
 32         DMI_ENTRY_BASEBOARD,
 33         DMI_ENTRY_CHASSIS,
 34         DMI_ENTRY_PROCESSOR,
 35         DMI_ENTRY_MEM_CONTROLLER,
 36         DMI_ENTRY_MEM_MODULE,
 37         DMI_ENTRY_CACHE,
 38         DMI_ENTRY_PORT_CONNECTOR,
 39         DMI_ENTRY_SYSTEM_SLOT,
 40         DMI_ENTRY_ONBOARD_DEVICE,
 41         DMI_ENTRY_OEMSTRINGS,
 42         DMI_ENTRY_SYSCONF,
 43         DMI_ENTRY_BIOS_LANG,
 44         DMI_ENTRY_GROUP_ASSOC,
 45         DMI_ENTRY_SYSTEM_EVENT_LOG,
 46         DMI_ENTRY_PHYS_MEM_ARRAY,
 47         DMI_ENTRY_MEM_DEVICE,
 48         DMI_ENTRY_32_MEM_ERROR,
 49         DMI_ENTRY_MEM_ARRAY_MAPPED_ADDR,
 50         DMI_ENTRY_MEM_DEV_MAPPED_ADDR,
 51         DMI_ENTRY_BUILTIN_POINTING_DEV,
 52         DMI_ENTRY_PORTABLE_BATTERY,
 53         DMI_ENTRY_SYSTEM_RESET,
 54         DMI_ENTRY_HW_SECURITY,
 55         DMI_ENTRY_SYSTEM_POWER_CONTROLS,
 56         DMI_ENTRY_VOLTAGE_PROBE,
 57         DMI_ENTRY_COOLING_DEV,
 58         DMI_ENTRY_TEMP_PROBE,
 59         DMI_ENTRY_ELECTRICAL_CURRENT_PROBE,
 60         DMI_ENTRY_OOB_REMOTE_ACCESS,
 61         DMI_ENTRY_BIS_ENTRY,
 62         DMI_ENTRY_SYSTEM_BOOT,
 63         DMI_ENTRY_MGMT_DEV,
 64         DMI_ENTRY_MGMT_DEV_COMPONENT,
 65         DMI_ENTRY_MGMT_DEV_THRES,
 66         DMI_ENTRY_MEM_CHANNEL,
 67         DMI_ENTRY_IPMI_DEV,
 68         DMI_ENTRY_SYS_POWER_SUPPLY,
 69         DMI_ENTRY_ADDITIONAL,
 70         DMI_ENTRY_ONBOARD_DEV_EXT,
 71         DMI_ENTRY_MGMT_CONTROLLER_HOST,
 72         DMI_ENTRY_INACTIVE = 126,
 73         DMI_ENTRY_END_OF_TABLE = 127,
 74 };
 75 
 76 struct dmi_header {
 77         u8 type;
 78         u8 length;
 79         u16 handle;
 80 } __packed;
 81 
 82 struct dmi_device {
 83         struct list_head list;
 84         int type;
 85         const char *name;
 86         void *device_data;      /* Type specific data */
 87 };
 88 
 89 #ifdef CONFIG_DMI
 90 
 91 struct dmi_dev_onboard {
 92         struct dmi_device dev;
 93         int instance;
 94         int segment;
 95         int bus;
 96         int devfn;
 97 };
 98 
 99 extern struct kobject *dmi_kobj;
100 extern int dmi_check_system(const struct dmi_system_id *list);
101 const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
102 extern const char * dmi_get_system_info(int field);
103 extern const struct dmi_device * dmi_find_device(int type, const char *name,
104         const struct dmi_device *from);
105 extern void dmi_scan_machine(void);
106 extern void dmi_memdev_walk(void);
107 extern void dmi_set_dump_stack_arch_desc(void);
108 extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp);
109 extern int dmi_name_in_vendors(const char *str);
110 extern int dmi_name_in_serial(const char *str);
111 extern int dmi_available;
112 extern int dmi_walk(void (*decode)(const struct dmi_header *, void *),
113         void *private_data);
114 extern bool dmi_match(enum dmi_field f, const char *str);
115 extern void dmi_memdev_name(u16 handle, const char **bank, const char **device);
116 
117 #else
118 
119 static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; }
120 static inline const char * dmi_get_system_info(int field) { return NULL; }
121 static inline const struct dmi_device * dmi_find_device(int type, const char *name,
122         const struct dmi_device *from) { return NULL; }
123 static inline void dmi_scan_machine(void) { return; }
124 static inline void dmi_memdev_walk(void) { }
125 static inline void dmi_set_dump_stack_arch_desc(void) { }
126 static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp)
127 {
128         if (yearp)
129                 *yearp = 0;
130         if (monthp)
131                 *monthp = 0;
132         if (dayp)
133                 *dayp = 0;
134         return false;
135 }
136 static inline int dmi_name_in_vendors(const char *s) { return 0; }
137 static inline int dmi_name_in_serial(const char *s) { return 0; }
138 #define dmi_available 0
139 static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *),
140         void *private_data) { return -ENXIO; }
141 static inline bool dmi_match(enum dmi_field f, const char *str)
142         { return false; }
143 static inline void dmi_memdev_name(u16 handle, const char **bank,
144                 const char **device) { }
145 static inline const struct dmi_system_id *
146         dmi_first_match(const struct dmi_system_id *list) { return NULL; }
147 
148 #endif
149 
150 #endif  /* __DMI_H__ */
151 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp