X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=init%2Fdo_mounts_initrd.c;h=a9c6cc56f505e6210356b0c8d94e8aa90dbc2aa7;hb=5bf9a06a5f7ca525621f4117257a49dc5a2786da;hp=73e02ea5d5d18b4ea77a2e52aa5985a98818278c;hpb=75f95da078b2891cd186f074ffc15a8e7c3f082d;p=linux.git diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 73e02ea5d5d1..a9c6cc56f505 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "do_mounts.h" @@ -16,6 +17,9 @@ int initrd_below_start_ok; unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_t */ static int __initdata mount_initrd = 1; +phys_addr_t phys_initrd_start __initdata; +unsigned long phys_initrd_size __initdata; + static int __init no_initrd(char *str) { mount_initrd = 0; @@ -24,6 +28,23 @@ static int __init no_initrd(char *str) __setup("noinitrd", no_initrd); +static int __init early_initrd(char *p) +{ + phys_addr_t start; + unsigned long size; + char *endp; + + start = memparse(p, &endp); + if (*endp == ',') { + size = memparse(endp + 1, NULL); + + phys_initrd_start = start; + phys_initrd_size = size; + } + return 0; +} +early_param("initrd", early_initrd); + static int init_linuxrc(struct subprocess_info *info, struct cred *new) { ksys_unshare(CLONE_FS | CLONE_FILES);