CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 19:28:06 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: genassym.cf locore.s src/sys/arch/cesfic/include: vectors.h Log Message: No need for our own spurious interrupt handler now that m68k_intr.c handles them for us. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/cesfic/cesfic/genassym.cf cvs rdiff -u -r1.42 -r1.43 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.2 -r1.3 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/genassym.cf diff -u src/sys/arch/cesfic/cesfic/genassym.cf:1.22 src/sys/arch/cesfic/cesfic/genassym.cf:1.23 --- src/sys/arch/cesfic/cesfic/genassym.cf:1.22 Mon Jan 15 19:11:31 2024 +++ src/sys/arch/cesfic/cesfic/genassym.cf Mon Jan 15 19:28:06 2024 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.22 2024/01/15 19:11:31 thorpej Exp $ +# $NetBSD: genassym.cf,v 1.23 2024/01/15 19:28:06 thorpej Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -110,7 +110,6 @@ define EVCNT_COUNT offsetof(struct evcn # interrupt/fault metering define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) -define SPUR_INTRCNT ((sizeof(struct evcnt)*0) + offsetof(struct evcnt, ev_count32)) define CLOCK_INTRCNT ((sizeof(struct evcnt)*6) + offsetof(struct evcnt, ev_count32)) define NMI_INTRCNT ((sizeof(struct evcnt)*7) + offsetof(struct evcnt, ev_count32)) Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.42 src/sys/arch/cesfic/cesfic/locore.s:1.43 --- src/sys/arch/cesfic/cesfic/locore.s:1.42 Mon Jan 15 19:11:31 2024 +++ src/sys/arch/cesfic/cesfic/locore.s Mon Jan 15 19:28:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.42 2024/01/15 19:11:31 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.43 2024/01/15 19:28:06 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -601,18 +601,8 @@ Lbrkpt2: /* * Interrupt handlers. - * All device interrupts are auto-vectored. The CPU provides - * the vector 0x18+level. Note we count spurious interrupts, but - * we don't do anything else with them. */ -ENTRY_NOPROFILE(spurintr) /* level 0 */ - addql #1,_C_LABEL(m68k_intr_evcnt)+SPUR_INTRCNT - INTERRUPT_SAVEREG - CPUINFO_INCREMENT(CI_NINTR) - INTERRUPT_RESTOREREG - jra _ASM_LABEL(rei) - ENTRY_NOPROFILE(lev6intr) /* Level 6: clock */ INTERRUPT_SAVEREG /* XXX */ Index: src/sys/arch/cesfic/include/vectors.h diff -u src/sys/arch/cesfic/include/vectors.h:1.2 src/sys/arch/cesfic/include/vectors.h:1.3 --- src/sys/arch/cesfic/include/vectors.h:1.2 Mon Jan 15 03:07:14 2024 +++ src/sys/arch/cesfic/include/vectors.h Mon Jan 15 19:28:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: vectors.h,v 1.2 2024/01/15 03:07:14 thorpej Exp $ */ +/* $NetBSD: vectors.h,v 1.3 2024/01/15 19:28:06 thorpej Exp $ */ /*- * Copyright (c) 2024 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include -#define MACHINE_AV0_HANDLER spurintr +#define MACHINE_AV0_HANDLER intrstub_autovec #define MACHINE_AV1_HANDLER intrstub_autovec #define MACHINE_AV2_HANDLER intrstub_autovec #define MACHINE_AV3_HANDLER intrstub_autovec
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 19:28:06 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: genassym.cf locore.s src/sys/arch/cesfic/include: vectors.h Log Message: No need for our own spurious interrupt handler now that m68k_intr.c handles them for us. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/cesfic/cesfic/genassym.cf cvs rdiff -u -r1.42 -r1.43 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.2 -r1.3 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 19:11:31 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: genassym.cf locore.s src/sys/arch/cesfic/include: intr.h types.h Log Message: G/C __HAVE_LEGACY_INTRCNT from cesfic. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/genassym.cf cvs rdiff -u -r1.41 -r1.42 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.16 -r1.17 src/sys/arch/cesfic/include/intr.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cesfic/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/genassym.cf diff -u src/sys/arch/cesfic/cesfic/genassym.cf:1.21 src/sys/arch/cesfic/cesfic/genassym.cf:1.22 --- src/sys/arch/cesfic/cesfic/genassym.cf:1.21 Tue Jan 9 04:16:24 2024 +++ src/sys/arch/cesfic/cesfic/genassym.cf Mon Jan 15 19:11:31 2024 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.21 2024/01/09 04:16:24 thorpej Exp $ +# $NetBSD: genassym.cf,v 1.22 2024/01/15 19:11:31 thorpej Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -38,6 +38,7 @@ include include include include +include include @@ -104,8 +105,14 @@ define P_FLAG offsetof(struct proc, p_ define P_RASLIST offsetof(struct proc, p_raslist) define P_VMSPACE offsetof(struct proc, p_vmspace) +# event counter +define EVCNT_COUNT offsetof(struct evcnt, ev_count) + # interrupt/fault metering define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) +define SPUR_INTRCNT ((sizeof(struct evcnt)*0) + offsetof(struct evcnt, ev_count32)) +define CLOCK_INTRCNT ((sizeof(struct evcnt)*6) + offsetof(struct evcnt, ev_count32)) +define NMI_INTRCNT ((sizeof(struct evcnt)*7) + offsetof(struct evcnt, ev_count32)) # PSL values (should just include psl.h?) define PSL_S PSL_S @@ -175,6 +182,3 @@ define SYS_compat_13_sigreturn13 SYS_com # errno define EFAULT EFAULT define ENAMETOOLONG ENAMETOOLONG - -# event counter -define EVCNT_COUNT offsetof(struct evcnt, ev_count) Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.41 src/sys/arch/cesfic/cesfic/locore.s:1.42 --- src/sys/arch/cesfic/cesfic/locore.s:1.41 Mon Jan 15 03:07:14 2024 +++ src/sys/arch/cesfic/cesfic/locore.s Mon Jan 15 19:11:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.41 2024/01/15 03:07:14 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.42 2024/01/15 19:11:31 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -607,7 +607,7 @@ Lbrkpt2: */ ENTRY_NOPROFILE(spurintr) /* level 0 */ - addql #1,_C_LABEL(intrcnt)+0 + addql #1,_C_LABEL(m68k_intr_evcnt)+SPUR_INTRCNT INTERRUPT_SAVEREG CPUINFO_INCREMENT(CI_NINTR) INTERRUPT_RESTOREREG @@ -621,7 +621,7 @@ ENTRY_NOPROFILE(lev6intr) /* Level 6: cl movl %d0, %a0@ btst #2, %d0 jeq 1f - addql #1,_C_LABEL(intrcnt)+24 + addql #1,_C_LABEL(m68k_intr_evcnt)+CLOCK_INTRCNT lea %sp@(0), %a1 | a1 = movl %a1, %sp@- jbsr _C_LABEL(hardclock) | hardclock() @@ -636,7 +636,7 @@ ENTRY_NOPROFILE(lev6intr) /* Level 6: cl jra _ASM_LABEL(rei) | all done ENTRY_NOPROFILE(lev7intr) /* level 7: parity errors, reset key */ - addql #1,_C_LABEL(intrcnt)+28 + addql #1,_C_LABEL(m68k_intr_evcnt)+NMI_INTRCNT clrl %sp@- moveml #0x,%sp@- | save registers movl %usp,%a0 | and save @@ -844,19 +844,3 @@ fulltflush: fullcflush: .long 0 #endif - -/* interrupt counters */ -GLOBAL(intrnames) - .asciz "spur" - .asciz "lev1" - .asciz "lev2" - .asciz "lev3" - .asciz "lev4" - .asciz "lev5" - .asciz "clock" - .asciz "nmi" -GLOBAL(eintrnames) - .even -GLOBAL(intrcnt) - .long 0,0,0,0,0,0,0,0 -GLOBAL(eintrcnt) Index: src/sys/arch/cesfic/include/intr.h diff -u src/sys/arch/cesfic/include/intr.h:1.16 src/sys/arch/cesfic/include/intr.h:1.17 --- src/sys/arch/cesfic/include/intr.h:1.16 Mon Jan 15 03:07:14 2024 +++ src/sys/arch/cesfic/include/intr.h Mon Jan 15 19:11:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.16 2024/01/15 03:07:14 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.17 2024/01/15 19:11:31 thorpej Exp $ */ /*- * Copyright (c) 2024 The NetBSD Foundation, Inc. @@ -41,6 +41,9 @@ #define MACHINE_PSL_IPL_VM PSL_IPL4 #define MACHINE_PSL_IPL_SCHED PSL_IPL6 +#define MACHINE_INTREVCNT_NAMES \ + { "spur", "lev1", "lev2", "lev3", "lev4", "lev5", "clock", "nmi" } + #include #endif /* _LUNA68K_INTR_H */ Index: src/sys/arch/cesfic/include/types.h diff -u src/sys/arch/cesfic/include/types.h:1.7 src/sys/arch/cesfic/include/types.h:1.8 --- src/sys/arch/cesfic/include/types.h:1.7 Thu Apr 1 04:43:00 2021 +++ src/sys/arch/cesfic/include/types.h Mon Jan 15 19:11:31 2024 @@ -1,5 +1,3 @@ -/* $NetBSD: types.h,v 1.7 2021/04/01 04:43:00 simonb Exp $ */ +/* $NetBSD: types.h,v 1.8 2024/01/15 19:11:31 thorpej Exp $ */ #include - -#define __HAVE_LEGACY_INTRCNT
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 19:11:31 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: genassym.cf locore.s src/sys/arch/cesfic/include: intr.h types.h Log Message: G/C __HAVE_LEGACY_INTRCNT from cesfic. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/genassym.cf cvs rdiff -u -r1.41 -r1.42 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.16 -r1.17 src/sys/arch/cesfic/include/intr.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cesfic/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 03:07:14 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: isr.h locore.s src/sys/arch/cesfic/conf: files.cesfic src/sys/arch/cesfic/include: cpu.h intr.h vectors.h Removed Files: src/sys/arch/cesfic/cesfic: isr.c Log Message: Switch cesfic over to the common interrupt dispatch code. To generate a diff of this commit: cvs rdiff -u -r1.19 -r0 src/sys/arch/cesfic/cesfic/isr.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cesfic/cesfic/isr.h cvs rdiff -u -r1.40 -r1.41 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/conf/files.cesfic cvs rdiff -u -r1.34 -r1.35 src/sys/arch/cesfic/include/cpu.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cesfic/include/intr.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 03:07:14 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: isr.h locore.s src/sys/arch/cesfic/conf: files.cesfic src/sys/arch/cesfic/include: cpu.h intr.h vectors.h Removed Files: src/sys/arch/cesfic/cesfic: isr.c Log Message: Switch cesfic over to the common interrupt dispatch code. To generate a diff of this commit: cvs rdiff -u -r1.19 -r0 src/sys/arch/cesfic/cesfic/isr.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cesfic/cesfic/isr.h cvs rdiff -u -r1.40 -r1.41 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/conf/files.cesfic cvs rdiff -u -r1.34 -r1.35 src/sys/arch/cesfic/include/cpu.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cesfic/include/intr.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/isr.h diff -u src/sys/arch/cesfic/cesfic/isr.h:1.4 src/sys/arch/cesfic/cesfic/isr.h:1.5 --- src/sys/arch/cesfic/cesfic/isr.h:1.4 Sat Mar 14 14:45:58 2009 +++ src/sys/arch/cesfic/cesfic/isr.h Mon Jan 15 03:07:14 2024 @@ -1,7 +1,7 @@ -/* $NetBSD: isr.h,v 1.4 2009/03/14 14:45:58 dsl Exp $ */ +/* $NetBSD: isr.h,v 1.5 2024/01/15 03:07:14 thorpej Exp $ */ /*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. + * Copyright (c) 2024 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -29,41 +29,25 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include +#ifndef _LUNA68K_ISR_H_ +#define _LUNA68K_ISR_H_ -/* - * The location and size of the autovectored interrupt portion - * of the vector table. - */ -#define ISRLOC 0x18 -#define NISR 8 - -struct isr { - LIST_ENTRY(isr) isr_link; - int (*isr_func)(void *); - void *isr_arg; - int isr_ipl; - int isr_priority; -}; +#include /* - * ISR priorities. These are not the same as interrupt levels. - * These serve 2 purposes: - * - properly order ISRs in the list - * - compute levels for spl*() calls. + * Aliases for the legacy cesfic ISR routines. */ -#define ISRPRI_BIO 0 -#define ISRPRI_NET 1 -#define ISRPRI_TTY 2 -#define ISRPRI_TTYNOBUF 3 -/* - * Convert PSL values to IPLs and vice-versa. - */ -#define PSLTOIPL(x) (((x) >> 8) & 0xf) -#define IPLTOPSL(x) x) & 0xf) << 8) | PSL_S) +static inline void +isrinit(void) +{ + m68k_intr_init(NULL); +} + +static inline void * +isrlink(int (*func)(void *), void *arg, int ipl, int isrpri) +{ + return m68k_intr_establish(func, arg, NULL, 0, ipl, isrpri, 0); +} -void isrinit(void); -void *isrlink(int (*)(void *), void *, int, int); -void isrunlink(void *); -void isrdispatch(int); +#endif /* _LUNA68K_ISR_H_ */ Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.40 src/sys/arch/cesfic/cesfic/locore.s:1.41 --- src/sys/arch/cesfic/cesfic/locore.s:1.40 Mon Jan 15 02:40:52 2024 +++ src/sys/arch/cesfic/cesfic/locore.s Mon Jan 15 03:07:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.40 2024/01/15 02:40:52 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.41 2024/01/15 03:07:14 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -613,15 +613,6 @@ ENTRY_NOPROFILE(spurintr) /* level 0 */ INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) -ENTRY_NOPROFILE(intrhand) /* levels 1 through 5 */ - INTERRUPT_SAVEREG - movw %sp@(22),%sp@- | push exception vector info - clrw %sp@- - jbsr _C_LABEL(isrdispatch) | call dispatch routine - addql #4,%sp - INTERRUPT_RESTOREREG - jra _ASM_LABEL(rei) | all done - ENTRY_NOPROFILE(lev6intr) /* Level 6: clock */ INTERRUPT_SAVEREG /* XXX */ @@ -631,7 +622,7 @@ ENTRY_NOPROFILE(lev6intr) /* Level 6: cl btst #2, %d0 jeq 1f addql #1,_C_LABEL(intrcnt)+24 - lea %sp@(16), %a1 | a1 = + lea %sp@(0), %a1 | a1 = movl %a1, %sp@- jbsr _C_LABEL(hardclock) | hardclock() addql #4, %sp Index: src/sys/arch/cesfic/conf/files.cesfic diff -u src/sys/arch/cesfic/conf/files.cesfic:1.20 src/sys/arch/cesfic/conf/files.cesfic:1.21 --- src/sys/arch/cesfic/conf/files.cesfic:1.20 Mon Jan 15 02:40:52 2024 +++ src/sys/arch/cesfic/conf/files.cesfic Mon Jan 15 03:07:14 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.cesfic,v 1.20 2024/01/15 02:40:52 thorpej Exp $ +# $NetBSD: files.cesfic,v 1.21 2024/01/15 03:07:14 thorpej Exp $ # # cesfic-specific configuration info @@ -52,12 +52,13 @@ file arch/cesfic/dev/if_le.c le file arch/cesfic/cesfic/autoconf.c file arch/cesfic/cesfic/clock.c file arch/cesfic/cesfic/machdep.c -file arch/cesfic/cesfic/isr.c file arch/cesfic/cesfic/pmap_bootstrap.c file arch/cesfic/cesfic/trap.c file arch/m68k/m68k/cacheops.c file arch/m68k/m68k/db_memrw.c ddb | kgdb file arch/m68k/m68k/kgdb_machdep.c kgdb +file arch/m68k/m68k/m68k_intr.c +file arch/m68k/m68k/m68k_intr_stubs.s file arch/m68k/m68k/m68k_trap.c file arch/m68k/m68k/mmu_subr.s file
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 02:40:52 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: locore.s src/sys/arch/cesfic/conf: files.cesfic Added Files: src/sys/arch/cesfic/include: vectors.h Removed Files: src/sys/arch/cesfic/cesfic: vectors.s Log Message: Switch cesfic over to the common vector table. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.4 -r0 src/sys/arch/cesfic/cesfic/vectors.s cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cesfic/conf/files.cesfic cvs rdiff -u -r0 -r1.1 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.39 src/sys/arch/cesfic/cesfic/locore.s:1.40 --- src/sys/arch/cesfic/cesfic/locore.s:1.39 Tue Jan 9 07:28:25 2024 +++ src/sys/arch/cesfic/cesfic/locore.s Mon Jan 15 02:40:52 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.39 2024/01/09 07:28:25 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.40 2024/01/15 02:40:52 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -107,10 +107,7 @@ GLOBAL(kernel_text) .space PAGE_SIZE ASLOCAL(tmpstk) -#include - .text - /* * Macro to relocate a symbol, used before MMU is enabled. */ @@ -323,15 +320,14 @@ Lenab1: nop nop nop - movl #_C_LABEL(vectab),%d0 | set Vector Base Register - movc %d0,%vbr moveq #0,%d0 | ensure TT regs are disabled .long 0x4e7b0004 | movc d0,itt0 .long 0x4e7b0005 | movc d0,itt1 .long 0x4e7b0006 | movc d0,dtt0 .long 0x4e7b0007 | movc d0,dtt1 - lea _ASM_LABEL(tmpstk),%sp | temporary stack + lea _ASM_LABEL(tmpstk),%sp | re-load temporary stack + jbsr _C_LABEL(vec_init) | initialize vector table /* call final pmap setup */ jbsr _C_LABEL(pmap_bootstrap_finalize) /* set kernel stack, user SP */ Index: src/sys/arch/cesfic/conf/files.cesfic diff -u src/sys/arch/cesfic/conf/files.cesfic:1.19 src/sys/arch/cesfic/conf/files.cesfic:1.20 --- src/sys/arch/cesfic/conf/files.cesfic:1.19 Tue Jan 9 04:16:24 2024 +++ src/sys/arch/cesfic/conf/files.cesfic Mon Jan 15 02:40:52 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.cesfic,v 1.19 2024/01/09 04:16:24 thorpej Exp $ +# $NetBSD: files.cesfic,v 1.20 2024/01/15 02:40:52 thorpej Exp $ # # cesfic-specific configuration info @@ -63,6 +63,7 @@ file arch/m68k/m68k/mmu_subr.s file arch/m68k/m68k/pmap_motorola.c file arch/m68k/m68k/procfs_machdep.c procfs file arch/m68k/m68k/sys_machdep.c +file arch/m68k/m68k/vectors.c file arch/m68k/m68k/vm_machdep.c file dev/cons.c Added files: Index: src/sys/arch/cesfic/include/vectors.h diff -u /dev/null src/sys/arch/cesfic/include/vectors.h:1.1 --- /dev/null Mon Jan 15 02:40:52 2024 +++ src/sys/arch/cesfic/include/vectors.h Mon Jan 15 02:40:52 2024 @@ -0,0 +1,50 @@ +/* $NetBSD: vectors.h,v 1.1 2024/01/15 02:40:52 thorpej Exp $ */ + +/*- + * Copyright (c) 2024 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _CESFIC_VECTORS_H_ +#define _CESFIC_VECTORS_H_ + +#ifdef _KERNEL + +#include + +#define MACHINE_AV0_HANDLER spurintr +#define MACHINE_AV1_HANDLER intrhand +#define MACHINE_AV2_HANDLER intrhand +#define MACHINE_AV3_HANDLER intrhand +#define MACHINE_AV4_HANDLER intrhand +#define MACHINE_AV5_HANDLER intrhand +#define MACHINE_AV6_HANDLER lev6intr +#define MACHINE_AV7_HANDLER lev7intr + +#endif /* _KERNEL */ + +#endif /* _CESFIC_VECTORS_H_ */
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Mon Jan 15 02:40:52 UTC 2024 Modified Files: src/sys/arch/cesfic/cesfic: locore.s src/sys/arch/cesfic/conf: files.cesfic Added Files: src/sys/arch/cesfic/include: vectors.h Removed Files: src/sys/arch/cesfic/cesfic: vectors.s Log Message: Switch cesfic over to the common vector table. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/cesfic/cesfic/locore.s cvs rdiff -u -r1.4 -r0 src/sys/arch/cesfic/cesfic/vectors.s cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cesfic/conf/files.cesfic cvs rdiff -u -r0 -r1.1 src/sys/arch/cesfic/include/vectors.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:55:02 UTC 2023 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER. Probably not necessary but let's be a little more cautious about this. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/include/intr.h diff -u src/sys/arch/cesfic/include/intr.h:1.14 src/sys/arch/cesfic/include/intr.h:1.15 --- src/sys/arch/cesfic/include/intr.h:1.14 Tue Jul 11 10:47:24 2023 +++ src/sys/arch/cesfic/include/intr.h Tue Jul 11 10:55:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.14 2023/07/11 10:47:24 riastradh Exp $ */ +/* $NetBSD: intr.h,v 1.15 2023/07/11 10:55:02 riastradh Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -46,7 +46,7 @@ */ #include -#ifndef _LOCORE +#if (defined(_KERNEL) || defined(_KMEMUSER)) && !defined(_LOCORE) typedef struct { uint16_t _psl;
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:55:02 UTC 2023 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER. Probably not necessary but let's be a little more cautious about this. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:47:24 UTC 2023 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/include/intr.h diff -u src/sys/arch/cesfic/include/intr.h:1.13 src/sys/arch/cesfic/include/intr.h:1.14 --- src/sys/arch/cesfic/include/intr.h:1.13 Thu Dec 22 15:06:17 2011 +++ src/sys/arch/cesfic/include/intr.h Tue Jul 11 10:47:24 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.13 2011/12/22 15:06:17 tsutsui Exp $ */ +/* $NetBSD: intr.h,v 1.14 2023/07/11 10:47:24 riastradh Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -46,6 +46,14 @@ */ #include +#ifndef _LOCORE + +typedef struct { + uint16_t _psl; +} ipl_cookie_t; + +#endif + #if defined(_KERNEL) && !defined(_LOCORE) /* spl0 requires checking for software interrupts */ #define spl1() _spl(PSL_S|PSL_IPL1) @@ -83,9 +91,6 @@ int spl0(void); extern const uint16_t ipl2psl_table[NIPL]; typedef int ipl_t; -typedef struct { - uint16_t _psl; -} ipl_cookie_t; static inline ipl_cookie_t makeiplcookie(ipl_t ipl)
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: riastradh Date: Tue Jul 11 10:47:24 UTC 2023 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Wed Nov 18 03:40:50 UTC 2020 Modified Files: src/sys/arch/cesfic/cesfic: isr.c src/sys/arch/cesfic/dev: zs.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cesfic/cesfic/isr.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/dev/zs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/isr.c diff -u src/sys/arch/cesfic/cesfic/isr.c:1.17 src/sys/arch/cesfic/cesfic/isr.c:1.18 --- src/sys/arch/cesfic/cesfic/isr.c:1.17 Sun Nov 10 21:16:25 2019 +++ src/sys/arch/cesfic/cesfic/isr.c Wed Nov 18 03:40:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: isr.c,v 1.17 2019/11/10 21:16:25 chs Exp $ */ +/* $NetBSD: isr.c,v 1.18 2020/11/18 03:40:50 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -34,12 +34,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.17 2019/11/10 21:16:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.18 2020/11/18 03:40:50 thorpej Exp $"); #include #include #include -#include +#include #include #include @@ -76,7 +76,7 @@ isrlink(int (*func)(void *), void *arg, if ((ipl < 0) || (ipl >= NISR)) panic("isrlink: bad ipl %d", ipl); - newisr = malloc(sizeof(struct isr), M_DEVBUF, M_WAITOK); + newisr = kmem_alloc(sizeof(*newisr), KM_SLEEP); newisr->isr_func = func; newisr->isr_arg = arg; newisr->isr_ipl = ipl; @@ -144,7 +144,7 @@ isrunlink(void *arg) struct isr *isr = arg; LIST_REMOVE(isr, isr_link); - free(isr, M_DEVBUF); + kmem_free(isr, sizeof(*isr)); } #endif Index: src/sys/arch/cesfic/dev/zs.c diff -u src/sys/arch/cesfic/dev/zs.c:1.20 src/sys/arch/cesfic/dev/zs.c:1.21 --- src/sys/arch/cesfic/dev/zs.c:1.20 Sun Nov 10 21:16:25 2019 +++ src/sys/arch/cesfic/dev/zs.c Wed Nov 18 03:40:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.20 2019/11/10 21:16:25 chs Exp $ */ +/* $NetBSD: zs.c,v 1.21 2020/11/18 03:40:50 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.20 2019/11/10 21:16:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.21 2020/11/18 03:40:50 thorpej Exp $"); #include "opt_ddb.h" @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.20 #include #include #include -#include +#include #include #include #include @@ -123,8 +123,7 @@ zs_config(struct zsc_softc *zsc, char *b if (zsc_args.hwflags & ZS_HWFLAG_CONSOLE) { cs = _conschan_store; } else { - cs = malloc(sizeof(struct zs_chanstate), -M_DEVBUF, M_WAITOK | M_ZERO); + cs = kmem_zalloc(sizeof(*cs), KM_SLEEP); if(channel==0){ cs->cs_reg_csr = base + 7; cs->cs_reg_data = base + 15;
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: thorpej Date: Wed Nov 18 03:40:50 UTC 2020 Modified Files: src/sys/arch/cesfic/cesfic: isr.c src/sys/arch/cesfic/dev: zs.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cesfic/cesfic/isr.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cesfic/dev/zs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: chs Date: Fri Sep 27 00:53:34 UTC 2019 Modified Files: src/sys/arch/cesfic/cesfic: autoconf.c Log Message: do not clear "cold" in MD code, that is done in MI code. this instance was missed when that was changed 20 years ago. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cesfic/cesfic/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/autoconf.c diff -u src/sys/arch/cesfic/cesfic/autoconf.c:1.26 src/sys/arch/cesfic/cesfic/autoconf.c:1.27 --- src/sys/arch/cesfic/cesfic/autoconf.c:1.26 Sun Jul 29 18:05:40 2012 +++ src/sys/arch/cesfic/cesfic/autoconf.c Fri Sep 27 00:53:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.27 2019/09/27 00:53:34 chs Exp $ */ /* * Copyright (c) 1997, 1999 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 2019/09/27 00:53:34 chs Exp $"); #include #include @@ -145,7 +145,6 @@ cpu_configure(void) panic("no mainbus found"); (void)spl0(); - cold = 0; } void
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: chs Date: Fri Sep 27 00:53:34 UTC 2019 Modified Files: src/sys/arch/cesfic/cesfic: autoconf.c Log Message: do not clear "cold" in MD code, that is done in MI code. this instance was missed when that was changed 20 years ago. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cesfic/cesfic/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: christos Date: Sat Jan 14 22:24:43 UTC 2017 Modified Files: src/sys/arch/cesfic/include: param.h Log Message: protect against multiple inclusion. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cesfic/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: christos Date: Sat Jan 14 22:24:43 UTC 2017 Modified Files: src/sys/arch/cesfic/include: param.h Log Message: protect against multiple inclusion. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cesfic/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/include/param.h diff -u src/sys/arch/cesfic/include/param.h:1.12 src/sys/arch/cesfic/include/param.h:1.13 --- src/sys/arch/cesfic/include/param.h:1.12 Fri Feb 10 12:35:49 2012 +++ src/sys/arch/cesfic/include/param.h Sat Jan 14 17:24:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.12 2012/02/10 17:35:49 para Exp $ */ +/* $NetBSD: param.h,v 1.13 2017/01/14 22:24:43 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -37,7 +37,8 @@ * * @(#)param.h 8.1 (Berkeley) 6/10/93 */ - +#ifndef _MACHINE_PARAM_H_ +#define _MACHINE_PARAM_H_ /* * Machine dependent constants for CES FIC8234. */ @@ -83,3 +84,4 @@ void _delay(u_int); #endif /* _KERNEL && !_LOCORE */ +#endif /* _MACHINE_PARAM_H_ */
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: pgoyette Date: Thu Nov 5 03:48:51 UTC 2015 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c Log Message: Remove superfluous #includes - nothing depends on them To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/cesfic/cesfic/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/machdep.c diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.65 src/sys/arch/cesfic/cesfic/machdep.c:1.66 --- src/sys/arch/cesfic/cesfic/machdep.c:1.65 Mon Mar 24 18:56:43 2014 +++ src/sys/arch/cesfic/cesfic/machdep.c Thu Nov 5 03:48:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -72,15 +72,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include -#ifdef SYSVMSG -#include -#endif -#ifdef SYSVSEM -#include -#endif -#ifdef SYSVSHM -#include -#endif #include #include
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: pgoyette Date: Thu Nov 5 03:48:51 UTC 2015 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c Log Message: Remove superfluous #includes - nothing depends on them To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/cesfic/cesfic/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/conf
Module Name:src Committed By: chs Date: Fri Jan 23 03:39:39 UTC 2015 Modified Files: src/sys/arch/cesfic/conf: Makefile.cesfic Log Message: fix build with gcc48. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/cesfic/conf/Makefile.cesfic Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/conf
Module Name:src Committed By: chs Date: Fri Jan 23 03:39:39 UTC 2015 Modified Files: src/sys/arch/cesfic/conf: Makefile.cesfic Log Message: fix build with gcc48. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/cesfic/conf/Makefile.cesfic Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/conf/Makefile.cesfic diff -u src/sys/arch/cesfic/conf/Makefile.cesfic:1.16 src/sys/arch/cesfic/conf/Makefile.cesfic:1.17 --- src/sys/arch/cesfic/conf/Makefile.cesfic:1.16 Fri Jan 21 15:59:05 2011 +++ src/sys/arch/cesfic/conf/Makefile.cesfic Fri Jan 23 03:39:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cesfic,v 1.16 2011/01/21 15:59:05 joerg Exp $ +# $NetBSD: Makefile.cesfic,v 1.17 2015/01/23 03:39:39 chs Exp $ # Makefile for NetBSD # @@ -35,7 +35,7 @@ CPPFLAGS+= -Dcesfic CWARNFLAGS+= -Wno-format CFLAGS+= -msoft-float AFLAGS+= -x assembler-with-cpp -AFLAGS+= -Wa,-m68040 -Wa,-m68030 -Wa,-m68851 +AFLAGS+= -Wa,-mcpu=68030 -Wa,-m68040 -Wa,-m68030 -Wa,-m68851 ## ## (3) libkern and compat
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: christos Date: Mon Mar 24 18:56:43 UTC 2014 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c src/sys/arch/cesfic/dev: zs.c Log Message: - use cpu_{g,s}etmodel - remove unused To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/cesfic/cesfic/machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/dev/zs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/machdep.c diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.64 src/sys/arch/cesfic/cesfic/machdep.c:1.65 --- src/sys/arch/cesfic/cesfic/machdep.c:1.64 Wed Aug 8 12:29:50 2012 +++ src/sys/arch/cesfic/cesfic/machdep.c Mon Mar 24 14:56:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $ */ +/* $NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $); #include opt_bufcache.h #include opt_ddb.h @@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include sys/vnode.h #include sys/ksyms.h #include sys/module.h +#include sys/cpu.h #ifdef SYSVMSG #include sys/msg.h #endif @@ -247,6 +248,7 @@ cpu_startup(void) pmapdebug = 0; #endif + cpu_setmodel(FIC8234); if (fputype != FPU_NONE) m68k_make_fpu_idle_frame(); @@ -274,12 +276,11 @@ cpu_startup(void) /* * Info for CTL_HW */ -char cpu_model[] = FIC8234; void identifycpu(void) { - printf(%s\n, cpu_model); + printf(%s\n, cpu_getmodel()); printf(delay constant: %d\n, delay_divisor); } @@ -510,6 +511,7 @@ badaddr(void *addr) return (1); } i = *(volatile short *)addr; + __USE(i); nofault = (int *) 0; return (0); } @@ -526,6 +528,7 @@ badbaddr(void *addr) return (1); } i = *(volatile char *)addr; + __USE(i); nofault = (int *) 0; return (0); } Index: src/sys/arch/cesfic/dev/zs.c diff -u src/sys/arch/cesfic/dev/zs.c:1.18 src/sys/arch/cesfic/dev/zs.c:1.19 --- src/sys/arch/cesfic/dev/zs.c:1.18 Mon Oct 26 15:16:55 2009 +++ src/sys/arch/cesfic/dev/zs.c Mon Mar 24 14:56:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $ */ +/* $NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $); #include opt_ddb.h @@ -271,16 +271,16 @@ zs_write_data(struct zs_chanstate *cs, u int zs_set_speed(struct zs_chanstate *cs, int bps) { - int tconst, real_bps; + int tconst; tconst = BPS_TO_TCONST(cs-cs_brg_clk, bps); if (tconst 0) return (EINVAL); - /* Convert back to make sure we can do it. */ - real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst); #if 0 + /* Convert back to make sure we can do it. */ + int real_bps = TCONST_TO_BPS(cs-cs_brg_clk, tconst); /* XXX - Allow some tolerance here? */ if (real_bps != bps) return (EINVAL);
CVS commit: src/sys/arch/cesfic
Module Name:src Committed By: christos Date: Mon Mar 24 18:56:43 UTC 2014 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c src/sys/arch/cesfic/dev: zs.c Log Message: - use cpu_{g,s}etmodel - remove unused To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/cesfic/cesfic/machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/dev/zs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: tsutsui Date: Sat Mar 15 11:53:30 UTC 2014 Modified Files: src/sys/arch/cesfic/cesfic: locore.s Log Message: Use common m68k/busaddrerr.s for bus error and address error handlers. No binary changes on GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/cesfic/cesfic/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.31 src/sys/arch/cesfic/cesfic/locore.s:1.32 --- src/sys/arch/cesfic/cesfic/locore.s:1.31 Sun Mar 9 16:28:43 2014 +++ src/sys/arch/cesfic/cesfic/locore.s Sat Mar 15 11:53:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.31 2014/03/09 16:28:43 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.32 2014/03/15 11:53:30 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -387,191 +387,10 @@ Lmainreturned: */ #include m68k/m68k/trap_subr.s -#if defined(M68040) || defined(M68060) -ENTRY_NOPROFILE(addrerr4060) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movl %sp@(FR_HW+8),%sp@- - clrl %sp@- | dummy code - movl #T_ADDRERR,%sp@- | mark address error - jra _ASM_LABEL(faultstkadj) | and deal with it -#endif - -#if defined(M68060) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movel %sp@(FR_HW+12),%d0 | FSLW - btst #2,%d0 | branch prediction error? - jeq Lnobpe - movc %cacr,%d2 - orl #IC60_CABC,%d2 | clear all branch cache entries - movc %d2,%cacr - movl %d0,%d1 - andl #0x7ffd,%d1 - jeq _ASM_LABEL(faultstkadjnotrap2) -Lnobpe: -| we need to adjust for misaligned addresses - movl %sp@(FR_HW+8),%d1 | grab VA - btst #27,%d0 | check for mis-aligned access - jeq Lberr3 | no, skip - addl #28,%d1 | yes, get into next page - | operand case: 3, - | instruction case: 4+12+12 - andl #PG_FRAME,%d1| and truncate -Lberr3: - movl %d1,%sp@- - movl %d0,%sp@- | code is FSLW now. - andw #0x1f80,%d0 - jeq Lberr60 | it is a bus error - movl #T_MMUFLT,%sp@- | show that we are an MMU fault - jra _ASM_LABEL(faultstkadj) | and deal with it -Lberr60: - tstl _C_LABEL(nofault) | catch bus error? - jeq Lisberr | no, handle as usual - movl _C_LABEL(nofault),%sp@- | yes, - jbsr _C_LABEL(longjmp) | longjmp(nofault) - /* NOTREACHED */ -#endif -#if defined(M68040) -ENTRY_NOPROFILE(buserr40) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - movl %sp@(FR_HW+20),%d1 | get fault address - moveq #0,%d0 - movw %sp@(FR_HW+12),%d0 | get SSW - btst #11,%d0 | check for mis-aligned - jeq Lbe1stpg | no skip - addl #3,%d1 | get into next page - andl #PG_FRAME,%d1 | and truncate -Lbe1stpg: - movl %d1,%sp@- | pass fault address. - movl %d0,%sp@- | pass SSW as code - btst #10,%d0 | test ATC - jeq Lberr40 | it is a bus error - movl #T_MMUFLT,%sp@- | show that we are an MMU fault - jra _ASM_LABEL(faultstkadj) | and deal with it -Lberr40: - tstl _C_LABEL(nofault) | catch bus error? - jeq Lisberr | no, handle as usual - movl _C_LABEL(nofault),%sp@- | yes, - jbsr _C_LABEL(longjmp) | longjmp(nofault) - /* NOTREACHED */ -#endif - -#if defined(M68020) || defined(M68030) -ENTRY_NOPROFILE(busaddrerr2030) - clrl %sp@- | stack adjust count - moveml #0x,%sp@- | save user registers - movl %usp,%a0 | save the user SP - movl %a0,%sp@(FR_SP) | in the savearea - moveq #0,%d0 - movw %sp@(FR_HW+10),%d0 | grab SSW for fault processing - btst #12,%d0 | RB set? - jeq LbeX0 | no, test RC - bset #14,%d0 | yes, must set FB - movw %d0,%sp@(FR_HW+10) | for hardware too -LbeX0: - btst #13,%d0 | RC set? - jeq LbeX1 | no, skip - bset #15,%d0 | yes, must set FC - movw %d0,%sp@(FR_HW+10) | for hardware too -LbeX1: - btst #8,%d0 | data fault? - jeq Lbe0 | no, check for hard cases - movl %sp@(FR_HW+16),%d1 | fault address is as given in frame - jra Lbe10 | thats it -Lbe0: - btst #4,%sp@(FR_HW+6) | long (type B) stack frame? - jne Lbe4 | yes, go handle - movl %sp@(FR_HW+2),%d1 | no, can use save PC - btst #14,%d0 | FB set? - jeq Lbe3 | no, try FC - addql #4,%d1 | yes, adjust address - jra Lbe10 | done -Lbe3: - btst #15,%d0 | FC set? - jeq Lbe10 | no, done - addql #2,%d1 | yes, adjust address - jra Lbe10 | done -Lbe4: - movl %sp@(FR_HW+36),%d1 | long format, use stage B address - btst #15,%d0 | FC set? - jeq Lbe10 | no, all done - subql #2,%d1 | yes, adjust address -Lbe10: - movl %d1,%sp@- | push fault VA - movl %d0,%sp@- | and padded SSW - movw %sp@(FR_HW+8+6),%d0 | get frame format/vector offset - andw #0x0FFF,%d0 | clear out frame format - cmpw
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: tsutsui Date: Sat Mar 15 11:53:30 UTC 2014 Modified Files: src/sys/arch/cesfic/cesfic: locore.s Log Message: Use common m68k/busaddrerr.s for bus error and address error handlers. No binary changes on GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/cesfic/cesfic/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: drochner Date: Wed Aug 8 16:29:50 UTC 2012 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c Log Message: build fix for gcc -fno-common, from Radoslaw Kujawa To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/cesfic/cesfic/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/machdep.c diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.63 src/sys/arch/cesfic/cesfic/machdep.c:1.64 --- src/sys/arch/cesfic/cesfic/machdep.c:1.63 Fri Jul 27 05:36:10 2012 +++ src/sys/arch/cesfic/cesfic/machdep.c Wed Aug 8 16:29:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.63 2012/07/27 05:36:10 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.63 2012/07/27 05:36:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $); #include opt_bufcache.h #include opt_ddb.h @@ -119,7 +119,7 @@ struct vm_map *phys_map = NULL; * Declare these as initialized data so we can patch them. */ /*int maxmem;*/ /* max memory per process */ -int physmem = MAXMEM; /* max supported memory, changes to actual */ +extern int physmem; /* max supported memory, changes to actual */ extern u_int lowram;
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: drochner Date: Wed Aug 8 16:29:50 UTC 2012 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c Log Message: build fix for gcc -fno-common, from Radoslaw Kujawa To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/cesfic/cesfic/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: tsutsui Date: Thu Dec 22 15:06:17 UTC 2011 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: No need to include m68k/softintr.h. Old softintr(9) was superseded by MI softint(9). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/include/intr.h diff -u src/sys/arch/cesfic/include/intr.h:1.12 src/sys/arch/cesfic/include/intr.h:1.13 --- src/sys/arch/cesfic/include/intr.h:1.12 Tue Feb 8 20:20:10 2011 +++ src/sys/arch/cesfic/include/intr.h Thu Dec 22 15:06:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.12 2011/02/08 20:20:10 rmind Exp $ */ +/* $NetBSD: intr.h,v 1.13 2011/12/22 15:06:17 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -101,8 +101,6 @@ splraiseipl(ipl_cookie_t icookie) return _splraise(icookie._psl); } -#include m68k/softintr.h - #endif /* _KERNEL !_LOCORE */ #endif /* !_CESFIC_INTR_H_ */
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: tsutsui Date: Thu Dec 22 15:06:17 UTC 2011 Modified Files: src/sys/arch/cesfic/include: intr.h Log Message: No need to include m68k/softintr.h. Old softintr(9) was superseded by MI softint(9). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cesfic/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/include
Module Name:src Committed By: tsutsui Date: Sun Jan 2 08:22:35 UTC 2011 Added Files: src/sys/arch/cesfic/include: bus.h Log Message: Add a dummy machine/bus.h which nows seems to be mandatory in MI code including sys/bus.h even if a port doesn't use it. Taken from sbmips. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/cesfic/include/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/cesfic/include/bus.h diff -u /dev/null src/sys/arch/cesfic/include/bus.h:1.1 --- /dev/null Sun Jan 2 08:22:35 2011 +++ src/sys/arch/cesfic/include/bus.h Sun Jan 2 08:22:35 2011 @@ -0,0 +1,16 @@ +/* $NetBSD: bus.h,v 1.1 2011/01/02 08:22:35 tsutsui Exp $ */ + +/* + * XXX: A dummy machine/bus.h for MI sys/bus.h. + */ + +#ifndef _MACHINE_BUS_H_ +#define _MACHINE_BUS_H_ + +typedef paddr_t bus_addr_t; +typedef psize_t bus_size_t; + +typedef int bus_space_tag_t; +typedef int bus_space_handle_t; + +#endif /* _MACHINE_BUS_H_ */
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: tsutsui Date: Sat Dec 25 16:11:12 UTC 2010 Modified Files: src/sys/arch/cesfic/cesfic: pmap_bootstrap.c Log Message: Fix another fatal typo. sigh. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/pmap_bootstrap.c diff -u src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.27 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.28 --- src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.27 Sat Dec 25 14:42:59 2010 +++ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Sat Dec 25 16:11:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.27 2010/12/25 14:42:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.28 2010/12/25 16:11:11 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.27 2010/12/25 14:42:59 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.28 2010/12/25 16:11:11 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -215,7 +215,7 @@ i = SG4_LEV1SIZE + (nl1desc * SG4_LEV2SIZE); ste = (st_entry_t *)kstpa; ste = ste[i + SG4_LEV2SIZE - NPTEPG / SG4_LEV3SIZE * 2]; - epte = ste[NPTEPG / SG4_LEV3SIZE]; + este = ste[NPTEPG / SG4_LEV3SIZE]; protoste = kptmpa | SG_U | SG_RW | SG_V; while (ste este) { *ste++ = protoste;
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: tsutsui Date: Sat Dec 25 16:11:12 UTC 2010 Modified Files: src/sys/arch/cesfic/cesfic: pmap_bootstrap.c Log Message: Fix another fatal typo. sigh. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: skrll Date: Thu Feb 25 07:15:25 UTC 2010 Modified Files: src/sys/arch/cesfic/cesfic: locore.s Log Message: s/cpu_fork/cpu_lwp_fork/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: skrll Date: Thu Feb 25 07:15:25 UTC 2010 Modified Files: src/sys/arch/cesfic/cesfic: locore.s Log Message: s/cpu_fork/cpu_lwp_fork/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/locore.s diff -u src/sys/arch/cesfic/cesfic/locore.s:1.21 src/sys/arch/cesfic/cesfic/locore.s:1.22 --- src/sys/arch/cesfic/cesfic/locore.s:1.21 Sun Dec 13 11:24:02 2009 +++ src/sys/arch/cesfic/cesfic/locore.s Thu Feb 25 07:15:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.21 2009/12/13 11:24:02 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.22 2010/02/25 07:15:25 skrll Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -359,7 +359,7 @@ jbsr _C_LABEL(fic_init) /* - * Create a fake exception frame so that cpu_fork() can copy it. + * Create a fake exception frame so that cpu_lwp_fork() can copy it. * main() nevers returns; we exit to user mode from a forked process * later on. */
CVS commit: src/sys/arch/cesfic/cesfic
Module Name:src Committed By: tsutsui Date: Sat Dec 5 15:31:07 UTC 2009 Modified Files: src/sys/arch/cesfic/cesfic: pmap_bootstrap.c Log Message: Replace obsolete vm_offset_t with appropriate paddr_t or vaddr_t. (why gcc compiles these differ!?) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/cesfic/pmap_bootstrap.c diff -u src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.21 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.22 --- src/sys/arch/cesfic/cesfic/pmap_bootstrap.c:1.21 Fri Dec 4 18:55:13 2009 +++ src/sys/arch/cesfic/cesfic/pmap_bootstrap.c Sat Dec 5 15:31:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.22 2009/12/05 15:31:07 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.22 2009/12/05 15:31:07 tsutsui Exp $); #include sys/param.h #include sys/systm.h @@ -55,7 +55,7 @@ extern char *etext; extern paddr_t avail_start, avail_end; -void pmap_bootstrap(vm_offset_t, vm_offset_t); +void pmap_bootstrap(paddr_t, paddr_t); /* * Special purpose kernel virtual addresses, used for mapping @@ -81,9 +81,9 @@ * XXX a PIC compiler would make this much easier. */ void -pmap_bootstrap(vm_offset_t nextpa, vm_offset_t firstpa) +pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) { - vm_offset_t kstpa, kptpa, kptmpa, lkptpa, lwp0upa; + paddr_t kstpa, kptpa, kptmpa, lkptpa, lwp0upa; u_int nptpages, kstsize; st_entry_t protoste, *ste; pt_entry_t protopte, *pte, *epte; @@ -371,14 +371,14 @@ * To work around this, we move avail_end back one more * page so the msgbuf can be preserved. */ - RELOC(avail_start, vm_offset_t) = nextpa; - RELOC(avail_end, vm_offset_t) = firstpa + RELOC(avail_start, paddr_t) = nextpa; + RELOC(avail_end, paddr_t) = firstpa + m68k_ptob(RELOC(physmem, int)) - m68k_round_page(MSGBUFSIZE) - PAGE_SIZE; /* if that start of last page??? */ - RELOC(virtual_avail, vm_offset_t) = + RELOC(virtual_avail, vaddr_t) = KERNBASE + (nextpa - firstpa); - RELOC(virtual_end, vm_offset_t) = VM_MAX_KERNEL_ADDRESS; + RELOC(virtual_end, vaddr_t) = VM_MAX_KERNEL_ADDRESS; /* * Initialize protection array. @@ -440,7 +440,7 @@ * Allocate some fixed, special purpose kernel virtual addresses */ { - vm_offset_t va = RELOC(virtual_avail, vm_offset_t); + vaddr_t va = RELOC(virtual_avail, vaddr_t); RELOC(CADDR1, void *) = (void *)va; va += PAGE_SIZE; @@ -450,6 +450,6 @@ va += PAGE_SIZE; RELOC(msgbufaddr, void *) = (void *)va; va += m68k_round_page(MSGBUFSIZE); - RELOC(virtual_avail, vm_offset_t) = va; + RELOC(virtual_avail, vaddr_t) = va; } }