summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h22
-rw-r--r--include/asm-generic/sections.h19
-rw-r--r--include/asm-generic/u-boot.h4
3 files changed, 38 insertions, 7 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 745d2c3a966..fd116b0cebf 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -108,6 +108,15 @@ struct global_data {
*/
unsigned long relocaddr;
/**
+ * @initial_relocaddr: top address of U-Boot in RAM
+ *
+ * This should be the value of relocaddr after setup_dest_addr() and
+ * before reserve_pram() or any other allocations or reservations shift
+ * it. This address will, depending on the platform, be equivalent to
+ * ram_top and should also be considered an exclusive address.
+ */
+ unsigned long initial_relocaddr;
+ /**
* @irq_sp: IRQ stack pointer
*/
unsigned long irq_sp;
@@ -448,6 +457,13 @@ struct global_data {
*/
struct upl *upl;
#endif
+ /**
+ * @dram: array describing DRAM banks (start address and size for each bank)
+ */
+ struct { /* RAM configuration */
+ phys_addr_t start;
+ phys_size_t size;
+ } dram[CONFIG_NR_DRAM_BANKS];
};
#ifndef DO_DEPS_ONLY
static_assert(sizeof(struct global_data) == GD_SIZE);
@@ -538,7 +554,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
#define gd_malloc_ptr() gd->malloc_ptr
#else
-#define gd_malloc_ptr() 0L
+#define gd_malloc_ptr() 0
#endif
#if CONFIG_IS_ENABLED(UPL)
@@ -681,9 +697,9 @@ enum gd_flags {
*/
GD_FLG_DM_DEAD = 0x400000,
/**
- * @GD_FLG_BLOBLIST_READY: bloblist is ready for use
+ * @GD_FLG_BLOBLIST_HANDOFF: bloblist has been found.
*/
- GD_FLG_BLOBLIST_READY = 0x800000,
+ GD_FLG_BLOBLIST_HANDOFF = 0x800000,
/**
* @GD_FLG_HUSH_OLD_PARSER: Use hush old parser.
*/
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index d59787948fd..48bd4fa8604 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -9,6 +9,7 @@
#define _ASM_GENERIC_SECTIONS_H_
#include <linux/types.h>
+#include <stdbool.h>
/* References to section boundaries */
@@ -62,6 +63,24 @@ static inline int arch_is_kernel_data(unsigned long addr)
}
#endif
+/**
+ * is_kernel_rodata - checks if the pointer address is located in the
+ * .rodata section
+ *
+ * @addr: address to check
+ *
+ * Returns: true if the address is located in .rodata, false otherwise.
+ */
+static inline bool is_kernel_rodata(unsigned long addr)
+{
+#ifdef CONFIG_ARM64
+ return addr >= (unsigned long)__start_rodata &&
+ addr < (unsigned long)__end_rodata;
+#else
+ return false;
+#endif
+}
+
/* U-Boot-specific things begin here */
/* Start of U-Boot text region */
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index 8c619c1b74a..931fe2f3274 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -59,10 +59,6 @@ struct bd_info {
#endif
ulong bi_arch_number; /* unique id for this board */
ulong bi_boot_params; /* where this board expects params */
- struct { /* RAM configuration */
- phys_addr_t start;
- phys_size_t size;
- } bi_dram[CONFIG_NR_DRAM_BANKS];
};
#endif /* __ASSEMBLY__ */