X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_bdinfo.c;h=6b611b1482969e222415dce677cd6acb463f0637;hb=e3c78c9b3c6a984934f98d3d622618edaa149fbd;hp=d43867f10bcbeb5bdf1cb8ca7ff23e39e7411148;hpb=09b4a9cf4003599f2cd609587dfa5f0b754640ed;p=u-boot diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index d43867f10b..6b611b1482 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -35,7 +35,7 @@ static void print_num(const char *, ulong); static void print_eth(int idx); #endif -#ifndef CONFIG_ARM /* PowerPC and other */ +#if (!defined(CONFIG_ARM) && !defined(CONFIG_X86)) static void print_lnum(const char *, u64); #endif @@ -330,7 +330,6 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bd_t *bd = gd->bd; print_num ("arch_number", bd->bi_arch_number); - print_num ("env_t", (ulong)bd->bi_env); print_num ("boot_params", (ulong)bd->bi_boot_params); for (i=0; ibi_ip_addr); #endif printf ("baudrate = %d bps\n", bd->bi_baudrate); - +#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) +#if !(defined(CONFIG_SYS_NO_ICACHE) && defined(CONFIG_SYS_NO_DCACHE)) + 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); +#endif return 0; } @@ -367,6 +375,45 @@ int do_bdinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#elif defined(CONFIG_X86) + +static void print_str(const char *, const char *); + +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + bd_t *bd = gd->bd; + char buf[32]; + + print_num ("env_t", (ulong)bd->bi_env); + 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_str ("cpufreq", strmhz(buf, bd->bi_intfreq)); + print_str ("busfreq", strmhz(buf, bd->bi_busfreq)); + + for (i=0; i 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_str ("ethspeed", strmhz(buf, bd->bi_ethspeed)); +#endif + printf ("baudrate = %d bps\n", bd->bi_baudrate); + + return 0; +} + #else #error "a case for this architecture does not exist!" #endif @@ -391,14 +438,17 @@ static void print_eth(int idx) } #endif -#ifndef CONFIG_ARM +#if (!defined(CONFIG_ARM) && !defined(CONFIG_X86)) static void print_lnum(const char *name, u64 value) { printf ("%-12s= 0x%.8llX\n", name, value); } #endif -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_BLACKFIN) +#if defined(CONFIG_PPC) || \ + defined(CONFIG_M68K) || \ + defined(CONFIG_BLACKFIN) || \ + defined(CONFIG_X86) static void print_str(const char *name, const char *str) { printf ("%-12s= %6s MHz\n", name, str);