diff options
| author | Laura Abbott <lauraa@codeaurora.org> | 2014-07-15 13:03:35 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@linaro.org> | 2014-07-29 23:26:45 -0400 |
| commit | 704033cee2e5b3c1c6eaf5bb398e465a9c3667b5 (patch) | |
| tree | 4b6e7a5ca961e3b8c82fd82295b53cca550a332a /include/linux | |
| parent | 4972a74b888c6b52ca41fae6076786dbbeb746d5 (diff) | |
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')
| -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); | |||
| 86 | extern void early_init_devtree(void *); | 86 | extern void early_init_devtree(void *); |
| 87 | extern void early_get_first_memblock_info(void *, phys_addr_t *); | 87 | extern void early_get_first_memblock_info(void *, phys_addr_t *); |
| 88 | extern u64 fdt_translate_address(const void *blob, int node_offset); | 88 | extern u64 fdt_translate_address(const void *blob, int node_offset); |
| 89 | extern void of_fdt_limit_memory(int limit); | ||
| 89 | #else /* CONFIG_OF_FLATTREE */ | 90 | #else /* CONFIG_OF_FLATTREE */ |
| 90 | static inline void early_init_fdt_scan_reserved_mem(void) {} | 91 | static inline void early_init_fdt_scan_reserved_mem(void) {} |
| 91 | static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } | 92 | static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } |
