Home | History | Annotate | Line # | Download | only in include
pmap.h revision 1.42
      1  1.42   andvar /*	$NetBSD: pmap.h,v 1.42 2022/04/21 21:31:11 andvar Exp $	*/
      2   1.1      leo 
      3   1.1      leo /*
      4   1.1      leo  * Copyright (c) 1991 Regents of the University of California.
      5   1.1      leo  * All rights reserved.
      6  1.31      agc  *
      7  1.31      agc  * This code is derived from software contributed to Berkeley by
      8  1.31      agc  * the Systems Programming Group of the University of Utah Computer
      9  1.31      agc  * Science Department.
     10  1.31      agc  *
     11  1.31      agc  * Redistribution and use in source and binary forms, with or without
     12  1.31      agc  * modification, are permitted provided that the following conditions
     13  1.31      agc  * are met:
     14  1.31      agc  * 1. Redistributions of source code must retain the above copyright
     15  1.31      agc  *    notice, this list of conditions and the following disclaimer.
     16  1.31      agc  * 2. Redistributions in binary form must reproduce the above copyright
     17  1.31      agc  *    notice, this list of conditions and the following disclaimer in the
     18  1.31      agc  *    documentation and/or other materials provided with the distribution.
     19  1.31      agc  * 3. Neither the name of the University nor the names of its contributors
     20  1.31      agc  *    may be used to endorse or promote products derived from this software
     21  1.31      agc  *    without specific prior written permission.
     22  1.31      agc  *
     23  1.31      agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.31      agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.31      agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.31      agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.31      agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.31      agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.31      agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.31      agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.31      agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.31      agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.31      agc  * SUCH DAMAGE.
     34  1.31      agc  *
     35  1.31      agc  *	@(#)pmap.h	7.6 (Berkeley) 5/10/91
     36  1.31      agc  */
     37  1.31      agc 
     38  1.31      agc /*
     39  1.31      agc  * Copyright (c) 1987 Carnegie-Mellon University
     40   1.1      leo  *
     41   1.1      leo  * This code is derived from software contributed to Berkeley by
     42   1.1      leo  * the Systems Programming Group of the University of Utah Computer
     43   1.1      leo  * Science Department.
     44   1.1      leo  *
     45   1.1      leo  * Redistribution and use in source and binary forms, with or without
     46   1.1      leo  * modification, are permitted provided that the following conditions
     47   1.1      leo  * are met:
     48   1.1      leo  * 1. Redistributions of source code must retain the above copyright
     49   1.1      leo  *    notice, this list of conditions and the following disclaimer.
     50   1.1      leo  * 2. Redistributions in binary form must reproduce the above copyright
     51   1.1      leo  *    notice, this list of conditions and the following disclaimer in the
     52   1.1      leo  *    documentation and/or other materials provided with the distribution.
     53   1.1      leo  * 3. All advertising materials mentioning features or use of this software
     54   1.1      leo  *    must display the following acknowledgement:
     55   1.1      leo  *	This product includes software developed by the University of
     56   1.1      leo  *	California, Berkeley and its contributors.
     57   1.1      leo  * 4. Neither the name of the University nor the names of its contributors
     58   1.1      leo  *    may be used to endorse or promote products derived from this software
     59   1.1      leo  *    without specific prior written permission.
     60   1.1      leo  *
     61   1.1      leo  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     62   1.1      leo  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     63   1.1      leo  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     64   1.1      leo  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     65   1.1      leo  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     66   1.1      leo  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     67   1.1      leo  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     68   1.1      leo  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     69   1.1      leo  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     70   1.1      leo  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     71   1.1      leo  * SUCH DAMAGE.
     72   1.1      leo  *
     73   1.1      leo  *	@(#)pmap.h	7.6 (Berkeley) 5/10/91
     74   1.1      leo  */
     75   1.1      leo 
     76   1.1      leo #ifndef	_MACHINE_PMAP_H_
     77   1.1      leo #define	_MACHINE_PMAP_H_
     78   1.1      leo 
     79  1.39  tsutsui #include <m68k/pmap_motorola.h>
     80   1.1      leo 
     81   1.1      leo /*
     82   1.6      leo  * Description of the memory segments. Build in atari_init/start_c().
     83   1.6      leo  * This gives a better separation between machine dependent stuff and
     84   1.6      leo  * the pmap-module.
     85   1.6      leo  */
     86  1.39  tsutsui #define NMEM_SEGS	8
     87   1.8      leo struct memseg {
     88  1.39  tsutsui 	paddr_t start;		/* PA of first page in segment	*/
     89  1.39  tsutsui 	paddr_t end;		/* PA of last  page in segment	*/
     90  1.39  tsutsui 	int     first_page;	/* relative page# of 'start'	*/
     91  1.40      abs 	int	free_list;	/* Memory priority, lower = faster */
     92   1.9      leo };
     93   1.9      leo 
     94   1.2      leo #ifdef	_KERNEL
     95   1.8      leo /*
     96   1.8      leo  * Memory segment descriptors.
     97   1.8      leo  *  - boot_segs
     98  1.42   andvar  *	describes the segments obtained from the bootcode.
     99   1.8      leo  *  - usable_segs
    100   1.8      leo  *	describes the segments available after system requirements are
    101  1.42   andvar  *	subtracted (reserved pages, etc...).
    102   1.8      leo  */
    103  1.39  tsutsui extern struct memseg	boot_segs[NMEM_SEGS];
    104  1.39  tsutsui extern struct memseg	usable_segs[NMEM_SEGS];
    105   1.8      leo 
    106  1.41  tsutsui void	pmap_bootstrap(vaddr_t);
    107  1.12  thorpej 
    108   1.5      leo #endif	/* _KERNEL */
    109   1.1      leo 
    110   1.1      leo #endif	/* !_MACHINE_PMAP_H_ */
    111