Merge remote branch 'genec/rosh_for_hpa'
[profile/ivi/syslinux.git] / com32 / gplinclude / dmi / dmi_bios.h
1 /* ----------------------------------------------------------------------- *
2  *
3  *   Copyright 2006 Erwan Velu - All Rights Reserved
4  *
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.
10  *
11  * ----------------------------------------------------------------------- */
12
13 #ifndef DMI_BIOS_H
14 #define DMI_BIOS_H
15
16 #include "stdbool.h"
17 #define BIOS_VENDOR_SIZE                65
18 #define BIOS_VERSION_SIZE               65
19 #define BIOS_RELEASE_SIZE               65
20 #define BIOS_RUNTIME_SIZE_UNIT_SIZE     16
21 #define BIOS_ROM_UNIT_SIZE              16
22 #define BIOS_BIOS_REVISION_SIZE         16
23 #define BIOS_FIRMWARE_REVISION_SIZE     16
24
25 #define BIOS_CHAR_NB_ELEMENTS           28
26 #define BIOS_CHAR_X1_NB_ELEMENTS        8
27 #define BIOS_CHAR_X2_NB_ELEMENTS        3
28
29 extern const char *bios_charac_strings[];
30
31 /* this struct has BIOS_CHAR_NB_ELEMENTS */
32 /* each bool is associated with the relevant message above */
33 typedef struct {
34     bool bios_characteristics_not_supported;
35     bool isa;
36     bool mca;
37     bool eisa;
38     bool pci;
39     bool pc_card;
40     bool pnp;
41     bool apm;
42     bool bios_upgreadable;
43     bool bios_shadowing;
44     bool vlb;
45     bool escd;
46     bool boot_from_cd;
47     bool selectable_boot;
48     bool bios_rom_socketed;
49     bool edd;
50     bool japanese_floppy_nec_9800_1_2MB;
51     bool japanese_floppy_toshiba_1_2MB;
52     bool floppy_5_25_360KB;
53     bool floppy_5_25_1_2MB;
54     bool floppy_3_5_720KB;
55     bool floppy_3_5_2_88MB;
56     bool print_screen;
57     bool keyboard_8042_support;
58     bool serial_support;
59     bool printer_support;
60     bool cga_mono_support;
61     bool nec_pc_98;
62 } __attribute__ ((__packed__)) s_characteristics;
63
64 extern const char *bios_charac_x1_strings[];
65
66 /* this struct has BIOS_CHAR_X1_NB_ELEMENTS */
67 /* each bool is associated with the relevant message above */
68 typedef struct {
69     bool acpi;
70     bool usb_legacy;
71     bool agp;
72     bool i2o_boot;
73     bool ls_120_boot;
74     bool zip_drive_boot;
75     bool ieee_1394_boot;
76     bool smart_battery;
77 } __attribute__ ((__packed__)) s_characteristics_x1;
78
79 extern const char *bios_charac_x2_strings[];
80
81 /* this struct has BIOS_CHAR_X2_NB_ELEMENTS */
82 /* each bool is associated with the relevant message above */
83 typedef struct {
84     bool bios_boot_specification;
85     bool bios_network_boot_by_keypress;
86     bool target_content_distribution;
87 } __attribute__ ((__packed__)) s_characteristics_x2;
88
89 typedef struct {
90     char vendor[BIOS_VENDOR_SIZE];
91     char version[BIOS_VERSION_SIZE];
92     char release_date[BIOS_RELEASE_SIZE];
93     uint16_t address;
94     uint16_t runtime_size;
95     char runtime_size_unit[BIOS_RUNTIME_SIZE_UNIT_SIZE];
96     uint16_t rom_size;
97     char rom_size_unit[BIOS_ROM_UNIT_SIZE];
98     s_characteristics characteristics;
99     s_characteristics_x1 characteristics_x1;
100     s_characteristics_x2 characteristics_x2;
101     char bios_revision[BIOS_BIOS_REVISION_SIZE];
102     char firmware_revision[BIOS_FIRMWARE_REVISION_SIZE];
103 /* The filled field have to be set to true when the dmitable implement that item */
104     bool filled;
105 } s_bios;
106
107 #endif