libflash: Add sanity checks to ffs init code.
libflash: Add sanity checks to ffs init code.

Quite a lot of code relies on values read from flash. These values
shouldn't be totally trusted without at least basic sanity checks.

Fixes coverity bug: 119719

Signed-off-by: Cyril Bur <6ce38dade8c4b52fd55c193fae70fd1d1275c3c3@au1.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

legoater/skiboot,stewart-ibm/skiboot,qemu/skiboot,open-power/skiboot,mikey/skiboot,shenki/skiboot,legoater/skiboot,mikey/skiboot,open-power/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,legoater/skiboot,shenki/skiboot,open-power/skiboot,shenki/skiboot,legoater/skiboot,shenki/skiboot,shenki/skiboot,qemu/skiboot,open-power/skiboot,qemu/skiboot,qemu/skiboot,stewart-ibm/skiboot,mikey/skiboot,stewart-ibm/skiboot