1a2e6df29SMike Smith /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 35e53a4f9SPedro F. Giffuni * 4a2e6df29SMike Smith * Copyright (c) 2000 Michael Smith 5a2e6df29SMike Smith * Copyright (c) 2000 BSDi 6a2e6df29SMike Smith * All rights reserved. 7a2e6df29SMike Smith * 8a2e6df29SMike Smith * Redistribution and use in source and binary forms, with or without 9a2e6df29SMike Smith * modification, are permitted provided that the following conditions 10a2e6df29SMike Smith * are met: 11a2e6df29SMike Smith * 1. Redistributions of source code must retain the above copyright 12a2e6df29SMike Smith * notice, this list of conditions and the following disclaimer. 13a2e6df29SMike Smith * 2. Redistributions in binary form must reproduce the above copyright 14a2e6df29SMike Smith * notice, this list of conditions and the following disclaimer in the 15a2e6df29SMike Smith * documentation and/or other materials provided with the distribution. 16a2e6df29SMike Smith * 17a2e6df29SMike Smith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18a2e6df29SMike Smith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19a2e6df29SMike Smith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20a2e6df29SMike Smith * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21a2e6df29SMike Smith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22a2e6df29SMike Smith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23a2e6df29SMike Smith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24a2e6df29SMike Smith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25a2e6df29SMike Smith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26a2e6df29SMike Smith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27a2e6df29SMike Smith * SUCH DAMAGE. 28a2e6df29SMike Smith */ 29a2e6df29SMike Smith 3082394a8dSWarner Losh #include <sys/types.h> 31a2e6df29SMike Smith #include <sys/rman.h> 32a2e6df29SMike Smith #include <sys/bus.h> 33a2e6df29SMike Smith 34a2e6df29SMike Smith /* 35a2e6df29SMike Smith * This is defined by the version 1 interface. 36a2e6df29SMike Smith */ 37a2e6df29SMike Smith #define DEVINFO_STRLEN 32 38a2e6df29SMike Smith 39a2e6df29SMike Smith /* 40a2e6df29SMike Smith * Devices. 41a2e6df29SMike Smith * 42a2e6df29SMike Smith * Internal structure contains string buffers and list linkage; 43a2e6df29SMike Smith */ 44a2e6df29SMike Smith struct devinfo_i_dev { 45a2e6df29SMike Smith struct devinfo_dev dd_dev; 46cf72c10fSWarner Losh char *dd_name; 47cf72c10fSWarner Losh char *dd_desc; 48cf72c10fSWarner Losh char *dd_drivername; 49cf72c10fSWarner Losh char *dd_pnpinfo; 50cf72c10fSWarner Losh char *dd_location; 5143832002SWarner Losh uint32_t dd_devflags; 5243832002SWarner Losh uint16_t dd_flags; 5343832002SWarner Losh device_state_t dd_state; 54a2e6df29SMike Smith TAILQ_ENTRY(devinfo_i_dev) dd_link; 55a2e6df29SMike Smith }; 56a2e6df29SMike Smith 57a2e6df29SMike Smith /* 58a2e6df29SMike Smith * Resources. 59a2e6df29SMike Smith * 60a2e6df29SMike Smith * Internal structures contain string buffers and list linkage; 61a2e6df29SMike Smith */ 62a2e6df29SMike Smith struct devinfo_i_rman { 63a2e6df29SMike Smith struct devinfo_rman dm_rman; 64a2e6df29SMike Smith char dm_desc[32]; 65a2e6df29SMike Smith TAILQ_ENTRY(devinfo_i_rman) dm_link; 66a2e6df29SMike Smith }; 67a2e6df29SMike Smith 68a2e6df29SMike Smith struct devinfo_i_res { 69a2e6df29SMike Smith struct devinfo_res dr_res; 70a2e6df29SMike Smith TAILQ_ENTRY(devinfo_i_res) dr_link; 71a2e6df29SMike Smith }; 72