Re: Copy files to usb (slow)

2017-01-29 Thread edward wandasiewicz
>From your dmesg, your machine has USB 3.0 hardware ports

usb0 at xhci0: USB revision 3.0

and you're using a USB 2.0 flash drive - rev 2.00/1.10

umass0 at uhub0 port 2 configuration 1 interface 0 "Kingston
DataTraveler 2.0" rev 2.00/1.10 addr 6

You could upgrade to a USB 3.0 flash drive.

On USB 3.0 hardware port with a USB 3.0 flash drive ( not an SSD ), with a

MSDOS file system, I get about 2.5 MB/s

4.2BSD file system, I get about 7 MB/s

with rsync --info=progress2 ./SOURCE/ /DEST transferring a single 1GB file.

Attempting to dd an image, I get about 20 MB/s

# dd if=img bs=1m | pv -s 16GB | dd of=/dev/rsd1c bs=1m

On Sun, Jan 29, 2017 at 6:57 PM, Ali Farzanrad  wrote:
> G  wrotes:
>>Hello.
>>Im trying to copy files from my laptop to a usb stick.
>>The speed varies between 300kB/sec and 400kB/sec. Its really slow.
>
> I also have the same problem.
> It seems that block files are slow and it is not possible to mount raw
> files.
> I tested it with dd(1) and found that fastest way to transfer data is
> using raw devices:
>
> # dd if=/dev/rsd1c of=temp.fs bs=1m
> # vnconfig vnd0 temp.fs
> # mount /dev/vnd0i /mnt/usb
> # ... do copy ...
> # umount /mnt/usb
> # vnconfig -u vnd0
> # dd if=temp.fs of=/dev/rsd1c bs=1m



Loss of USB connection if I "wiggle the cable at device end"

2017-01-24 Thread edward wandasiewicz
I am noticing a loss of USB connection if I accidentally / purposely
wiggle the cable near the USB type-C device end, using 6.0-current
#150.

I have 2 USB-A male to type-C cables, one implements USB 2.1, the other USB
3.1

I get the same problem with both cables.

The problem doesn't happen all the time, about 1 in 10 when I try to
replicate it, and I haven't had this problem in the past.

I get 2 different types of messages when the problem occurs



1. uhub0: port 2 reset failed

2. uhub0: device problem, disabling port X



where "disabling port X" can be either port 2 or port 1 - see below

I've also attached a dmesg from boot

I can compile a kernel with UMASS_DEBUG if further output is needed

Edward.

#
# uhub0: port 2 reset failed
#

Jan 24 12:10:21 mousse /bsd: sd3 detached
Jan 24 12:10:21 mousse /bsd: scsibus5 detached
Jan 24 12:10:21 mousse /bsd: umass1 detached
Jan 24 12:10:23 mousse /bsd: uhub0: port 2 reset failed

#
# uhub0: device problem, disabling port 2
#
# suddenly connect, from 12:11:19 to 12:11:20
#
# detach and attach using same cable, USB 2.1
#

Jan 24 12:10:46 mousse /bsd: sd3 detached
Jan 24 12:10:46 mousse /bsd: scsibus5 detached
Jan 24 12:10:46 mousse /bsd: umass1 detached
Jan 24 12:11:19 mousse /bsd: uhub0: device problem, disabling port 2
Jan 24 12:11:20 mousse /bsd: umass1 at uhub0 port 2 configuration 1
interface 0 "Samsung Portable
SSD T3" rev 2.10/1.00 addr 5
Jan 24 12:11:20 mousse /bsd: umass1: using SCSI over Bulk-Only
Jan 24 12:11:20 mousse /bsd: scsibus5 at umass1: 2 targets, initiator 0
Jan 24 12:11:20 mousse /bsd: sd3 at scsibus5 targ 1 lun 0:  SCSI4
0/direct fixed serial.04e861f312345678E41F
Jan 24 12:11:20 mousse /bsd: sd3: 476940MB, 512 bytes/sector, 976773168
sectors
Jan 24 12:11:20 mousse /bsd: sd3 detached
Jan 24 12:11:20 mousse /bsd: scsibus5 detached
Jan 24 12:11:20 mousse /bsd: umass1 detached

#
# uhub0: device problem, disabling port 1
#
# suddenly connect, from 12:20:43 to 12:20:45
#
# detach and attach using different cables
#
# detach with USB 2.1 cable, attach with USB 3.1 cable
#

Jan 24 12:19:57 mousse /bsd: umass1 at uhub0 port 1 configuration 1
interface 0 "Samsung Portable
SSD T3" rev 2.10/1.00 addr 5
Jan 24 12:19:57 mousse /bsd: umass1: using SCSI over Bulk-Only
Jan 24 12:19:57 mousse /bsd: scsibus5 at umass1: 2 targets, initiator 0
Jan 24 12:19:57 mousse /bsd: sd3 at scsibus5 targ 1 lun 0:  SCSI4
0/direct fixed serial.04e861f312345678E41F
Jan 24 12:19:57 mousse /bsd: sd3: 476940MB, 512 bytes/sector, 976773168
sectors
Jan 24 12:19:59 mousse /bsd: sd3 detached
Jan 24 12:19:59 mousse /bsd: scsibus5 detached
Jan 24 12:19:59 mousse /bsd: umass1 detached
Jan 24 12:20:43 mousse /bsd: uhub0: device problem, disabling port 1
Jan 24 12:20:45 mousse /bsd: umass1 at uhub0 port 13 configuration 1
interface 0 "Samsung Portable
SSD T3" rev 3.00/1.00 addr 5
Jan 24 12:20:45 mousse /bsd: umass1: using SCSI over Bulk-Only
Jan 24 12:20:45 mousse /bsd: scsibus5 at umass1: 2 targets, initiator 0
Jan 24 12:20:45 mousse /bsd: sd3 at scsibus5 targ 1 lun 0:  SCSI4
0/direct fixed serial.04e861f312345678E41F
Jan 24 12:20:45 mousse /bsd: sd3: 476940MB, 512 bytes/sector, 976773168
sectors

#
# dmesg
#

OpenBSD 6.0-current (GENERIC.MP) #150: Tue Jan 17 17:41:15 MST 2017
bu...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17094049792 (16302MB)
avail mem = 16571342848 (15803MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7ce42020 (9 entries)
bios0: vendor coreboot version "(null)" date 04/02/2015
bios0: GOOGLE Samus
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SSDT
acpi0: wakeup devices HDEF(S3) WLAN(S3) EHCI(S3) XHCI(S3) ATPA(S3)
CODC(S3) LID0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2394.83 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCN
T,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,IT
SC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2394830480 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2394.46 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS

Missing "boot> machine regs" on amd64

2016-01-21 Thread edward wandasiewicz
The man page on boot(8) for amd64 says we should be able to print the
contents of the processor registers if compiled with DEBUG.

If we can do so on amd64, it seems we are missing a few debug.* files
in the amd64 source tree to do so.

% find /usr/src/sys/ -type f | xargs grep -l "DUMP_REGS"
/usr/src/sys/arch/amd64/stand/libsa/cmd_i386.c
/usr/src/sys/arch/i386/stand/libsa/cmd_i386.c
/usr/src/sys/arch/i386/stand/libsa/debug_md.h

% find /usr/src/sys/ -type f | xargs grep -l "debug_md.h"
/usr/src/sys/arch/i386/stand/libsa/CVS/Entries
/usr/src/sys/arch/i386/stand/libsa/debug.h
/usr/src/sys/arch/i386/stand/libsa/debug_i386.S
/usr/src/sys/arch/i386/stand/libsa/debug_md.h
/usr/src/sys/arch/i386/stand/libsa/gidt.S

Are we missing this feature on amd64?

Or should the man page for boot(8) amd64 be changed if this feature is
not available on amd64?

Edward.



Re: iwm(4) 11n support: it just works

2015-12-16 Thread edward wandasiewicz
Works nicely on the Chrombook Pixel 2015 i7.

Thanks for the update Peter.

$ dmesg

OpenBSD 5.8-current (GENERIC.MP) #1749: Wed Dec 16 01:22:42 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17094049792 (16302MB)
avail mem = 16571850752 (15804MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7ce42020 (9 entries)
bios0: vendor coreboot version "(null)" date 04/02/2015
bios0: GOOGLE Samus
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SSDT
acpi0: wakeup devices HDEF(S3) WLAN(S3) EHCI(S3) XHCI(S3) ATPA(S3)
CODC(S3) LID0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2408.62 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.30 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 3 (application processor)
cpu2: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.31 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 1, package 0
cpu3 at mainbus0: apid 2 (application processor)
cpu3: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.30 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiprt7 at acpi0: bus -1 (RP07)
acpiprt8 at acpi0: bus -1 (RP08)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10),
C1(1000@0 mwait.1@0x1), PSS
acpicpu1 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10),
C1(1000@0 mwait.1@0x1), PSS
acpicpu2 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10),
C1(1000@0 mwait.1@0x1), PSS
acpicpu3 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10),
C1(1000@0 mwait.1@0x1), PSS
acpitz0 at acpi0: critical temperature is 104 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "3487041" serial 809777200 type LION oem
"21484737139854675"
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
cpu0: Enhanced SpeedStep 2408 MHz: speeds: 2401, 2400, 1700, 1300, 900, 500
MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5500" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 2560x1700
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3
pci1 at ppb0 bus 1
iwm0 at pci1 dev 0 function 0 

Re: No USB 3.0 on 5.8 -current Broadwell

2015-12-16 Thread edward wandasiewicz
Update to 5.8 -current. It now works.

See 1.65 of

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/xhci.c?sortby=date

Edward
On 16 Dec 2015 3:14 p.m., "Mark Carroll" <m...@ixod.org> wrote:

> On 20 Nov 2015, edward wandasiewicz wrote:
>
> > If I try to plug in various USB 3.0 umass(4) devices into a USB 3.0 or
> > USB 3.1 Type C port, nothing gets registered via dmesg, even if I add
> >
> > option USB_DEBUG
> > option UMASS_DEBUG
> > option XHCI_DEBUG
> >
> > and compile a kernel. No dmesg output upon attachment of USB 3.0
> > devices.
>
> For what it's worth, also on 5.8 stable I also don't see anything twitch
> (dmesg, usbdevs, etc.) if I plug in a USB3 drive.
>
> > The USB 3.0 devices can only get recognised if I attach them via a USB
> > 2.0 cable, and plug this cable into the USB 3.0 or USB 3.1 Type C
> > port.
>
> Ha, an interesting discovery! If I put a cheap USB extension cable
> (http://www.amazon.co.uk/gp/product/B000BI804Y) inline then suddenly
> dmesg /does/ notice the drive,
>
> Dec 16 15:00:47 saffron /bsd: umass0 at uhub0
> Dec 16 15:00:47 saffron /bsd:  port 4 configuration 1 interface 0 "Seagate
> Expansion" rev 2.10/7.06 addr 2
> Dec 16 15:00:47 saffron /bsd: umass0: using SCSI over Bulk-Only
> Dec 16 15:00:47 saffron /bsd: scsibus4 at umass0: 2 targets, initiator 0
> Dec 16 15:03:55 saffron /bsd: sd1 at scsibus4 targ 1 lun 0: <Seagate,
> Expansion, 0706> SCSI4 0/direct fixed
>
> though not in any useful way, e.g.,
>
> # fdisk sd1
> fdisk: sd1: Device not configured
>
> > $ pcidump -v 0:20:0
> >
> > 0:20:0: Intel 9 Series xHCI
> > 0x: Vendor ID: 8086 Product ID: 9cb1
>
> I too have this.
>
> -- Mark



Re: Meaning of '+', '*' in disk: hd0+ hd1+* hd2*

2015-11-30 Thread edward wandasiewicz
On Mon, Nov 30, 2015 at 6:39 PM, Alexander Salmin <alexan...@salmin.biz> wrote:
> The '+' character after the "hd0" indicates that the BIOS has told /boot
> that this disk can be accessed via LBA. When doing a first-time install, you
> will sometimes see a '*' after a hard disk -- this indicates a disk that
> does not seem to have a valid OpenBSD disk label on it.
>
> http://www.openbsd.org/faq/faq14.html#Boot386

So hd2* means

- cannot be accessed via LBA
- no OpenBSD disklabel

Edward.
>
>
>
> On 2015-11-30 19:28, edward wandasiewicz wrote:
>>
>> If I have the following showing after a probe during biosboot
>>
>> disk: hd0+ hd1+* h2*
>>
>> What is the meaning of '+', '+*' and '*' next to each disk?
>>
>> Edward.



Meaning of '+', '*' in disk: hd0+ hd1+* hd2*

2015-11-30 Thread edward wandasiewicz
If I have the following showing after a probe during biosboot

disk: hd0+ hd1+* h2*

What is the meaning of '+', '+*' and '*' next to each disk?

Edward.



Re: Meaning of '+', '*' in disk: hd0+ hd1+* hd2*

2015-11-30 Thread edward wandasiewicz
Many thanks. I knew it was man paged / documented somewhere, just
couldn't find it.

Reason for asking?

I have a USB 3.0 device attached to a Chromebook Pixel 2015, and on
booting, SeaBIOS is recognising the same single USB drive twice, as
hd1+* and hd2*.

hd0 is the soldered SSD.

...Looks like two separate issues are occurring - the Philips drive is
being detected as both a high speed device and as a super speed
device.  I need a log with CONFIG_DEBUG_LEVEL=5 to diagnose that...

See http://www.seabios.org/pipermail/seabios/2015-November/010058.html

Edward.

On Mon, Nov 30, 2015 at 6:54 PM, Ted Unangst <t...@tedunangst.com> wrote:
> edward wandasiewicz wrote:
>> If I have the following showing after a probe during biosboot
>>
>> disk: hd0+ hd1+* h2*
>>
>> What is the meaning of '+', '+*' and '*' next to each disk?
>
> + means big disk support.
>
> * means no openbsd disklabel. probably not the openbsd disk.



No USB 3.0 on 5.8 -current Broadwell

2015-11-20 Thread edward wandasiewicz
If I try to plug in various USB 3.0 umass(4) devices into a USB 3.0 or
USB 3.1 Type C port, nothing gets registered via dmesg, even if I add

option USB_DEBUG
option UMASS_DEBUG
option XHCI_DEBUG

and compile a kernel. No dmesg output upon attachment of USB 3.0 devices.

If I try, via config(8)

 UKC> disable xhci

I get no USB 2.0 support at all.

The USB 3.0 devices can only get recognised if I attach them via a USB
2.0 cable, and plug this cable into the USB 3.0 or USB 3.1 Type C
port.

I've attached

1. usbdevs via USB 2.0 with USB 3.0 device attached
2. usbdevs via USB 3.0, with USB 3.0 device attached
3. pcidump
4. and dmesg

via USB 2.0 cable


$ usbdevs -vd

Controller /dev/usb0:
addr 1: super speed, self powered, config 1, xHCI root hub(0x),
Intel(0x8086), rev 1.00
  uhub0
 port 1 addr 4: high speed, power 224 mA, config 1, Ultra Fit(0x5583),
SanDisk(0x0781), rev 1.00, iSerialNumber 4C530147300909108282
   umass0
 port 2 disabled
 port 3 disabled
 port 4 disabled
 port 5 disabled
 port 6 disabled
 port 7 addr 2: high speed, power 500 mA, config 1, NCM-G102(0x6001),
NMGAAI00010200253N01253(0x2232), rev 0.02
   uvideo0
 port 8 addr 3: full speed, self powered, config 1, product
0x07dc(0x07dc), Intel(0x8087), rev 0.01
   ugen0
 port 9 disabled
 port 10 disabled
 port 11 disabled
 port 12 disabled
 port 13 disabled
 port 14 disabled
 port 15 disabled

direct to USB 3.0 port
*

$ usbdevs -vd

Controller /dev/usb0:
addr 1: super speed, self powered, config 1, xHCI root hub(0x),
Intel(0x8086), rev 1.00
  uhub0
 port 1 disabled
 port 2 disabled
 port 3 disabled
 port 4 disabled
 port 5 disabled
 port 6 disabled
 port 7 addr 2: high speed, power 500 mA, config 1, NCM-G102(0x6001),
NMGAAI00010200253N01253(0x2232), rev 0.02
   uvideo0
 port 8 addr 3: full speed, self powered, config 1, product
0x07dc(0x07dc), Intel(0x8087), rev 0.01
   ugen0
 port 9 disabled
 port 10 disabled
 port 11 disabled
 port 12 disabled
 port 13 disabled
 port 14 disabled
 port 15 disabled

pcidump
**

$ pcidump -v 0:20:0

0:20:0: Intel 9 Series xHCI
0x: Vendor ID: 8086 Product ID: 9cb1
0x0004: Command: 0106 Status: 0290
0x0008: Class: 0c Subclass: 03 Interface: 30 Revision: 03
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00
0x0010: BAR mem 64bit addr: 0xe120/0x0001
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 8086 Product ID: 9cb1
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 8b Min Gnt: 00 Max Lat: 00
0x0070: Capability 0x01: Power Management
0x0080: Capability 0x05: Message Signaled Interrupts (MSI)

dmesg with XHCI_DEBUG
***

OpenBSD 5.8-current (GENERIC.MP) #3: Fri Nov 20 15:50:27 UTC 2015
char...@mousse.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17094049792 (16302MB)
avail mem = 16571830272 (15804MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7ce42020 (9 entries)
bios0: vendor coreboot version "(null)" date 04/02/2015
bios0: GOOGLE Samus
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SSDT
acpi0: wakeup devices HDEF(S3) WLAN(S3) EHCI(S3) XHCI(S3) ATPA(S3)
CODC(S3) LID0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2400.74 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.30 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FS
GSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 3 (application processor)
cpu2: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.30 MHz
cpu2:

Re: No USB 3.0 on 5.8 -current Broadwell

2015-11-20 Thread edward wandasiewicz
On 20 Nov 2015 5:54 p.m., "Martin Pieuchot" <m...@openbsd.org> wrote:
>
> On 20/11/15(Fri) 17:32, edward wandasiewicz wrote:
> > If I try to plug in various USB 3.0 umass(4) devices into a USB 3.0 or
> > USB 3.1 Type C port, nothing gets registered via dmesg, even if I add
>
> This issue seems to be occurring only after a warm reboot as found by
> jcs@.
>
> Could you tell me if your USB 3 devices are detected after the 1st cold
> boot?

They aren't detected after a 1st cold boot.

If the umass device has a bootable softraid, it does get flagged and recognised

I get sr0* for the main SSD and sr1* for the USB 3.0 device

However, upon booting the USB 3.0 device, I get

ugen0 at uhubo port 8 "Intel product 0x07dc" rev 2.00/0.01 addr 3
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
panic: root device (90480fed822a4f03) not found
Stopped at Debugger +0x9: leave
TID  PID  UID  PRFLAGSPFLAGS
 CPU COMMAND
* 0 0  0 0x1
   0x2000 swapper
Debugger at Debugger+0x9
panic() at panic+0xfe
setroot() at setroot+0xa59
diskconf() at diskconf+0
main() at main+0x565
end trace frame: 0x0, count: 10
http://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}>

No USB 3.0 ethernet devices get recognised either.

>
> >  UKC> disable xhci
> >
> > I get no USB 2.0 support at all.
>
> Because you don't seem to have any ehci hardware.



Re: No USB 3.0 on 5.8 -current Broadwell

2015-11-20 Thread edward wandasiewicz
I also get no dmesg or /var/log/messages output when I detach the USB
3.0 device from the USB 3.0 port or Type C port.

If I attach and / or detach the USB 3.0 device, it's like it's not
recognised at all.

I do however, get an "indicator light on" the device when it's plugged
in, for what it's worth.

Edward.

On Fri, Nov 20, 2015 at 5:32 PM, edward wandasiewicz <0.w3...@gmail.com>
wrote:
> If I try to plug in various USB 3.0 umass(4) devices into a USB 3.0 or
> USB 3.1 Type C port, nothing gets registered via dmesg, even if I add
>
> option USB_DEBUG
> option UMASS_DEBUG
> option XHCI_DEBUG
>
> and compile a kernel. No dmesg output upon attachment of USB 3.0 devices.
>
> If I try, via config(8)
>
>  UKC> disable xhci
>
> I get no USB 2.0 support at all.
>
> The USB 3.0 devices can only get recognised if I attach them via a USB
> 2.0 cable, and plug this cable into the USB 3.0 or USB 3.1 Type C
> port.
>
> I've attached
>
> 1. usbdevs via USB 2.0 with USB 3.0 device attached
> 2. usbdevs via USB 3.0, with USB 3.0 device attached
> 3. pcidump
> 4. and dmesg
>
> via USB 2.0 cable
> 
>
> $ usbdevs -vd
>
> Controller /dev/usb0:
> addr 1: super speed, self powered, config 1, xHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub0
>  port 1 addr 4: high speed, power 224 mA, config 1, Ultra Fit(0x5583),
> SanDisk(0x0781), rev 1.00, iSerialNumber 4C530147300909108282
>umass0
>  port 2 disabled
>  port 3 disabled
>  port 4 disabled
>  port 5 disabled
>  port 6 disabled
>  port 7 addr 2: high speed, power 500 mA, config 1, NCM-G102(0x6001),
> NMGAAI00010200253N01253(0x2232), rev 0.02
>uvideo0
>  port 8 addr 3: full speed, self powered, config 1, product
> 0x07dc(0x07dc), Intel(0x8087), rev 0.01
>ugen0
>  port 9 disabled
>  port 10 disabled
>  port 11 disabled
>  port 12 disabled
>  port 13 disabled
>  port 14 disabled
>  port 15 disabled
>
> direct to USB 3.0 port
> *
>
> $ usbdevs -vd
>
> Controller /dev/usb0:
> addr 1: super speed, self powered, config 1, xHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub0
>  port 1 disabled
>  port 2 disabled
>  port 3 disabled
>  port 4 disabled
>  port 5 disabled
>  port 6 disabled
>  port 7 addr 2: high speed, power 500 mA, config 1, NCM-G102(0x6001),
> NMGAAI00010200253N01253(0x2232), rev 0.02
>uvideo0
>  port 8 addr 3: full speed, self powered, config 1, product
> 0x07dc(0x07dc), Intel(0x8087), rev 0.01
>ugen0
>  port 9 disabled
>  port 10 disabled
>  port 11 disabled
>  port 12 disabled
>  port 13 disabled
>  port 14 disabled
>  port 15 disabled
>
> pcidump
> **
>
> $ pcidump -v 0:20:0
>
> 0:20:0: Intel 9 Series xHCI
> 0x: Vendor ID: 8086 Product ID: 9cb1
> 0x0004: Command: 0106 Status: 0290
> 0x0008: Class: 0c Subclass: 03 Interface: 30 Revision: 03
> 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00
> 0x0010: BAR mem 64bit addr: 0xe120/0x0001
> 0x0018: BAR empty ()
> 0x001c: BAR empty ()
> 0x0020: BAR empty ()
> 0x0024: BAR empty ()
> 0x0028: Cardbus CIS: 
> 0x002c: Subsystem Vendor ID: 8086 Product ID: 9cb1
> 0x0030: Expansion ROM Base Address: 
> 0x0038: 
> 0x003c: Interrupt Pin: 01 Line: 8b Min Gnt: 00 Max Lat: 00
> 0x0070: Capability 0x01: Power Management
> 0x0080: Capability 0x05: Message Signaled Interrupts (MSI)
>
> dmesg with XHCI_DEBUG
> ***
>
> OpenBSD 5.8-current (GENERIC.MP) #3: Fri Nov 20 15:50:27 UTC 2015
> char...@mousse.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17094049792 (16302MB)
> avail mem = 16571830272 (15804MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7ce42020 (9 entries)
> bios0: vendor coreboot version "(null)" date 04/02/2015
> bios0: GOOGLE Samus
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S2 S3 S4 S5
> acpi0: tables DSDT FACP HPET APIC MCFG SSDT
> acpi0: wakeup devices HDEF(S3) WLAN(S3) EHCI(S3) XHCI(S3) ATPA(S3)
> CODC(S3) LID0(S5)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2400.74 MHz
> cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEA
DLINE,AES,

Re: Boot on a device with only one video mode 1280 x 850 x 16

2015-10-09 Thread edward wandasiewicz
1280 x 850 x 16 refers to 16 bit colour depth ( 16bpp )

I can only get grub2 output if I set

GFXTERM = 1280 x 850

If I test on grub2

$ videotest 640x480x8

I get a black screen

Try

$ videotest 1280x850x16

I get the test patten on the Pixel 2.

I believe the reason for just the one resolution, is at present, the
SeaVGABIOS does not have support for mode switching on Intel graphics
adapters. So even if we had more than one resolution available, the
SeaVGABIOS can't switch to it.

On Fri, Oct 9, 2015 at 9:14 PM, edward wandasiewicz <0.w3...@gmail.com> wrote:
> Is it possible to boot OpenBSD on a device which only has one video
> mode available through the BIOS?
>
> At present, we boot in text mode via vga(4) and wscons(4).
>
> If we have a machine compatible with inteldrm(4), it attaches, and the
> dmesg output is then set to the highest resolution.
>
> Is it possible to boot with no dmesg output during the VGA text mode,
> but then once we attach to inteldrm(4), as if by magic, we get the
> dmesg output and can login.
>
> At present, with only one video mode on an inteldrm(4) compatible
> machine, the kernel boots, and then hangs / freezes.
> Basically, no dmesg output. Just sits there...
>
> Is it possible to say, okay, we have a resolution that's not
> compatible for VGA console text mode, but if we can attach to
> inteldrm(4) successfully, we can continue with booting?
>
> Or is it a case of a bad BIOS design in the first place, and it would
> be a case of making bad coding practice following someone else's bad
> coding practice, which is a mess.
>
> The machine in question is a Google Chromebook Pixel 2, which only has
> one video resolution available of 1280 x 850 x 16 in the BIOS. It has
> a Broadwell i7 processor.
>
> vbeinfo command in Grub2 lists just one value of 1280 x 850 x 16.
>
> Edward.



Boot on a device with only one video mode 1280 x 850 x 16

2015-10-09 Thread edward wandasiewicz
Is it possible to boot OpenBSD on a device which only has one video
mode available through the BIOS?

At present, we boot in text mode via vga(4) and wscons(4).

If we have a machine compatible with inteldrm(4), it attaches, and the
dmesg output is then set to the highest resolution.

Is it possible to boot with no dmesg output during the VGA text mode,
but then once we attach to inteldrm(4), as if by magic, we get the
dmesg output and can login.

At present, with only one video mode on an inteldrm(4) compatible
machine, the kernel boots, and then hangs / freezes.
Basically, no dmesg output. Just sits there...

Is it possible to say, okay, we have a resolution that's not
compatible for VGA console text mode, but if we can attach to
inteldrm(4) successfully, we can continue with booting?

Or is it a case of a bad BIOS design in the first place, and it would
be a case of making bad coding practice following someone else's bad
coding practice, which is a mess.

The machine in question is a Google Chromebook Pixel 2, which only has
one video resolution available of 1280 x 850 x 16 in the BIOS. It has
a Broadwell i7 processor.

vbeinfo command in Grub2 lists just one value of 1280 x 850 x 16.

Edward.