From: James S. <jsi...@us...> - 2001-10-15 01:13:21
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel In directory usw-pr-cvs1:/tmp/cvs-serv1198/arch/alpha/kernel Modified Files: setup.c Log Message: Synced to 2.4.12 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel/setup.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- setup.c 2001/10/05 03:58:58 1.3 +++ setup.c 2001/10/15 01:13:16 1.4 @@ -63,12 +63,20 @@ /* Which processor we booted from. */ int boot_cpuid; -/* Using SRM callbacks for initial console output. This works from - setup_arch() time through the end of init_IRQ(), as those places - are under our control. +/* + * Using SRM callbacks for initial console output. This works from + * setup_arch() time through the end of time_init(), as those places + * are under our (Alpha) control. - By default, OFF; set it with a bootcommand arg of "srmcons". -*/ + * "srmcons" specified in the boot command arguments allows us to + * see kernel messages during the period of time before the true + * console device is "registered" during console_init(). As of this + * version (2.4.10), time_init() is the last Alpha-specific code + * called before console_init(), so we put "unregister" code + * there to prevent schizophrenic console behavior later... ;-} + * + * By default, OFF; set it with a bootcommand arg of "srmcons". + */ int srmcons_output = 0; /* Enforce a memory size limit; useful for testing. By default, none. */ @@ -85,7 +93,7 @@ static struct alpha_machine_vector *get_sysvec(long, long, long); static struct alpha_machine_vector *get_sysvec_byname(const char *); -static void get_sysnames(long, long, char **, char **); +static void get_sysnames(long, long, long, char **, char **); static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; @@ -537,14 +545,14 @@ /* * Indentify and reconfigure for the current system. */ + cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset); + get_sysnames(hwrpb->sys_type, hwrpb->sys_variation, - &type_name, &var_name); + cpu->type, &type_name, &var_name); if (*var_name == '0') var_name = ""; if (!vec) { - cpu = (struct percpu_struct*) - ((char*)hwrpb + hwrpb->processor_offset); vec = get_sysvec(hwrpb->sys_type, hwrpb->sys_variation, cpu->type); } @@ -788,6 +796,8 @@ /* Member ID is a bit-field. */ long member = (variation >> 10) & 0x3f; + cpu &= 0xffffffff; /* make it usable */ + switch (type) { case ST_DEC_ALCOR: if (member < N(alcor_indices)) @@ -796,6 +806,10 @@ case ST_DEC_EB164: if (member < N(eb164_indices)) vec = eb164_vecs[eb164_indices[member]]; + /* PC164 may show as EB164 variation with EV56 CPU, + but, since no true EB164 had anything but EV5... */ + if (vec == &eb164_mv && cpu == EV56_CPU) + vec = &pc164_mv; break; case ST_DEC_EB64P: if (member < N(eb64p_indices)) @@ -814,21 +828,18 @@ vec = tsunami_vecs[tsunami_indices[member]]; break; case ST_DEC_1000: - cpu &= 0xffffffff; if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &mikasa_primo_mv; else vec = &mikasa_mv; break; case ST_DEC_NORITAKE: - cpu &= 0xffffffff; if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &noritake_primo_mv; else vec = &noritake_mv; break; case ST_DEC_2100_A500: - cpu &= 0xffffffff; if (cpu == EV5_CPU || cpu == EV56_CPU) vec = &sable_gamma_mv; else @@ -892,7 +903,7 @@ } static void -get_sysnames(long type, long variation, +get_sysnames(long type, long variation, long cpu, char **type_name, char **variation_name) { long member; @@ -925,12 +936,18 @@ member = (variation >> 10) & 0x3f; /* member ID is a bit-field */ + cpu &= 0xffffffff; /* make it usable */ + switch (type) { /* select by family */ default: /* default to variation "0" for now */ break; case ST_DEC_EB164: if (member < N(eb164_indices)) *variation_name = eb164_names[eb164_indices[member]]; + /* PC164 may show as EB164 variation, but with EV56 CPU, + so, since no true EB164 had anything but EV5... */ + if (eb164_indices[member] == 0 && cpu == EV56_CPU) + *variation_name = eb164_names[1]; /* make it PC164 */ break; case ST_DEC_ALCOR: if (member < N(alcor_indices)) @@ -1041,7 +1058,7 @@ cpu_name = cpu_names[cpu_index]; get_sysnames(hwrpb->sys_type, hwrpb->sys_variation, - &systype_name, &sysvariation_name); + cpu->type, &systype_name, &sysvariation_name); nr_processors = get_nr_processors(cpu, hwrpb->nr_processors); |