diff --git a/kernel/trunk/bus/usb/init.inc b/kernel/trunk/bus/usb/init.inc index fa438437a1..82641e5c3e 100644 --- a/kernel/trunk/bus/usb/init.inc +++ b/kernel/trunk/bus/usb/init.inc @@ -46,6 +46,8 @@ ohci_service_name: db 'OHCI',0 ehci_service_name: db 'EHCI',0 +xhci_service_name: + db 'XHCI',0 endg ; Initializes the USB subsystem. @@ -78,6 +80,9 @@ proc usb_init jz .do_kickoff mov ebx, ehci_service_name cmp byte [esi+PCIDEV.class], 0x20 + jz .do_kickoff + mov ebx, xhci_service_name + cmp byte [esi+PCIDEV.class], 0x30 jnz .kickoff .do_kickoff: inc dword [esp] @@ -117,6 +122,16 @@ proc usb_init ; 4a. Loop over all PCI devices, call usb_init_controller ; for all EHCI controllers. mov eax, pcidev_list +.scan_xhci: + mov eax, [eax+PCIDEV.fd] + cmp eax, pcidev_list + jz .done_xhci + cmp [eax+PCIDEV.class], 0x0C0330 + jnz .scan_xhci + call usb_init_controller + jmp .scan_xhci +.done_xhci: + mov eax, pcidev_list .scan_ehci: mov eax, [eax+PCIDEV.fd] cmp eax, pcidev_list diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index d45526c469..09c3b890e6 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -1782,7 +1782,7 @@ sys_getsetup: ;-------------------------------------- @@: ; F.26.10 - get the time from kernel launch in nanoseconds - sub ebx, 1 + dec ebx jnz @f call get_clock_ns @@ -1792,7 +1792,7 @@ sys_getsetup: ;-------------------------------------- @@: ; F.26.11 - Find out whether low-level HD access is enabled - sub ebx, 1 + dec ebx jnz @f mov eax, [lba_read_enabled]