# Intermittent hang during boot



## ansarm (Jun 11, 2011)

Hello all,

I have a Wyse SX0 that is quite stable when it boots but *both* OpenBSD and FreeBSD hang at the same point intermittently during boot. (Linux and Windows XP both boot fine).

I have tried a plethora of loader.conf tunables, but none make any change to the problem. The hangs are about 50% of the time and always in the same spot. The problem is the same regardless of if ACPI and APIC are enabled or disabled. Here is my loader.conf:


```
hw.ata.ata_dma=0
hw.ata.atapi_dma=0
hint.acpi.0.disabled=1
hint.apic.0.disabled=1
boot_verbose="YES"
verbose_loading="YES"
debug.bootverbose=1
```

Attached is my dmesg output after a successful boot and the hang area is in red. If you have any ideas I would appreciate it.


```
Copyright (c) 1992-2011 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-RELEASE #2: Mon Apr  4 01:20:24 UTC 2011
    sysop@sx0.vistapark.org:/usr/src/sys/i386/compile/SX0 i386
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0db6000.
Timecounter "i8254" frequency 1193182 Hz quality 0
Calibrating TSC clock ... TSC clock: 365239187 Hz
CPU: Geode(TM) Integrated Processor by National Semi (365.24-MHz 586-class CPU)
  Origin = "Geode by NSC"  Id = 0x552  Family = 5  Model = 5  Stepping = 2
  Features=0x80a13d<FPU,DE,PSE,TSC,MSR,CX8,PGE,CMOV,MMX>
real memory  = 129695744 (123 MB)
Physical memory chunk(s):
0x0000000000001000 - 0x000000000009efff, 647168 bytes (158 pages)
0x0000000000100000 - 0x00000000003fffff, 3145728 bytes (768 pages)
0x0000000001026000 - 0x0000000007940fff, 110211072 bytes (26907 pages)
avail memory = 112136192 (106 MB)
bios32: Found BIOS32 Service Directory header at 0xc00ff860
bios32: Entry = 0xff880 (c00ff880)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xfe100+0x17b7
Other BIOS signatures found:
x86bios:   IVT 0x000000-0x0004ff at 0xc0000000
x86bios:  SSEG 0x010000-0x01ffff at 0xc1bef000
x86bios:  EBDA 0x09f000-0x09ffff at 0xc009f000
x86bios:   ROM 0x0a0000-0x0effff at 0xc00a0000
ULE: setup cpu 0
wlan: <802.11 Link Layer>
kbd: new array size 4
kbd1 at kbdmux0
mem: <memory>
nfslock: pseudo-device
null: <null device, zero device>
random: <entropy source, Software, Yarrow>
io: <I/O>
pci_open(1):	mode 1 addr port (0x0cf8) is 0x80007030
pci_open(1a):	mode1res=0x80000000 (0x80000000)
pci_cfgcheck:	device 0 1 [class=060000] [hdr=80] is there (id=0028100b)
pcibios: BIOS version 2.10
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pir0: <PCI Interrupt Routing Table: 3 Entries> on motherboard
$PIR: Links after initial probe:
Link  IRQ  Rtd  Ref  IRQs
 0x1  255   N     3  11
 0x2  255   N     3  5
 0x3  255   N     3  10
 0x4  255   N     3  10
$PIR: Found matching pin for 0.15.INTB at func 3: 5
$PIR: Found matching pin for 0.15.INTD at func 4: 10
$PIR: Found matching pin for 0.14.INTA at func 0: 11
$PIR: Links after initial IRQ discovery:
Link  IRQ  Rtd  Ref  IRQs
 0x1   11   Y     3  11
 0x2    5   Y     3  5
 0x3  255   N     3  10
 0x4   10   Y     3  10
$PIR: IRQs used by BIOS: 5 10 11
$PIR: Interrupt Weights:
[    0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15 ]
[    0   0   0   0   0   3   0   0   0   0   3   3   0   0   0   0 ]
pci0: <PCI bus> on pcib0
pci0: domain=0, physical bus=0
found->	vendor=0x100b, dev=0x0028, revid=0x21
	domain=0, bus=0, slot=1, func=0
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0005, statreg=0x0220, cachelnsz=8 (dwords)
	lattimer=0xf8 (7440 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[10]: type I/O Port, range 32, base 0xac1c, size  2, enabled
found->	vendor=0x100b, dev=0x0030, revid=0x00
	domain=0, bus=0, slot=1, func=1
	class=03-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0003, statreg=0x0220, cachelnsz=8 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[10]: type Memory, range 32, base 0x41000000, size 24, enabled
	map[14]: type Memory, range 32, base 0x40ffc000, size 14, enabled
	map[18]: type Memory, range 32, base 0x40ff8000, size 14, enabled
	map[1c]: type Memory, range 32, base 0x40ff4000, size 14, enabled
found->	vendor=0x10ec, dev=0x8139, revid=0x10
	domain=0, bus=0, slot=14, func=0
	class=02-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0007, statreg=0x0290, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x20 (8000 ns), maxlat=0x40 (16000 ns)
	intpin=a, irq=11
	powerspec 2  supports D0 D1 D2 D3  current D0
	map[10]: type I/O Port, range 32, base 0xef00, size  8, enabled
	map[14]: type Memory, range 32, base 0xeff00000, size  8, enabled
$PIR: 0:14 INTA routed to irq 11
found->	vendor=0x1022, dev=0x2090, revid=0x03
	domain=0, bus=0, slot=15, func=0
	class=06-01-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0009, statreg=0x02a0, cachelnsz=8 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
[color="Red"]	map[10]: type I/O Port, range 32, base 0x6000, size  3, enabled
	map[14]: type I/O Port, range 32, base 0x6100, size  8, enabled
	map[18]: type I/O Port, range 32, base 0x6200, size  6, enabled
	map[1c]: type I/O Port, range 32, base 0, size  5, enabled
	map[20]: type I/O Port, range 32, base 0x9d00, size  7, enabled
	map[24]: type I/O Port, range 32, base 0x9c00, size  6, enabled[/color]
found->	vendor=0x1022, dev=0x209a, revid=0x01
	domain=0, bus=0, slot=15, func=2
	class=01-01-80, hdrtype=0x00, mfdev=0
	cmdreg=0x0005, statreg=0x02a0, cachelnsz=8 (dwords)
	lattimer=0xf8 (7440 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[20]: type I/O Port, range 32, base 0xeef0, size  4, enabled
found->	vendor=0x1022, dev=0x2093, revid=0x01
	domain=0, bus=0, slot=15, func=3
	class=04-01-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0005, statreg=0x02a0, cachelnsz=8 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=b, irq=5
	map[10]: type I/O Port, range 32, base 0xee00, size  7, enabled
$PIR: 0:15 INTB routed to irq 5
found->	vendor=0x1022, dev=0x2094, revid=0x02
	domain=0, bus=0, slot=15, func=4
	class=0c-03-10, hdrtype=0x00, mfdev=0
	cmdreg=0x0006, statreg=0x0230, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=d, irq=10
	powerspec 2  supports D0 D3  current D0
	map[10]: type Memory, range 32, base 0xefc00000, size 12, enabled
$PIR: 0:15 INTD routed to irq 10
unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xefc00000
ohci early: SMM active, request owner change
found->	vendor=0x1022, dev=0x2095, revid=0x02
	domain=0, bus=0, slot=15, func=5
	class=0c-03-20, hdrtype=0x00, mfdev=0
	cmdreg=0x0006, statreg=0x0230, cachelnsz=8 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	intpin=d, irq=10
	powerspec 2  supports D0 D3  current D0
	map[10]: type Memory, range 32, base 0xefb00000, size 12, enabled
$PIR: 0:15 INTD routed to irq 10
unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xefb00000
vgapci0: <VGA-compatible display> mem 0x41000000-0x41ffffff,0x40ffc000-0x40ffffff,0x40ff8000-0x40ffbfff,0x40ff4000-0x40ff7fff at device 1.1 on pci0
rl0: <RealTek 8139 10/100BaseTX> port 0xef00-0xefff mem 0xeff00000-0xeff000ff irq 11 at device 14.0 on pci0
rl0: Reserved 0x100 bytes for rid 0x10 type 4 at 0xef00
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: bpf attached
rl0: Ethernet address: 00:80:64:5c:14:a1
rl0: [MPSAFE]
rl0: [ITHREAD]
isab0: <PCI-ISA bridge> port 0x6000-0x6007,0x6100-0x61ff,0x6200-0x623f,0x9d00-0x9d7f,0x9c00-0x9c3f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xeef0-0xeeff at device 15.2 on pci0
atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0xeef0
ata0: <ATA channel 0> on atapci0
atapci0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1f0
atapci0: Reserved 0x1 bytes for rid 0x14 type 4 at 0x3f6
ata0: reset tp1 mask=03 ostat0=50 ostat1=00
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x00 err=0x00 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=00 devices=0x1
ata0: [MPSAFE]
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
atapci0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x170
atapci0: Reserved 0x1 bytes for rid 0x1c type 4 at 0x376
ata1: reset tp1 mask=00 ostat0=ff ostat1=ff
ata1: [MPSAFE]
ata1: [ITHREAD]
pci0: <multimedia, audio> at device 15.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xefc00000-0xefc00fff irq 10 at device 15.4 on pci0
ohci0: [MPSAFE]
ohci0: [ITHREAD]
usbus0: <OHCI (generic) USB controller> on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xefb00000-0xefb00fff irq 10 at device 15.5 on pci0
ehci0: [MPSAFE]
ehci0: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <AMD CS5536 (Geode) USB 2.0 controller> on ehci0
cpu0 on motherboard
ex_isa_identify()
pnp_identify: Trying Read_Port at 203
pnp_identify: Trying Read_Port at 243
pnp_identify: Trying Read_Port at 283
pnp_identify: Trying Read_Port at 2c3
pnp_identify: Trying Read_Port at 303
pnp_identify: Trying Read_Port at 343
pnp_identify: Trying Read_Port at 383
pnp_identify: Trying Read_Port at 3c3
PNP Identify complete
isa_probe_children: disabling PnP devices
pmtimer0 on isa0
ata: ata0 already exists; skipping it
ata: ata1 already exists; skipping it
sc: sc0 already exists; skipping it
isa_probe_children: probing non-PnP devices
```


----------



## StevenC (Jul 6, 2013)

This loader.conf option may help if FreeBSD 9.x hangs on Wyse Sx0 devices somewhere around the "pcib" detection: 
	
	



```
debug.acpi.disabled=timer
```

I found this out after noticing FreeBSD 8.x is able to boot, although many programs would hang including NTP, and `date` revealed the system clock was not ticking!  With the ACPI clock disabled it will fall back to the i8254, which works.

Some other issues specific to USB boot are:

the drive geometry assumed by BIOS, and its lack of support for LBA, means you can only address the first 1 GiB of the disk until the FreeBSD kernel is running.  Your bootloader, boot partition containing the kernel and any loadable modules, must fit entirely within that part of the disk.
the BIOS only responds to certain models of USB keyboard, you may just have to try several
factory-default BIOS password on these is 'fireport'
during early boot, the FreeBSD kernel resets some of the USB ports; depending where the keyboard is plugged into it might stop working, but some ports continue to work
failure to mount the root partition, due to the USB device attaching too slowly, can be worked around with another loader.conf option: 
	
	



```
kern.cam.boot_delay=60000
```


----------

