2 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
6 struct smbios_entry_struct {
7 char sm_sig[4]; /* +0 */
8 uint8_t checksum; /* +4 */
9 uint8_t length; /* +5 length of this structure */
10 uint8_t major_version,minor_version; /* +6 */
11 uint16_t maximum_structure_size; /* +8 */
12 uint8_t entry_point_revision; /* +10 */
13 uint8_t formatted_area[5]; /* +11 */
14 char dmi_sig[5]; /* +16 _DMI_ */
15 uint8_t intermediate_checksum; /* +21 */
16 uint16_t structure_table_length; /* +22 */
17 uint32_t structure_table_address; /* +24 */
18 uint16_t number_of_smbios_structures; /* +28 */
19 uint8_t smbios_bcd_revision; /* +30 */
22 struct smbios_struct_entry {
24 uint16_t handle; /* +2 */
25 uint16_t total_length;
26 uint8_t type,length; /* +0 */
27 uint16_t str_ofs[256]; /* offset of string relative to entry */
31 struct smbios_bios_info {
32 uint8_t type,length; /* +0 type=0 */
33 uint16_t handle; /* +2 */
34 uint8_t vendor_str_idx; /* +4 */
35 uint8_t bios_version_str_idx; /* +5 */
36 uint16_t bios_starting_address_segment; /* +6 */
37 uint8_t bios_release_data_str_idx; /* +8 */
38 uint8_t bios_rom_size; /* +9 size = 64K*(1+n) */
39 uint64_t bios_characteristics; /* +10 */
40 uint16_t bios_characteristics_ext; /* +18 */
41 uint8_t t1,t2,t3,t4; /* +20 */
46 uint16_t b,c; /* +4 */
47 uint8_t d[8]; /* +8 */
50 struct smbios_system_info {
51 uint8_t type,length; /* +0 type=1 */
52 uint16_t handle; /* +2 */
53 uint8_t manufacturer_str_idx; /* +4 */
54 uint8_t product_name_str_idx; /* +5 */
55 uint8_t version_str_idx; /* +6 */
56 uint8_t serial_number_str_idx; /* +7 */
57 struct smbios_guid uuid; /* +8 */
58 uint8_t wake_up_type; /* +24 */
59 uint8_t sku_number_str_idx; /* +25 */
60 uint8_t family_str_idx; /* +26 */
65 SMBIOS_ACCESS_DIRECT=0, /* direct access to the struct */
66 SMBIOS_ACCESS_FLAT /* flat real mode access */
69 extern const char *smbios_access_str[];
70 #define smbios_access_to_str(x) smbios_access_str[x]
72 #if TARGET_MSDOS == 32
73 extern uint8_t *smbios_table,*smbios_table_fence;
75 extern uint32_t smbios_entry_point;
76 extern uint8_t smbios_access;
77 extern struct smbios_entry_struct smbios_entry;
79 const char *smbios_wake_up_type(uint8_t t);
80 int smbios_next_entry(uint32_t ofs,struct smbios_struct_entry *s);
81 void smbios_get_string(char *d,size_t dl,uint32_t o);
82 const char *smbios_type_to_str(uint8_t t);
83 uint8_t smbios_peek(uint32_t ofs);
86 #define SMBIOS_BIOS_CF_ISA (1ULL << 4ULL)
87 #define SMBIOS_BIOS_CF_MCA (1ULL << 5ULL)
88 #define SMBIOS_BIOS_CF_EISA (1ULL << 6ULL)
89 #define SMBIOS_BIOS_CF_PCI (1ULL << 7ULL)
90 #define SMBIOS_BIOS_CF_PCMCIA (1ULL << 8ULL)
91 #define SMBIOS_BIOS_CF_PnP (1ULL << 9ULL)
92 #define SMBIOS_BIOS_CF_APM (1ULL << 10ULL)
93 #define SMBIOS_BIOS_CF_IS_UPGRADEABLE (1ULL << 11ULL)
94 #define SMBIOS_BIOS_CF_SHADOWING_ALLOWED (1ULL << 12ULL)
95 #define SMBIOS_BIOS_CF_VL_VESA (1ULL << 13ULL)
96 #define SMBIOS_BIOS_CF_ESCD_AVAILABLE (1ULL << 14ULL)
97 #define SMBIOS_BIOS_CF_BOOT_FROM_CD (1ULL << 15ULL)
98 #define SMBIOS_BIOS_CF_SELECTABLE_BOOT (1ULL << 16ULL)
99 #define SMBIOS_BIOS_CF_BIOS_ROM_SOCKETED (1ULL << 17ULL)
100 #define SMBIOS_BIOS_CF_BOOT_FROM_PCMCIA (1ULL << 18ULL)
101 #define SMBIOS_BIOS_CF_EDD_SUPPORTED (1ULL << 19ULL)
102 #define SMBIOS_BIOS_CF_INT13_NEC_9800_FLOPPY (1ULL << 20ULL)
103 #define SMBIOS_BIOS_CF_INT13_TOSHIBA_1_2MB (1ULL << 21ULL)
104 #define SMBIOS_BIOS_CF_INT13_5_25_360KB (1ULL << 22ULL)
105 #define SMBIOS_BIOS_CF_INT13_5_25_1_2MB (1ULL << 23ULL)
106 #define SMBIOS_BIOS_CF_INT13_3_5_720KB (1ULL << 24ULL)
107 #define SMBIOS_BIOS_CF_INT13_3_5_288MB (1ULL << 25ULL)
108 #define SMBIOS_BIOS_CF_INT5_PRINT_SCREEN (1ULL << 26ULL)
109 #define SMBIOS_BIOS_CF_INT9_8042_KEYBOARD (1ULL << 27ULL)
110 #define SMBIOS_BIOS_CF_INT14_SERIAL (1ULL << 28ULL)
111 #define SMBIOS_BIOS_CF_INT17_PRINTER (1ULL << 29ULL)
112 #define SMBIOS_BIOS_CF_INT10_CGA_MONO (1ULL << 30ULL)
113 #define SMBIOS_BIOS_CF_NEC_PC98 (1ULL << 31ULL)