@@ -942,6 +942,18 @@ void __init setup_arch(char **cmdline_p)
struct machine_desc *mdesc;
setup_processor();
+
+ if (__atags_pointer == 0L) {
+ early_print(
+ "Warning: ATAG_CORE/OF_DT_MAGIC pass failed or __atags_pointer NULL\n"
+ " Either r2 was NULL or __vet_atags set r2 to NULL on boot. This can be because\n"
+ " the bootloader is broken, the ATAGs or Device Tree have been overwritten by\n"
+ " other data during the boot process, the wrong address was supplied for the\n"
+ " Device Tree blob, or NULL was explicitly passed for some reason. Please check\n"
+ " into the situation as it is not usual to be able to boot a board with no ATAGs\n"
+ " or Device Tree.\n");
+ }
+
mdesc = setup_machine_fdt(__atags_pointer);
if (!mdesc)
mdesc = setup_machine_tags(machine_arch_type);