Jump to content











Photo
- - - - -

VIA USB3 and textmode XP setup


  • Please log in to reply
25 replies to this topic

#1 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 22 February 2016 - 06:30 PM

Before you ask, I'm deliberately doing a bit of an educational project, which is why I'm playing with obsolete software (i.e. XP).

 

With that out of the way, I'm currently manually integrating USB3 drivers so that USB3 mass storage devices work in text mode setup. I have this working fine with the Etron drivers and my motherboard's built-in USB3. To test against other chipsets I bought a couple of cheap cards off eBay, and it was not until they turned up that it dawned on me that I would be unable to test booting off them as they generally don't have option ROMS.

 

My solution here was to boot off my built-in USB3, but to have some USB3 storage in the new card's ports so they would show up. Problem is, they don't. Doesn't even so much as flash the access indicator. The VIA drivers are all happy enough once detected as part of GUI PnP setup - all works fine from there. Text mode however is another story.

 

Now, based upon what I have in place for my Etron drivers which work, I have the following set:

  • The PnP IDs are in the hardware IDs database (mine's the DEV_3483):
PCI\VEN_1106&DEV_9201                 = "viaxhci"
PCI\VEN_1106&DEV_3432                 = "viaxhci"
PCI\VEN_1106&DEV_3483                 = "viaxhci"
USB\VIA_ROOT_HUB                      = "viahub3"
VUSB1\CLASS_09                        = "viahub3"
VUSB2\CLASS_09                        = "viahub3"
VUSB2\CLASS_09&SUBCLASS_00&PROT_02    = "viahub3"
VUSB3\CLASS_09                        = "viahub3"
  • The drivers are set to load along with the rest of the USB drivers:
[InputDevicesSupport.Load]
etronxhci = etronxhci.sys
etronhub3 = etronhub3.sys

viaxhci = xhcdrv.sys
viahub3 = viahub3.sys

usbehci  = usbehci.sys
...etc
  • The drivers are also filled-in the same elsewhere:
[InputDevicesSupport]
etronxhci = "Etron USB 3.0 Extensible Host Controller",files.none,etronxhci
etronhub3 = "Etron USB 3.0 Extensible Root Hub",files.none,etronhub3

viaxhci = "VIA USB 3.0 eXtensible Host Controller",files.none,viaxhci
viahub3 = "VIA USB 3.0 eXtensible Root Hub",files.none,viahub3

usbehci  = "Enhanced Host Controller",files.usbehci,usbehci
...etc

...and the WDF libraries are also in the i386 directory (without which the drivers cannot be loaded):

  • wdf01000.sys
  • wdfldr.sys

 

 

...so I know they're being loaded. And I know they work with my hardware as they're fine from the PnP stage.

 

Any ideas why they aren't picking up any mass storage devices? Short of checking they're loading (they are) and it's not blowing up (it's not), I don't really know how I can troubleshoot the problem here!

 

For completeness, I've found threads here:

http://reboot.pro/to...-xp-install-cd/

http://forum.driverp...pic.php?id=6258

 

..and this:

http://gena.spam.net/Projects/Gena/Drivers/4%20Storage/RemovableDeviceUSB3%20More.script

 

...which all suggest it should work. The primary difference being that they tend to use the bus extenders sections rather than the input devices ones...but I used those because that's where the rest of the stock USB support is, and it works for the Etron drivers, so...

 

Next plan of action is to try and see if adding the registry keys the full-fat PnP inf sets up helps any.



#2 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 22 February 2016 - 06:59 PM

...and the WDF libraries are also in the i386 directory (without which the drivers cannot be loaded):

Do you run load wdf01000 at txtsetup.sif?

Compare a BartPE plugin #10.
http://www.911cd.net...ndpost&p=172598

#3 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 22 February 2016 - 09:53 PM

Thanks for the reply, I hadn't, no.

 

I've added it in and given it a go and have the same outcome, unless I'm mistaken those drivers only get loaded when something in the critical device database matches them, i.e. you'd need a HardwareID to pull it in? Maybe it's different with the BootBusExtenders...but I just gave it a go and still the same, no dice. :(



#4 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 23 February 2016 - 04:50 AM

No, not all drivers require a HardwareID.

Which VIA driver version do you use?
Try old drivers, without UASP part.

And try XP SP3 files.
http://www.msfn.org/...nt-with-rtm-xp/

#5 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 23 February 2016 - 07:26 PM

No, not all drivers require a HardwareID.

Which VIA driver version do you use?
Try old drivers, without UASP part.

And try XP SP3 files.
http://www.msfn.org/...nt-with-rtm-xp/

 

Thanks for the reply. Good detective work there, but alas you've put 2 & 2 together and ended up with 5. I start with SP3 files, then backport once things are working. :)

 

I'm using the most recent version that supports XP, 12/11/2013,6.1.7600.4402. The main problem being finding a version that supports my hardware (PCI\VEN_1106&DEV_3483), which the older set I initially started with did not include.

I'll try using the older drivers with my ID added and see if they work well enough for textmode. GUI mode can overwrite them if needed.



#6 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 24 February 2016 - 07:43 PM

I'm using the most recent version that supports XP, 12/11/2013,6.1.7600.4402.

.
I booted BartPE from a PCI\VEN_1106&DEV_3432&CC_0C0330 controller.
VIA drivers 6.1.7600.4402 and XP SP3 files and previous mentioned BartPE plugin used.

#7 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 24 February 2016 - 08:37 PM

Thank you for that test, much obliged. Hardware drivers are is the toughest part to test! I have a cheap Reneas card in the post which should help troubleshoot clashes, but it's not turned up for some reason.

 

Next up I intend on inserting some of the WDF registry keys from my PnP version into setupreg.hiv and seeing where that gets me. I've already tried inserting vusbstor from a package derived from some of your driverpacks work (http://forum.driverp...ic.php?id=10805), but alas, still no dice.

 

I'm aware of BartPE, but it's not really something I've ever needed to utilise. Is the driver usage the same as text mode? My understanding was that it is essentially GUI mode setup, which would use the full PnP drivers?



#8 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 24 February 2016 - 09:25 PM

There are some notes at localhost from 2012:
[SourceDisksFiles]
wdfldr.sys=1,,,,,,4_,4,0,0,,1,4
wdf01000.sys=1,,,,,,4_,4,0,0,,1,4

xhcdrv.sys=1,,,,,,4_,4,1,,,1,4
VUSB3HUB.sys=1,,,,,,4_,4,1,,,1,4
ViaHub3.sys=1,,,,,,4_,4,0,0,,1,4

[HardwareIdsDatabase]
PCI\VEN_1106&DEV_3432="xhcdrv"
PCI\VEN_1106&DEV_9201="xhcdrv"
USB\VIA_ROOT_HUB="VUSB3HUB"
VUSB3\CLASS_09="VUSB3HUB"
VUSB2\CLASS_09="VUSB3HUB"
VUSB1\CLASS_09="VUSB3HUB"

[SCSI.Load]
VUSB3HUB=VUSB3HUB.sys,4
xhcdrv=xhcdrv.sys,4

[BootBusExtenders.Load]
wdf01000 = wdf01000.sys

[SCSI]
xhcdrv="WDF Driver for VIA eXtensible Host Controller"
VUSB3HUB="VIA USB3 Hub Controller"

[BusExtenders]
wdf01000 = "Kernel Mode Driver Framework Runtime",files.wdf01000,wdf01000

[files.wdf01000]
wdf01000.sys,4
wdfldr.sys,4
.

And hivesys.inf
HKLM,"SYSTEM\CurrentControlSet\Services\Wdf01000","ImagePath",0x0,"System32\Drivers\wdf01000.sys"
.

Textmode works.
However: USB3 VIA USB device is missing at first reboot. No solution.

Rereading old notes: USB3 VIA USB device is available at first reboot. Setup finished.

Edited by cdob, 24 February 2016 - 09:50 PM.


#9 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 25 February 2016 - 05:11 AM

VUSB3HUB.sys=1,,,,,,4_,4,1,,,1,4
ViaHub3.sys=1,,,,,,4_,4,0,0,,1,4

Copy ViaHub3.sys to VUSB3HUB.sys

[SCSI.Load]
VUSB3HUB=VUSB3HUB.sys,4

Textmode creates a service VUSB3HUB.

ViaHub3.inf

[VUSB3HUB.NT.Services]
AddService = VUSB3HUB,0x00000002,VUSB3HUB_Service

PNP creates a service VUSB3HUB and load the file ViaHub3.sys
The text mode service entry is used too.

#10 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 25 February 2016 - 11:48 PM

Thank you for all that - it's very helpful.

 

I've been unable to get it working in text mode still, but I've built a BartPE image and it is working there (for storage at least - that I can live with!) Having a working point of comparison (especially one I can inspect!) should help immensely.

 

Much obliged.



#11 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 26 February 2016 - 08:33 PM

So, just to update you - it's working, even down to keyboards on the VIA controller. Marvellous.

 

I think it may have been the inclusion of the VIA USB Storage driver that sorted things. Now that it's working I'm going to try and break it to experiment with it :)



#12 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 26 February 2016 - 09:28 PM

viaxhci = xhcdrv.sys

Avoid this. Do not change names.

Try either
viaxhci = viaxhci.sys

or
xhcdrv = xhcdrv.sys

Recommended:
use the PNP registry service name. Often the file name, but not always.
 

it's working

Now that it's working I'm going to try and break it to experiment with it :)

Do you use different names viaxhci = xhcdrv.sys still?
Try insert them again.

#13 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 27 February 2016 - 11:43 AM

Discovery #1:
Setup is USB keyboard, USB2 flash stick and USB3 HDD in the VIA, USB3 boot stick in the Etron.

Solved the mystery of the missing VIA keyboard support....but opened up another. Loading the VIA drivers as BusExtenders means the USB1&2 HID support works - but weirdly only if the Etron drivers are loaded in the InputDevicesSupport, even though the keyboard is connected to the VIA. Loading the VIA drivers in InputDevicesSupport along with the Etron drivers (and the stock USB stack) means only USB3 works (i.e. I lose USB2 mass storage on the VIA). The Etron drivers work fine for everything when loaded in InputDevices, but BusExtenders seems a more logical place...but then I lose HID on the VIA!

All very mysterious.

EDIT:

I figured it may be load-order-dependent, and indeed, just putting the Etron drivers after the VIA ones in BusExtenders seems to have got things working again. I have no idea why they affect each other though...bit concerning.

Edited by mr_jrt, 27 February 2016 - 11:54 AM.


#14 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 27 February 2016 - 07:50 PM

Thanks for that tip about adding the WDF service to hivesys.inf - saved me a lot of time there.

 

Another interesting observation of the VIA controller though:

 

When booting stage-2 (GUI) setup, USB 3 storage doesn't seem to be available until the PnP drivers are installed. USB 2 storage however works fine, as does a USB1 keyboard. Stage-1 (text) setup all works fine.

 

I may try experimenting with the UAS drivers to see if they're causing a problem...



#15 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 29 February 2016 - 12:02 AM

Still haven't managed to get USB3 mass storage working before driver installation in GUI setup.

 

In simple txtsetup.sif-based-land (text mode and PE mode), the load order is controlled by the groups and then by the order present in the file. The drivers shouldn't depend/conflict on/with each order, but if they do, you can control the order so they work.

 

Once GUI setup (re)starts however, it's not using that order - it's using the proto-registry. And unless you want to start adding in hard-coded tag values, all you have to control the order are the service groups.

 

The load order is shown here: https://atkdinosauru...ce-start-order/

...but you can see SCSI loads after Bus Extenders, so that gives us some control.

 

That said, if I dive into the registry as soon as GUI setup starts, I can inspect the initial registry, and that shows that the USB3 mass storage has been found - it's enumerated against the usbstor service (along with all the other USB storage devices). Why I'm not getting the partitions on it to show up is another matter.

I've just tried firing up diskpart when setup starts, and lo and behold, the partitions are working...they just don't have drive letters!



#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 February 2016 - 08:28 AM

I've just tried firing up diskpart when setup starts, and lo and behold, the partitions are working...they just don't have drive letters!

Then it is something connected with timing and mount manager.
What does MOUNTVOL show? :unsure:

:duff:
Wonko

#17 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 29 February 2016 - 08:43 PM

Initially mountvol doesn't show the partitions on the usb3 devices (1x single-partition usb3 hdd, 1x 4 partition usb hdd, and a single partition removable usb stick used to boot) ...other than the boot device.

 

Once the PnP drivers kick in, mountvol shows all the partitions.



#18 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 March 2016 - 09:46 AM

Initially mountvol doesn't show the partitions on the usb3 devices (1x single-partition usb3 hdd, 1x 4 partition usb hdd, and a single partition removable usb stick used to boot) ...other than the boot device.

 

Once the PnP drivers kick in, mountvol shows all the partitions.

But does it show them with or without assigned drive letters?

 

I mean, the same "initially", when diskpart shows partitions without drive letters does mountvol show the partitions (still without drive letters) or it doesn't?

 

This could be connected to some peculiarities of the USBSTOR (or related subsystems) also on a fully running desktop there is often a delay when inserting a new USB mass storage device the first time.

 

You could try playing with some of Uwe Sieber's little programs, maybe this way you can pinpoint where exactly the situation changes :unsure:

http://www.uwe-sieber.de/english.html

 

:duff:

Wonko



#19 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 01 March 2016 - 08:18 PM

No, not shown in mountvol at all, even without letters, which rather suggests that's where the problem lies. How to inform the partition and mount managers (partmgr.sys and mountmgr.sys) about them would seem to be the trick. I suspect the boot device is known due to Firadisk having a reference to it, though it still gets a letter even when the ISO is loaded into RAM...



#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 March 2016 - 08:39 PM

No, not shown in mountvol at all, even without letters, which rather suggests that's where the problem lies. How to inform the partition and mount managers (partmgr.sys and mountmgr.sys) about them would seem to be the trick. I suspect the boot device is known due to Firadisk having a reference to it, though it still gets a letter even when the ISO is loaded into RAM...

AFAICR, when mem-mapped, Firadisk directly "hooks" the grub4dos or memdisk loaded image, so that doesn't count.

 

:duff:

Wonko



#21 cdob

cdob

    Gold Member

  • Expert
  • 1344 posts

Posted 01 March 2016 - 09:13 PM

No, not shown in mountvol at all, even without letters, which rather suggests that's where the problem lies. How to inform the partition and mount managers (partmgr.sys and mountmgr.sys) about them would seem to be the trick.

A idea: back then mnt.exe, showdrive.exe or mountstorePE was used to assign a drive letter at PE: USB device loaded but no drive letter.
May work or fail at given configuration.
#826 and following
http://www.msfn.org/...-34#entry905265

#22 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 01 March 2016 - 10:04 PM

Thanks all, I'll give those a go.

 

Interestingly, just tried hooking a few more mass storage devices up whilst experimenting, and noticed I was wrong - USB2/3 is irrelevant, as is the controller. If the USB device is removable, it gets a letter. If it's listed in diskpart as a partition, then it doesn't, even when connected via the USB2 ports on my motherboard, which XP will support natively via the stock ehci driver without any tinkering.



#23 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 March 2016 - 09:34 AM

That would be another sign that is something connected with partitioned media (that not necessarily are "Fixed" or "Removable") vs. non-partitioned media (I am nitpicking :w00t: :ph34r: only to make sure we use the same definitions).

To me:

"removable" is a device (usually a USB stick) which has the "removable bit" set

"fixed" is a device (usually an external hard disk or hard disk case) that has it not.

"partitioned media" is a mass storage device which first sector is a MBR and has a partition table

"non-partitioned media" is a mass storage device which first sector is a PBR.

 

You can have non-partitioned removable (most USB 1 and 2 sticks and a number of USB 3 ones from factory), partitioned removable (same as befor but partitioned manually), partitioned fixed (most hard disks and a few USB 3 sticks + those where the Removable bit was flipped manually) and possibly also non-partitioned fixed :w00t:.

 

:duff:

Wonko



#24 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 02 March 2016 - 07:59 PM

Ok, here's how it stands:

USB floppy = drive letter

USB3 card reader/USB3 port/standard SD card/syslinux MBR = drive letter

USB3 card reader/USB2 port/standard SD card/syslinux MBR = drive letter

USB2 card reader/USB3 port/standard SD card = drive letter

USB2 card reader/USB2 port/standard SD card = drive letter

USB2 stick/USB3 port = drive letter

USB2 stick/USB2 port = drive letter

USB3 patriot SATA adaptor/USB3 port/4-partitioned disk = no letter

USB3 patriotSATA adaptor/USB2 port/4-partitioned disk = no letter

USB3 WD hdd/USB3 port/single-partition disk = no letter

USB3 WD hdd/USB2 port/single-partition disk = no letter

 

Alas, my USB2 HDD is dead, but a USB3 disk in a USB2 port is much the same thing, so I'm happy enough that's covered.



#25 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 March 2016 - 08:48 PM

So, since most probably, these have the "Removable" bit set:

USB floppy = drive letter
USB3 card reader/USB3 port/standard SD card/syslinux MBR = drive letter
USB3 card reader/USB2 port/standard SD card/syslinux MBR = drive letter
USB2 card reader/USB3 port/standard SD card = drive letter
USB2 card reader/USB2 port/standard SD card = drive letter
USB2 stick/USB3 port = drive letter
USB2 stick/USB2 port = drive letter

and this are instead presumably "Fixed":

 

USB3 patriot SATA adaptor/USB3 port/4-partitioned disk = no letter
USB3 patriotSATA adaptor/USB2 port/4-partitioned disk = no letter
USB3 WD hdd/USB3 port/single-partition disk = no letter
USB3 WD hdd/USB2 port/single-partition disk = no letter

 

definitely it is connected with "Fixed" devices, which prompts you to experiment with dummydisk.sys and rdummy.sys or diskmod:

http://reboot.pro/to...-usb-hard-disk/

or other similar  filter drivers.

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users