Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jul 2002 08:25:04 +0200 (SAT)
From:      John Hay <jhay@icomtek.csir.co.za>
To:        peter@wemm.org
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
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
Message-ID:  <200207140625.g6E6P4043409@zibbi.icomtek.csir.co.za>
In-Reply-To: <200207121958.g6CJw5E63833@zibbi.icomtek.csir.co.za> from John Hay at "Jul 12, 2002 09:58:05 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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 <peter@FreeBSD.org> 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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,
> >     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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207140625.g6E6P4043409>