2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2019 Free Software Foundation, Inc.
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.
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.
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/>.
19 #ifndef GRUB_SMBIOS_HEADER
20 #define GRUB_SMBIOS_HEADER 1
22 #include <grub/symbol.h>
23 #include <grub/types.h>
25 #define GRUB_SMBIOS_TYPE_END_OF_TABLE ((grub_uint8_t)127)
27 struct grub_smbios_ieps
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
;
37 struct grub_smbios_eps
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
;
50 struct grub_smbios_eps3
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
;
58 grub_uint8_t revision
;
59 grub_uint8_t reserved
;
60 grub_uint32_t maximum_table_length
;
61 grub_uint64_t table_address
;
64 extern struct grub_smbios_eps
*grub_machine_smbios_get_eps (void);
65 extern struct grub_smbios_eps3
*grub_machine_smbios_get_eps3 (void);
67 extern struct grub_smbios_eps
*EXPORT_FUNC (grub_smbios_get_eps
) (void);
69 #endif /* ! GRUB_SMBIOS_HEADER */