Tried fixes for IDE on VMWare Workbench - doesn't crash on start anymore, but does crash after format.
git-svn-id: https://spexeah.com:8443/svn/Asuro@796 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
Binary file not shown.
+2
-2
@@ -51,7 +51,7 @@ c0b825d6daacd672ce343e062edc7238 src/include/bios_data_area.pas
|
||||
93342ca736d038c448e6322687edf3e2 src/include/fonts.pas
|
||||
afd15dca933f082c73f48aba1059a04e src/include/lists.pas
|
||||
6964ed22ee91c4c35724893a1996bfd7 src/include/multiboot.pas
|
||||
fcbd8be162a75e1a971fbc58318e077c src/include/strings.pas
|
||||
2aa600f989602fd2aaed548d7344736e src/include/strings.pas
|
||||
01e4c69601c664fff8922f4a0d96c02d src/include/system.pas
|
||||
6103928fbe8c413929cde49df82f5a1f src/include/types.pas
|
||||
177a03d217eba976acf0ead9e70d14c0 src/include/util.pas
|
||||
@@ -62,7 +62,7 @@ ff442b1dc417a277c68b2890740ea5a2 src/driver/storage/asfs.pas
|
||||
15e714c6bf0f6805f95cac019a8ef3ff src/driver/storage/ATA_OLD.pas
|
||||
631b160eab56da3ce6df8a76b1577452 src/driver/storage/fat32_OLD.pas
|
||||
0dbc9a5453191d47edbe85a90177e4ca src/driver/storage/fat32.pas
|
||||
7e41b1d061d5ffebd887b5fc65fe655f src/driver/storage/IDE.pas
|
||||
563f5a6a3aa1d127d9cfd026e681789c src/driver/storage/IDE.pas
|
||||
0843fb9b9ca537d4c595cafc88eac993 src/driver/storage/partitiontable.pas
|
||||
3437aa5ff213f37f5088ceb690e78d3d src/driver/storage/storagemanagement.pas
|
||||
2b3d1b9259cd2e80a8849515250998be src/driver/interface/serial.pas
|
||||
|
||||
Binary file not shown.
BIN
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.
Binary file not shown.
Binary file not shown.
+22
-11
@@ -192,7 +192,7 @@ var
|
||||
devID : TDeviceIdentifier;
|
||||
begin
|
||||
push_trace('ide.init');
|
||||
console.writestringln('IDE ATA Driver: Init()');
|
||||
console.writestringln('[IDE] (INIT) BEGIN');
|
||||
devID.bus:= biPCI;
|
||||
devID.id0:= idANY;
|
||||
devID.id1:= $00000001;
|
||||
@@ -203,6 +203,7 @@ begin
|
||||
drivermanagement.register_driver('IDE ATA Driver', @devID, @load);
|
||||
//terminal.registerCommand('IDE', @test_command, 'TEST IDE DRIVER');
|
||||
buffer := Puint32(kalloc(1024*2));
|
||||
console.writestringln('[IDE] (INIT) END');
|
||||
pop_trace();
|
||||
end;
|
||||
|
||||
@@ -212,8 +213,10 @@ var
|
||||
storageDevice1 : TStorage_Device;
|
||||
begin
|
||||
push_trace('ide.load');
|
||||
console.writestringln('[IDE] (LOAD) BEGIN');
|
||||
//controller := PPCI_Device(ptr);
|
||||
|
||||
console.writestringln('[IDE] (INIT) CHECK FLOATING BUS');
|
||||
//check if bus is floating and identify device
|
||||
if inb($1F7) <> $FF then begin
|
||||
//outb($3F6, inb($3f6) or (1 shl 1)); // disable interrupts
|
||||
@@ -251,6 +254,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
console.writestringln('[IDE] (LOAD) END');
|
||||
pop_trace();
|
||||
end;
|
||||
|
||||
@@ -276,6 +280,7 @@ var
|
||||
t : uint32 = 0;
|
||||
begin
|
||||
push_trace('ide.identify_device');
|
||||
console.writestringln('[IDE] (IDENTIFY_DEVICE) BEGIN');
|
||||
if bus = 0 then begin
|
||||
|
||||
if drive = $A0 then noInt(0);
|
||||
@@ -283,12 +288,12 @@ begin
|
||||
|
||||
outb($1F6, drive); //drive select
|
||||
|
||||
outw($1F2, 0); //clear sector count and lba
|
||||
outw($1F3, 0);
|
||||
outw($1F4, 0);
|
||||
outw($1F5, 0);
|
||||
outb($1F2, 0); //clear sector count and lba
|
||||
outb($1F3, 0);
|
||||
outb($1F4, 0);
|
||||
outb($1F5, 0);
|
||||
|
||||
outw($1F7, ATA_CMD_IDENTIFY); //send identify command//
|
||||
outb($1F7, ATA_CMD_IDENTIFY); //send identify command//
|
||||
|
||||
while true do begin
|
||||
if (inb($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||
@@ -308,6 +313,7 @@ begin
|
||||
identify_device:= identResponse;
|
||||
exit;
|
||||
end;
|
||||
console.writestringln('[IDE] (IDENTIFY_DEVICE) END');
|
||||
pop_trace();
|
||||
end;
|
||||
|
||||
@@ -318,6 +324,7 @@ var
|
||||
iii : uint32;
|
||||
begin
|
||||
push_trace('ide.writePIO28');
|
||||
console.writestringln('[IDE] (WRITEPIO28) BEGIN');
|
||||
while true do if (inb($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||
|
||||
|
||||
@@ -352,18 +359,19 @@ begin
|
||||
end;
|
||||
|
||||
for ii:=0 to 127 do begin //write data
|
||||
outw($1F0, Puint32(buffer + ((i * 512) + (ii * 32) DIV 32) )^);
|
||||
outb($1F0, Puint32(buffer + ((i * 512) + (ii * 32) DIV 32) )^);
|
||||
while true do if (inb($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||
outb($1F7, $E7);
|
||||
if ii <> 127 then begin
|
||||
outw($1F0, Puint32(buffer + ((i * 512) + (ii * 32) DIV 32) )^ shr 16);
|
||||
outb($1F0, Puint32(buffer + ((i * 512) + (ii * 32) DIV 32) )^ shr 16);
|
||||
while true do if (inb($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||
outb($1F7, $E7);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
//pop_trace();
|
||||
console.writestringln('[IDE] (WRITEPIO28) END');
|
||||
pop_trace();
|
||||
end;
|
||||
|
||||
procedure readPIO28(drive : uint8; LBA : uint32; sectorCount : uint8; buffer : puint32);
|
||||
@@ -373,6 +381,7 @@ var
|
||||
iii : uint32;
|
||||
begin
|
||||
push_trace('ide.readPIO28');
|
||||
console.writestringln('[IDE] (READPIO28) BEGIN');
|
||||
while true do if (inb($1f7) and (1 shl 7)) = 0 then break; //Wait until drive not busy
|
||||
|
||||
noInt(drive);
|
||||
@@ -425,13 +434,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
//pop_trace();
|
||||
console.writestringln('[IDE] (READPIO28) END');
|
||||
pop_trace();
|
||||
end;
|
||||
|
||||
procedure readPIOPI(drive : uint8; LBA : uint32; buffer : Puint32);
|
||||
var
|
||||
i : uint16;
|
||||
begin
|
||||
console.writestringln('[IDE] (READPIOPI) BEGIN');
|
||||
if IDEDevices[drive].isMaster then begin
|
||||
outb($1F7, $E0 or ((LBA shr 24) and $0F)); // command primary master
|
||||
end
|
||||
@@ -459,7 +470,7 @@ begin
|
||||
// for i:=0 to 1023 do begin
|
||||
// Puint32(buffer + (i * 1))^ := inb($1F0);
|
||||
// end;
|
||||
|
||||
console.writestringln('[IDE] (READPIOPI) END');
|
||||
end;
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ unit strings;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uses
|
||||
util,
|
||||
lmemorymanager;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user