home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / include / asm-sparc / bugs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-02  |  955 b   |  49 lines

  1. /*  include/asm-sparc/bugs.h:  Sparc probes for various bugs.
  2.  *
  3.  *  Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
  4.  */
  5.  
  6. /*
  7.  * This is included by init/main.c to check for architecture-dependent bugs.
  8.  *
  9.  * Needs:
  10.  *    void check_bugs(void);
  11.  */
  12.  
  13. #define CONFIG_BUGSPARC
  14.  
  15. #include <asm/openprom.h>
  16.  
  17. extern struct linux_romvec *romvec;
  18. extern int tbase_needs_unmapping;   /* We do the bug workaround in pagetables.c */
  19.  
  20. static void check_mmu(void)
  21. {
  22.   register struct linux_romvec *lvec;
  23.   register int root_node;
  24.   unsigned int present;
  25.  
  26.   lvec = romvec;
  27.  
  28.   root_node = (*(romvec->pv_nodeops->no_nextnode))(0);
  29.   tbase_needs_unmapping=0;
  30.  
  31.   present = 0;
  32.   (*(romvec->pv_nodeops->no_getprop))(root_node, "buserr-type", 
  33.                       (char *) &present);
  34.   if(present == 1)
  35.     {
  36.       tbase_needs_unmapping=1;
  37.       printk("MMU bug found: not allowing trapbase to be cached\n");
  38.     }
  39.  
  40.   return;
  41. }
  42.  
  43.  
  44. static void 
  45. check_bugs(void)
  46. {
  47.   check_mmu();
  48. }
  49.