9 #include <linux/module.h>
11 #include <linux/string.h>
12 #include <linux/utsname.h>
13 #include <linux/sched.h>
14 #include <asm/pgtable.h>
15 #include <asm/processor.h>
16 #include <asm/setup.h>
25 #define DEFAULT_COMMAND_LINE "root=98:0"
33 printf(
"add_arg: Too many command line arguments!\n");
36 if (
strlen(command_line) > 0)
48 .ipi_pipe = { -1, -1 }
75 seq_printf(m,
"vendor_id\t: User Mode Linux\n");
91 static void *c_next(
struct seq_file *m,
void *v, loff_t *
pos)
97 static void c_stop(
struct seq_file *m,
void *v)
125 static const char *usage_string =
126 "User Mode Linux v%s\n"
127 " available at http://user-mode-linux.sourceforge.net/\n\n";
139 " Prints the version number of the kernel.\n\n"
149 "root=<file containing the root fs>\n"
150 " This is actually used by the generic kernel in exactly the same\n"
151 " way as in any other kernel. If you configure a number of block\n"
152 " devices and want to boot off something other than ubd0, you \n"
153 " would use something like:\n"
154 " root=/dev/ubd5\n\n"
159 printf(
"'debug' is not necessary to gdb UML in skas mode - run \n");
167 " this flag is not needed to run gdb on UML in skas mode\n\n"
173 if (!
sscanf(line,
"%d", &ncpus)) {
174 printf(
"Couldn't parse [%s]\n", line);
182 "ncpus=<# of desired CPUs>\n"
183 " This tells an SMP kernel how many virtual processors to start.\n\n"
187 static int __init Usage(
char *line,
int *add)
193 while (p < &__uml_help_end) {
203 " Prints this message.\n\n"
206 static void __init uml_checksetup(
char *line,
int *add)
210 p = &__uml_setup_start;
211 while (p < &__uml_setup_end) {
221 static void __init uml_postsetup(
void)
226 while (p < &__uml_postsetup_end) {
245 .notifier_call = panic_exit,
260 #define MIN_VMALLOC (32 * 1024 * 1024)
266 unsigned long avail, diff;
267 unsigned long virtmem_size, max_physmem;
273 for (i = 1; i <
argc; i++) {
274 if ((i == 1) && (argv[i][0] ==
' '))
277 uml_checksetup(argv[i], &add);
301 printf(
"UML running in %s mode\n", mode);
303 brk_start = (
unsigned long)
sbrk(0);
312 if (diff > 1024 * 1024) {
313 printf(
"Adding %ld bytes to physical memory to account for "
314 "exec-shield gap\n", diff);
321 uml_reserved =
ROUND_4M(brk_start) + (1 << 22);
334 if (physmem_size +
iomem_size > max_physmem) {
337 #ifndef CONFIG_HIGHMEM
339 printf(
"CONFIG_HIGHMEM not enabled - physical memory shrunk "
340 "to %Lu bytes\n", physmem_size);
352 printf(
"Failed to allocate mem_map for %Lu bytes of physical "
353 "memory and %Lu bytes of highmem\n", physmem_size,
359 stack = (
unsigned long) argv;
360 stack &= ~(1024 * 1024 - 1);
362 if (physmem_size > avail)
363 virtmem_size =
avail;
364 end_vm = start_vm + virtmem_size;
366 if (virtmem_size < physmem_size)
367 printf(
"Kernel virtual memory size shrunk to %lu bytes\n",
371 &panic_exit_notifier);
400 void alternatives_smp_module_add(
struct module *
mod,
char *
name,
401 void *locks,
void *locks_end,
402 void *
text,
void *text_end)
406 void alternatives_smp_module_del(
struct module *
mod)