diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-03 17:58:07 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-04 11:22:47 +0000 |
commit | 73eaec81689662cf5c1cd6ac5de1152e19b0c14d (patch) | |
tree | e58a86d7c98c6e673cf6f09babbc2af794bdaa62 /src/include | |
parent | 9636a106d43453976addb39253cf70bc65ea1224 (diff) |
device_tree: Add version checks
This patch adds a few more sanity checks to the FDT header parsing to
make sure that our code can support the version that is passed in.
This patch was adapted from depthcharge's http://crosreview.com/1536384
Change-Id: I06c112f540213c8db7c2455c2e8a4e8e4f337b78
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32862
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device_tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/device_tree.h b/src/include/device_tree.h index 14be8322c6..96902b893b 100644 --- a/src/include/device_tree.h +++ b/src/include/device_tree.h @@ -33,7 +33,7 @@ struct fdt_header { uint32_t reserve_map_offset; uint32_t version; - uint32_t last_compatible_version; + uint32_t last_comp_version; uint32_t boot_cpuid_phys; @@ -42,6 +42,7 @@ struct fdt_header { }; #define FDT_HEADER_MAGIC 0xd00dfeed +#define FDT_SUPPORTED_VERSION 17 #define FDT_TOKEN_BEGIN_NODE 1 #define FDT_TOKEN_END_NODE 2 #define FDT_TOKEN_PROPERTY 3 |