The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386ps2/debugf.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990 Carnegie Mellon University
    4  * Copyright (c) 1991 IBM Corporation 
    5  * All Rights Reserved.
    6  * 
    7  * Permission to use, copy, modify and distribute this software and its
    8  * documentation is hereby granted, provided that both the copyright
    9  * notice and this permission notice appear in all copies of the
   10  * software, derivative works or modified versions, and any portions
   11  * thereof, and that both notices appear in supporting documentation,
   12  * and that the name IBM not be used in advertising or publicity 
   13  * pertaining to distribution of the software without specific, written
   14  * prior permission.
   15  * 
   16  * CARNEGIE MELLON AND IBM ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   17  * CONDITION.  CARNEGIE MELLON AND IBM DISCLAIM ANY LIABILITY OF ANY KIND FOR
   18  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   19  * 
   20  * Carnegie Mellon requests users of this software to return to
   21  * 
   22  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   23  *  School of Computer Science
   24  *  Carnegie Mellon University
   25  *  Pittsburgh PA 15213-3890
   26  * 
   27  * any improvements or extensions that they make and grant Carnegie Mellon
   28  * the rights to redistribute these changes.
   29  */
   30 
   31 /*
   32  * HISTORY
   33  * $Log:        debugf.h,v $
   34  * Revision 2.2  93/02/04  07:59:15  danner
   35  *      Integrate PS2 code from IBM.
   36  *      [93/01/18            prithvi]
   37  * 
   38  */
   39 
   40 #ifndef _H_DEBUGF
   41 #define _H_DEBUGF
   42 /*
   43  * COMPONENT_NAME: INC/SYS debugf.h Debugging Utility Define's
   44  *
   45  * FUNCTIONS:
   46  *
   47  * ORIGINS: 27
   48  */                                                                   
   49 
   50 #ifdef DEBUG
   51 #define DEBUGF(cond,stmt) if (cond) stmt        /* do the stmt (printf) */
   52 #else
   53 #define DEBUGF(cond,stmt)               /* do nothing if not debugging */
   54 #endif
   55 /*
   56  * Usage:
   57  * DEBUGF(fddebug & DEBUG_OPEN,
   58  *      printf("fdopen: Entering, Hi, I am %s, %d 0x%x\n", here, dec, hex));
   59  */
   60 #define DEBUG_ALL               0xffffffff
   61 #define DEBUG_NONE              0x00000000
   62 
   63 /*
   64  * Bit 0-15 are used to debug entry points found in most device drivers.
   65  * Bit 16-30 are used to debug component specific routines.
   66  * Bit 31 is used to debug error conditions.
   67  */
   68 #define DEBUG_CONFIG            BIT0
   69 #define DEBUG_OPEN              BIT1
   70 #define DEBUG_CLOSE             BIT2
   71 #define DEBUG_READ              BIT3
   72 #define DEBUG_WRITE             BIT4
   73 #define DEBUG_IOCTL             BIT5
   74 #define DEBUG_STRATEGY          BIT6
   75 #define DEBUG_SELECT            BIT7
   76 #define DEBUG_PRINT             BIT8
   77 #define DEBUG_DUMP              BIT9
   78 #define DEBUG_MPX               BIT10
   79 #define DEBUG_REVOKE            BIT11
   80 #define DEBUG_INTR              BIT12
   81 #define DEBUG_CALL              BIT13           /* still free */
   82 #define DEBUG_BIT14             BIT14           /* still free */
   83 #define DEBUG_ABIOS             BIT15
   84 
   85 #define DEBUG_ERR_COND          BIT31
   86 
   87 #ifdef DEBUG
   88 extern void debug_handy_brkpt(char * msg);
   89 #else
   90 #define debug_handy_brkpt(msg)
   91 #endif
   92 /*
   93  * Usage: use debugger to set a break point at debug_handy_brkpt(),
   94  *        put this line in your program where you wish to stop:
   95  * debug_handy_brkpt("I am here");
   96  */
   97 
   98 #ifdef DEBUG
   99 extern void dump_abios_rb(caddr_t addr, int flag);
  100 #else
  101 #define dump_abios_rb(addr, flag)
  102 #endif
  103 /*
  104  * Usage: dump content of abios request block.
  105  * dump_abios_rb((caddr_t)&this_request_block, DUMP_HEADER_ONLY);
  106  * or
  107  * dump_abios_rb((caddr_t)&this_request_block, DUMP_ENTIRE_BLOCK);
  108  */
  109 #define DUMP_HEADER_ONLY                BIT0
  110 #define DUMP_ENTIRE_BLOCK               BIT1
  111 
  112 /*
  113  * Little-Endian bit convention
  114  */
  115 #define BIT0                            0x00000001
  116 #define BIT1                            0x00000002
  117 #define BIT2                            0x00000004
  118 #define BIT3                            0x00000008
  119 #define BIT4                            0x00000010
  120 #define BIT5                            0x00000020
  121 #define BIT6                            0x00000040
  122 #define BIT7                            0x00000080
  123 #define BIT8                            0x00000100
  124 #define BIT9                            0x00000200
  125 #define BIT10                           0x00000400
  126 #define BIT11                           0x00000800
  127 #define BIT12                           0x00001000
  128 #define BIT13                           0x00002000
  129 #define BIT14                           0x00004000
  130 #define BIT15                           0x00008000
  131 #define BIT16                           0x00010000
  132 #define BIT17                           0x00020000
  133 #define BIT18                           0x00040000
  134 #define BIT19                           0x00080000
  135 #define BIT20                           0x00100000
  136 #define BIT21                           0x00200000
  137 #define BIT22                           0x00400000
  138 #define BIT23                           0x00800000
  139 #define BIT24                           0x01000000
  140 #define BIT25                           0x02000000
  141 #define BIT26                           0x04000000
  142 #define BIT27                           0x08000000
  143 #define BIT28                           0x10000000
  144 #define BIT29                           0x20000000
  145 #define BIT30                           0x40000000
  146 #define BIT31                           0x80000000
  147 
  148 #endif /* _H_DEBUGF */

Cache object: de46555fc86db4d928ceca3d94170d16


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.