init.c (f9040773b7bbbd9e98eb6184a263512a7cfc133f) init.c (a89dea585371a9d5d85499db47c93f129be8e0c4)
1/*
2 * Based on arch/arm/mm/init.c
3 *
4 * Copyright (C) 1995-2005 Russell King
5 * Copyright (C) 2012 ARM Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 45 unchanged lines hidden (view full) ---

54{
55 unsigned long start, size;
56 char *endp;
57
58 start = memparse(p, &endp);
59 if (*endp == ',') {
60 size = memparse(endp + 1, NULL);
61
1/*
2 * Based on arch/arm/mm/init.c
3 *
4 * Copyright (C) 1995-2005 Russell King
5 * Copyright (C) 2012 ARM Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 45 unchanged lines hidden (view full) ---

54{
55 unsigned long start, size;
56 char *endp;
57
58 start = memparse(p, &endp);
59 if (*endp == ',') {
60 size = memparse(endp + 1, NULL);
61
62 initrd_start = (unsigned long)__va(start);
63 initrd_end = (unsigned long)__va(start + size);
62 initrd_start = start;
63 initrd_end = start + size;
64 }
65 return 0;
66}
67early_param("initrd", early_initrd);
68#endif
69
70/*
71 * Return the maximum physical address for ZONE_DMA (DMA_BIT_MASK(32)). It

--- 91 unchanged lines hidden (view full) ---

163 memblock_enforce_memory_limit(memory_limit);
164
165 /*
166 * Register the kernel text, kernel data, initrd, and initial
167 * pagetables with memblock.
168 */
169 memblock_reserve(__pa(_text), _end - _text);
170#ifdef CONFIG_BLK_DEV_INITRD
64 }
65 return 0;
66}
67early_param("initrd", early_initrd);
68#endif
69
70/*
71 * Return the maximum physical address for ZONE_DMA (DMA_BIT_MASK(32)). It

--- 91 unchanged lines hidden (view full) ---

163 memblock_enforce_memory_limit(memory_limit);
164
165 /*
166 * Register the kernel text, kernel data, initrd, and initial
167 * pagetables with memblock.
168 */
169 memblock_reserve(__pa(_text), _end - _text);
170#ifdef CONFIG_BLK_DEV_INITRD
171 if (initrd_start)
172 memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
171 if (initrd_start) {
172 memblock_reserve(initrd_start, initrd_end - initrd_start);
173
174 /* the generic initrd code expects virtual addresses */
175 initrd_start = __phys_to_virt(initrd_start);
176 initrd_end = __phys_to_virt(initrd_end);
177 }
173#endif
174
175 early_init_fdt_scan_reserved_mem();
176
177 /* 4GB maximum for 32-bit only capable devices */
178 if (IS_ENABLED(CONFIG_ZONE_DMA))
179 arm64_dma_phys_limit = max_zone_dma_phys();
180 else

--- 203 unchanged lines hidden ---
178#endif
179
180 early_init_fdt_scan_reserved_mem();
181
182 /* 4GB maximum for 32-bit only capable devices */
183 if (IS_ENABLED(CONFIG_ZONE_DMA))
184 arm64_dma_phys_limit = max_zone_dma_phys();
185 else

--- 203 unchanged lines hidden ---