Annotation of Gnu-Mach/i386/util/anno.h, revision 1.1

1.1     ! root        1: /* 
        !             2:  * Copyright (c) 1995-1994 The University of Utah and
        !             3:  * the Computer Systems Laboratory at the University of Utah (CSL).
        !             4:  * All rights reserved.
        !             5:  *
        !             6:  * Permission to use, copy, modify and distribute this software is hereby
        !             7:  * granted provided that (1) source code retains these copyright, permission,
        !             8:  * and disclaimer notices, and (2) redistributions including binaries
        !             9:  * reproduce the notices in supporting documentation, and (3) all advertising
        !            10:  * materials mentioning features or use of this software display the following
        !            11:  * acknowledgement: ``This product includes software developed by the
        !            12:  * Computer Systems Laboratory at the University of Utah.''
        !            13:  *
        !            14:  * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
        !            15:  * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
        !            16:  * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            17:  *
        !            18:  * CSL requests users of this software to return to [email protected] any
        !            19:  * improvements that they make and grant CSL redistribution rights.
        !            20:  *
        !            21:  *      Author: Bryan Ford, University of Utah CSL
        !            22:  */
        !            23: #ifndef _I386_KERNEL_UTIL_ANNO_H_
        !            24: #define _I386_KERNEL_UTIL_ANNO_H_
        !            25: 
        !            26: #ifndef ASSEMBLER
        !            27: 
        !            28: 
        !            29: struct anno_table
        !            30: {
        !            31:        struct anno_entry       *start;
        !            32:        struct anno_entry       *end;
        !            33: };
        !            34: 
        !            35: struct anno_entry
        !            36: {
        !            37:        int                     val1;
        !            38:        int                     val2;
        !            39:        int                     val3;
        !            40:        struct anno_table       *table;
        !            41: };
        !            42: 
        !            43: 
        !            44: #else /* ASSEMBLER */
        !            45: 
        !            46: 
        !            47: /* Create an arbitrary annotation entry.
        !            48:    Must switch back to an appropriate segment afterward.  */
        !            49: #define ANNO_ENTRY(table, val1, val2, val3)    \
        !            50:        .section .anno,"aw",@progbits           ;\
        !            51:        .long   val1,val2,val3,table
        !            52: 
        !            53: /* Create an annotation entry for code in a text segment.  */
        !            54: #define ANNO_TEXT(table, val2, val3)           \
        !            55: 9:     ANNO_ENTRY(table, 9b, val2, val3)       ;\
        !            56:        .text
        !            57: 
        !            58: 
        !            59: 
        !            60: /* The following are for common annotation tables.
        !            61:    These don't have to be used in any given kernel,
        !            62:    and others can be defined as convenient.  */
        !            63: 
        !            64: 
        !            65: /* The anno_intr table is generally accessed
        !            66:    on hardware interrupts that occur while running in kernel mode.
        !            67:    The value is a routine for the trap handler in interrupt.S
        !            68:    to jump to before processing the hardware interrupt.
        !            69:    This routine applies to all code from this address
        !            70:    up to but not including the address of the next ANNO_INTR.
        !            71:    To disable interrupt redirection for a piece of code,
        !            72:    place an ANNO_INTR(0) before it.  */
        !            73: 
        !            74: #define ANNO_INTR(routine) \
        !            75:        ANNO_TEXT(anno_intr, routine, 0)
        !            76: 
        !            77: 
        !            78: /* The anno_trap table is accessed
        !            79:    on processor traps that occur in kernel mode.
        !            80:    If a match is found in this table,
        !            81:    the specified alternate handler is run instead of the generic handler.
        !            82:    A match is found only if the EIP exactly matches an ANNO_TRAP entry
        !            83:    (i.e. these entries apply to individual instructions, not groups),
        !            84:    and if the trap type that occurred matches the type specified.  */
        !            85: 
        !            86: #define ANNO_TRAP(type, routine) \
        !            87:        ANNO_TEXT(anno_trap, type, routine)
        !            88: 
        !            89: 
        !            90: #endif /* ASSEMBLER */
        !            91: 
        !            92: #endif _I386_KERNEL_UTIL_ANNO_H_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.