xref: /freebsd/sys/dev/smbios/smbios.h (revision d0673fe160b04f8162f380926d455dfb966f08fb)
1*d0673fe1SAllan Jude /*-
2*d0673fe1SAllan Jude  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3*d0673fe1SAllan Jude  *
4*d0673fe1SAllan Jude  * Copyright (c) 1997 Michael Smith
5*d0673fe1SAllan Jude  * Copyright (c) 1998 Jonathan Lemon
6*d0673fe1SAllan Jude  * All rights reserved.
7*d0673fe1SAllan Jude  *
8*d0673fe1SAllan Jude  * Redistribution and use in source and binary forms, with or without
9*d0673fe1SAllan Jude  * modification, are permitted provided that the following conditions
10*d0673fe1SAllan Jude  * are met:
11*d0673fe1SAllan Jude  * 1. Redistributions of source code must retain the above copyright
12*d0673fe1SAllan Jude  *    notice, this list of conditions and the following disclaimer.
13*d0673fe1SAllan Jude  * 2. Redistributions in binary form must reproduce the above copyright
14*d0673fe1SAllan Jude  *    notice, this list of conditions and the following disclaimer in the
15*d0673fe1SAllan Jude  *    documentation and/or other materials provided with the distribution.
16*d0673fe1SAllan Jude  *
17*d0673fe1SAllan Jude  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18*d0673fe1SAllan Jude  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*d0673fe1SAllan Jude  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*d0673fe1SAllan Jude  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21*d0673fe1SAllan Jude  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*d0673fe1SAllan Jude  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*d0673fe1SAllan Jude  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*d0673fe1SAllan Jude  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*d0673fe1SAllan Jude  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*d0673fe1SAllan Jude  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*d0673fe1SAllan Jude  * SUCH DAMAGE.
28*d0673fe1SAllan Jude  *
29*d0673fe1SAllan Jude  * $FreeBSD$
30*d0673fe1SAllan Jude  */
31*d0673fe1SAllan Jude 
32*d0673fe1SAllan Jude #ifndef _SMBIOS_H_
33*d0673fe1SAllan Jude #define _SMBIOS_H_
34*d0673fe1SAllan Jude 
35*d0673fe1SAllan Jude /*
36*d0673fe1SAllan Jude  * System Management BIOS
37*d0673fe1SAllan Jude  */
38*d0673fe1SAllan Jude #define	SMBIOS_START	0xf0000
39*d0673fe1SAllan Jude #define	SMBIOS_STEP	0x10
40*d0673fe1SAllan Jude #define	SMBIOS_OFF	0
41*d0673fe1SAllan Jude #define	SMBIOS_LEN	4
42*d0673fe1SAllan Jude #define	SMBIOS_SIG	"_SM_"
43*d0673fe1SAllan Jude 
44*d0673fe1SAllan Jude struct smbios_eps {
45*d0673fe1SAllan Jude 	uint8_t		anchor_string[4];		/* '_SM_' */
46*d0673fe1SAllan Jude 	uint8_t		checksum;
47*d0673fe1SAllan Jude 	uint8_t		length;
48*d0673fe1SAllan Jude 	uint8_t		major_version;
49*d0673fe1SAllan Jude 	uint8_t		minor_version;
50*d0673fe1SAllan Jude 	uint16_t	maximum_structure_size;
51*d0673fe1SAllan Jude 	uint8_t		entry_point_revision;
52*d0673fe1SAllan Jude 	uint8_t		formatted_area[5];
53*d0673fe1SAllan Jude 	uint8_t		intermediate_anchor_string[5];	/* '_DMI_' */
54*d0673fe1SAllan Jude 	uint8_t		intermediate_checksum;
55*d0673fe1SAllan Jude 	uint16_t	structure_table_length;
56*d0673fe1SAllan Jude 	uint32_t	structure_table_address;
57*d0673fe1SAllan Jude 	uint16_t	number_structures;
58*d0673fe1SAllan Jude 	uint8_t		BCD_revision;
59*d0673fe1SAllan Jude };
60*d0673fe1SAllan Jude 
61*d0673fe1SAllan Jude struct smbios_structure_header {
62*d0673fe1SAllan Jude 	uint8_t		type;
63*d0673fe1SAllan Jude 	uint8_t		length;
64*d0673fe1SAllan Jude 	uint16_t	handle;
65*d0673fe1SAllan Jude };
66*d0673fe1SAllan Jude 
67*d0673fe1SAllan Jude #endif /* _SMBIOS_H_ */
68