+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ int i;
+ bd_t *bd = gd->bd;
+
+ print_num("arch_number", bd->bi_arch_number);
+ print_num("boot_params", (ulong)bd->bi_boot_params);
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
+ print_num("DRAM bank", i);
+ print_num("-> start", bd->bi_dram[i].start);
+ print_num("-> size", bd->bi_dram[i].size);
+ }
+
+#if defined(CONFIG_CMD_NET)
+ print_eth(0);
+ printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+#endif
+ printf("baudrate = %d bps\n", bd->bi_baudrate);
+#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
+ print_num("TLB addr", gd->tlb_addr);
+#endif
+ print_num("relocaddr", gd->relocaddr);
+ print_num("reloc off", gd->reloc_off);
+ print_num("irq_sp", gd->irq_sp); /* irq stack pointer */
+ print_num("sp start ", gd->start_addr_sp);
+ print_num("FB base ", gd->fb_base);
+ return 0;
+}
+
+#elif defined(CONFIG_SH)
+
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ bd_t *bd = gd->bd;
+ print_num("mem start ", (ulong)bd->bi_memstart);
+ print_lnum("mem size ", (u64)bd->bi_memsize);
+ print_num("flash start ", (ulong)bd->bi_flashstart);
+ print_num("flash size ", (ulong)bd->bi_flashsize);
+ print_num("flash offset ", (ulong)bd->bi_flashoffset);
+
+#if defined(CONFIG_CMD_NET)
+ print_eth(0);
+ printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+#endif
+ printf("baudrate = %ld bps\n", (ulong)bd->bi_baudrate);
+ return 0;
+}
+
+#elif defined(CONFIG_X86)
+
+static void print_mhz(const char *, unsigned long);
+
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ int i;
+ bd_t *bd = gd->bd;
+
+ print_num("boot_params", (ulong)bd->bi_boot_params);
+ print_num("bi_memstart", bd->bi_memstart);
+ print_num("bi_memsize", bd->bi_memsize);
+ print_num("bi_flashstart", bd->bi_flashstart);
+ print_num("bi_flashsize", bd->bi_flashsize);
+ print_num("bi_flashoffset", bd->bi_flashoffset);
+ print_num("bi_sramstart", bd->bi_sramstart);
+ print_num("bi_sramsize", bd->bi_sramsize);
+ print_num("bi_bootflags", bd->bi_bootflags);
+ print_mhz("cpufreq", bd->bi_intfreq);
+ print_mhz("busfreq", bd->bi_busfreq);
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
+ print_num("DRAM bank", i);
+ print_num("-> start", bd->bi_dram[i].start);
+ print_num("-> size", bd->bi_dram[i].size);
+ }
+
+#if defined(CONFIG_CMD_NET)
+ print_eth(0);
+ printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ print_mhz("ethspeed", bd->bi_ethspeed);
+#endif
+ printf("baudrate = %d bps\n", bd->bi_baudrate);
+
+ return 0;
+}
+
+#elif defined(CONFIG_SANDBOX)
+
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])