|
From: Kenn H. <ke...@us...> - 2004-09-30 08:27:06
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27333/arch/vax/kernel Modified Files: cpu_ka46.c cpu_ka650.c Log Message: Stuff the actual contents of the machvec_match structures into the relevant section, rather than pointers to them (simplifies the code). Also need to be careful about pointers to things in the kernel at this early stage of boot. In code, we've got MOVAx instructions with PC-relative addressing that are nicely position independent, but pointers embedded in data structures by the linker (such as machvec_match.mv) will always have S0-space addresses (such as 0x80123456). So, the new id_cpu function needs to correct for this before returning to the boot code. Was the first-cut matching stuff boot tested on KA46? I can't see how it would have worked :-) Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cpu_ka650.c 30 Jul 2004 00:21:27 -0000 1.12 +++ cpu_ka650.c 30 Sep 2004 08:26:56 -0000 1.13 @@ -22,8 +22,9 @@ static void ka650_pre_vm_init(void) { +#ifndef USE_NEW_VECTORS mv_ka650.sidex = *(unsigned int *)CVAX_SIDEX_ADDR; - +#endif /* * Disable the level 1 and level 2 caches. My docs say that the * caches are disabled automatically at power up and when DCOK @@ -81,6 +82,34 @@ .clock_init = generic_clock_init, }; +#ifdef USE_NEW_VECTORS +struct machvec_match __CPU_MATCH mvm_ka650 = { + .mv = &mv_ka650, + .sid_mask = VAX_SID_FAMILY_MASK, + .sid_match = VAX_CVAX << VAX_SID_FAMILY_SHIFT, + + .sidex_addr = CVAX_SIDEX_ADDR, + + .sidex_mask = CVAX_SIDEX_TYPE_MASK | CVAX_Q22_SUBTYPE_MASK, + .sidex_match = (CVAX_SIDEX_TYPE_Q22 << CVAX_SIDEX_TYPE_SHIFT) | + (CVAX_Q22_SUBTYPE_KA650 << CVAX_Q22_SUBTYPE_SHIFT), +}; + + +struct machvec_match __CPU_MATCH mvm_ka655 = { + .mv = &mv_ka650, + .sid_mask = VAX_SID_FAMILY_MASK, + .sid_match = VAX_CVAX << VAX_SID_FAMILY_SHIFT, + + .sidex_addr = CVAX_SIDEX_ADDR, + + .sidex_mask = CVAX_SIDEX_TYPE_MASK | CVAX_Q22_SUBTYPE_MASK, + .sidex_match = (CVAX_SIDEX_TYPE_Q22 << CVAX_SIDEX_TYPE_SHIFT) | + (CVAX_Q22_SUBTYPE_KA655 << CVAX_Q22_SUBTYPE_SHIFT), +}; + +#endif /* USE_NEW_VECTORS */ + static struct platform_device ka650_cqbic_device = { .name = "cqbic" }; Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- cpu_ka46.c 29 Sep 2004 14:48:19 -0000 1.18 +++ cpu_ka46.c 30 Sep 2004 08:26:56 -0000 1.19 @@ -140,7 +140,7 @@ }; #ifdef USE_NEW_VECTORS -struct machvec_match mvm_ka46 = { +struct machvec_match __CPU_MATCH mvm_ka46 = { .mv = &mv_ka46, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_MARIAH << VAX_SID_FAMILY_SHIFT, @@ -150,8 +150,6 @@ .sidex_mask = 0x00000000, .sidex_match = 0x00000000, }; - -SET_VECTOR (mvm_ka46); #endif /* USE_NEW_VECTORS */ static struct platform_device ka46_vsbus_device = { |