diff --git a/Asuro.iso b/Asuro.iso index 7d624aed..7749b732 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 96d9b239..1b1a91da 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/checksums.md5 b/checksums.md5 index 4e02fb57..a35f1e93 100644 --- a/checksums.md5 +++ b/checksums.md5 @@ -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 diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index 96d9b239..1b1a91da 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/IDE.ppu b/lib/IDE.ppu index 749921d0..f8a263c9 100644 Binary files a/lib/IDE.ppu and b/lib/IDE.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index e8222662..4625cf0b 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index cfc10df9..fb0f5f16 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 77032591..be17a683 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 051b471e..73fbfb1f 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 2c37d469..d5fb2ca2 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/shell.ppu b/lib/shell.ppu index fadc8471..a333ed26 100644 Binary files a/lib/shell.ppu and b/lib/shell.ppu differ diff --git a/lib/strings.ppu b/lib/strings.ppu index df672b0e..414880dd 100644 Binary files a/lib/strings.ppu and b/lib/strings.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index ea3d73a1..5adb6e36 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/src/driver/storage/IDE.pas b/src/driver/storage/IDE.pas index ca8ec02c..6447deae 100644 --- a/src/driver/storage/IDE.pas +++ b/src/driver/storage/IDE.pas @@ -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; diff --git a/src/include/strings.pas b/src/include/strings.pas index 7c67cf6f..c4213948 100644 --- a/src/include/strings.pas +++ b/src/include/strings.pas @@ -7,7 +7,7 @@ unit strings; interface -uses +uses util, lmemorymanager;