xref: /freebsd/sys/compat/freebsd32/freebsd32_ioctl.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1ae528485SDavid E. O'Brien /*-
251369649SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
351369649SPedro F. Giffuni  *
4ae528485SDavid E. O'Brien  * Copyright (c) 2008 David E. O'Brien
5ae528485SDavid E. O'Brien  * All rights reserved.
6ae528485SDavid E. O'Brien  *
7ae528485SDavid E. O'Brien  * Redistribution and use in source and binary forms, with or without
8ae528485SDavid E. O'Brien  * modification, are permitted provided that the following conditions
9ae528485SDavid E. O'Brien  * are met:
10ae528485SDavid E. O'Brien  * 1. Redistributions of source code must retain the above copyright
11ae528485SDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer.
12ae528485SDavid E. O'Brien  * 2. Redistributions in binary form must reproduce the above copyright
13ae528485SDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer in the
14ae528485SDavid E. O'Brien  *    documentation and/or other materials provided with the distribution.
15ae528485SDavid E. O'Brien  * 3. Neither the name of the author nor the names of its contributors
16ae528485SDavid E. O'Brien  *    may be used to endorse or promote products derived from this software
17ae528485SDavid E. O'Brien  *    without specific prior written permission.
18ae528485SDavid E. O'Brien  *
19ae528485SDavid E. O'Brien  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20ae528485SDavid E. O'Brien  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21ae528485SDavid E. O'Brien  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22ae528485SDavid E. O'Brien  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23ae528485SDavid E. O'Brien  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24ae528485SDavid E. O'Brien  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25ae528485SDavid E. O'Brien  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26ae528485SDavid E. O'Brien  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27ae528485SDavid E. O'Brien  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28ae528485SDavid E. O'Brien  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29ae528485SDavid E. O'Brien  * SUCH DAMAGE.
30ae528485SDavid E. O'Brien  */
31ae528485SDavid E. O'Brien 
32ae528485SDavid E. O'Brien #ifndef _COMPAT_FREEBSD32_IOCTL_H_
33ae528485SDavid E. O'Brien #define	_COMPAT_FREEBSD32_IOCTL_H_
34ae528485SDavid E. O'Brien 
35fcaf473cSAlexander Motin #include <cam/scsi/scsi_sg.h>
36fcaf473cSAlexander Motin 
37ae528485SDavid E. O'Brien typedef __uint32_t caddr_t32;
38c750e17cSDavid E. O'Brien 
39bfac1583SKonstantin Belousov struct mem_range_op32
40bfac1583SKonstantin Belousov {
41bfac1583SKonstantin Belousov 	caddr_t32	mo_desc;
42bfac1583SKonstantin Belousov 	int		mo_arg[2];
43bfac1583SKonstantin Belousov };
44bfac1583SKonstantin Belousov 
45*87842989SKonstantin Belousov struct pci_bar_mmap32 {
46*87842989SKonstantin Belousov 	uint32_t	pbm_map_base;
47*87842989SKonstantin Belousov 	uint32_t	pbm_map_length;
48*87842989SKonstantin Belousov 	uint32_t	pbm_bar_length1, pbm_bar_length2;
49*87842989SKonstantin Belousov 	int		pbm_bar_off;
50*87842989SKonstantin Belousov 	struct pcisel	pbm_sel;
51*87842989SKonstantin Belousov 	int		pbm_reg;
52*87842989SKonstantin Belousov 	int		pbm_flags;
53*87842989SKonstantin Belousov 	int		pbm_memattr;
54*87842989SKonstantin Belousov };
55*87842989SKonstantin Belousov 
56bfac1583SKonstantin Belousov #define	MEMRANGE_GET32	_IOWR('m', 50, struct mem_range_op32)
57bfac1583SKonstantin Belousov #define	MEMRANGE_SET32	_IOW('m', 51, struct mem_range_op32)
58fcaf473cSAlexander Motin #define	SG_IO_32	_IOWR(SGIOC, 0x85, struct sg_io_hdr32)
59*87842989SKonstantin Belousov #define	PCIOCBARMMAP_32	_IOWR('p', 8, struct pci_bar_mmap32)
60ae528485SDavid E. O'Brien 
61ae528485SDavid E. O'Brien #endif	/* _COMPAT_FREEBSD32_IOCTL_H_ */
62