diff options
author | Laura Abbott <lauraa@codeaurora.org> | 2014-07-15 10:03:35 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-07-29 21:26:45 -0600 |
commit | 704033cee2e5b3c1c6eaf5bb398e465a9c3667b5 (patch) | |
tree | 4b6e7a5ca961e3b8c82fd82295b53cca550a332a /include/linux/of_fdt.h | |
parent | 4972a74b888c6b52ca41fae6076786dbbeb746d5 (diff) | |
download | linux-704033cee2e5b3c1c6eaf5bb398e465a9c3667b5.tar.gz linux-704033cee2e5b3c1c6eaf5bb398e465a9c3667b5.tar.bz2 linux-704033cee2e5b3c1c6eaf5bb398e465a9c3667b5.zip |
of: Add memory limiting function for flattened devicetrees
Buggy bootloaders may pass bogus memory entries in the devicetree.
Add of_fdt_limit_memory to add an upper bound on the number of
entries that can be present in the devicetree.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r-- | include/linux/of_fdt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index ebb2449082fb..0ff360d5b3b3 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -86,6 +86,7 @@ extern void unflatten_and_copy_device_tree(void); extern void early_init_devtree(void *); extern void early_get_first_memblock_info(void *, phys_addr_t *); extern u64 fdt_translate_address(const void *blob, int node_offset); +extern void of_fdt_limit_memory(int limit); #else /* CONFIG_OF_FLATTREE */ static inline void early_init_fdt_scan_reserved_mem(void) {} static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } |