git-svn-id: https://spexeah.com:8443/svn/Asuro@492 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
d492b8a122
commit
2d73017379
@ -197,6 +197,7 @@ end;
|
|||||||
function load(ptr : void) : boolean;
|
function load(ptr : void) : boolean;
|
||||||
var
|
var
|
||||||
storageDevice : TStorage_Device;
|
storageDevice : TStorage_Device;
|
||||||
|
storageDevice1 : TStorage_Device;
|
||||||
begin
|
begin
|
||||||
//controller := PPCI_Device(ptr);
|
//controller := PPCI_Device(ptr);
|
||||||
|
|
||||||
@ -204,7 +205,6 @@ begin
|
|||||||
//check if bus is floating and identify device
|
//check if bus is floating and identify device
|
||||||
if inb($1F7) <> $FF then begin
|
if inb($1F7) <> $FF then begin
|
||||||
outb($3F6, inb($3f6) or (1 shl 1)); // disable interrupts
|
outb($3F6, inb($3f6) or (1 shl 1)); // disable interrupts
|
||||||
IDEDevices[0].exists:= true;
|
|
||||||
IDEDevices[0].isMaster:= true;
|
IDEDevices[0].isMaster:= true;
|
||||||
IDEDevices[0].info := identify_device(0, $A0);
|
IDEDevices[0].info := identify_device(0, $A0);
|
||||||
|
|
||||||
@ -212,9 +212,25 @@ begin
|
|||||||
storageDevice.controllerId0:= 0;
|
storageDevice.controllerId0:= 0;
|
||||||
storageDevice.maxSectorCount:= (IDEDevices[0].info[60] or (IDEDevices[0].info[61] shl 16) ); //LBA28 SATA
|
storageDevice.maxSectorCount:= (IDEDevices[0].info[60] or (IDEDevices[0].info[61] shl 16) ); //LBA28 SATA
|
||||||
storageDevice.sectorSize:= 512;
|
storageDevice.sectorSize:= 512;
|
||||||
storagemanagement.register_device(@storageDevice);
|
if storageDevice.maxSectorCount <> 0 then begin
|
||||||
|
IDEDevices[0].exists:= true;
|
||||||
|
storagemanagement.register_device(@storageDevice);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if inb($1F7) <> $FF then begin
|
||||||
|
IDEDevices[1].isMaster:= false;
|
||||||
|
IDEDevices[1].info := identify_device(0, $B0);
|
||||||
|
|
||||||
|
storageDevice1.controller := ControllerIDE;
|
||||||
|
storageDevice1.controllerId0:= 0;
|
||||||
|
storageDevice1.maxSectorCount:= (IDEDevices[1].info[60] or (IDEDevices[1].info[61] shl 16) ); //LBA28 SATA
|
||||||
|
storageDevice1.sectorSize:= 512;
|
||||||
|
if storageDevice1.maxSectorCount <> 0 then begin
|
||||||
|
IDEDevices[1].exists:= true;
|
||||||
|
storagemanagement.register_device(@storageDevice1);
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
//identify_device(0, $B0);
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -85,7 +85,6 @@ var
|
|||||||
i : uint8;
|
i : uint8;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
console.writestringln('poop');
|
|
||||||
|
|
||||||
if stringEquals(getParam(0, params), 'ls') then begin
|
if stringEquals(getParam(0, params), 'ls') then begin
|
||||||
for i:=0 to LL_Size(storageDevices) - 1 do begin
|
for i:=0 to LL_Size(storageDevices) - 1 do begin
|
||||||
@ -99,7 +98,7 @@ begin
|
|||||||
ControllerNET : console.writestring('NET, ');
|
ControllerNET : console.writestring('NET, ');
|
||||||
end;
|
end;
|
||||||
console.writestring('Capacity: ');
|
console.writestring('Capacity: ');
|
||||||
console.writeint((( PStorage_Device(LL_Get(storageDevices, i))^.maxSectorCount * PStorage_Device(LL_Get(storageDevices, i))^.sectorSize) DIV 1000) DIV 1000);
|
console.writeint((( PStorage_Device(LL_Get(storageDevices, i))^.maxSectorCount * PStorage_Device(LL_Get(storageDevices, i))^.sectorSize) DIV 1024) DIV 1024);
|
||||||
console.writestringln('MB');
|
console.writestringln('MB');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -119,6 +118,7 @@ var
|
|||||||
begin
|
begin
|
||||||
elm:= LL_Add(storageDevices);
|
elm:= LL_Add(storageDevices);
|
||||||
PStorage_device(elm)^ := device^;
|
PStorage_device(elm)^ := device^;
|
||||||
|
|
||||||
//check for volumes
|
//check for volumes
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user