You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
(66) |
Jul
(16) |
Aug
(2) |
Sep
(7) |
Oct
(17) |
Nov
(1) |
Dec
(220) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(154) |
Feb
(167) |
Mar
(159) |
Apr
(172) |
May
(35) |
Jun
(58) |
Jul
(97) |
Aug
(285) |
Sep
(139) |
Oct
(252) |
Nov
(8) |
Dec
(3) |
| 2004 |
Jan
(13) |
Feb
(159) |
Mar
(136) |
Apr
(33) |
May
(50) |
Jun
(42) |
Jul
(140) |
Aug
(42) |
Sep
(199) |
Oct
(31) |
Nov
(55) |
Dec
|
| 2005 |
Jan
|
Feb
(12) |
Mar
(214) |
Apr
(119) |
May
(21) |
Jun
(2) |
Jul
(127) |
Aug
(10) |
Sep
(3) |
Oct
(24) |
Nov
(1) |
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(13) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(26) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 21:08:53
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23691 Modified Files: Kconfig Log Message: - Introduce KA49 into the build system, 2nd part. Index: Kconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/Kconfig,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Kconfig 15 Sep 2004 21:57:05 -0000 1.21 +++ Kconfig 30 Sep 2004 21:08:44 -0000 1.22 @@ -100,6 +100,10 @@ bool "Support for KA48 (VAXstation 4000 VLC)" default n +config CPU_KA49 + bool "Support for KA49 (VAXstation 4000/90)" + default n + config CPU_KA55 bool "Support for KA55" default n |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 21:06:51
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23162 Modified Files: Makefile Log Message: - Introduce cpu_ka49.c into the build system, part one. Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Makefile 12 May 2004 11:46:09 -0000 1.16 +++ Makefile 30 Sep 2004 21:06:42 -0000 1.17 @@ -15,6 +15,7 @@ obj-$(CONFIG_CPU_KA43) += cpu_ka43.o obj-$(CONFIG_CPU_KA46) += cpu_ka46.o obj-$(CONFIG_CPU_KA48) += cpu_ka48.o +obj-$(CONFIG_CPU_KA49) += cpu_ka49.o obj-$(CONFIG_CPU_KA55) += cpu_ka55.o obj-$(CONFIG_CPU_KA410) += cpu_ka410.o obj-$(CONFIG_CPU_KA630) += cpu_ka630.o |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 21:05:54
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22793 Added Files: cpu_ka49.c Log Message: - Start of the KA49 port. - Will crash while accessing the DZ11 with the normal serial driver. --- NEW FILE: cpu_ka49.c --- /* * Copyright (C) 2004 by Jan-Benedict Glaw <jb...@lu...> * * This file contains a machine vector for the KA49 CPU. */ #include <linux/types.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/config.h> #include <linux/init.h> #include <linux/device.h> #include <asm/mtpr.h> #include <asm/mv.h> #include <asm/vaxcpu.h> #include <asm/clock.h> /* for clock_init routines */ #include <asm/bus/vsbus.h> static void ka49_post_vm_init(void) { int start, slut; #ifdef CONFIG_DZ init_dz11_console(0x25000000, 3); dz_serial_console_init(); #endif /* * Enable Caches */ #define PR_CCTL 0x0a #define CCTL_ENABLE 0x00000001 #define CCTL_SSIZE 0x00000002 #define CCTL_VSIZE 0x00000004 #define CCTL_SW_ETM 0x40000000 #define CCTL_HW_ETM 0x80000000 #define PR_BCETSTS 0xa3 #define PR_BCEDSTS 0xa6 #define PR_NESTS 0xae #define PR_VMAR 0xd0 #define PR_VTAG 0xd1 #define PR_ICSR 0xd3 #define ICSR_ENABLE 0x01 #define PR_PCCTL 0xf8 #define PCCTL_P_EN 0x10 /* Primary Cache Enable */ #define PCCTL_I_EN 0x02 /* Instruction Cache Enable */ #define PCCTL_D_EN 0x01 /* Data Cache Enable */ /* * Caches off */ __mtpr (0, PR_ICSR); __mtpr (0, PR_PCCTL); __mtpr (__mfpr (PR_CCTL) | CCTL_SW_ETM, PR_CCTL); /* * Invalidate Caches */ __mtpr (__mfpr (PR_CCTL) | 0x10, PR_CCTL); /* Set Cache Size */ __mtpr (__mfpr (PR_BCETSTS), PR_BCETSTS); /* Clear Error Bits */ __mtpr (__mfpr (PR_BCEDSTS), PR_BCEDSTS); /* Clear Error Bits */ __mtpr (__mfpr (PR_NESTS), PR_NESTS); /* Clear Error Bits */ /* * Flush Cache Lines */ start = 0x01400000; slut = 0x01440000; for (; start < slut; start += 0x20) __mtpr (0, start); __mtpr ((__mfpr (PR_CCTL) & ~(CCTL_SW_ETM | CCTL_ENABLE)) | CCTL_HW_ETM, PR_CCTL); /* * Clear Tag and Valid */ start = 0x01000000; slut = 0x01040000; for (; start < slut; start += 0x20) __mtpr (0, start); __mtpr (__mfpr (PR_CCTL) | 0x10 | CCTL_ENABLE, PR_CCTL); /* Enable BCache */ /* * Clear Primary Cache (2nd level, 8KB, on-CPU) */ start = 0x01800000; slut = 0x01802000; for (; start < slut; start += 0x20) __mtpr (0, start); /* * Flush The Pipe (via REI) */ asm ( "movpsl -(%sp);" "movab 1f,-(%sp);" "rei;" "1:;"); /* * Enable Primary Cache */ __mtpr (PCCTL_P_EN | PCCTL_I_EN | PCCTL_D_EN, PR_PCCTL); /* * Enable Virtual Instruction Cache (1st level, 2KB, on-CPU) */ start = 0x00000000; slut = 0x00000800; for (; start < slut; start += 0x20) { __mtpr (start, PR_VMAR); __mtpr (0, PR_VTAG); } __mtpr (ICSR_ENABLE, PR_ICSR); return; } static const char *ka49_cpu_type_str(void) { return "KA49"; } static void ka49_pre_vm_init(void) { #ifndef USE_NEW_VECTORS mv_ka49.sidex = * (unsigned int *) NVAX_SIDEX_ADDR; #endif // KA46: __mtpr(PR_ACCS, 2); /* Enable floating points */ } static void ka49_init_devices(void) { printk ("ka49: init_devices\n"); } struct vax_mv mv_ka49 = { .pre_vm_init = ka49_pre_vm_init, .post_vm_init = ka49_post_vm_init, .pre_vm_putchar = ka46_48_49_prom_putchar, .pre_vm_getchar = ka46_48_49_prom_getchar, .post_vm_putchar = dz11_putchar, .post_vm_getchar = dz11_getchar, .init_devices = ka49_init_devices, .cpu_type_str = ka49_cpu_type_str, .clock_init = ka4x_clock_init, }; #ifdef USE_NEW_VECTORS static struct machvec_match __CPU_MATCH mvm_ka49 = { .mv = &mv_ka49, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_NVAX << VAX_SID_FAMILY_SHIFT, .sidex_addr = NVAX_SIDEX_ADDR, .sidex_mask = 0xffffffff, /* Don't yet know how to interpret SID + SIDEX, so keep it tight */ .sidex_match = 0x02000104, }; #endif /* USE_NEW_VECTORS */ static struct platform_device ka49_vsbus_device = { .name = "ka4x-vsbus" }; static struct platform_device ka49_diag_led_device = { .name = "diag_led" }; static int __init ka49_platform_device_init(void) { int retval; if (mv != &mv_ka49) return -ENODEV; platform_device_register (&ka49_diag_led_device); retval = platform_device_register (&ka49_vsbus_device); if (!retval) { #ifdef CONFIG_VSBUS #if 0 /* No lance, but SGEC instead */ vsbus_add_fixed_device(&ka49_vsbus_device.dev, "lance", 0x200e0000, 1); #endif vsbus_add_fixed_device(&ka49_vsbus_device.dev, "dz", 0x25000000, 4); #endif } return retval; } arch_initcall (ka49_platform_device_init); |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 20:50:58
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19755 Modified Files: time.c Log Message: - Always load the NICR. Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/time.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- time.c 30 Sep 2004 09:12:16 -0000 1.16 +++ time.c 30 Sep 2004 20:50:50 -0000 1.17 @@ -61,9 +61,19 @@ if (request_irq(0x30, do_timer_interrupt, 0, "timer", NULL)) { printk("Panic: unable to register timer interrupt handler\n"); - asm("halt"); + HALT; } + /* + * Some VAX CPUs are hardwired to trigger interrupts at 100Hz, + * so we need to pay attention to HZ always being 100 for + * compatibility reasons. For all other machines, we need to + * supply a value (initial counter--an interrupt is triggered upon + * overflow while this value is incremented at a 1µs interval) + * to get more than one interrupt per hour:-) + */ + __mtpr (0xffffffff - 1000000/HZ, PR_NICR); + /* Set the clock ticking and enable clock interrupts */ __mtpr(ICCS_ERROR | ICCS_INTERRUPT | /* clear error and interrupt bits */ ICCS_TRANSFER | /* Load ICR from NICR */ @@ -155,8 +165,7 @@ */ write_seqlock(&xtime_lock); - iccs = __mfpr(PR_ICCS); - + iccs = __mfpr(PR_ICCS); if (iccs & ICCS_ERROR) { printk("Clock overrun\n"); } @@ -168,29 +177,30 @@ * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be * called as close as possible to 500 ms before the new second starts. */ - if ((time_status & STA_UNSYNC) == 0 && - xtime.tv_sec > last_rtc_update + 660 && - (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && - (xtime.tv_nsec / 1000 ) <= 500000 + ((unsigned) TICK_SIZE) / 2) { + if ((time_status & STA_UNSYNC) == 0 + && xtime.tv_sec > last_rtc_update + 660 + && (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 + && (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { if (set_rtc_mmss(xtime.tv_sec) == 0) last_rtc_update = xtime.tv_sec; else last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ } - - /* The ARM says we should do this in the clock ISR. It isn't - actually required on the KA650, as the ICCS register is - not fully implemented. But I don't know about the other - CPU's yet */ + /* + * The VARM says we should do this in the clock ISR. It isn't + * actually required on the KA650, as the ICCS register is + * not fully implemented. But I don't know about the other + * CPUs yet + */ __mtpr(ICCS_INTERRUPT | /* Clear interrupt bit */ ICCS_ERROR | /* Clear error bit */ ICCS_TRANSFER | /* Reload ICR from NICR */ ICCS_RUN, /* ... and go again */ PR_ICCS); - + write_sequnlock(&xtime_lock); - + return IRQ_HANDLED; } |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 20:17:53
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12756 Modified Files: param.h Log Message: - Add a comment to HZ that 100 is *required* to keep compatibility with all the hardwired machines (seems most machines that we developers have access to are hardwired, though...). - Next patch will be to set a proper value for the NICR. Index: param.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/param.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- param.h 29 Jan 2003 00:09:25 -0000 1.4 +++ param.h 30 Sep 2004 20:17:44 -0000 1.5 @@ -1,9 +1,10 @@ #ifndef _VAX_PARAM_H #define _VAX_PARAM_H -/* FIXME: check this value */ #ifdef __KERNEL__ -#define HZ 100 +#define HZ 100 /* Actually, some VAX CPUs are hardwired + to trigger interrupts at 10ms, so + HZ==100 is mandatory */ #define USER_HZ 100 #define CLOCKS_PER_SEC 100 /* frequency at which times() counts */ #endif |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 20:03:20
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10147 Modified Files: mv.h Log Message: - Add prototypes for the VXT console chip. - The support for console didn't work right out of the box (as cut'n'pasted from 2.4.x) so I guess I'll need to have a look at the data sheet. Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- mv.h 30 Sep 2004 19:59:05 -0000 1.26 +++ mv.h 30 Sep 2004 20:03:09 -0000 1.27 @@ -96,11 +96,15 @@ extern void ka4x_prom_putchar(int c); extern int ka4x_prom_getchar(void); +extern void vxt2694_putchar (int c); +extern int vxt2694_getchar (void); + /* Helper functions to get serial console working. */ extern void dz11_putchar(int c); extern int dz11_getchar(void); extern void init_dz11_console(unsigned long dz11_phys_addr, unsigned int line); extern void dz_serial_console_init(void); +extern void init_vxt2694_console (unsigned long phys_addr); /* * FIXME: These should be removed eventually after there's no more code |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 19:59:22
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9154 Modified Files: mv.h Log Message: - Here's a is_vxt(). I now own a working VXT2000+, but it's still serverely broken. But maybe we can resurrect that soon, especially because there seems to be a working 2.4.x port. Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- mv.h 30 Sep 2004 10:01:19 -0000 1.25 +++ mv.h 30 Sep 2004 19:59:05 -0000 1.26 @@ -154,6 +154,14 @@ #endif } +static inline int is_vxt(void) { +#ifdef CONFIG_CPU_VXT + return mv == &mv_vxt; +#else + return 0; +#endif +} + #endif /* !__ASSEMBLY__ */ #endif /* __VAX_MV_H_ */ |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 19:52:27
|
Update of /cvsroot/linux-vax/kernel-2.5/fs/ods2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8081 Modified Files: ods2.h util.c Log Message: - Access to my girlfriend's laptop HDD! So here's the fix for ODS-2 to not require libgcc's long long functions. Index: util.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/fs/ods2/util.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- util.c 23 Sep 2004 13:43:02 -0000 1.12 +++ util.c 30 Sep 2004 19:52:18 -0000 1.13 @@ -20,6 +20,8 @@ #include <linux/buffer_head.h> #include "ods2.h" +#define DODGY_GCC /* Old compiler, FIXME */ + u32 vbn2lbn (struct super_block *sb, struct ods2map *map, u32 vbn) { @@ -191,6 +193,27 @@ } +#ifdef DODGY_GCC +/* + * To not emit __udivdi3 and __umoddi3, we'll for now implement our own + * div64() and use it. Once we've got a "capable" toolchain, this may + * again go away, so this is a FIXME item. + */ +static u64 +div64 (u64 a, u32 b0) +{ + u32 a1, a2; + u32 res; + + a1 = ((u32 *) &a)[0]; + a2 = ((u32 *) &a)[1]; + res = a1/b0 + (u64) a2 * (u64) (0xffffffff/b0) + a2 / b0 + (a2 * (0xffffffff % b0)) / b0; + + return res; +} +#endif /* DODGY_GCC */ + + /* * Ok, I give up :-) for some reason unknown to me the addition of 2 seconds * is needed to get the correct time. @@ -202,8 +225,13 @@ vms2timespec (struct timespec *dest, vms_timestamp_t src) { /* time_t = (vms-350669880092000)/10000000 + 2 */ +#ifdef DODGY_GCC + dest->tv_sec = div64 ((le64_to_cpu (src) - 35066988009200000ull), 10000000) + 2; + dest->tv_nsec = le64_to_cpu (src) - div64 (src, 10000000); +#else dest->tv_sec = (le64_to_cpu (src) - 35066988009200000ull) / 10000000 + 2; dest->tv_nsec = (le64_to_cpu (src) - 35066988009200000ull) % 10000000; +#endif } void Index: ods2.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/fs/ods2/ods2.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ods2.h 23 Sep 2004 13:43:02 -0000 1.10 +++ ods2.h 30 Sep 2004 19:52:18 -0000 1.11 @@ -498,7 +498,6 @@ /* * util.c */ -extern u64 div64(u64 a, u32 b0); extern u32 vbn2lbn(struct super_block *sb, struct ods2map *map, u32 vbn); extern u32 ino2fhlbn(struct super_block *sb, u32 ino); extern struct ods2map *getmap(struct super_block *sb, struct fh2def *fh2p); |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 11:53:04
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5789 Modified Files: cpu_ka650.c Log Message: - Make'em static. Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- cpu_ka650.c 30 Sep 2004 08:26:56 -0000 1.13 +++ cpu_ka650.c 30 Sep 2004 11:52:32 -0000 1.14 @@ -83,7 +83,7 @@ }; #ifdef USE_NEW_VECTORS -struct machvec_match __CPU_MATCH mvm_ka650 = { +static struct machvec_match __CPU_MATCH mvm_ka650 = { .mv = &mv_ka650, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_CVAX << VAX_SID_FAMILY_SHIFT, @@ -95,8 +95,7 @@ (CVAX_Q22_SUBTYPE_KA650 << CVAX_Q22_SUBTYPE_SHIFT), }; - -struct machvec_match __CPU_MATCH mvm_ka655 = { +static struct machvec_match __CPU_MATCH mvm_ka655 = { .mv = &mv_ka650, .sid_mask = VAX_SID_FAMILY_MASK, .sid_match = VAX_CVAX << VAX_SID_FAMILY_SHIFT, @@ -107,7 +106,6 @@ .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 = { |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 10:01:43
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13449 Modified Files: mv.h Log Message: - Mark match vectors as used so newer gccs (which we don't yet have:-) won't warn about it... Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- mv.h 30 Sep 2004 08:58:43 -0000 1.24 +++ mv.h 30 Sep 2004 10:01:19 -0000 1.25 @@ -78,7 +78,7 @@ unsigned long sidex_match; }; -#define __CPU_MATCH __attribute__((__section__(".init.vecmatch"))) +#define __CPU_MATCH __attribute_used__ __attribute__((__section__(".init.vecmatch"))) #endif /* USE_NEW_VECTORS */ |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 09:12:37
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3953 Modified Files: time.c Log Message: - Remove some whitespace. - If I already had access to my g/f's laptop HDD, I'd even place the needed value for NICR... Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/time.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- time.c 5 Oct 2003 01:54:16 -0000 1.15 +++ time.c 30 Sep 2004 09:12:16 -0000 1.16 @@ -50,11 +50,11 @@ void __init time_init(void) { - /* initialise the hardware clock */ - mv->clock_init(); + /* initialise the hardware clock */ + mv->clock_init(); - /* read cmos time */ - xtime.tv_nsec = 0; + /* read cmos time */ + xtime.tv_nsec = 0; xtime.tv_sec = get_cmos_time(); wall_to_monotonic.tv_sec = -xtime.tv_sec; wall_to_monotonic.tv_nsec = -xtime.tv_nsec; @@ -65,10 +65,10 @@ } /* Set the clock ticking and enable clock interrupts */ - __mtpr(ICCS_ERROR | ICCS_INTERRUPT | /* clear error and interrupt bits */ - ICCS_TRANSFER | /* Load ICR from NICR */ - ICCS_INTENABLE | ICCS_RUN, /* enable interrupts and go */ - PR_ICCS); + __mtpr(ICCS_ERROR | ICCS_INTERRUPT | /* clear error and interrupt bits */ + ICCS_TRANSFER | /* Load ICR from NICR */ + ICCS_INTENABLE | /* enable interrupts... */ + ICCS_RUN, PR_ICCS); /* ...and go */ } |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 09:05:29
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2751 Modified Files: diag_led.c Log Message: - Remove guards for KA49 - This function is no longer inline: it's only called once (ever) and probably already too large. Index: diag_led.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/diag_led.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- diag_led.c 30 Sep 2004 06:52:22 -0000 1.7 +++ diag_led.c 30 Sep 2004 09:05:20 -0000 1.8 @@ -32,7 +32,7 @@ * that your system isn't yet supported, add the correct address * right here. */ -static unsigned long __inline__ +static unsigned long diag_led_get_base (void) { inverted = 0; @@ -49,13 +49,10 @@ inverted = 1; return DIAG_LED_KA48_BASE; } -#ifdef CONFIG_CPU_KA49 - /* Generally, KA49 isn't yet booting to userland, so for now this code is guarded */ if (is_ka49 ()) { inverted = 1; return DIAG_LED_KA49_BASE; } -#endif /* CONFIG_CPU_KA49 */ printk (KERN_ERR "No base address known for your machine yet!\n"); return 0; |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 08:58:59
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1641 Modified Files: mv.h Log Message: - Add is_ka49(). Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- mv.h 30 Sep 2004 08:26:56 -0000 1.23 +++ mv.h 30 Sep 2004 08:58:43 -0000 1.24 @@ -145,6 +145,15 @@ return 0; #endif } + +static inline int is_ka49(void) { +#ifdef CONFIG_CPU_KA49 + return mv == &mv_ka49; +#else + return 0; +#endif +} + #endif /* !__ASSEMBLY__ */ #endif /* __VAX_MV_H_ */ |
|
From: Jan-Benedict G. <jb...@lu...> - 2004-09-30 08:55:13
|
On Thu, 2004-09-30 08:26:58 +0000, Kenn Humborg <ke...@us...>
wrote in message <E1C...@sc...>:
> --- mv.h 29 Sep 2004 14:20:27 -0000 1.22
> +++ mv.h 30 Sep 2004 08:26:56 -0000 1.23
> @@ -78,10 +78,8 @@
> unsigned long sidex_match;
> };
> =20
> -#define SET_VECTOR(vec) \
> - static struct machvec_match *__init_vecmatch_##vec \
> - __attribute_used__ \
> - __attribute__((__section__(".init.vecmatch"))) =3D &(vec)
> +#define __CPU_MATCH __attribute__((__section__(".init.vecmatch")))
> +
> #endif /* USE_NEW_VECTORS */
> =20
> =20
I guess you also want __attribute__((used)) to now silence the warnings
newer GCCs will emit.
MfG, JBG
--=20
Jan-Benedict Glaw jb...@lu... . +49-172-7608481 =
_ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg =
_ _ O
fuer einen Freien Staat voll Freier B=FCrger" | im Internet! | im Irak! =
O O O
ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)=
);
|
|
From: Jan-Benedict G. <jb...@lu...> - 2004-09-30 08:52:26
|
On Thu, 2004-09-30 08:26:58 +0000, Kenn Humborg <ke...@us...> wrote in message <E1C...@sc...>: > Was the first-cut matching stuff boot tested on KA46? I can't see how > it would have worked :-) -ETIMEDOUT -- not yet. Anyways, thanks for testing and fixing it:-) MfG, JBG --=20 Jan-Benedict Glaw jb...@lu... . +49-172-7608481 = _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg = _ _ O fuer einen Freien Staat voll Freier B=FCrger" | im Internet! | im Irak! = O O O ret =3D do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA)= ); |
|
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 = { |
|
From: Kenn H. <ke...@us...> - 2004-09-30 08:27:06
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27333/include/asm-vax Modified Files: mv.h 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: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- mv.h 29 Sep 2004 14:20:27 -0000 1.22 +++ mv.h 30 Sep 2004 08:26:56 -0000 1.23 @@ -66,8 +66,8 @@ #undef USE_NEW_VECTORS #ifdef USE_NEW_VECTORS /* - * This defines a match for a machine vector and a macro to install - * such a match structure. + * This defines a match for a machine vector and a macro to place + * such a match structure into the right section at link time */ struct machvec_match { struct vax_mv *mv; @@ -78,10 +78,8 @@ unsigned long sidex_match; }; -#define SET_VECTOR(vec) \ - static struct machvec_match *__init_vecmatch_##vec \ - __attribute_used__ \ - __attribute__((__section__(".init.vecmatch"))) = &(vec) +#define __CPU_MATCH __attribute__((__section__(".init.vecmatch"))) + #endif /* USE_NEW_VECTORS */ |
|
From: Kenn H. <ke...@us...> - 2004-09-30 08:27:04
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27333/arch/vax/boot Modified Files: cpu_sel.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_sel.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/cpu_sel.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cpu_sel.c 29 Sep 2004 10:47:57 -0000 1.12 +++ cpu_sel.c 30 Sep 2004 08:26:55 -0000 1.13 @@ -5,14 +5,26 @@ * $Id$ */ -#include <asm/mtpr.h> /* Processor register definitions */ -#include <asm/mv.h> /* machine vector definitions */ -#include <asm/system.h> /* for HALT */ -#include <asm/vaxcpu.h> /* CPU type definitions */ - +#include <asm/mtpr.h> /* Processor register definitions */ +#include <asm/mv.h> /* machine vector definitions */ +#include <linux/mm.h> /* for PAGE_OFFSET and KERNEL_START_PHYS */ +#include <asm/system.h> /* for HALT */ +#include <asm/vaxcpu.h> /* CPU type definitions */ #ifdef USE_NEW_VECTORS -extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end; + +/* + * Given a virtual address in the final kernel image (i.e. an S0 + * address like 0x80123456, convert it to the corresponding address + * in the loaded kernel before we relocate (which depends on the + * exact load address) + */ +void * +s0vmaddr_to_load_addr(void *vaddr) +{ + extern char _stext; + return (char *)vaddr - PAGE_OFFSET - KERNEL_START_PHYS + (unsigned int) &_stext; +} struct vax_mv * idcpu (void) @@ -20,10 +32,20 @@ unsigned long sid; unsigned long sidex; struct machvec_match *mvm; + unsigned int i; + unsigned int num_matches; + struct vax_mv *retmv; + + extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end; sid = __mfpr (PR_SID); - for (mvm = &__init_vecmatch_start; mvm < &__init_vecmatch_end; mvm++) { + num_matches = &__init_vecmatch_end - &__init_vecmatch_start; + + for (i = 0; i < num_matches; i++) { + + mvm = &__init_vecmatch_start + i; + if ((sid & mvm->sid_mask) == mvm->sid_match) { /* * No sidex known? Accept the vector. @@ -32,15 +54,16 @@ * entries with weaker/shorter masks */ if (!mvm->sidex_addr) - return mvm->mv; + return s0vmaddr_to_load_addr(mvm->mv); /* * If a SIDEX match was supplied, too, check it! */ sidex = * ((unsigned long *) mvm->sidex_addr); if ((sidex & mvm->sidex_mask) == mvm->sidex_match) { - mvm->mv->sidex = sidex; - return mvm->mv; + retmv = s0vmaddr_to_load_addr(mvm->mv); + retmv->sidex = sidex; + return retmv; } } } |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 06:52:38
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9193 Modified Files: diag_led.c Log Message: - diag_led support for upcoming KA49 support. Index: diag_led.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/diag_led.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- diag_led.c 30 Jul 2004 00:19:34 -0000 1.6 +++ diag_led.c 30 Sep 2004 06:52:22 -0000 1.7 @@ -49,6 +49,13 @@ inverted = 1; return DIAG_LED_KA48_BASE; } +#ifdef CONFIG_CPU_KA49 + /* Generally, KA49 isn't yet booting to userland, so for now this code is guarded */ + if (is_ka49 ()) { + inverted = 1; + return DIAG_LED_KA49_BASE; + } +#endif /* CONFIG_CPU_KA49 */ printk (KERN_ERR "No base address known for your machine yet!\n"); return 0; |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 06:49:14
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8402 Modified Files: diag_led.h Log Message: - Add the base address define for KA49. Index: diag_led.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/diag_led.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- diag_led.h 13 May 2004 09:48:13 -0000 1.3 +++ diag_led.h 30 Sep 2004 06:48:54 -0000 1.4 @@ -21,6 +21,7 @@ #define DIAG_LED_KA46_BASE 0x20080010 #define DIAG_LED_KA42_BASE 0x20080010 #define DIAG_LED_KA48_BASE 0x20080010 +#define DIAG_LED_KA49_BASE 0x25800004 extern int diag_led_set_state (unsigned char state); extern unsigned char diag_led_get_state (void); |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-30 05:31:24
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28603 Modified Files: lib.c Log Message: - Prefix hex numbers with '0x'. Index: lib.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/lib.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lib.c 29 Sep 2004 21:49:58 -0000 1.5 +++ lib.c 30 Sep 2004 05:31:04 -0000 1.6 @@ -44,6 +44,10 @@ { int i; int d; + + boot_putchar('0'); + boot_putchar('x'); + for (i = 28; i>= 0; i -= 4) { d = (x >> i) & 0x0f; if (d > 9) { |
|
From: Kenn H. <ke...@us...> - 2004-09-29 21:50:11
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9739 Modified Files: head.S lib.c Log Message: Move printing of the CPU type line at start of boot into C code Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/head.S,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- head.S 28 Sep 2004 22:26:38 -0000 1.15 +++ head.S 29 Sep 2004 21:49:58 -0000 1.16 @@ -72,15 +72,7 @@ subl2 $PAGE_OFFSET, MV_PRE_VM_INIT(%r10) # print the cpu type - calls $0, boot_crlf - pushab msg_cpu_type - calls $1, boot_printstr - - movl mv, %r10 - calls $0, *MV_CPU_TYPE_STR(%r10) - pushl %r0 - calls $1, boot_printstr - calls $0, boot_crlf + calls $0, boot_print_cpu_id # print first line of debug diagnostics pushab msg_loaded # ascii string @@ -170,10 +162,7 @@ pushal reloc # where we are now (physical) calls $1, boot_printint calls $0, boot_crlf - - # Grab stuff we need between ioremaps in setup_arch/paging_init and - # start of virtual memory - jsb cpu_id + calls $0, boot_crlf # save RPB before it gets obliterated movl boot_r11, %r11 @@ -325,38 +314,6 @@ .ascii "Starting VM\0" .align 1 -# identify cpu -.globl cpu_id -cpu_id: - clrl prom_sidex - clrl cpu_type - mfpr $PR_SID, cpu_type - pushab msg_cpu_type - calls $1, boot_printstr - pushl cpu_type - calls $1, boot_printint - calls $0, boot_printspace - movl cpu_type, %r7 - extv $24, $8, %r7, %r6 - cmpl %r6, $0x0A - blss no_sidex - # note - we may not need to do this here. Is the board type used - # before we remap prom? - movl 0x20040004, prom_sidex # FIXME: This looks bogus... Do all VAXen have sidex at this address, if they have it at all? - pushab msg_sidex - calls $1, boot_printstr - pushl prom_sidex - calls $1, boot_printint -no_sidex: - calls $0, boot_crlf - calls $0, boot_crlf - rsb - -msg_cpu_type: - .ascii "CPU type: \0" -msg_sidex: - .ascii "sidex: \0" - # # memory locations. @@ -390,10 +347,6 @@ .globl boot_mv boot_mv: .int 0x00000000 -cpu_type: - .int 0x00000000 -prom_sidex: - .int 0x00000000 # our dummy pcb __INITDATA Index: lib.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/lib.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lib.c 28 Sep 2004 22:24:39 -0000 1.4 +++ lib.c 29 Sep 2004 21:49:58 -0000 1.5 @@ -3,6 +3,7 @@ #include <linux/types.h> #include <asm/mv.h> +#include <asm/mtpr.h> #include "boot_sections.h" @@ -22,7 +23,7 @@ boot_putchar(' '); } -void __boot boot_printstr(char *s) +void __boot boot_printstr(const char *s) { while (*s) { boot_putchar(*s); @@ -88,3 +89,17 @@ } } +void __boot boot_print_cpu_id(void) +{ + boot_printstr("CPU type: "); + boot_printstr(mv->cpu_type_str()); + + boot_printstr(" SID: "); + boot_printint(__mfpr(PR_SID)); + + boot_printstr(" SIDEX: "); + boot_printint(mv->sidex); + + boot_crlf(); +} + |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-29 14:48:28
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15957/arch/vax/kernel Modified Files: cpu_ka46.c Log Message: - Register the match vector, otherwise it won't work for sure :-) Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- cpu_ka46.c 29 Sep 2004 10:44:14 -0000 1.17 +++ cpu_ka46.c 29 Sep 2004 14:48:19 -0000 1.18 @@ -150,6 +150,8 @@ .sidex_mask = 0x00000000, .sidex_match = 0x00000000, }; + +SET_VECTOR (mvm_ka46); #endif /* USE_NEW_VECTORS */ static struct platform_device ka46_vsbus_device = { |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-29 14:20:54
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10506/include/asm-vax Modified Files: mv.h Log Message: - We only store pointers to MVMs, not whole MVMs. Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mv.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- mv.h 29 Sep 2004 10:33:45 -0000 1.21 +++ mv.h 29 Sep 2004 14:20:27 -0000 1.22 @@ -79,7 +79,7 @@ }; #define SET_VECTOR(vec) \ - static struct machvec_match __init_vecmatch_##vec \ + static struct machvec_match *__init_vecmatch_##vec \ __attribute_used__ \ __attribute__((__section__(".init.vecmatch"))) = &(vec) #endif /* USE_NEW_VECTORS */ |
|
From: Jan-Benedict G. <jb...@us...> - 2004-09-29 10:48:07
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32543/arch/vax/boot Modified Files: cpu_sel.c Log Message: - Move the new code to the head of the file; with the ifdef in place, this silences a number of warnings (about now unused functions). Index: cpu_sel.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/cpu_sel.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- cpu_sel.c 29 Sep 2004 10:45:45 -0000 1.11 +++ cpu_sel.c 29 Sep 2004 10:47:57 -0000 1.12 @@ -11,6 +11,53 @@ #include <asm/vaxcpu.h> /* CPU type definitions */ +#ifdef USE_NEW_VECTORS +extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end; + +struct vax_mv * +idcpu (void) +{ + unsigned long sid; + unsigned long sidex; + struct machvec_match *mvm; + + sid = __mfpr (PR_SID); + + for (mvm = &__init_vecmatch_start; mvm < &__init_vecmatch_end; mvm++) { + if ((sid & mvm->sid_mask) == mvm->sid_match) { + /* + * No sidex known? Accept the vector. + * FIXME: Maybe sort the metch structs to have + * those with "long" masks first, then the loose + * entries with weaker/shorter masks + */ + if (!mvm->sidex_addr) + return mvm->mv; + + /* + * If a SIDEX match was supplied, too, check it! + */ + sidex = * ((unsigned long *) mvm->sidex_addr); + if ((sidex & mvm->sidex_mask) == mvm->sidex_match) { + mvm->mv->sidex = sidex; + return mvm->mv; + } + } + } + + /* + * No matching vector found, so you're on your own to get a SID + * and SIDEX value and add it to one of the existing vectors (if + * that works for you) or create an own vector for your machine. + */ + HALT; + + /* Not reached */ + return NULL; +} + +#else /* USE_NEW_VECTORS */ + static struct vax_mv *idcpu_uvax2(unsigned int sid) { unsigned int subtype; @@ -226,51 +273,6 @@ #endif } -#ifdef USE_NEW_VECTORS -extern struct machvec_match __init_vecmatch_start, __init_vecmatch_end; - -struct vax_mv * -idcpu (void) -{ - unsigned long sid; - unsigned long sidex; - struct machvec_match *mvm; - - sid = __mfpr (PR_SID); - - for (mvm = &__init_vecmatch_start; mvm < &__init_vecmatch_end; mvm++) { - if ((sid & mvm->sid_mask) == mvm->sid_match) { - /* - * No sidex known? Accept the vector. - * FIXME: Maybe sort the metch structs to have - * those with "long" masks first, then the loose - * entries with weaker/shorter masks - */ - if (!mvm->sidex_addr) - return mvm->mv; - - /* - * If a SIDEX match was supplied, too, check it! - */ - sidex = * ((unsigned long *) mvm->sidex_addr); - if ((sidex & mvm->sidex_mask) == mvm->sidex_match) { - mvm->mv->sidex = sidex; - return mvm->mv; - } - } - } - - /* - * No matching vector found, so you're on your own to get a SID - * and SIDEX value and add it to one of the existing vectors (if - * that works for you) or create an own vector for your machine. - */ - HALT; - - /* Not reached */ - return NULL; -} -#else struct vax_mv *idcpu(void) { unsigned int sid; |