0001
0002
0003
0004
0005
0006
0007 #include <linux/init.h>
0008 #include <linux/kernel.h>
0009 #include <asm/setup.h>
0010 #include <asm/sections.h>
0011
0012
0013
0014
0015
0016
0017
0018
0019 notrace unsigned long __init early_init(unsigned long dt_ptr)
0020 {
0021 unsigned long kva, offset = reloc_offset();
0022
0023 kva = *PTRRELOC(&kernstart_virt_addr);
0024
0025
0026 if (kva == KERNELBASE)
0027 memset(PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start);
0028
0029
0030
0031
0032
0033 identify_cpu(offset, mfspr(SPRN_PVR));
0034
0035 apply_feature_fixups();
0036
0037 return kva + offset;
0038 }