summaryrefslogtreecommitdiff
path: root/cmd/meminfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/meminfo.c')
-rw-r--r--cmd/meminfo.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/cmd/meminfo.c b/cmd/meminfo.c
new file mode 100644
index 00000000000..bb9bcec2e3f
--- /dev/null
+++ b/cmd/meminfo.c
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#include <command.h>
+#include <display_options.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static int do_meminfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ puts("DRAM: ");
+ print_size(gd->ram_size, "\n");
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ meminfo, 1, 1, do_meminfo,
+ "display memory information",
+ ""
+);