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, 30 Apr 2012 10:56:26 +0300
Didn't get sent to gnats-bugs. Very sorry for duplicate messages and
broken order.
------
I found the main problem for this bug. It is related to the patch made for
PR40213. Changes itself were not bad but for some reason (cpu_feature[0] &
CPUID_CX8) !=3D 0 (x86_patch function in patch.c) returns false for this
system (VIA Eden-N actually supports cmpxchg8b instruction). Because of th=
is
it uses i486 version of atomic_cas_64 function (atomic.S) and this is the
place where it doesn't work. That code worked too until popf, pushf were
added and that change broke the support (it was made for "Fix the i486
atomic_cas_64() to not unconditionally enable interrupts.", if I am not
wrong), because of this atomic_swap_64 goes into infinitive loop too (look
at my earlier posts). The main question remains why pentium routine is not
used how to solve that? Currently I commented this if clause (so the "patc=
h"
applied anyway) and system just booted fine with both CPUs. Any thoughts a=
nd
suggestions? Thanks.
On Mon, Apr 11, 2011 at 4:00 PM, Andrius V <vezhlys%gmail.com@localhost>
wrote:
>
> 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
> =C2=A0VT-310DP motherboard
> Date: Mon, 11 Apr 2011 15:57:46 +0300
>
> =C2=A0Didn't sent to gnats-bugs (retry)
>
> =C2=A0Hello once again,
>
> =C2=A0I investigated the problem more and I found the exact place where
> =C2=A0something went wrong... I realized that tsc_read_bp function waits =
for
> =C2=A0results whose come from tsc_post_ap (functions from tsc.c). I print=
ed
> =C2=A0some text after every step in tsc_post_ap and found that it stopped
> =C2=A0printing before this line:
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Post result. =C2=A0Ensure the whole value g=
oes out atomically. */
> =C2=A0 =C2=A0 =C2=A0 =C2=A0(void)atomic_swap_64(&tsc_sync_val, tsc);
>
> =C2=A0I commented this line (I know that it is not a solution at all but =
I
> =C2=A0just wanted to be sure) and to my surprise the second cpu started..=
.
> =C2=A0Unfortunately one more problem appeared with via ide drivers
> =C2=A0(viaide0:0:0: lost interrupt), but I successfully booted NetBSD
> =C2=A0without acpi support (-2vx). I posted dmesg below. If somebody will
> =C2=A0help me to understand how atomic_swap_64 works on i386 architecture=
I
> =C2=A0might try to localize the problem even more...
>
> =C2=A0What is more I found that x86_ipi_init: ESR 00000040 problem comes
> =C2=A0after first i82489_writereg(LAPIC_ESR, 0); call (so it wasn't relat=
ed
> =C2=A0problem). If I add two function i82489_writereg(LAPIC_ESR, 0) calls
> =C2=A0one after another in x86_ipi_init then problem disappears and never
> =C2=A0reappears. If I comment this line then I am getting the same error =
in
> =C2=A0x86_ipi_startup function.
>
> =C2=A0dmesg represents this two changes I described (commented
> =C2=A0atomic_swap_64 line and added second i82489_writereg(LAPIC_ESR, 0);
> =C2=A0call in x86_ipi_init), -2vx arguments used:
>
> =C2=A0rbus: rbus_min_start set to 0x80000000
> =C2=A0Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,=
2005,
> =C2=A0 =C2=A02006, 2007, 2008, 2009, 2010, 2011
> =C2=A0 =C2=A0The NetBSD Foundation, Inc. =C2=A0All rights reserved.
> =C2=A0Copyright (c) 1982, 1986, 1989, 1991, 1993
> =C2=A0 =C2=A0The Regents of the University of California. =C2=A0All right=
s reserved.
>
> =C2=A0NetBSD 5.99.48 (VT-3102) #58: Mon Apr 11 04:50:22 EEST 2011
>
> =C2=A0andrius@agraphic-vt310dp.VIDANDRIUS:/usr/src/sys/arch/i386/compile/=
VT-3102
> =C2=A0total memory =3D 1981 MB
> =C2=A0avail memory =3D 1935 MB
> =C2=A0Prep module path=3Dffs len=3D230310 pa=3Dc4d000
> =C2=A0timecounter: Timecounters tick every 10.000 msec
> =C2=A0timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
> =C2=A0BIOS32 rev. 0 found at 0xfa2a0
> =C2=A0SMBIOS rev. 2.3 @ 0xf0000 (37 entries)
> =C2=A0VIA Technologies, Inc. CN400-8237 ( )
> =C2=A0mainbus0 (root)
> =C2=A0mainbus0: Intel MP Specification (Version 1.4) (OEM00000 PROD000000=
00)
> =C2=A0cpu0 at mainbus0 apid 0cpu0: calibrating local timer
> =C2=A0cpu0: apic clock running at 133 MHz
> =C2=A0timecounter: Timecounter "lapic" frequency 133032544 Hz quality -10=
0
> =C2=A0: VIA Nehemiah, id 0x69a
> =C2=A0cpu0: PAT enabled
> =C2=A0cpu1 at mainbus0 apid 1: VIA Nehemiah, id 0x69a
> =C2=A0cpu1: PAT enabled
> =C2=A0mpbios: bus 0 is type PCI
> =C2=A0mpbios: bus 1 is type PCI
> =C2=A0mpbios: bus 2 is type ISA
> =C2=A0ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 3, 24 pins
> =C2=A0ioapic0: misconfigured as apic 0
> =C2=A0ioapic0: remapped to apic 2
> =C2=A0pci0 at mainbus0 bus 0: configuration mode 1
> =C2=A0pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
> =C2=A0pchb0 at pci0 dev 0 function 0: vendor 0x1106 product 0x0259 (rev. =
0x00)
> =C2=A0agp0 at pchb0 (v3): aperture at 0xe8000000, size 0x8000000
> =C2=A0pchb1 at pci0 dev 0 function 1: vendor 0x1106 product 0x1259 (rev. =
0x00)
> =C2=A0pchb2 at pci0 dev 0 function 2: vendor 0x1106 product 0x2259 (rev. =
0x00)
> =C2=A0pchb3 at pci0 dev 0 function 3: vendor 0x1106 product 0x3259 (rev. =
0x00)
> =C2=A0pchb4 at pci0 dev 0 function 4: vendor 0x1106 product 0x4259 (rev. =
0x00)
> =C2=A0pchb5 at pci0 dev 0 function 7: vendor 0x1106 product 0x7259 (rev. =
0x00)
> =C2=A0ppb0 at pci0 dev 1 function 0: vendor 0x1106 product 0xb198 (rev. 0=
x00)
> =C2=A0pci1 at ppb0 bus 1
> =C2=A0pci1: i/o space, memory space enabled
> =C2=A0vga1 at pci1 dev 0 function 0: vendor 0x1106 product 0x3118 (rev. 0=
x02)
> =C2=A0wsdisplay0 at vga1 kbdmux 1
> =C2=A0wsmux1: connecting to wsdisplay0
> =C2=A0viadrm0 at vga1pci_mem_find: void region
> =C2=A0pci_mem_find: void region
> =C2=A0pci_mem_find: void region
> =C2=A0pci_mem_find: void region
> =C2=A0: VIA CN400 / PM8X0
> =C2=A0viadrm0: AGP at 0xe8000000 128MB
> =C2=A0viadrm0: Initialized via 2.11.1 20070202
> =C2=A0fxp0 at pci0 dev 9 function 0: i82551 Ethernet, rev 16
> =C2=A0fxp0: interrupting at ioapic0 pin 17
> =C2=A0fxp0: Ethernet address 00:e0:81:59:68:e5
> =C2=A0inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
> =C2=A0inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> =C2=A0vge0 at pci0 dev 10 function 0: VIA VT612X Gigabit Ethernet (rev. 0=
x11)
> =C2=A0vge0: interrupting at ioapic0 pin 18
> =C2=A0vge0: Ethernet address: 00:e0:81:59:68:e3
> =C2=A0ciphy0 at vge0 phy 1: Cicada CS8201 10/100/1000TX PHY, rev. 2
> =C2=A0ciphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> =C2=A01000baseT-FDX, auto
> =C2=A0pci_mem_find: expected type mem, found i/o
> =C2=A0viaide0 at pci0 dev 15 function 0: VIA Technologies VT8237 SATA
> =C2=A0Controller (rev. 0x80)
> =C2=A0viaide0: bus-master DMA support present
> =C2=A0viaide0: primary channel wired to native-PCI mode
> =C2=A0viaide0: using ioapic0 pin 20 for native-PCI interrupt
> =C2=A0atabus0 at viaide0 channel 0
> =C2=A0viaide0: secondary channel wired to native-PCI mode
> =C2=A0atabus1 at viaide0 channel 1
> =C2=A0uhci0 at pci0 dev 16 function 0: vendor 0x1106 product 0x3038 (rev.=
0x81)
> =C2=A0uhci0: interrupting at ioapic0 pin 21
> =C2=A0usb0 at uhci0: USB revision 1.0
> =C2=A0usb0: WARNING: power management not supported
> =C2=A0uhci1 at pci0 dev 16 function 1: vendor 0x1106 product 0x3038 (rev.=
0x81)
> =C2=A0uhci1: interrupting at ioapic0 pin 21
> =C2=A0usb1 at uhci1: USB revision 1.0
> =C2=A0usb1: WARNING: power management not supported
> =C2=A0uhci2 at pci0 dev 16 function 2: vendor 0x1106 product 0x3038 (rev.=
0x81)
> =C2=A0uhci2: interrupting at ioapic0 pin 21
> =C2=A0usb2 at uhci2: USB revision 1.0
> =C2=A0usb2: WARNING: power management not supported
> =C2=A0uhci3 at pci0 dev 16 function 3: vendor 0x1106 product 0x3038 (rev.=
0x81)
> =C2=A0uhci3: interrupting at ioapic0 pin 21
> =C2=A0usb3 at uhci3: USB revision 1.0
> =C2=A0usb3: WARNING: power management not supported
> =C2=A0ehci0 at pci0 dev 16 function 4: vendor 0x1106 product 0x3104 (rev.=
0x86)
> =C2=A0ehci0: interrupting at ioapic0 pin 21
> =C2=A0ehci0: dropped intr workaround enabled
> =C2=A0ehci0: BIOS refuses to give up ownership, using force
> =C2=A0ehci0: EHCI version 1.0
> =C2=A0ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
> =C2=A0usb4 at ehci0: USB revision 2.0
> =C2=A0usb4: WARNING: power management not supported
> =C2=A0viapcib0 at pci0 dev 17 function 0: vendor 0x1106 product 0x3227 (r=
ev.
> 0x00)
> =C2=A0viapcib0: SMBus found at 0x500 (revision 0x0)
> =C2=A0iic0 at viapcib0: I2C bus
> =C2=A0auvia0 at pci0 dev 17 function 5: VIA Technologies VT8237 AC'97 Aud=
io
> (rev 0x60)
> =C2=A0auvia0: interrupting at ioapic0 pin 22
> =C2=A0auvia0: ac97: VIA Technologies VT1616i codec; headphone, 18 bit DAC=
,
> =C2=A018 bit ADC, KS Waves 3D
> =C2=A0auvia0: ac97: ext id 0x1c1<LDAC,SDAC,CDAC,VRA>
> =C2=A0audio0 at auvia0: full duplex, playback, capture, mmap, independent
> =C2=A0vr0 at pci0 dev 18 function 0: vendor 0x1106 product 0x3065 (rev. 0=
x78)
> =C2=A0vr0: interrupting at ioapic0 pin 23
> =C2=A0vr0: Ethernet address: 00:e0:81:59:68:e4
> =C2=A0ukphy0 at vr0 phy 1: OUI 0x0002c6, model 0x0032, rev. 10
> =C2=A0ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> =C2=A0isa0 at viapcib0
> =C2=A0com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> =C2=A0com0: console
> =C2=A0com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
> =C2=A0pckbc0 at isa0 port 0x60-0x64
> =C2=A0pckbd0 at pckbc0 (kbd slot)
> =C2=A0pckbc0: using irq 1 for kbd slot
> =C2=A0wskbd0 at pckbd0 mux 1
> =C2=A0wskbd0: connecting to wsdisplay0
> =C2=A0attimer0 at isa0 port 0x40-0x43
> =C2=A0pcppi0 at isa0 port 0x61
> =C2=A0midi0 at pcppi0: PC speaker
> =C2=A0sysbeep0 at pcppi0
> =C2=A0npx0 at isa0 port 0xf0-0xff
> =C2=A0npx0: reported by CPUID; using exception 16
> =C2=A0attimer0: attached to pcppi0
> =C2=A0Initializing SSP: c27390a4 6212f8d8 e980c1a0 b41a9157 a4a14c45
> =C2=A063cbe0ef bf816db0 6f3407f0
> =C2=A0timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality =
0
> =C2=A0cpu1: TSC skew=3D109030138706 drift=3D-8788792544
> =C2=A0TSC not known safe on this CPU
> =C2=A0timecounter: Timecounter "TSC" frequency 997225350 Hz quality -100
> =C2=A0cpu1: running
> =C2=A0uhub0 at usb0: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.0=
0,
> addr 1
> =C2=A0uhub0: 2 ports with 2 removable, self powered
> =C2=A0uhub1 at usb1: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.0=
0,
> addr 1
> =C2=A0uhub1: 2 ports with 2 removable, self powered
> =C2=A0uhub2 at usb2: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.0=
0,
> addr 1
> =C2=A0uhub2: 2 ports with 2 removable, self powered
> =C2=A0uhub3 at usb3: vendor 0x1106 UHCI root hub, class 9/0, rev 1.00/1.0=
0,
> addr 1
> =C2=A0uhub3: 2 ports with 2 removable, self powered
> =C2=A0viaide0 port 0: device present, speed: 1.5Gb/s
> =C2=A0uhub4 at usb4: vendor 0x1106 EHCI root hub, class 9/0, rev 2.00/1.0=
0,
> addr 1
> =C2=A0uhub4: 8 ports with 8 removable, self powered
> =C2=A0viaide0 port 1: device present, speed: 1.5Gb/s
> =C2=A0wd0 at atabus0 drive 0
> =C2=A0wd0: <HDS722516VLSA80>
> =C2=A0wd0: drive supports 16-sector PIO transfers, LBA48 addressing
> =C2=A0wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 32167296=
0
> sectors
> =C2=A0wd0: 32-bit data port
> =C2=A0wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra=
/100)
> =C2=A0wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (u=
sing
> DMA)
> =C2=A0atapibus0 at atabus1: 2 targets
> =C2=A0cd0 at atapibus0 drive 0: <HL-DT-ST DVDRAM GH22NS40, K5I98JK5513,
> =C2=A0NL01> cdrom removable
> =C2=A0cd0: 32-bit data port
> =C2=A0cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra=
/100)
> =C2=A0cd0(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (u=
sing
> DMA)
> =C2=A0crypto: assign driver 0, flags 2
> =C2=A0crypto: driver 0 registers alg 1 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 2 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 3 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 4 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 5 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 17 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 6 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 19 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 7 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 20 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 15 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 24 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 25 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 8 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 21 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 16 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 9 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 10 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 13 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 14 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 11 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 18 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 23 flags 0 maxoplen 0
> =C2=A0crypto: driver 0 registers alg 22 flags 0 maxoplen 0
> =C2=A0raidattach: Asked for 8 units
> =C2=A0Kernelized RAIDframe activated
> =C2=A0Searching for RAID components...
> =C2=A0boot device: wd0
> =C2=A0root on wd0a dumps on wd0b
> =C2=A0root file system type: ffs
> =C2=A0uhidev0 at uhub0 port 1 configuration 1 interface 0
> =C2=A0uhidev0: Logitech USB-PS/2 Optical Mouse, rev 2.00/20.00, addr 2, i=
class
> 3/1
> =C2=A0ums0 at uhidev0: 3 buttons and Z dir
> =C2=A0wsmouse0 at ums0 mux 0
> =C2=A0wsdisplay0: screen 1 added (80x25, vt100 emulation)
> =C2=A0wsdisplay0: screen 2 added (80x25, vt100 emulation)
> =C2=A0wsdisplay0: screen 3 added (80x25, vt100 emulation)
> =C2=A0wsdisplay0: screen 4 added (80x25, vt100 emulation)
> =C2=A0- Hide quoted text -
>
>
> =C2=A0On Sun, Apr 3, 2011 at 3:25 AM, Andrius V
> <vezhlys%gmail.com@localhost> wrote=
:
> =C2=A0> Hello,
> =C2=A0>
> =C2=A0> Unfortunately I didn't get any response to my last message so I
> =C2=A0> debugged the system a little bit more... There is some small
> =C2=A0> information that I missed previous times and can be helpful. I bo=
oted
> =C2=A0> the system with debug messages (-vx) and got a bit more informati=
on.
> =C2=A0> Firstly I received x86_ipi_init: ESR 00000040 message (it is from
> =C2=A0> lapic.c x86_ipi_init function and target value equals 1). It mean=
s
> =C2=A0> that IPI with illegal vector was received by Intel APIC specifica=
tion.
> =C2=A0> Maybe this is the point where the problem began? It happens befor=
e
> =C2=A0> cpu_start_secondary and subsequently tsc_read_bp is executed (whe=
re
> =C2=A0> I'm getting infinitive loop). Secondly, I also compared various v=
alues
> =C2=A0> between correctly working system (dual core Athlon II X2) and VT-=
310DP
> =C2=A0> in tsc_read_bp function during execution. It seems that these val=
ues
> =C2=A0> were set correctly except that tsc_sync_cpu never becomes null on
> =C2=A0> VT-310DP. I used quite recent NetBSD-current for tests so the pro=
blem
> =C2=A0> remains in current version. Here is updated boot log with debug
> =C2=A0> messages:
> =C2=A0>
> =C2=A0> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 200=
4,
> 2005,
> =C2=A0> =C2=A0 =C2=A02006, 2007, 2008, 2009, 2010, 2011
> =C2=A0> =C2=A0 =C2=A0The NetBSD Foundation, Inc. =C2=A0All rights reserve=
d.
> =C2=A0> Copyright (c) 1982, 1986, 1989, 1991, 1993
> =C2=A0> =C2=A0 =C2=A0The Regents of the University of California. =C2=A0A=
ll rights reserved.
> =C2=A0>
> =C2=A0> NetBSD 5.99.48 (GENERIC) #0: Sun Mar 20 11:14:49 UTC 2011
> =C2=A0>
> =C2=A0builds%b8.netbsd.org@localhost:/home/builds/ab/HEAD/i386/201103200600Z-obj/ho=
me/bC
> =C2=A0> total memory =3D 1981 MB
> =C2=A0> avail memory =3D 1935 MB
> =C2=A0> Prep module path=3Dffs len=3D230310 pa=3Dc4d000
> =C2=A0> timecounter: Timecounters tick every 10.000 msec
> =C2=A0> timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
> =C2=A0> BIOS32 rev. 0 found at 0xfa2a0
> =C2=A0> SMBIOS rev. 2.3 @ 0xf0000 (37 entries)
> =C2=A0> VIA Technologies, Inc. CN400-8237 ( )
> =C2=A0> mainbus0 (root)
> =C2=A0> cpu0 at mainbus0 apid 0cpu0: calibrating local timer
> =C2=A0> cpu0: apic clock running at 133 MHz
> =C2=A0> timecounter: Timecounter "lapic" frequency 133032744 Hz quality -=
100
> =C2=A0> : VIA Nehemiah, id 0x69a
> =C2=A0> cpu0: PAT enabled
> =C2=A0> cpu1 at mainbus0 apid 1x86_ipi_init: ESR 00000040
> =C2=A0>
>
Home |
Main Index |
Thread Index |
Old Index