root/arch/sparc/kernel/setup.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. bios32_init
  2. sparc_console_print
  3. sparc_console_print_v3
  4. setup_arch
  5. sys_ioperm

   1 /*
   2  *  linux/arch/alpha/kernel/setup.c
   3  *
   4  *  Copyright (C) 1995  David S. Miller (davem@caip.rutgers.edu)
   5  */
   6 
   7 /*
   8  * bootup setup stuff..
   9  */
  10 
  11 #include <linux/errno.h>
  12 #include <linux/sched.h>
  13 #include <linux/kernel.h>
  14 #include <linux/mm.h>
  15 #include <linux/stddef.h>
  16 #include <linux/unistd.h>
  17 #include <linux/ptrace.h>
  18 #include <linux/malloc.h>
  19 #include <linux/ldt.h>
  20 #include <linux/user.h>
  21 #include <linux/a.out.h>
  22 #include <linux/tty.h>
  23 
  24 #include <asm/segment.h>
  25 #include <asm/system.h>
  26 #include <asm/io.h>
  27 #include <asm/openprom.h>   /* for console registration + cheese */
  28 
  29 extern void get_idprom(void);
  30 extern void probe_devices(void);
  31 
  32 /*
  33  * Gcc is hard to keep happy ;-)
  34  */
  35 struct screen_info screen_info = {
  36         0, 0,                   /* orig-x, orig-y */
  37         { 0, 0, },              /* unused */
  38         0,                      /* orig-video-page */
  39         0,                      /* orig-video-mode */
  40         80,                     /* orig-video-cols */
  41         0,0,0,                  /* ega_ax, ega_bx, ega_cx */
  42         25                      /* orig-video-lines */
  43 };
  44 
  45 /* At least I hide the sneaky floppy_track_buffer in my dirty assembly
  46  * code. ;-)
  47  */
  48 
  49 unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
     /* [previous][next][first][last][top][bottom][index][help] */
  50 {
  51         return memory_start;
  52 }
  53 
  54 /* Lame prom console routines, gets registered below. Thanks for the
  55  * tip Linus.  First comes the V0 prom routine, then the V3 version
  56  * written by Paul Hatchman (paul@sfe.com.au).
  57  */
  58 
  59 void sparc_console_print(const char * p)
     /* [previous][next][first][last][top][bottom][index][help] */
  60 {
  61   unsigned char c;
  62 
  63         while ((c = *(p++)) != 0)
  64           {
  65             if (c == '\n') romvec->pv_putchar('\r');
  66             (*(romvec->pv_putchar))(c);
  67           }
  68 
  69   return;
  70 
  71 }
  72 
  73 /* paul@sfe.com.au */
  74 /* V3 prom console printing routines */
  75 void sparc_console_print_v3 (const char *p)
     /* [previous][next][first][last][top][bottom][index][help] */
  76 {
  77        unsigned char c;
  78 
  79        while ((c = *(p++)) != 0)
  80        {
  81                if (c == '\n') romvec->pv_v2devops.v2_dev_write 
  82                        ((*romvec->pv_v2bootargs.fd_stdout), "\r", 1);
  83                romvec->pv_v2devops.v2_dev_write 
  84                        ((*romvec->pv_v2bootargs.fd_stdout), &c, 1);
  85        }
  86 
  87        return;
  88 }
  89 
  90 
  91 /* This routine will in the future do all the nasty prom stuff
  92  * to probe for the mmu type and its parameters, etc. This will
  93  * also be where SMP things happen plus the Sparc specific memory
  94  * physical memory probe as on the alpha.
  95  */
  96 
  97 extern void register_console(void (*proc)(const char *));
  98 extern unsigned int prom_iface_vers, end_of_phys_memory;
  99 
 100 void setup_arch(char **cmdline_p,
     /* [previous][next][first][last][top][bottom][index][help] */
 101         unsigned long * memory_start_p, unsigned long * memory_end_p)
 102 {
 103         if(romvec->pv_romvers == 0) {
 104           register_console(sparc_console_print);
 105         } else {
 106           register_console(sparc_console_print_v3);
 107         };
 108 
 109         printk("Sparc PROM-Console registered...\n");
 110         get_idprom();     /* probe_devices expects this to be done */
 111         probe_devices();  /* cpu/fpu, mmu probes */
 112 
 113         *memory_start_p = (((unsigned long) &end));
 114         *memory_end_p = (((unsigned long) end_of_phys_memory));
 115 }
 116 
 117 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
     /* [previous][next][first][last][top][bottom][index][help] */
 118 {
 119         return -EIO;
 120 }

/* [previous][next][first][last][top][bottom][index][help] */