|
@@ -719,6 +719,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
|
|
const char *uname, int depth, void *data)
|
|
const char *uname, int depth, void *data)
|
|
{
|
|
{
|
|
unsigned long *lprop;
|
|
unsigned long *lprop;
|
|
|
|
+ u32 *prop;
|
|
unsigned long l;
|
|
unsigned long l;
|
|
char *p;
|
|
char *p;
|
|
|
|
|
|
@@ -760,6 +761,22 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
|
|
crashk_res.end = crashk_res.start + *lprop - 1;
|
|
crashk_res.end = crashk_res.start + *lprop - 1;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#ifdef CONFIG_BLK_DEV_INITRD
|
|
|
|
+ DBG("Looking for initrd properties... ");
|
|
|
|
+ prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l);
|
|
|
|
+ if (prop) {
|
|
|
|
+ initrd_start = (unsigned long)__va(of_read_ulong(prop, l/4));
|
|
|
|
+ prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l);
|
|
|
|
+ if (prop) {
|
|
|
|
+ initrd_end = (unsigned long)__va(of_read_ulong(prop, l/4));
|
|
|
|
+ initrd_below_start_ok = 1;
|
|
|
|
+ } else {
|
|
|
|
+ initrd_start = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ DBG("initrd_start=0x%lx initrd_end=0x%lx\n", initrd_start, initrd_end);
|
|
|
|
+#endif /* CONFIG_BLK_DEV_INITRD */
|
|
|
|
+
|
|
/* Retreive command line */
|
|
/* Retreive command line */
|
|
p = of_get_flat_dt_prop(node, "bootargs", &l);
|
|
p = of_get_flat_dt_prop(node, "bootargs", &l);
|
|
if (p != NULL && l > 0)
|
|
if (p != NULL && l > 0)
|
|
@@ -926,6 +943,12 @@ static void __init early_reserve_mem(void)
|
|
self_size = initial_boot_params->totalsize;
|
|
self_size = initial_boot_params->totalsize;
|
|
lmb_reserve(self_base, self_size);
|
|
lmb_reserve(self_base, self_size);
|
|
|
|
|
|
|
|
+#ifdef CONFIG_BLK_DEV_INITRD
|
|
|
|
+ /* then reserve the initrd, if any */
|
|
|
|
+ if (initrd_start && (initrd_end > initrd_start))
|
|
|
|
+ lmb_reserve(__pa(initrd_start), initrd_end - initrd_start);
|
|
|
|
+#endif /* CONFIG_BLK_DEV_INITRD */
|
|
|
|
+
|
|
#ifdef CONFIG_PPC32
|
|
#ifdef CONFIG_PPC32
|
|
/*
|
|
/*
|
|
* Handle the case where we might be booting from an old kexec
|
|
* Handle the case where we might be booting from an old kexec
|