setup.c (6f50fa2a6f1395ad5f59ce7b87730f1f3ea19d76) | setup.c (e112b032a72c78f15d0c803c5dc6be444c2e6c66) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Based on arch/arm/kernel/setup.c 4 * 5 * Copyright (C) 1995-2001 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8 --- 156 unchanged lines hidden (view full) --- 165 * than expected on most systems. 166 */ 167 if (mpidr_hash_size() > 4 * num_possible_cpus()) 168 pr_warn("Large number of MPIDR hash buckets detected\n"); 169} 170 171static void __init setup_machine_fdt(phys_addr_t dt_phys) 172{ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Based on arch/arm/kernel/setup.c 4 * 5 * Copyright (C) 1995-2001 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8 --- 156 unchanged lines hidden (view full) --- 165 * than expected on most systems. 166 */ 167 if (mpidr_hash_size() > 4 * num_possible_cpus()) 168 pr_warn("Large number of MPIDR hash buckets detected\n"); 169} 170 171static void __init setup_machine_fdt(phys_addr_t dt_phys) 172{ |
173 void *dt_virt = fixmap_remap_fdt(dt_phys); | 173 int size; 174 void *dt_virt = fixmap_remap_fdt(dt_phys, &size, PAGE_KERNEL); |
174 const char *name; 175 | 175 const char *name; 176 |
177 if (dt_virt) 178 memblock_reserve(dt_phys, size); 179 |
|
176 if (!dt_virt || !early_init_dt_scan(dt_virt)) { 177 pr_crit("\n" 178 "Error: invalid device tree blob at physical address %pa (virtual address 0x%p)\n" 179 "The dtb must be 8-byte aligned and must not exceed 2 MB in size\n" 180 "\nPlease check your bootloader.", 181 &dt_phys, dt_virt); 182 183 while (true) 184 cpu_relax(); 185 } 186 | 180 if (!dt_virt || !early_init_dt_scan(dt_virt)) { 181 pr_crit("\n" 182 "Error: invalid device tree blob at physical address %pa (virtual address 0x%p)\n" 183 "The dtb must be 8-byte aligned and must not exceed 2 MB in size\n" 184 "\nPlease check your bootloader.", 185 &dt_phys, dt_virt); 186 187 while (true) 188 cpu_relax(); 189 } 190 |
191 /* Early fixups are done, map the FDT as read-only now */ 192 fixmap_remap_fdt(dt_phys, &size, PAGE_KERNEL_RO); 193 |
|
187 name = of_flat_dt_get_machine_name(); 188 if (!name) 189 return; 190 191 pr_info("Machine model: %s\n", name); 192 dump_stack_set_arch_desc("%s (DT)", name); 193} 194 --- 211 unchanged lines hidden --- | 194 name = of_flat_dt_get_machine_name(); 195 if (!name) 196 return; 197 198 pr_info("Machine model: %s\n", name); 199 dump_stack_set_arch_desc("%s (DT)", name); 200} 201 --- 211 unchanged lines hidden --- |