aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-04 20:23:16 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-04 21:01:32 -0700
commit0b19aba1d072ab3a2d9f528d7f0042dc8bc9e0ca (patch)
treeeb93c4db28c463d98cf520e3235e7357f870c0e8 /com32/gplinclude
parenta6b80d3e8a356a55b4365c5e402e502843bbff8c (diff)
parent8e01231be41fd889bcb71604dbda511688ed0f38 (diff)
downloadsyslinux-0b19aba1d072ab3a2d9f528d7f0042dc8bc9e0ca.tar.gz
syslinux-0b19aba1d072ab3a2d9f528d7f0042dc8bc9e0ca.tar.xz
syslinux-0b19aba1d072ab3a2d9f528d7f0042dc8bc9e0ca.zip
Merge commit 'hpa/master' into for-erwan
Conflicts: com32/cmenu/libmenu/com32io.h com32/gplinclude/dmi/dmi.h com32/gplinclude/dmi/dmi_base_board.h com32/gplinclude/dmi/dmi_memory.h com32/gplinclude/dmi/dmi_system.h com32/gpllib/dmi/dmi.c com32/gpllib/dmi/dmi_memory.c com32/include/sys/pci.h com32/lib/pci/scan.c com32/modules/Makefile Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gplinclude')
-rw-r--r--com32/gplinclude/cpuid.h226
-rw-r--r--com32/gplinclude/dmi/dmi.h45
-rw-r--r--com32/gplinclude/dmi/dmi_base_board.h40
-rw-r--r--com32/gplinclude/dmi/dmi_battery.h32
-rw-r--r--com32/gplinclude/dmi/dmi_bios.h112
-rw-r--r--com32/gplinclude/dmi/dmi_chassis.h28
-rw-r--r--com32/gplinclude/dmi/dmi_ipmi.h18
-rw-r--r--com32/gplinclude/dmi/dmi_memory.h36
-rw-r--r--com32/gplinclude/dmi/dmi_processor.h123
-rw-r--r--com32/gplinclude/dmi/dmi_system.h16
-rw-r--r--com32/gplinclude/vpd/vpd.h22
11 files changed, 347 insertions, 351 deletions
diff --git a/com32/gplinclude/cpuid.h b/com32/gplinclude/cpuid.h
index 2473b41e..95d66e99 100644
--- a/com32/gplinclude/cpuid.h
+++ b/com32/gplinclude/cpuid.h
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2006-2009 Erwan Velu - All Rights Reserved
*
* Portions of this file taken from the Linux kernel,
@@ -28,53 +28,53 @@
#define CPU_VENDOR_SIZE 48
typedef struct {
- bool fpu; /* Onboard FPU */
- bool vme; /* Virtual Mode Extensions */
- bool de; /* Debugging Extensions */
- bool pse; /* Page Size Extensions */
- bool tsc; /* Time Stamp Counter */
- bool msr; /* Model-Specific Registers, RDMSR, WRMSR */
- bool pae; /* Physical Address Extensions */
- bool mce; /* Machine Check Architecture */
- bool cx8; /* CMPXCHG8 instruction */
- bool apic;/* Onboard APIC */
- bool sep; /* SYSENTER/SYSEXIT */
- bool mtrr;/* Memory Type Range Registers */
- bool pge; /* Page Global Enable */
- bool mca; /* Machine Check Architecture */
- bool cmov;/* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
- bool pat; /* Page Attribute Table */
- bool pse_36; /* 36-bit PSEs */
- bool psn; /* Processor serial number */
- bool clflsh; /* Supports the CLFLUSH instruction */
- bool dts; /* Debug Trace Store */
- bool acpi;/* ACPI via MSR */
- bool mmx; /* Multimedia Extensions */
- bool fxsr;/* FXSAVE and FXRSTOR instructions (fast save and restore */
- /* of FPU context), and CR4.OSFXSR available */
- bool sse; /* Streaming SIMD Extensions */
- bool sse2;/* Streaming SIMD Extensions 2*/
- bool ss; /* CPU self snoop */
- bool htt; /* Hyper-Threading */
- bool acc; /* Automatic clock control */
- bool syscall; /* SYSCALL/SYSRET */
- bool mp; /* MP Capable. */
- bool nx; /* Execute Disable */
- bool mmxext; /* AMD MMX extensions */
- bool lm; /* Long Mode (x86-64) */
- bool nowext;/* AMD 3DNow! extensions */
- bool now; /* 3DNow! */
- bool smp; /* A smp configuration has been found*/
+ bool fpu; /* Onboard FPU */
+ bool vme; /* Virtual Mode Extensions */
+ bool de; /* Debugging Extensions */
+ bool pse; /* Page Size Extensions */
+ bool tsc; /* Time Stamp Counter */
+ bool msr; /* Model-Specific Registers, RDMSR, WRMSR */
+ bool pae; /* Physical Address Extensions */
+ bool mce; /* Machine Check Architecture */
+ bool cx8; /* CMPXCHG8 instruction */
+ bool apic; /* Onboard APIC */
+ bool sep; /* SYSENTER/SYSEXIT */
+ bool mtrr; /* Memory Type Range Registers */
+ bool pge; /* Page Global Enable */
+ bool mca; /* Machine Check Architecture */
+ bool cmov; /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
+ bool pat; /* Page Attribute Table */
+ bool pse_36; /* 36-bit PSEs */
+ bool psn; /* Processor serial number */
+ bool clflsh; /* Supports the CLFLUSH instruction */
+ bool dts; /* Debug Trace Store */
+ bool acpi; /* ACPI via MSR */
+ bool mmx; /* Multimedia Extensions */
+ bool fxsr; /* FXSAVE and FXRSTOR instructions (fast save and restore */
+ /* of FPU context), and CR4.OSFXSR available */
+ bool sse; /* Streaming SIMD Extensions */
+ bool sse2; /* Streaming SIMD Extensions 2 */
+ bool ss; /* CPU self snoop */
+ bool htt; /* Hyper-Threading */
+ bool acc; /* Automatic clock control */
+ bool syscall; /* SYSCALL/SYSRET */
+ bool mp; /* MP Capable. */
+ bool nx; /* Execute Disable */
+ bool mmxext; /* AMD MMX extensions */
+ bool lm; /* Long Mode (x86-64) */
+ bool nowext; /* AMD 3DNow! extensions */
+ bool now; /* 3DNow! */
+ bool smp; /* A smp configuration has been found */
} s_cpu_flags;
typedef struct {
- char vendor[CPU_VENDOR_SIZE];
- uint8_t vendor_id;
- uint8_t family;
- char model[CPU_MODEL_SIZE];
- uint8_t model_id;
- uint8_t stepping;
- s_cpu_flags flags;
+ char vendor[CPU_VENDOR_SIZE];
+ uint8_t vendor_id;
+ uint8_t family;
+ char model[CPU_MODEL_SIZE];
+ uint8_t model_id;
+ uint8_t stepping;
+ s_cpu_flags flags;
} s_cpu;
/**********************************************************************************/
@@ -86,23 +86,23 @@ typedef struct {
/*
* EFLAGS bits
*/
-#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */
-#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */
-#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */
-#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */
-#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */
-#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */
-#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */
-#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */
-#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */
-#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */
-#define X86_EFLAGS_NT 0x00004000 /* Nested Task */
-#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */
-#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
-#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */
-#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */
-#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */
-#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
+#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */
+#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */
+#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */
+#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */
+#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */
+#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */
+#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */
+#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */
+#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */
+#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */
+#define X86_EFLAGS_NT 0x00004000 /* Nested Task */
+#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */
+#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
+#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */
+#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */
+#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */
+#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
#define X86_VENDOR_INTEL 0
#define X86_VENDOR_CYRIX 1
@@ -116,9 +116,9 @@ typedef struct {
#define X86_VENDOR_NUM 9
#define X86_VENDOR_UNKNOWN 0xff
-static inline __purefunc bool test_bit(int nr, const uint32_t *addr)
+static inline __purefunc bool test_bit(int nr, const uint32_t * addr)
{
- return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
+ return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
}
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
@@ -130,55 +130,55 @@ static inline __purefunc bool test_bit(int nr, const uint32_t *addr)
*/
struct cpuinfo_x86 {
- uint8_t x86; /* CPU family */
- uint8_t x86_vendor; /* CPU vendor */
- uint8_t x86_model;
- uint8_t x86_mask;
- char wp_works_ok; /* It doesn't on 386's */
- char hlt_works_ok; /* Problems on some 486Dx4's and old 386's */
- char hard_math;
- char rfu;
- int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */
- uint32_t x86_capability[NCAPINTS];
- char x86_vendor_id[16];
- char x86_model_id[64];
- int x86_cache_size; /* in KB, if available */
- int x86_cache_alignment; /* in bytes */
- char fdiv_bug;
- char f00f_bug;
- char coma_bug;
- char pad0;
- int x86_power;
- unsigned long loops_per_jiffy;
+ uint8_t x86; /* CPU family */
+ uint8_t x86_vendor; /* CPU vendor */
+ uint8_t x86_model;
+ uint8_t x86_mask;
+ char wp_works_ok; /* It doesn't on 386's */
+ char hlt_works_ok; /* Problems on some 486Dx4's and old 386's */
+ char hard_math;
+ char rfu;
+ int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */
+ uint32_t x86_capability[NCAPINTS];
+ char x86_vendor_id[16];
+ char x86_model_id[64];
+ int x86_cache_size; /* in KB, if available */
+ int x86_cache_alignment; /* in bytes */
+ char fdiv_bug;
+ char f00f_bug;
+ char coma_bug;
+ char pad0;
+ int x86_power;
+ unsigned long loops_per_jiffy;
#ifdef CONFIG_SMP
- cpumask_t llc_shared_map; /* cpus sharing the last level cache */
+ cpumask_t llc_shared_map; /* cpus sharing the last level cache */
#endif
- unsigned char x86_max_cores; /* cpuid returned max cores value */
- unsigned char booted_cores; /* number of cores as seen by OS */
- unsigned char apicid;
- unsigned char x86_clflush_size;
+ unsigned char x86_max_cores; /* cpuid returned max cores value */
+ unsigned char booted_cores; /* number of cores as seen by OS */
+ unsigned char apicid;
+ unsigned char x86_clflush_size;
-} __attribute__((__packed__));
+} __attribute__ ((__packed__));
#endif
struct cpu_model_info {
- int vendor;
- int family;
- char *model_names[16];
+ int vendor;
+ int family;
+ char *model_names[16];
};
/* attempt to consolidate cpu attributes */
struct cpu_dev {
- char * c_vendor;
+ char *c_vendor;
- /* some have two possibilities for cpuid string */
- char * c_ident[2];
+ /* some have two possibilities for cpuid string */
+ char *c_ident[2];
- struct cpu_model_info c_models[4];
+ struct cpu_model_info c_models[4];
- void (*c_init)(struct cpuinfo_x86 * c);
- void (*c_identify)(struct cpuinfo_x86 * c);
- unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size);
+ void (*c_init) (struct cpuinfo_x86 * c);
+ void (*c_identify) (struct cpuinfo_x86 * c);
+ unsigned int (*c_size_cache) (struct cpuinfo_x86 * c, unsigned int size);
};
/*
@@ -193,20 +193,18 @@ struct cpu_dev {
#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
-struct intel_mp_floating
-{
- char mpf_signature[4]; /* "_MP_" */
- uint32_t mpf_physptr; /* Configuration table address */
- uint8_t mpf_length; /* Our length (paragraphs) */
- uint8_t mpf_specification; /* Specification version */
- uint8_t mpf_checksum; /* Checksum (makes sum 0) */
- uint8_t mpf_feature1; /* Standard or configuration ? */
- uint8_t mpf_feature2; /* Bit7 set for IMCR|PIC */
- uint8_t mpf_feature3; /* Unused (0) */
- uint8_t mpf_feature4; /* Unused (0) */
- uint8_t mpf_feature5; /* Unused (0) */
+struct intel_mp_floating {
+ char mpf_signature[4]; /* "_MP_" */
+ uint32_t mpf_physptr; /* Configuration table address */
+ uint8_t mpf_length; /* Our length (paragraphs) */
+ uint8_t mpf_specification; /* Specification version */
+ uint8_t mpf_checksum; /* Checksum (makes sum 0) */
+ uint8_t mpf_feature1; /* Standard or configuration ? */
+ uint8_t mpf_feature2; /* Bit7 set for IMCR|PIC */
+ uint8_t mpf_feature3; /* Unused (0) */
+ uint8_t mpf_feature4; /* Unused (0) */
+ uint8_t mpf_feature5; /* Unused (0) */
};
-
extern void get_cpu_vendor(struct cpuinfo_x86 *c);
-extern void detect_cpu(s_cpu *cpu);
+extern void detect_cpu(s_cpu * cpu);
diff --git a/com32/gplinclude/dmi/dmi.h b/com32/gplinclude/dmi/dmi.h
index a2274c02..def0a8ea 100644
--- a/com32/gplinclude/dmi/dmi.h
+++ b/com32/gplinclude/dmi/dmi.h
@@ -27,7 +27,7 @@ extern const char *bad_index;
#define DWORD(x) (uint32_t)(*(const uint32_t *)(x))
#define QWORD(x) (*(const uint64_t *)(x))
-enum {DMI_TABLE_PRESENT = 100, ENODMITABLE};
+enum { DMI_TABLE_PRESENT = 100, ENODMITABLE };
#include "dmi_bios.h"
#include "dmi_system.h"
@@ -43,22 +43,19 @@ extern char display_line;
#define moreprintf(...) do { display_line++; if (display_line == 24) { char tempbuf[10]; display_line=0; printf("Press enter to continue"); fgets(tempbuf, sizeof tempbuf, stdin);} printf ( __VA_ARGS__); } while (0);
typedef struct {
-uint16_t num;
-uint16_t len;
-uint16_t ver;
-uint32_t base;
-uint16_t major_version;
-uint16_t minor_version;
+ uint16_t num;
+ uint16_t len;
+ uint16_t ver;
+ uint32_t base;
+ uint16_t major_version;
+ uint16_t minor_version;
} dmi_table;
-
-
-struct dmi_header
-{
- uint8_t type;
- uint8_t length;
- uint16_t handle;
- uint8_t *data;
+struct dmi_header {
+ uint8_t type;
+ uint8_t length;
+ uint16_t handle;
+ uint8_t *data;
};
typedef struct {
@@ -86,16 +83,16 @@ typedef struct {
} hardware_security;
} s_dmi;
-void to_dmi_header(struct dmi_header *h, uint8_t *data);
-void dmi_bios_runtime_size(uint32_t code, s_dmi *dmi);
+void to_dmi_header(struct dmi_header *h, uint8_t * data);
+void dmi_bios_runtime_size(uint32_t code, s_dmi * dmi);
const char *dmi_string(struct dmi_header *dm, uint8_t s);
-int dmi_checksum(uint8_t *buf);
-void parse_dmitable(s_dmi *dmi);
-void dmi_decode(struct dmi_header *h, uint16_t ver, s_dmi *dmi);
-int dmi_iterate(s_dmi *dmi);
+int dmi_checksum(uint8_t * buf);
+void parse_dmitable(s_dmi * dmi);
+void dmi_decode(struct dmi_header *h, uint16_t ver, s_dmi * dmi);
+int dmi_iterate(s_dmi * dmi);
/* dmi_utils.c */
-void display_bios_characteristics(s_dmi *dmi);
-void display_base_board_features(s_dmi *dmi);
-void display_processor_flags(s_dmi *dmi);
+void display_bios_characteristics(s_dmi * dmi);
+void display_base_board_features(s_dmi * dmi);
+void display_processor_flags(s_dmi * dmi);
#endif
diff --git a/com32/gplinclude/dmi/dmi_base_board.h b/com32/gplinclude/dmi/dmi_base_board.h
index f12cc222..ff4dd8a9 100644
--- a/com32/gplinclude/dmi/dmi_base_board.h
+++ b/com32/gplinclude/dmi/dmi_base_board.h
@@ -30,29 +30,29 @@ extern const char *base_board_features_strings[];
/* this struct have BASE_BOARD_NB_ELEMENTS */
/* each bool is associated to the relevant message above */
typedef struct {
-bool hosting;
-bool board_needs_daughter;
-bool removable;
-bool replaceable;
-bool hot_swappable;
-} __attribute__((__packed__)) s_base_board_features;
+ bool hosting;
+ bool board_needs_daughter;
+ bool removable;
+ bool replaceable;
+ bool hot_swappable;
+} __attribute__ ((__packed__)) s_base_board_features;
typedef struct {
-char manufacturer[BASE_BOARD_MANUFACTURER_SIZE];
-char product_name[BASE_BOARD_PRODUCT_NAME_SIZE];
-char version[BASE_BOARD_VERSION_SIZE];
-char serial[BASE_BOARD_SERIAL_SIZE];
-char asset_tag[BASE_BOARD_ASSET_TAG_SIZE];
-char location[BASE_BOARD_LOCATION_SIZE];
-char type[BASE_BOARD_TYPE_SIZE];
-s_base_board_features features;
+ char manufacturer[BASE_BOARD_MANUFACTURER_SIZE];
+ char product_name[BASE_BOARD_PRODUCT_NAME_SIZE];
+ char version[BASE_BOARD_VERSION_SIZE];
+ char serial[BASE_BOARD_SERIAL_SIZE];
+ char asset_tag[BASE_BOARD_ASSET_TAG_SIZE];
+ char location[BASE_BOARD_LOCATION_SIZE];
+ char type[BASE_BOARD_TYPE_SIZE];
+ s_base_board_features features;
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
-struct {
- char type[16];
- uint8_t status;
- char description[10];
-} devices_information[10];
+ bool filled;
+ struct {
+ char type[16];
+ uint8_t status;
+ char description[10];
+ } devices_information[10];
} s_base_board;
#endif
diff --git a/com32/gplinclude/dmi/dmi_battery.h b/com32/gplinclude/dmi/dmi_battery.h
index 72c19693..fae7acb5 100644
--- a/com32/gplinclude/dmi/dmi_battery.h
+++ b/com32/gplinclude/dmi/dmi_battery.h
@@ -32,26 +32,26 @@
#define BATTERY_OEM_INFO_SIZE 255
typedef struct {
-char location[BATTERY_LOCATION_SIZE];
-char manufacturer[BATTERY_MANUFACTURER_SIZE];
-char manufacture_date[BATTERY_MANUFACTURE_DATE_SIZE];
-char serial[BATTERY_SERIAL_SIZE];
-char name[BATTERY_DEVICE_NAME_SIZE];
-char chemistry[BATTERY_CHEMISTRY_SIZE];
-char design_capacity[BATTERY_CAPACITY_SIZE];
-char design_voltage[BATTERY_DESIGN_VOLTAGE_SIZE];
-char sbds[BATTERY_SBDS_SIZE];
-char sbds_serial[BATTERY_SBDS_SERIAL_SIZE];
-char maximum_error[BATTERY_MAXIMUM_ERROR_SIZE];
-char sbds_manufacture_date[BATTERY_SBDS_MANUFACTURE_DATE_SIZE];
-char sbds_chemistry[BATTERY_SBDS_CHEMISTRY_SIZE];
-char oem_info[BATTERY_OEM_INFO_SIZE];
+ char location[BATTERY_LOCATION_SIZE];
+ char manufacturer[BATTERY_MANUFACTURER_SIZE];
+ char manufacture_date[BATTERY_MANUFACTURE_DATE_SIZE];
+ char serial[BATTERY_SERIAL_SIZE];
+ char name[BATTERY_DEVICE_NAME_SIZE];
+ char chemistry[BATTERY_CHEMISTRY_SIZE];
+ char design_capacity[BATTERY_CAPACITY_SIZE];
+ char design_voltage[BATTERY_DESIGN_VOLTAGE_SIZE];
+ char sbds[BATTERY_SBDS_SIZE];
+ char sbds_serial[BATTERY_SBDS_SERIAL_SIZE];
+ char maximum_error[BATTERY_MAXIMUM_ERROR_SIZE];
+ char sbds_manufacture_date[BATTERY_SBDS_MANUFACTURE_DATE_SIZE];
+ char sbds_chemistry[BATTERY_SBDS_CHEMISTRY_SIZE];
+ char oem_info[BATTERY_OEM_INFO_SIZE];
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
+ bool filled;
} s_battery;
const char *dmi_battery_chemistry(uint8_t code);
-void dmi_battery_capacity(uint16_t code, uint8_t multiplier,char *capacity);
+void dmi_battery_capacity(uint16_t code, uint8_t multiplier, char *capacity);
void dmi_battery_voltage(uint16_t code, char *voltage);
void dmi_battery_maximum_error(uint8_t code, char *error);
#endif
diff --git a/com32/gplinclude/dmi/dmi_bios.h b/com32/gplinclude/dmi/dmi_bios.h
index 546bbefc..53201acb 100644
--- a/com32/gplinclude/dmi/dmi_bios.h
+++ b/com32/gplinclude/dmi/dmi_bios.h
@@ -31,77 +31,77 @@ extern const char *bios_charac_strings[];
/* this struct has BIOS_CHAR_NB_ELEMENTS */
/* each bool is associated with the relevant message above */
typedef struct {
-bool bios_characteristics_not_supported;
-bool isa;
-bool mca;
-bool eisa;
-bool pci;
-bool pc_card;
-bool pnp;
-bool apm;
-bool bios_upgreadable;
-bool bios_shadowing;
-bool vlb;
-bool escd;
-bool boot_from_cd;
-bool selectable_boot;
-bool bios_rom_socketed;
-bool edd;
-bool japanese_floppy_nec_9800_1_2MB;
-bool japanese_floppy_toshiba_1_2MB;
-bool floppy_5_25_360KB;
-bool floppy_5_25_1_2MB;
-bool floppy_3_5_720KB;
-bool floppy_3_5_2_88MB;
-bool print_screen;
-bool keyboard_8042_support;
-bool serial_support;
-bool printer_support;
-bool cga_mono_support;
-bool nec_pc_98;
-} __attribute__((__packed__)) s_characteristics;
+ bool bios_characteristics_not_supported;
+ bool isa;
+ bool mca;
+ bool eisa;
+ bool pci;
+ bool pc_card;
+ bool pnp;
+ bool apm;
+ bool bios_upgreadable;
+ bool bios_shadowing;
+ bool vlb;
+ bool escd;
+ bool boot_from_cd;
+ bool selectable_boot;
+ bool bios_rom_socketed;
+ bool edd;
+ bool japanese_floppy_nec_9800_1_2MB;
+ bool japanese_floppy_toshiba_1_2MB;
+ bool floppy_5_25_360KB;
+ bool floppy_5_25_1_2MB;
+ bool floppy_3_5_720KB;
+ bool floppy_3_5_2_88MB;
+ bool print_screen;
+ bool keyboard_8042_support;
+ bool serial_support;
+ bool printer_support;
+ bool cga_mono_support;
+ bool nec_pc_98;
+} __attribute__ ((__packed__)) s_characteristics;
extern const char *bios_charac_x1_strings[];
/* this struct has BIOS_CHAR_X1_NB_ELEMENTS */
/* each bool is associated with the relevant message above */
typedef struct {
-bool acpi;
-bool usb_legacy;
-bool agp;
-bool i2o_boot;
-bool ls_120_boot;
-bool zip_drive_boot;
-bool ieee_1394_boot;
-bool smart_battery;
-} __attribute__((__packed__)) s_characteristics_x1;
+ bool acpi;
+ bool usb_legacy;
+ bool agp;
+ bool i2o_boot;
+ bool ls_120_boot;
+ bool zip_drive_boot;
+ bool ieee_1394_boot;
+ bool smart_battery;
+} __attribute__ ((__packed__)) s_characteristics_x1;
extern const char *bios_charac_x2_strings[];
/* this struct has BIOS_CHAR_X2_NB_ELEMENTS */
/* each bool is associated with the relevant message above */
typedef struct {
-bool bios_boot_specification;
-bool bios_network_boot_by_keypress;
-bool target_content_distribution;
-} __attribute__((__packed__)) s_characteristics_x2;
+ bool bios_boot_specification;
+ bool bios_network_boot_by_keypress;
+ bool target_content_distribution;
+} __attribute__ ((__packed__)) s_characteristics_x2;
typedef struct {
-char vendor[BIOS_VENDOR_SIZE];
-char version[BIOS_VERSION_SIZE];
-char release_date[BIOS_RELEASE_SIZE];
-uint16_t address;
-uint16_t runtime_size;
-char runtime_size_unit[BIOS_RUNTIME_SIZE_UNIT_SIZE];
-uint16_t rom_size;
-char rom_size_unit[BIOS_ROM_UNIT_SIZE];
-s_characteristics characteristics;
-s_characteristics_x1 characteristics_x1;
-s_characteristics_x2 characteristics_x2;
-char bios_revision [BIOS_BIOS_REVISION_SIZE];
-char firmware_revision [BIOS_FIRMWARE_REVISION_SIZE];
+ char vendor[BIOS_VENDOR_SIZE];
+ char version[BIOS_VERSION_SIZE];
+ char release_date[BIOS_RELEASE_SIZE];
+ uint16_t address;
+ uint16_t runtime_size;
+ char runtime_size_unit[BIOS_RUNTIME_SIZE_UNIT_SIZE];
+ uint16_t rom_size;
+ char rom_size_unit[BIOS_ROM_UNIT_SIZE];
+ s_characteristics characteristics;
+ s_characteristics_x1 characteristics_x1;
+ s_characteristics_x2 characteristics_x2;
+ char bios_revision[BIOS_BIOS_REVISION_SIZE];
+ char firmware_revision[BIOS_FIRMWARE_REVISION_SIZE];
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
+ bool filled;
} s_bios;
#endif
diff --git a/com32/gplinclude/dmi/dmi_chassis.h b/com32/gplinclude/dmi/dmi_chassis.h
index 96711ed4..88433ea1 100644
--- a/com32/gplinclude/dmi/dmi_chassis.h
+++ b/com32/gplinclude/dmi/dmi_chassis.h
@@ -26,21 +26,21 @@
#define CHASSIS_OEM_INFORMATION_SIZE 32
typedef struct {
-char manufacturer[CHASSIS_MANUFACTURER_SIZE];
-char type[CHASSIS_TYPE_SIZE];
-char lock[CHASSIS_LOCK_SIZE];
-char version[CHASSIS_VERSION_SIZE];
-char serial[CHASSIS_SERIAL_SIZE];
-char asset_tag[CHASSIS_ASSET_TAG_SIZE];
-char boot_up_state[CHASSIS_BOOT_UP_STATE_SIZE];
-char power_supply_state[CHASSIS_POWER_SUPPLY_STATE_SIZE];
-char thermal_state[CHASSIS_THERMAL_STATE_SIZE];
-char security_status[CHASSIS_SECURITY_STATUS_SIZE];
-char oem_information[CHASSIS_OEM_INFORMATION_SIZE];
-uint16_t height;
-uint16_t nb_power_cords;
+ char manufacturer[CHASSIS_MANUFACTURER_SIZE];
+ char type[CHASSIS_TYPE_SIZE];
+ char lock[CHASSIS_LOCK_SIZE];
+ char version[CHASSIS_VERSION_SIZE];
+ char serial[CHASSIS_SERIAL_SIZE];
+ char asset_tag[CHASSIS_ASSET_TAG_SIZE];
+ char boot_up_state[CHASSIS_BOOT_UP_STATE_SIZE];
+ char power_supply_state[CHASSIS_POWER_SUPPLY_STATE_SIZE];
+ char thermal_state[CHASSIS_THERMAL_STATE_SIZE];
+ char security_status[CHASSIS_SECURITY_STATUS_SIZE];
+ char oem_information[CHASSIS_OEM_INFORMATION_SIZE];
+ uint16_t height;
+ uint16_t nb_power_cords;
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
+ bool filled;
} s_chassis;
const char *dmi_chassis_type(uint8_t code);
diff --git a/com32/gplinclude/dmi/dmi_ipmi.h b/com32/gplinclude/dmi/dmi_ipmi.h
index 7dcb71b9..9110ae4f 100644
--- a/com32/gplinclude/dmi/dmi_ipmi.h
+++ b/com32/gplinclude/dmi/dmi_ipmi.h
@@ -17,17 +17,17 @@
#define IPMI_MEMORY_MODEL_SIZE 16
typedef struct {
-char interface_type[IPMI_INTERFACE_TYPE_SIZE];
-uint8_t major_specification_version;
-uint8_t minor_specification_version;
-uint8_t I2C_slave_address;
-uint16_t nv_address;
-uint64_t base_address;
+ char interface_type[IPMI_INTERFACE_TYPE_SIZE];
+ uint8_t major_specification_version;
+ uint8_t minor_specification_version;
+ uint8_t I2C_slave_address;
+ uint16_t nv_address;
+ uint64_t base_address;
-uint8_t irq;
-bool filled;
+ uint8_t irq;
+ bool filled;
} s_ipmi;
-void dmi_ipmi_base_address(uint8_t type, const uint8_t *p, s_ipmi *ipmi);
+void dmi_ipmi_base_address(uint8_t type, const uint8_t * p, s_ipmi * ipmi);
const char *dmi_ipmi_interface_type(uint8_t code);
#endif
diff --git a/com32/gplinclude/dmi/dmi_memory.h b/com32/gplinclude/dmi/dmi_memory.h
index 6939cd00..f9c2b561 100644
--- a/com32/gplinclude/dmi/dmi_memory.h
+++ b/com32/gplinclude/dmi/dmi_memory.h
@@ -30,23 +30,23 @@
#define MEMORY_PART_NUMBER_SIZE 16
typedef struct {
-char manufacturer[MEMORY_MANUFACTURER_SIZE];
-char error[MEMORY_ERROR_SIZE];
-char total_width[MEMORY_TOTAL_WIDTH_SIZE];
-char data_width[MEMORY_DATA_WIDTH_SIZE];
-char size[MEMORY_SIZE_SIZE];
-char form_factor[MEMORY_FORM_FACTOR_SIZE];
-char device_set[MEMORY_DEVICE_SET_SIZE];
-char device_locator[MEMORY_DEVICE_LOCATOR_SIZE];
-char bank_locator[MEMORY_BANK_LOCATOR_SIZE];
-char type[MEMORY_TYPE_SIZE];
-char type_detail[MEMORY_TYPE_DETAIL_SIZE];
-char speed[MEMORY_SPEED_SIZE];
-char serial[MEMORY_SERIAL_SIZE];
-char asset_tag[MEMORY_ASSET_TAG_SIZE];
-char part_number[MEMORY_PART_NUMBER_SIZE];
+ char manufacturer[MEMORY_MANUFACTURER_SIZE];
+ char error[MEMORY_ERROR_SIZE];
+ char total_width[MEMORY_TOTAL_WIDTH_SIZE];
+ char data_width[MEMORY_DATA_WIDTH_SIZE];
+ char size[MEMORY_SIZE_SIZE];
+ char form_factor[MEMORY_FORM_FACTOR_SIZE];
+ char device_set[MEMORY_DEVICE_SET_SIZE];
+ char device_locator[MEMORY_DEVICE_LOCATOR_SIZE];
+ char bank_locator[MEMORY_BANK_LOCATOR_SIZE];
+ char type[MEMORY_TYPE_SIZE];
+ char type_detail[MEMORY_TYPE_DETAIL_SIZE];
+ char speed[MEMORY_SPEED_SIZE];
+ char serial[MEMORY_SERIAL_SIZE];
+ char asset_tag[MEMORY_ASSET_TAG_SIZE];
+ char part_number[MEMORY_PART_NUMBER_SIZE];
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
+ bool filled;
} s_memory;
typedef struct {
@@ -60,13 +60,13 @@ char error_status[8];
bool filled;
} s_memory_module;
-void dmi_memory_array_error_handle(uint16_t code,char *array);
+void dmi_memory_array_error_handle(uint16_t code, char *array);
void dmi_memory_device_width(uint16_t code, char *width);
void dmi_memory_device_size(uint16_t code, char *size);
const char *dmi_memory_device_form_factor(uint8_t code);
void dmi_memory_device_set(uint8_t code, char *set);
const char *dmi_memory_device_type(uint8_t code);
-void dmi_memory_device_type_detail(uint16_t code,char *type_detail);
+void dmi_memory_device_type_detail(uint16_t code, char *type_detail);
void dmi_memory_device_speed(uint16_t code, char *speed);
void dmi_memory_module_connections(uint8_t, char*);
diff --git a/com32/gplinclude/dmi/dmi_processor.h b/com32/gplinclude/dmi/dmi_processor.h
index 79ee43d4..de2f4e4f 100644
--- a/com32/gplinclude/dmi/dmi_processor.h
+++ b/com32/gplinclude/dmi/dmi_processor.h
@@ -36,76 +36,77 @@ extern const char *cpu_flags_strings[PROCESSOR_FLAGS_ELEMENTS];
/* this struct have PROCESSOR_FLAGS_ELEMENTS */
/* each bool is associated to the relevant message above */
typedef struct {
-bool fpu;
-bool vme;
-bool de;
-bool pse;
-bool tsc;
-bool msr;
-bool pae;
-bool mce;
-bool cx8;
-bool apic;
-bool null_10;
-bool sep;
-bool mtrr;
-bool pge;
-bool mca;
-bool cmov;
-bool pat;
-bool pse_36;
-bool psn;
-bool clfsh;
-bool null_20;
-bool ds;
-bool acpi;
-bool mmx;
-bool fxsr;
-bool sse;
-bool sse2;
-bool ss;
-bool htt;
-bool tm;
-bool null_30;
-bool pbe;
-} __attribute__((__packed__)) s_dmi_cpu_flags;
+ bool fpu;
+ bool vme;
+ bool de;
+ bool pse;
+ bool tsc;
+ bool msr;
+ bool pae;
+ bool mce;
+ bool cx8;
+ bool apic;
+ bool null_10;
+ bool sep;
+ bool mtrr;
+ bool pge;
+ bool mca;
+ bool cmov;
+ bool pat;
+ bool pse_36;
+ bool psn;
+ bool clfsh;
+ bool null_20;
+ bool ds;
+ bool acpi;
+ bool mmx;
+ bool fxsr;
+ bool sse;
+ bool sse2;
+ bool ss;
+ bool htt;
+ bool tm;
+ bool null_30;
+ bool pbe;
+} __attribute__ ((__packed__)) s_dmi_cpu_flags;
typedef struct {
-uint8_t type;
-uint8_t family;
-uint8_t model;
-uint8_t stepping;
-uint8_t minor_stepping;
-} __attribute__((__packed__)) s_signature;
+ uint8_t type;
+ uint8_t family;
+ uint8_t model;
+ uint8_t stepping;
+ uint8_t minor_stepping;
+} __attribute__ ((__packed__)) s_signature;
typedef struct {
-char socket_designation[PROCESSOR_SOCKET_DESIGNATION_SIZE];
-char type[PROCESSOR_TYPE_SIZE];
-char family[PROCESSOR_FAMILY_SIZE];
-char manufacturer[PROCESSOR_MANUFACTURER_SIZE];
-char version[PROCESSOR_VERSION_SIZE];
-float voltage;
-uint16_t external_clock;
-uint16_t max_speed;
-uint16_t current_speed;
-char status[PROCESSOR_STATUS_SIZE];
-char upgrade[PROCESSOR_UPGRADE_SIZE];
-char cache1[PROCESSOR_CACHE_SIZE];
-char cache2[PROCESSOR_CACHE_SIZE];
-char cache3[PROCESSOR_CACHE_SIZE];
-char serial[PROCESSOR_SERIAL_SIZE];
-char asset_tag[PROCESSOR_ASSET_TAG_SIZE];
-char part_number[PROCESSOR_PART_NUMBER_SIZE];
-char id[PROCESSOR_ID_SIZE];
-s_dmi_cpu_flags cpu_flags;
-s_signature signature;
+ char socket_designation[PROCESSOR_SOCKET_DESIGNATION_SIZE];
+ char type[PROCESSOR_TYPE_SIZE];
+ char family[PROCESSOR_FAMILY_SIZE];
+ char manufacturer[PROCESSOR_MANUFACTURER_SIZE];
+ char version[PROCESSOR_VERSION_SIZE];
+ float voltage;
+ uint16_t external_clock;
+ uint16_t max_speed;
+ uint16_t current_speed;
+ char status[PROCESSOR_STATUS_SIZE];
+ char upgrade[PROCESSOR_UPGRADE_SIZE];
+ char cache1[PROCESSOR_CACHE_SIZE];
+ char cache2[PROCESSOR_CACHE_SIZE];
+ char cache3[PROCESSOR_CACHE_SIZE];
+ char serial[PROCESSOR_SERIAL_SIZE];
+ char asset_tag[PROCESSOR_ASSET_TAG_SIZE];
+ char part_number[PROCESSOR_PART_NUMBER_SIZE];
+ char id[PROCESSOR_ID_SIZE];
+ s_dmi_cpu_flags cpu_flags;
+ s_signature signature;
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
+ bool filled;
} s_processor;
const char *dmi_processor_type(uint8_t code);
const char *dmi_processor_family(uint8_t code, char *manufacturer);
const char *dmi_processor_status(uint8_t code);
const char *dmi_processor_upgrade(uint8_t code);
-void dmi_processor_cache(uint16_t code, const char *level, uint16_t ver, char *cache);
+void dmi_processor_cache(uint16_t code, const char *level, uint16_t ver,
+ char *cache);
#endif
diff --git a/com32/gplinclude/dmi/dmi_system.h b/com32/gplinclude/dmi/dmi_system.h
index 218fa4f9..28a562de 100644
--- a/com32/gplinclude/dmi/dmi_system.h
+++ b/com32/gplinclude/dmi/dmi_system.h
@@ -26,14 +26,14 @@
#define SYSTEM_CONFIGURATION_OPTIONS_SIZE 50
typedef struct {
-char manufacturer[SYSTEM_MANUFACTURER_SIZE];
-char product_name[SYSTEM_PRODUCT_NAME_SIZE];
-char version[SYSTEM_VERSION_SIZE];
-char serial[SYSTEM_SERIAL_SIZE];
-char uuid[SYSTEM_UUID_SIZE];
-char wakeup_type[SYSTEM_WAKEUP_TYPE_SIZE];
-char sku_number[SYSTEM_SKU_NUMBER_SIZE];
-char family[SYSTEM_FAMILY_SIZE];
+ char manufacturer[SYSTEM_MANUFACTURER_SIZE];
+ char product_name[SYSTEM_PRODUCT_NAME_SIZE];
+ char version[SYSTEM_VERSION_SIZE];
+ char serial[SYSTEM_SERIAL_SIZE];
+ char uuid[SYSTEM_UUID_SIZE];
+ char wakeup_type[SYSTEM_WAKEUP_TYPE_SIZE];
+ char sku_number[SYSTEM_SKU_NUMBER_SIZE];
+ char family[SYSTEM_FAMILY_SIZE];
/* The filled field have to be set to true when the dmitable implement that item */
bool filled;
char system_boot_status[SYSTEM_BOOT_STATUS_SIZE];
diff --git a/com32/gplinclude/vpd/vpd.h b/com32/gplinclude/vpd/vpd.h
index 4bb1afc9..f1dcec68 100644
--- a/com32/gplinclude/vpd/vpd.h
+++ b/com32/gplinclude/vpd/vpd.h
@@ -15,19 +15,19 @@
#include <inttypes.h>
#include <stdbool.h>
-enum {VPD_TABLE_PRESENT = 100, ENOVPDTABLE};
+enum { VPD_TABLE_PRESENT = 100, ENOVPDTABLE };
typedef struct {
- char bios_build_id[10];
- char box_serial_number[8];
- char motherboard_serial_number[12];
- char machine_type_model[8];
- char bios_release_date[9];
- char default_flash_filename[13];
- char bios_version[255];
- char base_address[6];
- bool filled;
+ char bios_build_id[10];
+ char box_serial_number[8];
+ char motherboard_serial_number[12];
+ char machine_type_model[8];
+ char bios_release_date[9];
+ char default_flash_filename[13];
+ char bios_version[255];
+ char base_address[6];
+ bool filled;
} s_vpd;
-int vpd_decode(s_vpd *vpd);
+int vpd_decode(s_vpd * vpd);
#endif