diff --git a/src/driver/PCI.pas b/src/driver/PCI.pas index 43e38235..450a4b4a 100644 --- a/src/driver/PCI.pas +++ b/src/driver/PCI.pas @@ -244,13 +244,12 @@ var ii : uint16; begin //enumerate pci bus - for ii:=0 to 32 do begin - for i:=0 to 256 do begin + for ii:=0 to 256 do begin + for i:=0 to 31 do begin check_device(ii, i); end; end; - //TODO while there are unchecked nested busses, check nested busses end; procedure loadConfig(bus : uint8; slot : uint8; func : uint8; offset : uint8); @@ -277,7 +276,7 @@ begin if vendor_id = $FFFF then exit; isDeviceb := isDevice(bus, device, 0, 8); - if isDeviceb >= 0 then begin + if isDeviceb = 1 then begin devices[device_count] := read_device_config(bus, device, 0, 0); device_count := device_count + 1; check_device := true;