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

This commit is contained in:
aaron 2017-05-21 10:02:46 +00:00
parent 209eb713a8
commit 1f7b8f2b50

View File

@ -212,12 +212,6 @@ begin
check_device(0, i); check_device(0, i);
end; end;
for i:= 0 to device_count -1 do begin
console.writestring('PCI Device: ');
console.writehexln(devices[i].vendor_id);
psleep(350);
end;
//TODO while there are unchecked nested busses, check nested busses //TODO while there are unchecked nested busses, check nested busses
end; end;
@ -300,9 +294,16 @@ end;
function read_device_config(bus : uint8; slot : uint8; func : uint8; offset : uint8) : TPCI_Device; function read_device_config(bus : uint8; slot : uint8; func : uint8; offset : uint8) : TPCI_Device;
var var
tmp : TPCI_Device; tmp : TPCI_Device;
i : uint16;
begin begin
memset(uint32(@tmp), 0, sizeof(TPCI_Device)); memset(uint32(@tmp), 0, sizeof(TPCI_Device));
// for i:=0 to 16 do begin
// console.writehexln(read32(0, slot, 0, offset + i, 0));
// psleep(1000);
// end;
tmp.device_id := read16(bus, slot, func, offset, 1); tmp.device_id := read16(bus, slot, func, offset, 1);
tmp.vendor_id := read16(bus, slot, func, offset, 0); tmp.vendor_id := read16(bus, slot, func, offset, 0);
@ -359,15 +360,15 @@ begin
tmp.interrupt_pin := read8(bus, slot, func, offset, 1); tmp.interrupt_pin := read8(bus, slot, func, offset, 1);
tmp.interrupt_line := read8(bus, slot, func, offset, 0); tmp.interrupt_line := read8(bus, slot, func, offset, 0);
console.writestring('Checking Device: '); console.writestring('Found PCI Device: ');
console.writehex(slot); console.writehex(slot);
console.writestring(' '); console.writestring(' ');
console.writehex(tmp.device_id); console.writehex(tmp.device_id);
console.writestring(' '); console.writestring(' ');
console.writehex(tmp.vendor_id); console.writehex(tmp.vendor_id);
console.writestring(' '); console.writestring(' ');
console.writehex(tmp.class_code); console.writehex(tmp.class_code);
console.writestring(' '); console.writestring(' ');
console.writehexln(tmp.subclass_class); console.writehexln(tmp.subclass_class);
psleep(300); psleep(300);