xref: /netbsd-src/sys/arch/mips/sibyte/include/ui_bitfields.h (revision 8ed35a9caa386f2b37ebc68f473c345fe1e47602)
1*8ed35a9cSsimonb /*  *********************************************************************
2*8ed35a9cSsimonb     *  Broadcom Common Firmware Environment (CFE)
3*8ed35a9cSsimonb     *
4*8ed35a9cSsimonb     *  Misc. utility routines for Big Sur 	File: bigsur_utils.h
5*8ed35a9cSsimonb     *
6*8ed35a9cSsimonb     *  Random stuff we use on this board package.
7*8ed35a9cSsimonb     *
8*8ed35a9cSsimonb     *  Author:  Mitch Lichtenberg
9*8ed35a9cSsimonb     *
10*8ed35a9cSsimonb     *********************************************************************
11*8ed35a9cSsimonb     *
12*8ed35a9cSsimonb     *  Copyright 2000,2001,2002,2003
13*8ed35a9cSsimonb     *  Broadcom Corporation. All rights reserved.
14*8ed35a9cSsimonb     *
15*8ed35a9cSsimonb     *  This software is furnished under license and may be used and
16*8ed35a9cSsimonb     *  copied only in accordance with the following terms and
17*8ed35a9cSsimonb     *  conditions.  Subject to these conditions, you may download,
18*8ed35a9cSsimonb     *  copy, install, use, modify and distribute modified or unmodified
19*8ed35a9cSsimonb     *  copies of this software in source and/or binary form.  No title
20*8ed35a9cSsimonb     *  or ownership is transferred hereby.
21*8ed35a9cSsimonb     *
22*8ed35a9cSsimonb     *  1) Any source code used, modified or distributed must reproduce
23*8ed35a9cSsimonb     *     and retain this copyright notice and list of conditions
24*8ed35a9cSsimonb     *     as they appear in the source file.
25*8ed35a9cSsimonb     *
26*8ed35a9cSsimonb     *  2) No right is granted to use any trade name, trademark, or
27*8ed35a9cSsimonb     *     logo of Broadcom Corporation.  The "Broadcom Corporation"
28*8ed35a9cSsimonb     *     name may not be used to endorse or promote products derived
29*8ed35a9cSsimonb     *     from this software without the prior written permission of
30*8ed35a9cSsimonb     *     Broadcom Corporation.
31*8ed35a9cSsimonb     *
32*8ed35a9cSsimonb     *  3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
33*8ed35a9cSsimonb     *     IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
34*8ed35a9cSsimonb     *     WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35*8ed35a9cSsimonb     *     PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
36*8ed35a9cSsimonb     *     SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
37*8ed35a9cSsimonb     *     PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
38*8ed35a9cSsimonb     *     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39*8ed35a9cSsimonb     *     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
40*8ed35a9cSsimonb     *     GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
41*8ed35a9cSsimonb     *     BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
42*8ed35a9cSsimonb     *     OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
43*8ed35a9cSsimonb     *     TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF
44*8ed35a9cSsimonb     *     THE POSSIBILITY OF SUCH DAMAGE.
45*8ed35a9cSsimonb     ********************************************************************* */
46*8ed35a9cSsimonb 
47*8ed35a9cSsimonb 
48*8ed35a9cSsimonb typedef struct bitfield_s {
49*8ed35a9cSsimonb     uint64_t field;
50*8ed35a9cSsimonb     char *name;
51*8ed35a9cSsimonb } bitfield_t;
52*8ed35a9cSsimonb 
53*8ed35a9cSsimonb char *showfields(bitfield_t *fields,uint64_t val);
54