Adding upstream version 3.20.
[syslinux-debian/hramrach.git] / com32 / include / dmi / dmi_chassis.h
blob933b80b9520c4d0c9c35a59ec97ba5b424ccdd3e
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2006 Erwan Velu - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
13 #ifndef DMI_CHASSIS_H
14 #define DMI_CHASSIS_H
16 #define CHASSIS_MANUFACTURER_SIZE 32
17 #define CHASSIS_TYPE_SIZE 16
18 #define CHASSIS_LOCK_SIZE 16
19 #define CHASSIS_VERSION_SIZE 16
20 #define CHASSIS_SERIAL_SIZE 32
21 #define CHASSIS_ASSET_TAG_SIZE 32
22 #define CHASSIS_BOOT_UP_STATE_SIZE 32
23 #define CHASSIS_POWER_SUPPLY_STATE_SIZE 32
24 #define CHASSIS_THERMAL_STATE_SIZE 32
25 #define CHASSIS_SECURITY_STATUS_SIZE 32
26 #define CHASSIS_OEM_INFORMATION_SIZE 32
28 typedef struct {
29 char manufacturer[CHASSIS_MANUFACTURER_SIZE];
30 char type[CHASSIS_TYPE_SIZE];
31 char lock[CHASSIS_LOCK_SIZE];
32 char version[CHASSIS_VERSION_SIZE];
33 char serial[CHASSIS_SERIAL_SIZE];
34 char asset_tag[CHASSIS_ASSET_TAG_SIZE];
35 char boot_up_state[CHASSIS_BOOT_UP_STATE_SIZE];
36 char power_supply_state[CHASSIS_POWER_SUPPLY_STATE_SIZE];
37 char thermal_state[CHASSIS_THERMAL_STATE_SIZE];
38 char security_status[CHASSIS_SECURITY_STATUS_SIZE];
39 char oem_information[CHASSIS_OEM_INFORMATION_SIZE];
40 u16 height;
41 u16 nb_power_cords;
42 } s_chassis;
44 static const char *dmi_chassis_type(u8 code)
46 /* 3.3.4.1 */
47 static const char *type[]={
48 "Other", /* 0x01 */
49 "Unknown",
50 "Desktop",
51 "Low Profile Desktop",
52 "Pizza Box",
53 "Mini Tower",
54 "Tower",
55 "Portable",
56 "Laptop",
57 "Notebook",
58 "Hand Held",
59 "Docking Station",
60 "All In One",
61 "Sub Notebook",
62 "Space-saving",
63 "Lunch Box",
64 "Main Server Chassis", /* master.mif says System */
65 "Expansion Chassis",
66 "Sub Chassis",
67 "Bus Expansion Chassis",
68 "Peripheral Chassis",
69 "RAID Chassis",
70 "Rack Mount Chassis",
71 "Sealed-case PC",
72 "Multi-system" /* 0x19 */
75 if(code>=0x01 && code<=0x19)
76 return type[code-0x01];
77 return out_of_spec;
80 static const char *dmi_chassis_lock(u8 code)
82 static const char *lock[]={
83 "Not Present", /* 0x00 */
84 "Present" /* 0x01 */
87 return lock[code];
90 static const char *dmi_chassis_state(u8 code)
92 /* 3.3.4.2 */
93 static const char *state[]={
94 "Other", /* 0x01 */
95 "Unknown",
96 "Safe", /* master.mif says OK */
97 "Warning",
98 "Critical",
99 "Non-recoverable" /* 0x06 */
102 if(code>=0x01 && code<=0x06)
103 return(state[code-0x01]);
104 return out_of_spec;
107 static const char *dmi_chassis_security_status(u8 code)
109 /* 3.3.4.3 */
110 static const char *status[]={
111 "Other", /* 0x01 */
112 "Unknown",
113 "None",
114 "External Interface Locked Out",
115 "External Interface Enabled" /* 0x05 */
118 if(code>=0x01 && code<=0x05)
119 return(status[code-0x01]);
120 return out_of_spec;
123 #endif