patch-2.1.96 linux/arch/arm/kernel/setup-ebsa110.c
Next file: linux/arch/arm/kernel/setup.c
Previous file: linux/arch/arm/kernel/ptrace.c
Back to the patch index
Back to the overall index
- Lines: 115
- Date:
Sun Apr 12 11:42:15 1998
- Orig file:
v2.1.95/linux/arch/arm/kernel/setup-ebsa110.c
- Orig date:
Tue Jan 20 16:39:41 1998
diff -u --recursive --new-file v2.1.95/linux/arch/arm/kernel/setup-ebsa110.c linux/arch/arm/kernel/setup-ebsa110.c
@@ -26,62 +26,95 @@
#include <linux/delay.h>
#include <linux/major.h>
#include <linux/utsname.h>
+#include <linux/init.h>
-#include <asm/segment.h>
-#include <asm/system.h>
#include <asm/hardware.h>
#include <asm/pgtable.h>
+#include <asm/segment.h>
+#include <asm/setup.h>
+#include <asm/system.h>
#ifndef CONFIG_CMDLINE
#define CONFIG_CMDLINE "root=nfs rw console=ttyS1,38400n8"
#endif
+#define COMMAND_LINE_SIZE 256
+
#define MEM_SIZE (16*1024*1024)
-#define COMMAND_LINE_SIZE 256
+static char command_line[COMMAND_LINE_SIZE] = { 0, };
+ char saved_command_line[COMMAND_LINE_SIZE];
+struct processor processor;
+struct screen_info screen_info;
unsigned char aux_device_present;
unsigned long arm_id;
+
extern int root_mountflags;
extern int _etext, _edata, _end;
+extern const struct processor sa110_processor_functions;
#ifdef CONFIG_BLK_DEV_RAM
extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
extern int rd_image_start; /* starting block # of image */
-static inline void setup_ramdisk (void)
+static inline void setup_ramdisk(int start, int prompt, int load)
{
- rd_image_start = 0;
- rd_prompt = 1;
- rd_doload = 1;
+ rd_image_start = start;
+ rd_prompt = prompt;
+ rd_doload = load;
}
#else
-#define setup_ramdisk()
+#define setup_ramdisk(start,prompt,load)
#endif
+#ifdef PARAMS_BASE
+static struct param_struct *params = (struct param_struct *)PARAMS_BASE;
+
+static inline char *setup_params(unsigned long *mem_end_p)
+{
+ ROOT_DEV = to_kdev_t(params->u1.s.rootdev);
+ ORIG_X = params->u1.s.video_x;
+ ORIG_Y = params->u1.s.video_y;
+ ORIG_VIDEO_COLS = params->u1.s.video_num_cols;
+ ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
+
+ setup_ramdisk(params->u1.s.rd_start,
+ (params->u1.s.flags & FLAG_RDPROMPT) == 0,
+ (params->u1.s.flags & FLAG_RDLOAD) == 0);
+
+ *mem_end_p = 0xc0000000 + MEM_SIZE;
+
+ return params->commandline;
+}
+#else
static char default_command_line[] = CONFIG_CMDLINE;
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
- char saved_command_line[COMMAND_LINE_SIZE];
-struct processor processor;
-extern const struct processor sa110_processor_functions;
+static inline char *setup_params(unsigned long *mem_end_p)
+{
+ ROOT_DEV = 0x00ff;
+
+ setup_ramdisk(0, 1, 1);
+
+ *mem_end_p = 0xc0000000 + MEM_SIZE;
+
+ return default_command_line;
+}
+#endif
-void setup_arch(char **cmdline_p,
- unsigned long * memory_start_p, unsigned long * memory_end_p)
+__initfunc(void setup_arch(char **cmdline_p,
+ unsigned long * memory_start_p, unsigned long * memory_end_p))
{
unsigned long memory_start, memory_end;
char c = ' ', *to = command_line, *from;
int len = 0;
memory_start = (unsigned long)&_end;
- memory_end = 0xc0000000 + MEM_SIZE;
- from = default_command_line;
processor = sa110_processor_functions;
- processor._proc_init ();
+ processor._proc_init();
- ROOT_DEV = 0x00ff;
- setup_ramdisk();
+ from = setup_params(&memory_end);
init_task.mm->start_code = TASK_SIZE;
init_task.mm->end_code = TASK_SIZE + (unsigned long) &_etext;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov