diff --git a/sys/arch/m68k/include/frame.h b/sys/arch/m68k/include/frame.h index 9821e30ad45e..8748d783cd86 100644 --- a/sys/arch/m68k/include/frame.h +++ b/sys/arch/m68k/include/frame.h @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.33 2023/09/26 14:33:55 tsutsui Exp $ */ +/* $NetBSD: frame.h,v 1.34 2024/01/12 23:46:52 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -243,6 +243,22 @@ do { \ #define ATOMIC_CAS_CHECK(cfp) /* nothing */ #endif /* __mc68010__ */ +static inline void ** +getvbr(void) +{ + void **vbr; + + __asm volatile("movc %%vbr,%0" : "=r" (vbr)); + + return vbr; +} + +static inline void +setvbr(void **vbr) +{ + __asm volatile("movc %0,%%vbr" : : "r" (vbr)); +} + #endif /* _KERNEL */ #endif /* _M68K_FRAME_H_ */ diff --git a/sys/arch/sun2/sun2/locore.s b/sys/arch/sun2/sun2/locore.s index 14c759f7e5fd..6087f518685b 100644 --- a/sys/arch/sun2/sun2/locore.s +++ b/sys/arch/sun2/sun2/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.31 2024/01/12 23:36:29 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.32 2024/01/12 23:46:52 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -550,18 +550,6 @@ Ldorte: #undef FPCOPROC #include -ENTRY(getvbr) - movc %vbr,%d0 -#ifdef __ELF__ - movl %d0, %a0 -#endif /* __ELF__ */ - rts - -ENTRY(setvbr) - movl %sp@(4),%d0 - movc %d0,%vbr - rts - /* loadustp, ptest_addr */ /* diff --git a/sys/arch/sun2/sun2/machdep.h b/sys/arch/sun2/sun2/machdep.h index c20ad6bcd72e..8952fa4099fe 100644 --- a/sys/arch/sun2/sun2/machdep.h +++ b/sys/arch/sun2/sun2/machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.14 2024/01/12 23:36:29 thorpej Exp $ */ +/* $NetBSD: machdep.h,v 1.15 2024/01/12 23:46:52 thorpej Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -115,14 +115,10 @@ int fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *); int getdfc(void); int getsfc(void); -void** getvbr(void); - void initfpu(void); void set_clk_mode(int, int); -void setvbr(void **); - void g0_entry(void); void g4_entry(void); diff --git a/sys/arch/sun3/sun3/locore.s b/sys/arch/sun3/sun3/locore.s index 45de8d34c520..3bdef105ce28 100644 --- a/sys/arch/sun3/sun3/locore.s +++ b/sys/arch/sun3/sun3/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.103 2024/01/12 23:36:29 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.104 2024/01/12 23:46:53 thorpej Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -619,15 +619,6 @@ ENTRY(DCIU) /* ICPL, ICPP, DCPL, DCPP, DCPA, DCFL, DCFP */ /* PCIA, ecacheon, ecacheoff */ -ENTRY(getvbr) - movc %vbr,%a0 - rts - -ENTRY(setvbr) - movl %sp@(4),%d0 - movc %d0,%vbr - rts - /* loadustp, ptest_addr */ /* diff --git a/sys/arch/sun3/sun3/machdep.h b/sys/arch/sun3/sun3/machdep.h index 070a63d51eef..b5b881128097 100644 --- a/sys/arch/sun3/sun3/machdep.h +++ b/sys/arch/sun3/sun3/machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.40 2024/01/12 23:36:30 thorpej Exp $ */ +/* $NetBSD: machdep.h,v 1.41 2024/01/12 23:46:53 thorpej Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -114,7 +114,6 @@ void enable_video(int); int fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *); -void** getvbr(void); int getcrp(struct mmu_rootptr *); void initfpu(void); @@ -127,8 +126,6 @@ void netintr(void); void obio_init(void); -void setvbr(void **); - void sunmon_abort(void); void sunmon_halt(void); void sunmon_init(void); diff --git a/sys/arch/sun3/sun3/sunmon.c b/sys/arch/sun3/sun3/sunmon.c index a3c199cbd464..a12a9b3ed4de 100644 --- a/sys/arch/sun3/sun3/sunmon.c +++ b/sys/arch/sun3/sun3/sunmon.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunmon.c,v 1.22 2020/09/10 02:03:44 rin Exp $ */ +/* $NetBSD: sunmon.c,v 1.23 2024/01/12 23:46:53 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.22 2020/09/10 02:03:44 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.23 2024/01/12 23:46:53 thorpej Exp $"); #include #include @@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.22 2020/09/10 02:03:44 rin Exp $"); #include #include +#include + #include #include #include diff --git a/sys/arch/sun3/sun3x/locore.s b/sys/arch/sun3/sun3x/locore.s index b62f0e37d65f..b34c5a790378 100644 --- a/sys/arch/sun3/sun3x/locore.s +++ b/sys/arch/sun3/sun3x/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.71 2024/01/12 23:36:30 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.72 2024/01/12 23:46:53 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -599,16 +599,6 @@ ENTRY(ecacheon) ENTRY(ecacheoff) rts -ENTRY(getvbr) - movc %vbr,%d0 - movl %d0,%a0 - rts - -ENTRY(setvbr) - movl %sp@(4),%d0 - movc %d0,%vbr - rts - /* * Load a new CPU Root Pointer (CRP) into the MMU. * void loadcrp(struct mmu_rootptr *);