x86, efi: Add basic error handling
authorOlof Johansson <olof@lixom.net>
Sun, 12 Feb 2012 21:24:28 +0000 (13:24 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 24 Feb 2012 02:54:39 +0000 (18:54 -0800)
commit140bf275d3e89e9b36851d5cf498dbbbecdf7ca8
tree9acc553c7e74d82102ff035b49bc0e06dc85f8b7
parenta6a46f415dca828a04a435ca1f67de0bc5b9ae30
x86, efi: Add basic error handling

It's not perfect, but way better than before. Mark efi_enabled as false in
case of error and at least stop dereferencing pointers that are known to
be invalid.

The only significant missing piece is the lack of undoing the
memblock_reserve of the memory that efi marks as in use. On the other
hand, it's not a large amount of memory, and leaving it unavailable for
system use should be the safer choice anyway.

Signed-off-by: Olof Johansson <olof@lixom.net>
Link: http://lkml.kernel.org/r/1329081869-20779-5-git-send-email-olof@lixom.net
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/platform/efi/efi.c