From: Russ D. <ru...@us...> - 2001-09-02 23:35:31
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv7689/src Modified Files: main.c memory.c param_block.c Log Message: Put terminal baud in core tag so it can be parsed early Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/main.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- main.c 2001/09/02 03:13:54 1.7 +++ main.c 2001/09/02 23:35:28 1.8 @@ -103,16 +103,13 @@ blob_status.boot_delay = 10; SerialInit(blob_status.terminalSpeed); - /* get the amount of memory */ - get_memory_map(); - - TimerInit(); - - /* Parse the paramater block */ + /* parse the core tag, for critical things like terminal speed */ #ifdef PARAM_START - parse_ptags((void *) PARAM_START, &conf); + parse_ptag((void *) PARAM_START, &conf); #endif + TimerInit(); + /* Print the required GPL string */ SerialOutputString("\nConsider yourself LARTed!\n\n"); SerialOutputString(PACKAGE " version " VERSION "\n" @@ -126,12 +123,15 @@ "to redistribute it\n"); SerialOutputString("under certain conditions; " "read the GNU GPL for details.\n"); + + /* get the amount of memory */ + get_memory_map(); + + /* Parse all the tags in the paramater block */ +#ifdef PARAM_START + parse_ptags((void *) PARAM_START, &conf); +#endif - /* Paramater block parsing can change the baud rate. get_memory_map - * can destroy things that parse_ptags does, So break up the - * memory make detection/display */ - show_memory_map(); - /* Load kernel and ramdisk from flash to RAM */ Reload("blob"); Reload("kernel"); Index: memory.c =================================================================== RCS file: /cvsroot/blob/blob/src/memory.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- memory.c 2001/09/02 02:29:54 1.3 +++ memory.c 2001/09/02 23:35:28 1.4 @@ -99,12 +99,6 @@ i++; } } -} - - -void show_memory_map(void) -{ - int i; SerialOutputString("Memory map:\n"); for(i = 0; i < NUM_MEM_AREAS; i++) { if(memory_map[i].used) { Index: param_block.c =================================================================== RCS file: /cvsroot/blob/blob/src/param_block.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- param_block.c 2001/09/02 03:08:20 1.3 +++ param_block.c 2001/09/02 23:35:28 1.4 @@ -54,6 +54,8 @@ */ static int parse_ptag_core(const struct ptag *ptag) { + blob_status.terminalSpeed = ptag->u.core.terminal; + SerialInit(blob_status.terminalSpeed); return 0; } @@ -86,8 +88,6 @@ static int parse_ptag_baud(const struct ptag *ptag) { - blob_status.terminalSpeed = ptag->u.baud.terminal; - SerialInit(blob_status.terminalSpeed); blob_status.downloadSpeed = ptag->u.baud.download; return 0; } @@ -109,7 +109,7 @@ * The tag table is built by the linker from all the __ptagtable * declarations. */ -static int parse_ptag(const struct ptag *ptag, u32 *conf) +int parse_ptag(const struct ptag *ptag, u32 *conf) { extern struct ptagtable __ptagtable_begin, __ptagtable_end; struct ptagtable *t; |