via.h revision 256281
190075Sobrien/*- 290075Sobrien * Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>. 3132718Skan * All rights reserved. 4169689Skan * 5169689Skan * Redistribution and use in source and binary forms, with or without 690075Sobrien * modification, are permitted provided that the following conditions 790075Sobrien * are met: 890075Sobrien * 1. Redistributions of source code must retain the above copyright 990075Sobrien * notice, this list of conditions and the following disclaimer. 1090075Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1190075Sobrien * notice, this list of conditions and the following disclaimer in the 1290075Sobrien * documentation and/or other materials provided with the distribution. 1390075Sobrien * 1490075Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1590075Sobrien * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1690075Sobrien * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1790075Sobrien * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1890075Sobrien * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1990075Sobrien * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2090075Sobrien * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2190075Sobrien * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22169689Skan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23169689Skan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2490075Sobrien * 2590075Sobrien * $FreeBSD: stable/10/usr.sbin/cpucontrol/via.h 228436 2011-12-12 12:30:44Z fabient $ 2690075Sobrien */ 27132718Skan 28132718Skan#ifndef VIA_H 2990075Sobrien#define VIA_H 3090075Sobrien 3190075Sobrien/* 3290075Sobrien * Prototypes. 3390075Sobrien */ 3490075Sobrienucode_probe_t via_probe; 35132718Skanucode_update_t via_update; 36132718Skan 37132718Skantypedef struct via_fw_header { 38132718Skan uint32_t signature; /* Signature. */ 3990075Sobrien int32_t revision; /* Unique version number. */ 4090075Sobrien uint32_t date; /* Date of creation in BCD. */ 4190075Sobrien uint32_t cpu_signature; /* Extended family, extended 4290075Sobrien model, type, family, model 4390075Sobrien and stepping. */ 4490075Sobrien uint32_t checksum; /* Sum of all DWORDS should 45117395Skan be 0. */ 46132718Skan uint32_t loader_revision; /* Version of the loader 47169689Skan required to load update. */ 48169689Skan uint32_t reserverd1; /* Platform IDs encoded in 4990075Sobrien the lower 8 bits. */ 5090075Sobrien uint32_t data_size; 5190075Sobrien uint32_t total_size; 5290075Sobrien uint8_t reserved2[12]; 53169689Skan} via_fw_header_t; 5490075Sobrien 55169689Skantypedef struct via_cpu_signature { 56169689Skan uint32_t cpu_signature; 57169689Skan uint32_t checksum; 58169689Skan} via_cpu_signature_t; 5990075Sobrien 6090075Sobrien#define VIA_HEADER_SIGNATURE 0x53415252 6190075Sobrien#define VIA_LOADER_REVISION 0x00000001 62169689Skan 6390075Sobrien#endif /* !VIA_H */ 6490075Sobrien