panic on current ACPI

2001-09-01 Thread Mitsuru IWASAKI

Hi,  I've noticed that the recent CURRENT got panic on some machines
if we have `device acpica' in kernel config.


ACPI debug layer 0x0  debug level 0x0
Copyright (c) 1992-2001 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 #8: Sat Sep  1 20:02:07 JST 2001
root@tp1620:/usr/obj/usr/CURRENT/src/sys/TP1620
Timecounter i8254  frequency 1193182 Hz
Timecounter TSC  frequency 597407237 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (597.41-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x686  Stepping = 6
  
Features=0x383f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real memory  = 402587648 (393152K bytes)
avail memory = 385839104 (376796K bytes)
Preloaded elf kernel kernel at 0xc05a5000.
Preloaded userconfig_script /boot/kernel.conf at 0xc05a509c.
Preloaded elf module acpi.ko at 0xc05a50ec.
can't re-use a leaf (acpi_debug_layer)!
can't re-use a leaf (acpi_debug_level)!
can't re-use a leaf (acpi_timecounter)!
can't re-use a leaf (acpi_timer_freq)!
can't re-use a leaf (acpi_wakeup)!
Warning: module nexus/acpi already exists
Warning: module acpi/acpi_acad already exists
Warning: module acpi/acpi_button already exists
Warning: module acpi/acpi_cmbat already exists
Warning: module acpi/acpi_cpu already exists
Warning: module acpi/acpi_ec already exists
Warning: module acpi/acpi_lid already exists
Warning: module acpi/acpi_pcib already exists
Warning: module acpi/acpi_sysresource already exists
Warning: module acpi/acpi_tz already exists
Warning: module acpi/acpi_timer already exists
Warning: module pci/acpi_timer_pci already exists
Pentium Pro MTRR support enabled
WARNING: Driver mistake: destroy_dev on 154/0
Using $PIR table, 11 entries at 0xc00fdee0
acpi0: PTLTDRSDT   on motherboard
acpi0: power button is handled as a fixed feature programming model.
Timecounter ACPI  frequency 3579545 Hz
acpi_timer1: couldn't allocate I/O resource (port 0x1008)
acpi_timer1 port 0x1008-0x100b on acpi0
acpi_cpu0: CPU on acpi0
acpi_tz0: thermal zone on acpi0
acpi_lid0: Control Method Lid Switch on acpi0
acpi_button0: Sleep Button on acpi0
acpi_pcib0: Host-PCI bridge port 0xcf8-0xcff on acpi0
pci0: PCI bus on acpi_pcib0
pcib1: PCI-PCI bridge at device 1.0 on pci0
pci1: PCI bus on pcib1
pci1: display, VGA at 0.0 (no driver attached)
isab0: PCI-ISA bridge at device 7.0 on pci0
isa0: ISA bus on isab0
atapci0: Intel PIIX4 ATA33 controller port 0x1800-0x180f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x28
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc058ed3c
stack pointer   = 0x10:0xc05c6be0
frame pointer   = 0x10:0xc05c6be0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 0 (swapper)
kernel: type 12 trap, code=0
Stopped at  acpi_timer_get_timecount+0x08:  movl0x28(%eax),%edx


I think that this is because acpi_timer device is identified twice,
so I've just made a quick fix for this so that acpi_timer_identify()
is called only once.

I hope more proper fixes would be made...

Thanks

Index: acpi_timer.c
===
RCS file: /home/ncvs/src/sys/dev/acpica/acpi_timer.c,v
retrieving revision 1.10
diff -u -r1.10 acpi_timer.c
--- acpi_timer.c5 Aug 2001 23:20:32 -   1.10
+++ acpi_timer.c1 Sep 2001 12:04:14 -
@@ -55,7 +55,7 @@
 #define _COMPONENT ACPI_SYSTEM
 MODULE_NAME(TIMER)
 
-static device_tacpi_timer_dev;
+static device_tacpi_timer_dev = NULL;
 struct resource*acpi_timer_reg;
 #define TIMER_READ bus_space_read_4(rman_get_bustag(acpi_timer_reg),   \
 rman_get_bushandle(acpi_timer_reg),\
@@ -122,6 +122,9 @@
return_VOID;
 
 if (AcpiGbl_FADT == NULL)
+   return_VOID;
+
+if (acpi_timer_dev != NULL)
return_VOID;
 
 if ((dev = BUS_ADD_CHILD(parent, 0, acpi_timer, 0)) == NULL) {


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: panic on current ACPI

2001-09-01 Thread Sergey A. Osokin

On Sat, Sep 01, 2001 at 11:25:04PM +0900, Mitsuru IWASAKI wrote:
 Hi,  I've noticed that the recent CURRENT got panic on some machines
 if we have `device acpica' in kernel config.
 
 
 ata0: at 0x1f0 irq 14 on atapci0
 
 
 Fatal trap 12: page fault while in kernel mode
 fault virtual address = 0x28
 fault code= supervisor read, page not present
 instruction pointer   = 0x8:0xc058ed3c
 stack pointer = 0x10:0xc05c6be0
 frame pointer = 0x10:0xc05c6be0
 code segment  = base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, def32 1, gran 1
 processor eflags  = interrupt enabled, resume, IOPL = 0
 current process   = 0 (swapper)
 kernel: type 12 trap, code=0
 Stopped atacpi_timer_get_timecount+0x08:  movl0x28(%eax),%edx
 
 
 I think that this is because acpi_timer device is identified twice,
 so I've just made a quick fix for this so that acpi_timer_identify()
 is called only once.
 
 I hope more proper fixes would be made...
 
 Thanks
 
 Index: acpi_timer.c
 ===
 RCS file: /home/ncvs/src/sys/dev/acpica/acpi_timer.c,v
 retrieving revision 1.10
 diff -u -r1.10 acpi_timer.c
 --- acpi_timer.c  5 Aug 2001 23:20:32 -   1.10
 +++ acpi_timer.c  1 Sep 2001 12:04:14 -
 @@ -55,7 +55,7 @@
  #define _COMPONENT   ACPI_SYSTEM
  MODULE_NAME(TIMER)
  
 -static device_t  acpi_timer_dev;
 +static device_t  acpi_timer_dev = NULL;
  struct resource  *acpi_timer_reg;
  #define TIMER_READ   bus_space_read_4(rman_get_bustag(acpi_timer_reg),   \
rman_get_bushandle(acpi_timer_reg),\
 @@ -122,6 +122,9 @@
   return_VOID;
  
  if (AcpiGbl_FADT == NULL)
 + return_VOID;
 +
 +if (acpi_timer_dev != NULL)
   return_VOID;
  
  if ((dev = BUS_ADD_CHILD(parent, 0, acpi_timer, 0)) == NULL) {
 
 

I have the same problem. Your patch works for me.
Thanks.

-- 

Rgdz,/\ 
Sergey Osokin aka oZZ,   \ /  ASCII RIBBON CAMPAIGN
[EMAIL PROTECTED]X AGAINST HTML MAIL
http://freebsd.org.ru/~osa/  / \

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: panic on current ACPI

2001-09-01 Thread Mike Smith

 Hi,  I've noticed that the recent CURRENT got panic on some machines
 if we have `device acpica' in kernel config.

You've loaded the ACPI module as well as compiling it into the kernel.

Don't do that.

 I hope more proper fixes would be made...

Peter has suggested that properly versioning the ACPI module should 
prevent it from being loaded if the kernel already contains it.  I hope 
he's right. 8)

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message