From 3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Sun, 7 Sep 2008 07:08:42 +1000 Subject: Update i386 code (sc520_cdp) Attempt to bring i386 / sc520 inline with master Signed-off-by: Graeme Russ --- lib_i386/bios_setup.c | 6 ++++-- lib_i386/board.c | 13 ++++++++----- lib_i386/bootm.c | 2 +- lib_i386/video_bios.c | 3 +++ 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'lib_i386') diff --git a/lib_i386/bios_setup.c b/lib_i386/bios_setup.c index 75f04a01fe..33c842c6a0 100644 --- a/lib_i386/bios_setup.c +++ b/lib_i386/bios_setup.c @@ -140,8 +140,9 @@ int bios_setup(void) { static int done=0; int vector; +#ifdef CONFIG_PCI struct pci_controller *pri_hose; - +#endif if (done) { return 0; } @@ -223,12 +224,13 @@ int bios_setup(void) * (This, ofcause break on multi hose systems, * but our PCI BIOS only support one hose anyway) */ +#ifdef CONFIG_PCI pri_hose = pci_bus_to_hose(0); if (NULL != pri_hose) { /* fill in last pci bus number for use by the realmode * PCI BIOS */ RELOC_16_BYTE(0xf000, pci_last_bus) = pri_hose->last_busno; } - +#endif return 0; } diff --git a/lib_i386/board.c b/lib_i386/board.c index 55fa42af42..f3da0a292c 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -213,7 +213,7 @@ init_fnc_t *init_sequence[] = { NULL, }; -gd_t *global_data; +gd_t *gd; void start_i386boot (void) { @@ -226,7 +226,7 @@ void start_i386boot (void) show_boot_progress(0x21); - gd = global_data = &gd_data; + gd = &gd_data; /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); @@ -266,7 +266,7 @@ void start_i386boot (void) int i; ulong reg; char *s, *e; - uchar tmp[64]; + char tmp[64]; i = getenv_r ("ethaddr", tmp, sizeof (tmp)); s = (i > 0) ? tmp : NULL; @@ -412,7 +412,10 @@ void hang (void) unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) { /* - * Nios function pointers are address >> 1 + * TODO: Test this function - changed to fix compiler error. + * Original code was: + * return (entry >> 1) (argc, argv); + * with a comment about Nios function pointers are address >> 1 */ - return (entry >> 1) (argc, argv); + return (entry) (argc, argv); } diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c index 522d7ad8ee..613e339a5f 100644 --- a/lib_i386/bootm.c +++ b/lib_i386/bootm.c @@ -34,7 +34,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) void *base_ptr; ulong os_data, os_len; image_header_t *hdr; - int ret; + #if defined(CONFIG_FIT) const void *data; size_t len; diff --git a/lib_i386/video_bios.c b/lib_i386/video_bios.c index 45f78e22fa..ce96a3e058 100644 --- a/lib_i386/video_bios.c +++ b/lib_i386/video_bios.c @@ -136,6 +136,8 @@ static u32 probe_pci_video(void) #endif +#ifdef CONFIG_VIDEO + static int probe_isa_video(void) { u32 ptr; @@ -217,3 +219,4 @@ int video_bios_init(void) return 1; } +#endif -- cgit v1.2.1 From 6d0f6bcf337c5261c08fabe12982178c2c489d76 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 16 Oct 2008 15:01:15 +0200 Subject: rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- lib_i386/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib_i386') diff --git a/lib_i386/board.c b/lib_i386/board.c index f3da0a292c..659f9a243a 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -84,7 +84,7 @@ static int mem_malloc_init(void) { /* start malloc area right after the stack */ mem_malloc_start = i386boot_bss_start + - i386boot_bss_size + CFG_STACK_SIZE; + i386boot_bss_size + CONFIG_SYS_STACK_SIZE; mem_malloc_start = (mem_malloc_start+3)&~3; /* Use all available RAM for malloc() */ @@ -137,7 +137,7 @@ static int display_banner (void) i386boot_romdata_dest, i386boot_romdata_dest+i386boot_romdata_size-1, i386boot_bss_start, i386boot_bss_start+i386boot_bss_size-1, i386boot_bss_start+i386boot_bss_size, - i386boot_bss_start+i386boot_bss_size+CFG_STACK_SIZE-1); + i386boot_bss_start+i386boot_bss_size+CONFIG_SYS_STACK_SIZE-1); return (0); -- cgit v1.2.1 From 49c3a861d11735838f1f1b11999ce433006dc919 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 21 Oct 2008 17:25:45 -0500 Subject: bootm: Add subcommands Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala --- lib_i386/bootm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib_i386') diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c index 613e339a5f..ea19b3de93 100644 --- a/lib_i386/bootm.c +++ b/lib_i386/bootm.c @@ -40,6 +40,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) size_t len; #endif + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) + return 1; + if (images->legacy_hdr_valid) { hdr = images->legacy_hdr_os; if (image_check_type (hdr, IH_TYPE_MULTI)) { -- cgit v1.2.1 From 561858ee7d0274c3e89dc98d4d0698cb6fcf6fd9 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 3 Nov 2008 09:30:59 -0600 Subject: Update U-Boot's build timestamp on every compile Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile. Signed-off-by: Peter Tyser --- lib_i386/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib_i386') diff --git a/lib_i386/board.c b/lib_i386/board.c index 659f9a243a..1734f86cdf 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -70,7 +71,7 @@ ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; /* size of BIOS const char version_string[] = - U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"; + U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"; /* -- cgit v1.2.1