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

1.1     ! root        1: /* 
        !             2:  * Mach Operating System
        !             3:  * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
        !             4:  * All Rights Reserved.
        !             5:  * 
        !             6:  * Permission to use, copy, modify and distribute this software and its
        !             7:  * documentation is hereby granted, provided that both the copyright
        !             8:  * notice and this permission notice appear in all copies of the
        !             9:  * software, derivative works or modified versions, and any portions
        !            10:  * thereof, and that both notices appear in supporting documentation.
        !            11:  * 
        !            12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
        !            14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            15:  * 
        !            16:  * Carnegie Mellon requests users of this software to return to
        !            17:  * 
        !            18:  *  Software Distribution Coordinator  or  [email protected]
        !            19:  *  School of Computer Science
        !            20:  *  Carnegie Mellon University
        !            21:  *  Pittsburgh PA 15213-3890
        !            22:  * 
        !            23:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            24:  * the rights to redistribute these changes.
        !            25:  */
        !            26: /*
        !            27:  *     File:   vm_param.h
        !            28:  *     Author: Avadis Tevanian, Jr.
        !            29:  *     Date:   1985
        !            30:  *
        !            31:  *     I386 machine dependent virtual memory parameters.
        !            32:  *     Most of the declarations are preceeded by I386_ (or i386_)
        !            33:  *     which is OK because only I386 specific code will be using
        !            34:  *     them.
        !            35:  */
        !            36: 
        !            37: #ifndef        _I386_KERNEL_UTIL_VM_PARAM_H_
        !            38: #define _I386_KERNEL_UTIL_VM_PARAM_H_
        !            39: 
        !            40: #include <mach/vm_param.h>
        !            41: 
        !            42: 
        !            43: /* This variable is expected always to contain
        !            44:    the kernel virtual address at which physical memory is mapped.
        !            45:    It may change as paging is turned on or off.  */
        !            46: extern vm_offset_t phys_mem_va;
        !            47: 
        !            48: 
        !            49: /* Calculate a kernel virtual address from a physical address.  */
        !            50: #define phystokv(pa)   ((vm_offset_t)(pa) + phys_mem_va)
        !            51: 
        !            52: /* Same, but in reverse.
        !            53:    This only works for the region of kernel virtual addresses
        !            54:    that directly map physical addresses.  */
        !            55: #define kvtophys(va)   ((vm_offset_t)(va) - phys_mem_va)
        !            56: 
        !            57: 
        !            58: /* This variable contains the kernel virtual address
        !            59:    corresponding to linear address 0.
        !            60:    In the absence of paging,
        !            61:    linear addresses are always the same as physical addresses.  */
        !            62: #ifndef linear_base_va
        !            63: #define linear_base_va phys_mem_va
        !            64: #endif
        !            65: 
        !            66: /* Convert between linear and kernel virtual addresses.  */
        !            67: #define lintokv(la)    ((vm_offset_t)(la) + linear_base_va)
        !            68: #define kvtolin(va)    ((vm_offset_t)(va) - linear_base_va)
        !            69: 
        !            70: 
        !            71: /* This variable keeps track of where in physical memory
        !            72:    our boot image was loaded.
        !            73:    It holds the physical address
        !            74:    corresponding to the boot image's virtual address 0.
        !            75:    When paging is disabled, this is simply -phys_mem_va.
        !            76:    However, when paging is enabled,
        !            77:    phys_mem_va points to the place physical memory is mapped into exec space,
        !            78:    and has no relationship to where in physical memory the boot image is.
        !            79:    Thus, this variable always contains the location of the boot image
        !            80:    whether or not paging is enabled.  */
        !            81: extern vm_offset_t boot_image_pa;
        !            82: 
        !            83: /* Code segment we originally had when we started in real mode.
        !            84:    Always equal to boot_image_pa >> 4.  */
        !            85: extern unsigned short real_cs;
        !            86: 
        !            87: 
        !            88: 
        !            89: #endif /* _I386_KERNEL_UTIL_VM_PARAM_H_ */

unix.superglobalmegacorp.com

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