1181430Sstas/*-
2181430Sstas * Copyright (c) 2006, 2008 Stanislav Sedov <stas@FreeBSD.org>.
3181430Sstas * All rights reserved.
4181430Sstas *
5181430Sstas * Redistribution and use in source and binary forms, with or without
6181430Sstas * modification, are permitted provided that the following conditions
7181430Sstas * are met:
8181430Sstas * 1. Redistributions of source code must retain the above copyright
9181430Sstas *    notice, this list of conditions and the following disclaimer.
10181430Sstas * 2. Redistributions in binary form must reproduce the above copyright
11181430Sstas *    notice, this list of conditions and the following disclaimer in the
12181430Sstas *    documentation and/or other materials provided with the distribution.
13181430Sstas *
14181430Sstas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15181430Sstas * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16181430Sstas * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17181430Sstas * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18181430Sstas * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19181430Sstas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20181430Sstas * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21181430Sstas * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22181430Sstas * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23181430Sstas * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24181430Sstas *
25181430Sstas * $FreeBSD: releng/11.0/usr.sbin/cpucontrol/intel.h 181430 2008-08-08 16:26:53Z stas $
26181430Sstas */
27181430Sstas
28181430Sstas#ifndef INTEL_H
29181430Sstas#define	INTEL_H
30181430Sstas
31181430Sstas/*
32181430Sstas * Prototypes.
33181430Sstas */
34181430Sstasucode_probe_t	intel_probe;
35181430Sstasucode_update_t	intel_update;
36181430Sstas
37181430Sstastypedef struct intel_fw_header {
38181430Sstas	uint32_t	header_version;		/* Version of the header. */
39181430Sstas	int32_t		revision;		/* Unique version number. */
40181430Sstas	uint32_t	date;			/* Date of creation in BCD. */
41181430Sstas	uint32_t	cpu_signature;		/* Extended family, extended
42181430Sstas						   model, type, family, model
43181430Sstas						   and stepping. */
44181430Sstas	uint32_t	checksum;		/* Sum of all DWORDS should
45181430Sstas						   be 0. */
46181430Sstas	uint32_t	loader_revision;	/* Version of the loader
47181430Sstas						   required to load update. */
48181430Sstas	uint32_t	cpu_flags;		/* Platform IDs encoded in
49181430Sstas						   the lower 8 bits. */
50181430Sstas	uint32_t	data_size;
51181430Sstas	uint32_t	total_size;
52181430Sstas	uint8_t		reserved[12];
53181430Sstas} intel_fw_header_t;
54181430Sstas
55181430Sstastypedef struct intel_cpu_signature {
56181430Sstas	uint32_t	cpu_signature;
57181430Sstas	uint32_t	cpu_flags;
58181430Sstas	uint32_t	checksum;
59181430Sstas} intel_cpu_signature_t;
60181430Sstas
61181430Sstastypedef struct intel_ext_header {
62181430Sstas	uint32_t	sig_count;
63181430Sstas	uint32_t	checksum;
64181430Sstas	uint8_t		reserved[12];
65181430Sstas} intel_ext_header_t;
66181430Sstas
67181430Sstas#define	INTEL_HEADER_VERSION	0x00000001
68181430Sstas#define	INTEL_LOADER_REVISION	0x00000001
69181430Sstas
70181430Sstas#endif /* !INTEL_H */
71