1184251Smarcel/*- 2184251Smarcel * Copyright (c) 2007, Juniper Networks, Inc. 3184251Smarcel * All rights reserved. 4184251Smarcel * 5184251Smarcel * Redistribution and use in source and binary forms, with or without 6184251Smarcel * modification, are permitted provided that the following conditions 7184251Smarcel * are met: 8184251Smarcel * 1. Redistributions of source code must retain the above copyright 9184251Smarcel * notice, this list of conditions and the following disclaimer. 10184251Smarcel * 2. Redistributions in binary form must reproduce the above copyright 11184251Smarcel * notice, this list of conditions and the following disclaimer in the 12184251Smarcel * documentation and/or other materials provided with the distribution. 13184251Smarcel * 3. Neither the name of the author nor the names of any co-contributors 14184251Smarcel * may be used to endorse or promote products derived from this software 15184251Smarcel * without specific prior written permission. 16184251Smarcel * 17184735Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18184735Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19184735Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20184735Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21184735Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22184735Smarcel * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23184735Smarcel * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24184735Smarcel * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25184735Smarcel * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26184735Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27184735Smarcel * SUCH DAMAGE. 28184251Smarcel * 29184251Smarcel * $FreeBSD$ 30184251Smarcel */ 31184251Smarcel 32184251Smarcel#ifndef _SYS_CFICTL_H_ 33184251Smarcel#define _SYS_CFICTL_H_ 34184251Smarcel 35184251Smarcel/* 36184251Smarcel * Allow reading of the CFI query structure. 37184251Smarcel */ 38184251Smarcel 39184251Smarcelstruct cfiocqry { 40184251Smarcel unsigned long offset; 41184251Smarcel unsigned long count; 42184251Smarcel u_char *buffer; 43184251Smarcel}; 44184251Smarcel 45184251Smarcel#define CFIOCQRY _IOWR('q', 0, struct cfiocqry) 46184251Smarcel 47188156Ssam/* Intel StrataFlash Protection Register support */ 48188156Ssam#define CFIOCGFACTORYPR _IOR('q', 1, uint64_t) /* get factory protection reg */ 49188156Ssam#define CFIOCGOEMPR _IOR('q', 2, uint64_t) /* get oem protection reg */ 50188156Ssam#define CFIOCSOEMPR _IOW('q', 3, uint64_t) /* set oem protection reg */ 51188156Ssam#define CFIOCGPLR _IOR('q', 4, uint32_t) /* get protection lock reg */ 52188156Ssam#define CFIOCSPLR _IO('q', 5) /* set protection log reg */ 53184251Smarcel#endif /* _SYS_CFICTL_H_ */ 54