diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-26 05:02:55 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-26 05:02:55 +0200 |
| commit | 9076aff05349093c2c6280287ee3257d9c07c014 (patch) | |
| tree | 9c415985dabaa37c7effc93306ca51e90c496e17 /dev/ZBA/Sources | |
| parent | ff94ce367f7f23e3a78f157f9420c480a4d7f9aa (diff) | |
[IMP] Add page file inside \System\ (syspage.sys)
[FIX] Fix ATA support in bootloader and kernel.
[IMP] Add sector count macro in DriveManager.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBA/Sources')
| -rw-r--r-- | dev/ZBA/Sources/HEL/AMD64/BootATA.cxx | 4 | ||||
| -rw-r--r-- | dev/ZBA/Sources/HEL/AMD64/BootMain.cxx | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx index 714e552d..0c59ef8c 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx @@ -120,7 +120,7 @@ Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, Out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F)); - Out8(IO + ATA_REG_SEC_COUNT0, 2); + Out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz)); Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); Out8(IO + ATA_REG_LBA1, (Lba) >> 8); @@ -150,7 +150,7 @@ Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, Out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F)); - Out8(IO + ATA_REG_SEC_COUNT0, 2); + Out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz)); Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); Out8(IO + ATA_REG_LBA1, (Lba) >> 8); diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx index cd18d34a..9cdaf603 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx @@ -253,9 +253,6 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, // If we succeed in reading the blob, then execute it. // ------------------------------------------ // - handoverHdrPtr->f_HardwareTables.f_ImagePtr = readerKernel.Blob(); - handoverHdrPtr->f_HardwareTables.f_ImageSz = readerKernel.Size(); - if (readerKernel.Blob()) { loader = new Boot::BThread(readerKernel.Blob()); |
