summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-10-25 14:22:36 -0600
committerTom Rini <trini@konsulko.com>2024-10-25 14:22:36 -0600
commitdeafcdc8e014dc83f154cc448cf8cf6a24b29136 (patch)
tree853fc8fe04e1235d55b077f86e22dfc0ba0a41f2 /include/asm-generic
parent3fbc657669591ca893613f14d42e07069b7d56cd (diff)
parent9252b7f867f7638ba3f6af85058fee7b3993222d (diff)
Merge patch series "Allow showing the memory map"
Simon Glass <sjg@chromium.org> says: This little series adds a new 'memmap' command, intended to show the layout of memory within U-Boot and how much memory is available for loading images. Link: https://lore.kernel.org/r/20241021081934.289473-1-sjg@chromium.org
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index b84cc5bbecd..bf593d96a84 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -543,6 +543,36 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_upl(val)
#endif
+#if CONFIG_IS_ENABLED(BLOBLIST)
+#define gd_bloblist() gd->bloblist
+#else
+#define gd_bloblist() NULL
+#endif
+
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
+#define gd_bootstage() gd->bootstage
+#else
+#define gd_bootstage() NULL
+#endif
+
+#if CONFIG_IS_ENABLED(TRACE)
+#define gd_trace_buff() gd->trace_buff
+#define gd_trace_size() CONFIG_TRACE_BUFFER_SIZE
+#else
+#define gd_trace_buff() NULL
+#define gd_trace_size() 0
+#endif
+
+#if CONFIG_IS_ENABLED(VIDEO)
+#define gd_video_top() gd->video_top
+#define gd_video_bottom() gd->video_bottom
+#define gd_video_size() (gd->video_top - gd->video_bottom)
+#else
+#define gd_video_top() 0
+#define gd_video_bottom() 0
+#define gd_video_size() 0
+#endif
+
/**
* enum gd_flags - global data flags
*