Module Name: src Committed By: martin Date: Fri Sep 20 10:00:14 UTC 2024
Modified Files: src/sys/arch/i386/i386 [netbsd-10]: bioscall.S Log Message: Pull up following revision(s) (requested by rin in ticket #875): sys/arch/i386/i386/bioscall.S: revision 1.11 i386/bioscall: Disable preemption while we load the kernel pmap. Fixes crash on boot in new KASSERT(kpreempt_disabled()) in cpu_load_pmap. We could do KASSERT(kpreempt_disabled() || cold), but I don't know if bioscall is ever reachable after warm boot; this way is safer. XXX Would be nice if bioscall were a C function, not asm -- I don't see any reason why we need it to be asm? To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.30.1 src/sys/arch/i386/i386/bioscall.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/i386/i386/bioscall.S diff -u src/sys/arch/i386/i386/bioscall.S:1.10 src/sys/arch/i386/i386/bioscall.S:1.10.30.1 --- src/sys/arch/i386/i386/bioscall.S:1.10 Sat Jul 14 14:29:40 2018 +++ src/sys/arch/i386/i386/bioscall.S Fri Sep 20 10:00:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bioscall.S,v 1.10 2018/07/14 14:29:40 maxv Exp $ */ +/* $NetBSD: bioscall.S,v 1.10.30.1 2024/09/20 10:00:14 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <machine/asm.h> -__KERNEL_RCSID(0, "$NetBSD: bioscall.S,v 1.10 2018/07/14 14:29:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bioscall.S,v 1.10.30.1 2024/09/20 10:00:14 martin Exp $"); #include <machine/bioscall.h> @@ -67,6 +67,8 @@ ENTRY(bioscall) pushl %ebp movl %esp,%ebp /* set up frame ptr */ + call _C_LABEL(kpreempt_disable) + /* install lwp0 pmap */ movl _C_LABEL(kernel_pmap_ptr),%eax pushl %eax @@ -85,5 +87,7 @@ ENTRY(bioscall) call _C_LABEL(cpu_load_pmap) addl $4,%esp + call _C_LABEL(kpreempt_enable) + leave ret