git-svn-id: https://spexeah.com:8443/svn/Asuro@313 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron 2018-04-05 11:20:59 +00:00
parent 5223a3e294
commit 883c983396
9 changed files with 23 additions and 27 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -326,15 +326,12 @@ begin
console.writestring(' '); console.writestring(' ');
console.writehexln(device.prog_if); console.writehexln(device.prog_if);
drivermanagement.register_device('PCI Device', DevID, @device);
kfree(void(DevID));
devices[device_count] := device; devices[device_count] := device;
device_count := device_count + 1; device_count := device_count + 1;
//if device.class_code = 1 then ata.init(device); drivermanagement.register_device('PCI Device', DevID, @device);
kfree(void(DevID));
//if device.class_code = 1 then ata.init(device);
end; end;
function getDeviceInfo(class_code : uint8; subclass_code : uint8; prog_if : uint8; var count : uint32) : TDeviceArray; function getDeviceInfo(class_code : uint8; subclass_code : uint8; prog_if : uint8; var count : uint32) : TDeviceArray;
@ -343,27 +340,25 @@ var
devices_out : array[0..31] of TPCI_Device; devices_out : array[0..31] of TPCI_Device;
begin begin
console.writestring('DEV COUNT: ');
console.writeintln(device_count);
count := 0; count := 0;
if prog_if <> $FF then begin for i:=0 to device_count do begin
for i:=0 to device_count+1 do begin {writehex(devices[i].class_code);
if (devices[i].class_code = class_code) and (devices[i].subclass_class = subclass_code) and (devices[i].prog_if = prog_if) then begin writestring(' ?= ');
devices_out[count] := devices[i]; writehex(class_code);
count := count + 1; writestring(' && ');
end; writehex(devices[i].subclass_class);
end; writestring(' ?= ');
end else begin writehex(subclass_code);
for i:=0 to device_count+1 do begin writestring(' && ');
if (devices[i].class_code = class_code) and (devices[i].subclass_class = subclass_code) then begin writehex(devices[i].prog_if);
devices_out[count] := devices[i]; writestring(' ?= ');
count := count + 1; writehex(prog_if);}
end; if (devices[i].class_code = class_code) and (devices[i].subclass_class = subclass_code) and ((devices[i].prog_if = prog_if) or (prog_if = $FF)) then begin
devices_out[count] := devices[i];
count := count + 1;
end; end;
end; end;
getDeviceInfo := devices_out; getDeviceInfo := devices_out;
end; end;
end. end.

View File

@ -117,12 +117,13 @@ begin
//drivers //drivers
console.writestringln('DRIVERS: INIT BEGIN.'); console.writestringln('DRIVERS: INIT BEGIN.');
keyboard.init(keyboard_layout); //keyboard.init(keyboard_layout);
mouse.init(); //mouse.init();
AHCI.init(); //AHCI.init();
testdriver.init(); //testdriver.init();
USB.init(); USB.init();
pci.init(); pci.init();
halt_and_catch_fire;
console.writestringln('DRIVERS: INIT END.'); console.writestringln('DRIVERS: INIT END.');
console.writestringln(''); console.writestringln('');