diff --git a/Asuro.iso b/Asuro.iso index 53cf45c6..452d8e40 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index c966f5c5..2ba957e9 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index c966f5c5..2ba957e9 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/EHCI.ppu b/lib/EHCI.ppu index c1f1a29d..870991eb 100644 Binary files a/lib/EHCI.ppu and b/lib/EHCI.ppu differ diff --git a/lib/USB.ppu b/lib/USB.ppu index 3c44a501..70ef96fc 100644 Binary files a/lib/USB.ppu and b/lib/USB.ppu differ diff --git a/lib/XHCI.ppu b/lib/XHCI.ppu new file mode 100644 index 00000000..17cd3deb Binary files /dev/null and b/lib/XHCI.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index 6266556b..3abb9f08 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/fat32.ppu b/lib/fat32.ppu index cf8844bc..5b39b7b6 100644 Binary files a/lib/fat32.ppu and b/lib/fat32.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index eed39bad..c02c2a9c 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 843272de..97c6e8c7 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index a78aa690..751503c0 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index c9002045..05c4eb7d 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/shell.ppu b/lib/shell.ppu index 221b795b..a2dc1069 100644 Binary files a/lib/shell.ppu and b/lib/shell.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index 9c375a6e..59a61dca 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/src/driver/bus/EHCI.pas b/src/driver/bus/EHCI.pas index 70a2b3a1..86110123 100644 --- a/src/driver/bus/EHCI.pas +++ b/src/driver/bus/EHCI.pas @@ -29,7 +29,7 @@ begin console.writestringln(' USB Controller(s).'); if count > 0 then begin for i:=0 to count-1 do begin - console.output('USB-OHCI Driver', 'Controller['); + console.output('USB-EHCI Driver', 'Controller['); console.writeint(i); console.writestring(']: '); console.writehex(devices[i].device_id); diff --git a/src/driver/bus/USB.pas b/src/driver/bus/USB.pas index 3eaffc66..fe806686 100644 --- a/src/driver/bus/USB.pas +++ b/src/driver/bus/USB.pas @@ -11,12 +11,18 @@ uses vmemorymanager, util, drivermanagement, - OHCI, UHCI, EHCI; + OHCI, UHCI, EHCI, XHCI; procedure init; implementation +function loadXHCI(ptr : void) : boolean; +begin + push_trace('USB.loadXHCI'); + loadXHCI:= XHCI.load; +end; + function loadEHCI(ptr : void) : boolean; begin push_trace('USB.loadEHCI'); @@ -37,7 +43,10 @@ end; procedure init; var - UHCI_ID, OHCI_ID, EHCI_ID: TDeviceIdentifier; + UHCI_ID, + OHCI_ID, + EHCI_ID, + XHCI_ID: TDeviceIdentifier; begin push_trace('USB.init'); @@ -67,9 +76,18 @@ begin EHCI_ID.id4:= $FFFFFFFF; EHCI_ID.ex:= nil; + XHCI_ID.Bus:= biPCI; + XHCI_ID.id0:= idANY; + XHCI_ID.id1:= $0000000C; + XHCI_ID.id2:= $00000003; + XHCI_ID.id3:= $00000030; + XHCI_ID.id4:= $FFFFFFFF; + XHCI_ID.ex:= nil; + drivermanagement.register_driver('USB-UHCI Driver', @UHCI_ID, @loadUHCI); drivermanagement.register_driver('USB-OHCI Driver', @OHCI_ID, @loadOHCI); drivermanagement.register_driver('USB-EHCI Driver', @EHCI_ID, @loadEHCI); + drivermanagement.register_driver('USB-XHCI Driver', @XHCI_ID, @loadXHCI); console.outputln('USB Driver', 'INIT END.'); pop_trace; diff --git a/src/driver/bus/XHCI.pas b/src/driver/bus/XHCI.pas new file mode 100644 index 00000000..852dbd5c --- /dev/null +++ b/src/driver/bus/XHCI.pas @@ -0,0 +1,45 @@ +unit XHCI; + +interface + +uses + tracer, + Console, + PCI, + drivertypes, + pmemorymanager, + vmemorymanager, + util, + drivermanagement; + +function load : boolean; + +implementation + +function load : boolean; +var + devices : TDeviceArray; + count : uint32; + i : uint32; + +begin + devices:= PCI.getDeviceInfo($0C, $03, $30, count); + console.output('USB-XHCI Driver', 'Found '); + console.writeint(count); + console.writestringln(' USB Controller(s).'); + if count > 0 then begin + for i:=0 to count-1 do begin + console.output('USB-XHCI Driver', 'Controller['); + console.writeint(i); + console.writestring(']: '); + console.writehex(devices[i].device_id); + console.writestring(' '); + console.writehex(devices[i].vendor_id); + console.writestring(' '); + console.writehexln(devices[i].prog_if); + end; + end; + load:= true; +end; + +end. \ No newline at end of file diff --git a/src/include/asuro.pas b/src/include/asuro.pas index 993bb7da..cb28e512 100644 --- a/src/include/asuro.pas +++ b/src/include/asuro.pas @@ -3,20 +3,20 @@ unit asuro; interface const - VERSION = '1.0.1-668ia'; + VERSION = '1.0.1-670ia'; VERSION_MAJOR = '1'; VERSION_MINOR = '0'; VERSION_SUB = '1'; - REVISION = '668'; + REVISION = '670'; RELEASE = 'ia'; - LINE_COUNT = 27480; - FILE_COUNT = 87; - DRIVER_COUNT = 31; + LINE_COUNT = 27477; + FILE_COUNT = 88; + DRIVER_COUNT = 32; FPC_VERSION = '2.6.4'; NASM_VERSION = '2.10.09'; MAKE_VERSION = '3.81'; COMPILE_DATE = '07/05/18'; - COMPILE_TIME = '22:47:28'; + COMPILE_TIME = '22:53:20'; implementation