]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - GRUB2/MOD_SRC/grub-2.04/include/grub/smbios.h
Add missing file
[Ventoy.git] / GRUB2 / MOD_SRC / grub-2.04 / include / grub / smbios.h
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2019 Free Software Foundation, Inc.
4 *
5 * GRUB 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, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef GRUB_SMBIOS_HEADER
20 #define GRUB_SMBIOS_HEADER 1
21
22 #include <grub/symbol.h>
23 #include <grub/types.h>
24
25 #define GRUB_SMBIOS_TYPE_END_OF_TABLE ((grub_uint8_t)127)
26
27 struct grub_smbios_ieps
28 {
29 grub_uint8_t anchor[5]; /* "_DMI_" */
30 grub_uint8_t checksum;
31 grub_uint16_t table_length;
32 grub_uint32_t table_address;
33 grub_uint16_t structures;
34 grub_uint8_t revision;
35 } GRUB_PACKED;
36
37 struct grub_smbios_eps
38 {
39 grub_uint8_t anchor[4]; /* "_SM_" */
40 grub_uint8_t checksum;
41 grub_uint8_t length; /* 0x1f */
42 grub_uint8_t version_major;
43 grub_uint8_t version_minor;
44 grub_uint16_t maximum_structure_size;
45 grub_uint8_t revision;
46 grub_uint8_t formatted[5];
47 struct grub_smbios_ieps intermediate;
48 } GRUB_PACKED;
49
50 struct grub_smbios_eps3
51 {
52 grub_uint8_t anchor[5]; /* "_SM3_" */
53 grub_uint8_t checksum;
54 grub_uint8_t length; /* 0x18 */
55 grub_uint8_t version_major;
56 grub_uint8_t version_minor;
57 grub_uint8_t docrev;
58 grub_uint8_t revision;
59 grub_uint8_t reserved;
60 grub_uint32_t maximum_table_length;
61 grub_uint64_t table_address;
62 } GRUB_PACKED;
63
64 extern struct grub_smbios_eps *grub_machine_smbios_get_eps (void);
65 extern struct grub_smbios_eps3 *grub_machine_smbios_get_eps3 (void);
66
67 extern struct grub_smbios_eps *EXPORT_FUNC (grub_smbios_get_eps) (void);
68
69 #endif /* ! GRUB_SMBIOS_HEADER */