aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/dmi/dmi_bios.h
blob: 53201acb0f7d036b3a838884f7b3aa93ce5b63a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* ----------------------------------------------------------------------- *
 *
 *   Copyright 2006 Erwan Velu - All Rights Reserved
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
 *   Boston MA 02111-1307, USA; either version 2 of the License, or
 *   (at your option) any later version; incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

#ifndef DMI_BIOS_H
#define DMI_BIOS_H

#include "stdbool.h"
#define BIOS_VENDOR_SIZE		32
#define BIOS_VERSION_SIZE		32
#define BIOS_RELEASE_SIZE		16
#define BIOS_RUNTIME_SIZE_UNIT_SIZE	16
#define BIOS_ROM_UNIT_SIZE		16
#define BIOS_BIOS_REVISION_SIZE		16
#define BIOS_FIRMWARE_REVISION_SIZE	16

#define BIOS_CHAR_NB_ELEMENTS		28
#define BIOS_CHAR_X1_NB_ELEMENTS	8
#define BIOS_CHAR_X2_NB_ELEMENTS	3

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;

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;

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;

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];
/* The filled field have to be set to true when the dmitable implement that item */
    bool filled;
} s_bios;

#endif