]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Check flat device tree version at boot
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 28 Aug 2014 08:40:47 +0000 (18:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:50 +0000 (23:14 +1000)
commit6a680be9568bb1d9f745a7106d7450a328a540d4
tree134686b3b28605c37ffa9cabbe9292747de981f4
parent58f0f88388e58a3d08633aeb2b4629d304f52d35
powerpc: Check flat device tree version at boot

In commit 37b8da12b27c "of/fdt: Convert FDT functions to use libfdt",
the kernel stopped supporting old flat device tree formats. The minimum
supported version is now 0x10.

There was a checking function added, early_init_dt_verify(), but it's
not called on powerpc.

The result is, if you boot with an old flat device tree, the kernel will
fail to parse it correctly, think you have no memory etc. and hilarity
ensues.

We can't really fix it, but we can at least catch the fact that the
device tree is in an unsupported format and panic(). We can't call
BUG(), it's too early.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom.c