X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=ac63c462c36d5cd4af3dda15e93714cc8f80e6bb;hp=f8e7d65675763d68ac08a59e50889f55eb23299d;hb=6d1b9adfa92da6ad903544b7497f05462ef8a301;hpb=4d84db875abc3fb337368263333c47bfd5c14d13 diff --git a/second/yaboot.c b/second/yaboot.c index f8e7d65..ac63c46 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -58,6 +58,8 @@ #define CONFIG_FILE_NAME "yaboot.conf" #define CONFIG_FILE_MAX 0x8000 /* 32k */ +#define MESSAGE_FILE_MAX 2048 + #ifdef USE_MD5_PASSWORDS #include "md5.h" #endif /* USE_MD5_PASSWORDS */ @@ -154,10 +156,6 @@ int fgcolor = 15; int bgcolor = 0; #endif /* CONFIG_COLOR_TEXT */ -#if DEBUG -static int test_bss; -static int test_data = 0; -#endif static int pause_after; static char *pause_message = "Type go to continue.\n"; static char given_bootargs[1024]; @@ -174,8 +172,6 @@ extern unsigned char linux_logo_blue[]; extern char* __bss_start; extern char* _end; -static struct first_info *quik_fip = NULL; - int yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) { @@ -187,15 +183,6 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) /* OF seems to do it, but I'm not very confident */ memset(&__bss_start, 0, &_end - &__bss_start); - /* Check for quik first stage bootloader (but I don't think we are - * compatible with it anyway, I'll look into backporting to older OF - * versions later - */ - if (r5 == 0xdeadbeef) { - r5 = r3; - quik_fip = (struct first_info *)r4; - } - /* Initialize OF interface */ prom_init ((prom_entry) r5); @@ -215,10 +202,6 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) /* A few useless DEBUG_F's */ DEBUG_F("reloc_offset : %ld (should be 0)\n", reloc_offset()); - DEBUG_F("test_bss : %d (should be 0)\n", test_bss); - DEBUG_F("test_data : %d (should be 0)\n", test_data); - DEBUG_F("&test_data : %p\n", &test_data); - DEBUG_F("&test_bss : %p\n", &test_bss); DEBUG_F("linked at : 0x%08x\n", TEXTADDR); /* ask the OF info if we're a chrp or pmac */ @@ -314,13 +297,13 @@ void print_message_file(char *filename) } else opened = 1; - msg = malloc(2001); + msg = malloc(MESSAGE_FILE_MAX + 1); if (!msg) goto done; else - memset(msg, 0, 2001); + memset(msg, 0, MESSAGE_FILE_MAX + 1); - if (file.fs->read(&file, 2000, msg) <= 0) + if (file.fs->read(&file, MESSAGE_FILE_MAX, msg) <= 0) goto done; else prom_printf("%s", msg);