NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/41267: 5.0 RC4 does not detect second CPU in VIA VT-310DP motherboard



The following reply was made to PR port-i386/41267; it has been noted by GNATS.

From: Andrius V <vezhlys%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-i386/41267: 5.0 RC4 does not detect second CPU in VIA
 VT-310DP motherboard
Date: Mon, 11 Apr 2011 15:57:46 +0300

 Didn't sent to gnats-bugs (retry)
 
 Hello once again,
 
 I investigated the problem more and I found the exact place where
 something went wrong... I realized that tsc_read_bp function waits for
 results whose come from tsc_post_ap (functions from tsc.c). I printed
 some text after every step in tsc_post_ap and found that it stopped
 printing before this line:
 
        /* Post result.  Ensure the whole value goes out atomically. */
        (void)atomic_swap_64(&tsc_sync_val, tsc);
 
 I commented this line (I know that it is not a solution at all but I
 just wanted to be sure) and to my surprise the second cpu started...
 Unfortunately one more problem appeared with via ide drivers
 (viaide0:0:0: lost interrupt), but I successfully booted NetBSD
 without acpi support (-2vx). I posted dmesg below. If somebody will
 help me to understand how atomic_swap_64 works on i386 architecture I
 might try to localize the problem even more...
 
 What is more I found that x86_ipi_init: ESR 00000040 problem comes
 after first i82489_writereg(LAPIC_ESR, 0); call (so it wasn't related
 problem). If I add two function i82489_writereg(LAPIC_ESR, 0) calls
 one after another in x86_ipi_init then problem disappears and never
 reappears. If I comment this line then I am getting the same error in
 x86_ipi_startup function.
 
 dmesg represents this two changes I described (commented
 atomic_swap_64 line and added second i82489_writereg(LAPIC_ESR, 0);
 call in x86_ipi_init), -2vx arguments used:
 
 rbus: rbus_min_start set to 0x80000000
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011
    The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.
 
 NetBSD 5.99.48 (VT-3102) #58: Mon Apr 11 04:50:22 EEST 2011
        
andrius@agraphic-vt310dp.VIDANDRIUS:/usr/src/sys/arch/i386/compile/VT-3102
 total memory = 1981 MB
 avail memory = 1935 MB
 Prep module path=ffs len=230310 pa=c4d000
 timecounter: Timecounters tick every 10.000 msec
 timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 BIOS32 rev. 0 found at 0xfa2a0
 SMBIOS rev. 2.3 @ 0xf0000 (37 entries)
 VIA Technologies, Inc. CN400-8237 ( )
 mainbus0 (root)
 mainbus0: Intel MP Specification (Version 1.4) (OEM00000 PROD00000000)
 cpu0 at mainbus0 apid 0cpu0: calibrating local timer
 cpu0: apic clock running at 133 MHz
 timecounter: Timecounter "lapic" frequency 133032544 Hz quality -100
 : VIA Nehemiah, id 0x69a
 cpu0: PAT enabled
 cpu1 at mainbus0 apid 1: VIA Nehemiah, id 0x69a
 cpu1: PAT enabled
 mpbios: bus 0 is type PCI
 mpbios: bus 1 is type PCI
 mpbios: bus 2 is type ISA
 ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 3, 24 pins
 ioapic0: misconfigured as apic 0
 ioapic0: remapped to apic 2
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 pchb0 at pci0 dev 0 function 0: vendor 0x1106 product 0x0259 (rev. 0x00)
 agp0 at pchb0 (v3): aperture at 0xe8000000, size 0x8000000
 pchb1 at pci0 dev 0 function 1: vendor 0x1106 product 0x1259 (rev. 0x00)
 pchb2 at pci0 dev 0 function 2: vendor 0x1106 product 0x2259 (rev. 0x00)
 pchb3 at pci0 dev 0 function 3: vendor 0x1106 product 0x3259 (rev. 0x00)
 pchb4 at pci0 dev 0 function 4: vendor 0x1106 product 0x4259 (rev. 0x00)
 pchb5 at pci0 dev 0 function 7: vendor 0x1106 product 0x7259 (rev. 0x00)
 ppb0 at pci0 dev 1 function 0: vendor 0x1106 product 0xb198 (rev. 0x00)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 vga1 at pci1 dev 0 function 0: vendor 0x1106 product 0x3118 (rev. 0x02)
 wsdisplay0 at vga1 kbdmux 1
 wsmux1: connecting to wsdisplay0
 viadrm0 at vga1pci_mem_find: void region
 pci_mem_find: void region
 pci_mem_find: void region
 pci_mem_find: void region
 : VIA CN400 / PM8X0
 viadrm0: AGP at 0xe8000000 128MB
 viadrm0: Initialized via 2.11.1 20070202
 fxp0 at pci0 dev 9 function 0: i82551 Ethernet, rev 16
 fxp0: interrupting at ioapic0 pin 17
 fxp0: Ethernet address 00:e0:81:59:68:e5
 inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 vge0 at pci0 dev 10 function 0: VIA VT612X Gigabit Ethernet (rev. 0x11)
 vge0: interrupting at ioapic0 pin 18
 vge0: Ethernet address: 00:e0:81:59:68:e3
 ciphy0 at vge0 phy 1: Cicada CS8201 10/100/1000TX PHY, rev. 2
 ciphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
 1000baseT-FDX, auto
 pci_mem_find: expected type mem, found i/o
 viaide0 at pci0 dev 15 function 0: VIA Technologies VT8237 SATA
 Controller (rev. 0x80)
 viaide0: bus-master DMA support present
 viaide0: primary channel wired to native-PCI mode
 viaide0: using ioapic0 pin 20 for native-PCI interrupt
 atabus0 at viaide0 channel 0
 viaide0: secondary channel wired to native-PCI mode
 atabus1 at viaide0 channel 1
 uhci0 at pci0 dev 16 function 0: vendor 0x1106 product 0x3038 (rev. 0x81)
 uhci0: interrupting at ioapic0 pin 21
 usb0 at uhci0: USB revision 1.0
 usb0: WARNING: power management not supported
 uhci1 at pci0 dev 16 function 1: vendor 0x1106 product 0x3038 (rev. 0x81)
 uhci1: interrupting at ioapic0 pin 21
 usb1 at uhci1: USB revision 1.0
 usb1: WARNING: power management not supported
 uhci2 at pci0 dev 16 function 2: vendor 0x1106 product 0x3038 (rev. 0x81)
 uhci2: interrupting at ioapic0 pin 21
 usb2 at uhci2: USB revision 1.0
 usb2: WARNING: power management not supported
 uhci3 at pci0 dev 16 function 3: vendor 0x1106 product 0x3038 (rev. 0x81)
 uhci3: interrupting at ioapic0 pin 21
 usb3 at uhci3: USB revision 1.0
 usb3: WARNING: power management not supported
 ehci0 at pci0 dev 16 function 4: vendor 0x1106 product 0x3104 (rev. 0x86)
 ehci0: interrupting at ioapic0 pin 21
 ehci0: dropped intr workaround enabled
 ehci0: BIOS refuses to give up ownership, using force
 ehci0: EHCI version 1.0
 ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
 usb4 at ehci0: USB revision 2.0
 usb4: WARNING: power management not supported
 viapcib0 at pci0 dev 17 function 0: vendor 0x1106 product 0x3227 (rev. 0x00)
 viapcib0: SMBus found at 0x500 (revision 0x0)
 iic0 at viapcib0: I2C bus
 auvia0 at pci0 dev 17 function 5: VIA Technologies VT8237 AC'97 Audio (rev 
0x60)
 auvia0: interrupting at ioapic0 pin 22
 auvia0: ac97: VIA Technologies VT1616i codec; headphone, 18 bit DAC,
 18 bit ADC, KS Waves 3D
 auvia0: ac97: ext id 0x1c1<LDAC,SDAC,CDAC,VRA>
 audio0 at auvia0: full duplex, playback, capture, mmap, independent
 vr0 at pci0 dev 18 function 0: vendor 0x1106 product 0x3065 (rev. 0x78)
 vr0: interrupting at ioapic0 pin 23
 vr0: Ethernet address: 00:e0:81:59:68:e4
 ukphy0 at vr0 phy 1: OUI 0x0002c6, model 0x0032, rev. 10
 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 isa0 at viapcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com0: console
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
 pckbc0 at isa0 port 0x60-0x64
 pckbd0 at pckbc0 (kbd slot)
 pckbc0: using irq 1 for kbd slot
 wskbd0 at pckbd0 mux 1
 wskbd0: connecting to wsdisplay0
 attimer0 at isa0 port 0x40-0x43
 pcppi0 at isa0 port 0x61
 midi0 at pcppi0: PC speaker
 sysbeep0 at pcppi0
 npx0 at isa0 port 0xf0-0xff
 npx0: reported by CPUID; using exception 16
 attimer0: attached to pcppi0
 Initializing SSP: c27390a4 6212f8d8 e980c1a0 b41a9157 a4a14c45
 63cbe0ef bf816db0 6f3407f0
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 cpu1: TSC skew=109030138706 drift=-8788792544
 TSC not known safe on this CPU
 timecounter: Timecounter "TSC" frequency 997225350 Hz quality -100
 cpu1: running
 uhub0 at usb0: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhub1 at usb1: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 uhub2 at usb2: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 uhub3 at usb3: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub3: 2 ports with 2 removable, self powered
 viaide0 port 0: device present, speed: 1.5Gb/s
 uhub4 at usb4: vendor 0x1106 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub4: 8 ports with 8 removable, self powered
 viaide0 port 1: device present, speed: 1.5Gb/s
 wd0 at atabus0 drive 0
 wd0: <HDS722516VLSA80>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
 wd0: 32-bit data port
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
 atapibus0 at atabus1: 2 targets
 cd0 at atapibus0 drive 0: <HL-DT-ST DVDRAM GH22NS40, K5I98JK5513,
 NL01> cdrom removable
 cd0: 32-bit data port
 cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 cd0(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
 crypto: assign driver 0, flags 2
 crypto: driver 0 registers alg 1 flags 0 maxoplen 0
 crypto: driver 0 registers alg 2 flags 0 maxoplen 0
 crypto: driver 0 registers alg 3 flags 0 maxoplen 0
 crypto: driver 0 registers alg 4 flags 0 maxoplen 0
 crypto: driver 0 registers alg 5 flags 0 maxoplen 0
 crypto: driver 0 registers alg 17 flags 0 maxoplen 0
 crypto: driver 0 registers alg 6 flags 0 maxoplen 0
 crypto: driver 0 registers alg 19 flags 0 maxoplen 0
 crypto: driver 0 registers alg 7 flags 0 maxoplen 0
 crypto: driver 0 registers alg 20 flags 0 maxoplen 0
 crypto: driver 0 registers alg 15 flags 0 maxoplen 0
 crypto: driver 0 registers alg 24 flags 0 maxoplen 0
 crypto: driver 0 registers alg 25 flags 0 maxoplen 0
 crypto: driver 0 registers alg 8 flags 0 maxoplen 0
 crypto: driver 0 registers alg 21 flags 0 maxoplen 0
 crypto: driver 0 registers alg 16 flags 0 maxoplen 0
 crypto: driver 0 registers alg 9 flags 0 maxoplen 0
 crypto: driver 0 registers alg 10 flags 0 maxoplen 0
 crypto: driver 0 registers alg 13 flags 0 maxoplen 0
 crypto: driver 0 registers alg 14 flags 0 maxoplen 0
 crypto: driver 0 registers alg 11 flags 0 maxoplen 0
 crypto: driver 0 registers alg 18 flags 0 maxoplen 0
 crypto: driver 0 registers alg 23 flags 0 maxoplen 0
 crypto: driver 0 registers alg 22 flags 0 maxoplen 0
 raidattach: Asked for 8 units
 Kernelized RAIDframe activated
 Searching for RAID components...
 boot device: wd0
 root on wd0a dumps on wd0b
 root file system type: ffs
 uhidev0 at uhub0 port 1 configuration 1 interface 0
 uhidev0: Logitech USB-PS/2 Optical Mouse, rev 2.00/20.00, addr 2, iclass 3/1
 ums0 at uhidev0: 3 buttons and Z dir
 wsmouse0 at ums0 mux 0
 wsdisplay0: screen 1 added (80x25, vt100 emulation)
 wsdisplay0: screen 2 added (80x25, vt100 emulation)
 wsdisplay0: screen 3 added (80x25, vt100 emulation)
 wsdisplay0: screen 4 added (80x25, vt100 emulation)
 - Hide quoted text -
 
 
 On Sun, Apr 3, 2011 at 3:25 AM, Andrius V <vezhlys%gmail.com@localhost> wrote:
 > Hello,
 >
 > Unfortunately I didn't get any response to my last message so I
 > debugged the system a little bit more... There is some small
 > information that I missed previous times and can be helpful. I booted
 > the system with debug messages (-vx) and got a bit more information.
 > Firstly I received x86_ipi_init: ESR 00000040 message (it is from
 > lapic.c x86_ipi_init function and target value equals 1). It means
 > that IPI with illegal vector was received by Intel APIC specification.
 > Maybe this is the point where the problem began? It happens before
 > cpu_start_secondary and subsequently tsc_read_bp is executed (where
 > I'm getting infinitive loop). Secondly, I also compared various values
 > between correctly working system (dual core Athlon II X2) and VT-310DP
 > in tsc_read_bp function during execution. It seems that these values
 > were set correctly except that tsc_sync_cpu never becomes null on
 > VT-310DP. I used quite recent NetBSD-current for tests so the problem
 > remains in current version. Here is updated boot log with debug
 > messages:
 >
 > Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 >    2006, 2007, 2008, 2009, 2010, 2011
 >    The NetBSD Foundation, Inc.  All rights reserved.
 > Copyright (c) 1982, 1986, 1989, 1991, 1993
 >    The Regents of the University of California.  All rights reserved.
 >
 > NetBSD 5.99.48 (GENERIC) #0: Sun Mar 20 11:14:49 UTC 2011
 >        
 > builds%b8.netbsd.org@localhost:/home/builds/ab/HEAD/i386/201103200600Z-obj/home/bC
 > total memory = 1981 MB
 > avail memory = 1935 MB
 > Prep module path=ffs len=230310 pa=c4d000
 > timecounter: Timecounters tick every 10.000 msec
 > timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 > BIOS32 rev. 0 found at 0xfa2a0
 > SMBIOS rev. 2.3 @ 0xf0000 (37 entries)
 > VIA Technologies, Inc. CN400-8237 ( )
 > mainbus0 (root)
 > cpu0 at mainbus0 apid 0cpu0: calibrating local timer
 > cpu0: apic clock running at 133 MHz
 > timecounter: Timecounter "lapic" frequency 133032744 Hz quality -100
 > : VIA Nehemiah, id 0x69a
 > cpu0: PAT enabled
 > cpu1 at mainbus0 apid 1x86_ipi_init: ESR 00000040
 >
 


Home | Main Index | Thread Index | Old Index