Home | History | Annotate | Line # | Download | only in include
cpu.h revision 1.11.16.1
      1  1.11.16.1      yamt /*      $NetBSD: cpu.h,v 1.11.16.1 2007/02/26 09:05:48 yamt Exp $ */
      2        1.6        is 
      3        1.6        is /*
      4        1.6        is  * Copyright (C) 1995-1997 Wolfgang Solfrank.
      5        1.6        is  * Copyright (C) 1995-1997 TooLs GmbH.
      6        1.6        is  * All rights reserved.
      7        1.6        is  *
      8        1.6        is  * Redistribution and use in source and binary forms, with or without
      9        1.6        is  * modification, are permitted provided that the following conditions
     10        1.6        is  * are met:
     11        1.6        is  * 1. Redistributions of source code must retain the above copyright
     12        1.6        is  *    notice, this list of conditions and the following disclaimer.
     13        1.6        is  * 2. Redistributions in binary form must reproduce the above copyright
     14        1.6        is  *    notice, this list of conditions and the following disclaimer in the
     15        1.6        is  *    documentation and/or other materials provided with the distribution.
     16        1.6        is  * 3. All advertising materials mentioning features or use of this software
     17        1.6        is  *    must display the following acknowledgement:
     18        1.6        is  *      This product includes software developed by TooLs GmbH.
     19        1.6        is  * 4. The name of TooLs GmbH may not be used to endorse or promote products
     20        1.6        is  *    derived from this software without specific prior written permission.
     21        1.6        is  *
     22        1.6        is  * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
     23        1.6        is  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24        1.6        is  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25        1.6        is  * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26        1.6        is  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     27        1.6        is  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     28        1.6        is  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     29        1.6        is  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     30        1.6        is  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     31        1.6        is  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32        1.6        is  */
     33        1.1        is #ifndef _MACHINE_CPU_H_
     34        1.1        is #define _MACHINE_CPU_H_
     35        1.1        is 
     36        1.7       mrg #if defined(_KERNEL_OPT)
     37        1.2   thorpej #include "opt_lockdebug.h"
     38        1.2   thorpej #endif
     39        1.2   thorpej 
     40        1.1        is #include <machine/frame.h>
     41        1.1        is #include <machine/psl.h>
     42        1.1        is #include <machine/intr.h>
     43        1.1        is 
     44        1.3        is #include <sys/sched.h>
     45        1.2   thorpej 
     46        1.2   thorpej #ifdef _KERNEL
     47        1.2   thorpej 
     48        1.1        is u_long	clkread	__P((void));
     49        1.1        is void	physaccess	__P((caddr_t, caddr_t, int, int));
     50        1.2   thorpej 
     51        1.2   thorpej #endif /* _KERNEL */
     52        1.1        is 
     53        1.8   aymeric #define CPU_MAXNUM	1
     54        1.8   aymeric 
     55        1.1        is /* ADAM: taken from macppc/cpu.h */
     56        1.1        is #define CLKF_USERMODE(frame)    (((frame)->srr1 & PSL_PR) != 0)
     57        1.1        is #define CLKF_PC(frame)          ((frame)->srr0)
     58        1.1        is #define CLKF_INTR(frame)        ((frame)->depth > 0)
     59        1.1        is 
     60        1.5   mycroft #define	PROC_PC(p)		(trapframe(p)->srr0)
     61        1.5   mycroft 
     62       1.10  jdolecek #define cpu_swapout(p)		/* nothing */
     63        1.1        is #define cpu_number()            0
     64        1.1        is 
     65        1.1        is extern void delay __P((unsigned));
     66        1.1        is #define DELAY(n)                delay(n)
     67        1.1        is 
     68        1.1        is extern char bootpath[];
     69        1.1        is 
     70        1.1        is #if defined(_KERNEL) || defined(_STANDALONE)
     71        1.1        is #define CACHELINESIZE   32
     72        1.1        is #endif
     73        1.1        is 
     74        1.8   aymeric #include <powerpc/cpu.h>
     75        1.1        is 
     76        1.1        is /* end of ADAM */
     77        1.1        is 
     78        1.1        is 
     79        1.1        is /* ADAM: maybe we will need this??? */
     80        1.1        is /* values for machineid (happen to be AFF_* settings of AttnFlags) */
     81        1.1        is /*
     82        1.1        is #define AMIGA_68020	(1L<<1)
     83        1.1        is #define AMIGA_68030	(1L<<2)
     84        1.1        is #define AMIGA_68040	(1L<<3)
     85        1.1        is #define AMIGA_68881	(1L<<4)
     86        1.1        is #define AMIGA_68882	(1L<<5)
     87        1.1        is #define	AMIGA_FPU40	(1L<<6)
     88        1.1        is #define AMIGA_68060	(1L<<7)
     89        1.1        is */
     90        1.1        is 
     91        1.1        is #ifdef _KERNEL
     92        1.1        is int machineid;
     93        1.1        is #endif
     94        1.1        is 
     95        1.1        is #ifdef _KERNEL
     96        1.1        is /*
     97        1.1        is  * Prototypes from amiga_init.c
     98        1.1        is  */
     99        1.1        is void    *alloc_z2mem __P((long));
    100        1.1        is 
    101        1.1        is /*
    102        1.1        is  * Prototypes from autoconf.c
    103        1.1        is  */
    104        1.1        is int     is_a1200 __P((void));
    105        1.1        is int     is_a3000 __P((void));
    106        1.1        is int     is_a4000 __P((void));
    107        1.1        is #endif
    108        1.1        is 
    109        1.1        is #endif /* !_MACHINE_CPU_H_ */
    110