root/arch/alpha/kernel/setup.c

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

DEFINITIONS

This source file includes following definitions.
  1. bios32_init
  2. find_end_memory
  3. setup_arch
  4. sys_ioperm

   1 /*
   2  *  linux/arch/alpha/kernel/setup.c
   3  *
   4  *  Copyright (C) 1995  Linus Torvalds
   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/hwrpb.h>
  27 #include <asm/io.h>
  28 
  29 unsigned char aux_device_present;
  30 
  31 /*
  32  * The format of "screen_info" is strange, and due to early
  33  * i386-setup code. This is just enough to make the console
  34  * code think we're on a EGA+ colour display.
  35  */
  36 struct screen_info screen_info = {
  37         0, 0,                   /* orig-x, orig-y */
  38         0, 0,                   /* unused */
  39         0,                      /* orig-video-page */
  40         0,                      /* orig-video-mode */
  41         80,                     /* orig-video-cols */
  42         0,0,0,                  /* ega_ax, ega_bx, ega_cx */
  43         25                      /* orig-video-lines */
  44 };
  45 
  46 unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
     /* [previous][next][first][last][top][bottom][index][help] */
  47 {
  48         return memory_start;
  49 }
  50 
  51 static unsigned long find_end_memory(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  52 {
  53         int i;
  54         unsigned long high = 0;
  55         struct memclust_struct * cluster;
  56         struct memdesc_struct * memdesc;
  57 
  58         memdesc = (struct memdesc_struct *) (INIT_HWRPB->mddt_offset + (unsigned long) INIT_HWRPB);
  59         cluster = memdesc->cluster;
  60         for (i = memdesc->numclusters ; i > 0; i--, cluster++) {
  61                 unsigned long tmp;
  62                 tmp = (cluster->start_pfn + cluster->numpages) << PAGE_SHIFT;
  63                 if (tmp > high)
  64                         high = tmp;
  65         }
  66         /* round it up to an even number of pages.. */
  67         high = (high + PAGE_SIZE) & (PAGE_MASK*2);
  68         return PAGE_OFFSET + high;
  69 }
  70 
  71 void setup_arch(char **cmdline_p,
     /* [previous][next][first][last][top][bottom][index][help] */
  72         unsigned long * memory_start_p, unsigned long * memory_end_p)
  73 {
  74         static char cmdline[] = "";
  75         extern int _end;
  76 
  77         ROOT_DEV = 0x0200;      /* fd0 */
  78         aux_device_present = 0xaa;
  79         *cmdline_p = cmdline;
  80         *memory_start_p = (unsigned long) &_end;
  81         *memory_end_p = find_end_memory();
  82 }
  83 
  84 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
     /* [previous][next][first][last][top][bottom][index][help] */
  85 {
  86         return -EIO;
  87 }

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