From owner-cvs-all Sat Jul 13 23:26:15 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B59B337B400; Sat, 13 Jul 2002 23:26:02 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D9B943E86; Sat, 13 Jul 2002 23:25:53 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.6/8.11.6) id g6E6P4043409; Sun, 14 Jul 2002 08:25:04 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200207140625.g6E6P4043409@zibbi.icomtek.csir.co.za> Subject: Re: cvs commit: src/sys/conf options.i386 options.pc98 src/sys/i386/i386 bios.c db_interface.c locore.s mp_machdep.c mpapic.c pm In-Reply-To: <200207121958.g6CJw5E63833@zibbi.icomtek.csir.co.za> from John Hay at "Jul 12, 2002 09:58:05 pm" To: peter@wemm.org Date: Sun, 14 Jul 2002 08:25:04 +0200 (SAT) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter, The "#if 0" around that block of code is good enough to get my machine going again. I have also tried it again just now, after all the latest commits to pmap.c, but it still panic without the "#if 0". > > John Hay wrote: > > > > In message: <200207120756.g6C7uBjZ051826@freefall.freebsd.org> > > > > Peter Wemm writes: > > > > : - It actually works this time, honest! > > > > > > My dual PII machine panic while booting now. I have tried with and without > > > acpi, just in case, but that does not make a difference. > > > > > > ############################ > > > Hit [Enter] to boot immediately, or any other key for command prompt. > > > Booting [/boot/kernel/kernel]... > > > ACPI autoload failed - no such file or directory > > > Copyright (c) 1992-2002 The FreeBSD Project. > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > > The Regents of the University of California. All rights reserved. > > > FreeBSD 5.0-CURRENT #66: Fri Jul 12 18:46:29 SAST 2002 > > > jhay@beast.icomtek.csir.co.za:/usr/src/sys/i386/compile/BEAST > > > Preloaded elf kernel "/boot/kernel/kernel" at 0xc043b000. > > > Timecounter "i8254" frequency 1193520 Hz > > > CPU: Pentium II/Pentium II Xeon/Celeron (267.35-MHz 686-class CPU) > > > Origin = "GenuineIntel" Id = 0x633 Stepping = 3 > > > Features=0x80fbff > CMOV,MMX> > > > real memory = 134205440 (131060K bytes) > > > avail memory = 125702144 (122756K bytes) > > > Programming 24 pins in IOAPIC #0 > > > IOAPIC #0 intpin 2 -> irq 0 > > > > > > > > > Fatal trap 12: page fault while in kernel mode > > > cpuid = 0; lapic.id = 01000000 > > > fault virtual address = 0xbff00498 > > > fault code = supervisor read, protection violation > > > instruction pointer = 0x8:0xc02d4468 > > > stack pointer = 0x10:0xc045dcf4 > > > frame pointer = 0x10:0xc045dcfc > > > code segment = base 0x0, limit 0xfffff, type 0x1b > > > = DPL 0, pres 1, def32 1, gran 1 > > > processor eflags = interrupt enabled, resume, IOPL = 0 > > > current process = 0 () > > > kernel: type 12 trap, code=0 > > > Stopped at pmap_set_opt+0xa8: cmpl $0,PTmap(%eax) > > > db> > > > ############################ > > > > Umm, what the hell? First off, the DISABLE_PG_G option avoids this block > > of code, so you shouldn't be stuck. > > > > Secondly, the code in question is: > > if (pgeflag) { > > /* Turn on PG_G for text, data, bss pages. */ > > va = (vm_offset_t)btext; > > endva = KERNBASE + KERNend; > > while (va < endva) { > > pte = vtopte(va); > > if (*pte) > > ^^^^^^^^^ > > *pte |= pgeflag; > > va += PAGE_SIZE; > > } > > invltlb(); /* Insurance */ > > } > > #define vtopte(va) (PTmap + i386_btop(va)) > > > > "read protection violation"?? We cannot read the page table pages that map > > in the kernel? > > > > Can you repeat this anywhere else? Or is it just that one box? > > Well this is box I try current first. I can try it on another, but it will > take a while. > > > Do you > > have any unusual kernel compile options or tunables? I'll go over the code > > I use a serial console. I have CPUTYPE=i686 in /etc/make.conf and these > (maybe less normal ones) in my kernel config: > > options INET6 > options MROUTING > options PPS_SYNC > options CLK_USE_TSC_CALIBRATION > options "CLK_USE_I8254_CALIBRATION" > makeoptions DEBUG=-g > options DDB > options INVARIANTS > options INVARIANT_SUPPORT > options WITNESS > > > again but it would be useful if I could get some clues as to why it happens > > for you. Can you do a 'show all registers' for me and in particular tell > > me what %eax is? That will tell me the KVA address that it is trying to > > access the pte for. > > db> show all registers > No such command > db> show all > procs > db> show registers > cs 0x8 > ds 0xc0450010 > es 0x10 > fs 0x18 > ss 0x10 > eax 0x300498 > ecx 0xc043c000 > edx 0xc0126b10 btext > ebx 0x100 > esp 0xc045dcf4 > ebp 0xc045dcfc > esi 0xc0463000 > edi 0xbfeff000 PTD > eip 0xc02d4468 pmap_set_opt+0xa8 > efl 0x90202 > dr0 0 > dr1 0 > dr2 0 > dr3 0 > dr4 0xffff0ff0 > dr5 0x400 > dr6 0xffff0ff0 > dr7 0x400 > pmap_set_opt+0xa8: cmpl $0,PTmap(%eax) > db> > > > > > If this is absolutely repeatable, try throwing a #if 0 around that block of > > code, it isn't as severe as DISABLE_PG_G. You would lose PG_G on kernel > > text+data only instead of that plus mapped kernel pages. That should be > > mostly harmless because we should be running from the 4MB page for the most > > part. (say, how big is your kernel? More than 3MB? check the size(1) > > output please) > > Well I have tried the kernel a few times and it did the same everytime. > > beast:/home/jhay # size /boot/kernel/kernel > text data bss dec hex filename > 2311433 203892 428320 2943645 2cea9d /boot/kernel/kernel > > I'll try the #if 0 and DISABLE_PG_G tomorrow morning. Now it is bedtime > for me. John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message