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  * XXXXX!! Warning Will Robinson.
  33  * Danger! Danger! This is bogus, I'll get it to link if it kills me
  34  */
  35 unsigned char floppy_track_buffer[256];
  36 
  37 /*
  38  * The format of "screen_info" is strange, and due to early
  39  * i386-setup code. This is just enough to make the console
  40  * code think we're on a EGA+ colour display.
  41  */
  42 struct screen_info screen_info = {
  43         0, 0,                   /* orig-x, orig-y */
  44         0, 0,                   /* unused */
  45         0,                      /* orig-video-page */
  46         0,                      /* orig-video-mode */
  47         80,                     /* orig-video-cols */
  48         0,0,0,                  /* ega_ax, ega_bx, ega_cx */
  49         25                      /* orig-video-lines */
  50 };
  51 
  52 unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
     /* [previous][next][first][last][top][bottom][index][help] */
  53 {
  54         return memory_start;
  55 }
  56 
  57 static unsigned long find_end_memory(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  58 {
  59         int i;
  60         unsigned long high = 0;
  61         struct memclust_struct * cluster;
  62         struct memdesc_struct * memdesc;
  63 
  64         memdesc = (struct memdesc_struct *) (INIT_HWRPB->mddt_offset + (unsigned long) INIT_HWRPB);
  65         cluster = memdesc->cluster;
  66         for (i = memdesc->numclusters ; i > 0; i--, cluster++) {
  67                 unsigned long tmp;
  68                 tmp = (cluster->start_pfn + cluster->numpages) << PAGE_SHIFT;
  69                 if (tmp > high)
  70                         high = tmp;
  71         }
  72         /* round it up to an even number of pages.. */
  73         high = (high + PAGE_SIZE) & (PAGE_MASK*2);
  74         return PAGE_OFFSET + high;
  75 }
  76 
  77 void setup_arch(char **cmdline_p,
     /* [previous][next][first][last][top][bottom][index][help] */
  78         unsigned long * memory_start_p, unsigned long * memory_end_p)
  79 {
  80         static char cmdline[] = "";
  81         extern int _end;
  82 
  83         aux_device_present = 0xaa;
  84         *cmdline_p = cmdline;
  85         *memory_start_p = (unsigned long) &_end;
  86         *memory_end_p = find_end_memory();
  87 }
  88 
  89 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
     /* [previous][next][first][last][top][bottom][index][help] */
  90 {
  91         return -EIO;
  92 }

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