1 1.1 mrg /* $NetBSD: centralvar.h,v 1.1 2011/07/29 08:37:36 mrg Exp $ */ 2 1.1 mrg /* $OpenBSD: centralvar.h,v 1.1 2004/09/22 21:31:51 jason Exp $ */ 3 1.1 mrg 4 1.1 mrg /* 5 1.1 mrg * Copyright (c) 2004 Jason L. Wright (jason (at) thought.net) 6 1.1 mrg * All rights reserved. 7 1.1 mrg * 8 1.1 mrg * Redistribution and use in source and binary forms, with or without 9 1.1 mrg * modification, are permitted provided that the following conditions 10 1.1 mrg * are met: 11 1.1 mrg * 1. Redistributions of source code must retain the above copyright 12 1.1 mrg * notice, this list of conditions and the following disclaimer. 13 1.1 mrg * 2. Redistributions in binary form must reproduce the above copyright 14 1.1 mrg * notice, this list of conditions and the following disclaimer in the 15 1.1 mrg * documentation and/or other materials provided with the distribution. 16 1.1 mrg * 17 1.1 mrg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 1.1 mrg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 1.1 mrg * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 1.1 mrg * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 21 1.1 mrg * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 1.1 mrg * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 1.1 mrg * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 1.1 mrg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 1.1 mrg * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 26 1.1 mrg * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 1.1 mrg * POSSIBILITY OF SUCH DAMAGE. 28 1.1 mrg */ 29 1.1 mrg 30 1.1 mrg struct central_reg { 31 1.1 mrg u_int32_t cbr_slot; 32 1.1 mrg u_int32_t cbr_offset; 33 1.1 mrg u_int32_t cbr_size; 34 1.1 mrg }; 35 1.1 mrg 36 1.1 mrg struct central_attach_args { 37 1.1 mrg char *ca_name; 38 1.1 mrg bus_space_tag_t ca_bustag; 39 1.1 mrg struct central_reg *ca_reg; 40 1.1 mrg int ca_node; 41 1.1 mrg int ca_nreg; 42 1.1 mrg }; 43 1.1 mrg 44 1.1 mrg struct central_range { 45 1.1 mrg u_int32_t cspace; /* Client space */ 46 1.1 mrg u_int32_t coffset; /* Client offset */ 47 1.1 mrg u_int32_t pspace; /* Parent space */ 48 1.1 mrg u_int32_t poffset; /* Parent offset */ 49 1.1 mrg u_int32_t size; /* Size in bytes of this range */ 50 1.1 mrg }; 51 1.1 mrg 52 1.1 mrg #define central_bus_map(t, slot, offset, sz, flags, hp) \ 53 1.1 mrg bus_space_map(t, BUS_ADDR(slot, offset), sz, flags, hp) 54