Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2002 12:24:20 -0700
From:      Peter Wemm <peter@wemm.org>
To:        John Hay <jhay@icomtek.csir.co.za>
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:  <20020712192420.C71223811@overcee.wemm.org>
In-Reply-To: <200207121656.g6CGuxf57431@zibbi.icomtek.csir.co.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
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?  Do you
have any unusual kernel compile options or tunables? I'll go over the code
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.

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)

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


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?20020712192420.C71223811>