summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-11-30 23:24:56 +0300
committerAlexander Graf <agraf@suse.de>2018-12-02 23:59:37 +0300
commit7b78d6438a2b3a7f58a34934b54a1a83733b8fdd (patch)
treee7701d578d250b5cc47abad743bb73ec0738ec12 /include/common.h
parent335ce71db78b80ab43cf68fcf812fb99bac84c86 (diff)
downloadu-boot-7b78d6438a2b3a7f58a34934b54a1a83733b8fdd.tar.xz
efi_loader: Reserve unaccessible memory
On some systems, not all RAM may be usable within U-Boot. Maybe the memory maps are incomplete, maybe it's used as workaround for broken DMA. But whatever the reason may be, a platform can say that it does not wish to have its RAM accessed above a certain address by defining board_get_usable_ram_top(). In the efi_loader world, we ignored that hint, mostly because very few boards actually have real restrictions around this. So let's honor the board's wish to not access high addresses during boot time. The best way to do so is by indicating the respective pages as "allocated by firmware". That way, Operating Systems will still use the pages after boot, but before boot no allocation will use them. Reported-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 8b56137032..a8e879e1b9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -106,6 +106,17 @@ int mdm_init(void);
void board_show_dram(phys_size_t size);
/**
+ * Get the uppermost pointer that is valid to access
+ *
+ * Some systems may not map all of their address space. This function allows
+ * boards to indicate what their highest support pointer value is for DRAM
+ * access.
+ *
+ * @param total_size Size of U-Boot (unused?)
+ */
+ulong board_get_usable_ram_top(ulong total_size);
+
+/**
* arch_fixup_fdt() - Write arch-specific information to fdt
*
* Defined in arch/$(ARCH)/lib/bootm-fdt.c