summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/AMD64/Storage
AgeCommit message (Collapse)Author
2025-03-23meta(kernel): Reworked repository's filesystem structure.Amlal El Mahrouss
Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-22kernel(general): Refactor AHCI driver and clean up project structureAmlal El Mahrouss
- Reworked AHCI command setup: fixed command slot indexing and clarified memory setup - Updated AHCI disk initialization to use reference for ATAPI flag - Cleaned up verbose logging in scheduler and IRQ handler for a quieter kernel log - Updated boot image target from fat32.img to neos.img - Renamed and moved documentation files from `doc/` to `docs/` for consistency - Renamed `make_docs.sh` to `osx_docs.sh` to reflect platform-specific intent - Minor formatting improvements in DiskImage struct - Revised ReadMe: clarified mount instructions and removed outdated screenshots Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-21project(format): Ran the run_format.sh, in order to comply withAmlal El Mahrouss
repository standards. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-21kernel(storage): Add two functions, sk_io_read_ahci and sk_io_write_ahci. To ↵Amlal El Mahrouss
avoid using lambdas inside the device initialization expression. This leads to the following: - Better readability. - Much more predictible code. - And a check on *disk* which could've been invalid memory area (NULL address here) Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-20AHCI-Generic.cc: Disk Driver builtin improvements.Amlal El Mahrouss
- Poll for CR in ahci_enable_and_probe. - Init NeFS, not an AHCI device for portability. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-19refactor(kernel): Standardize DMA and AHCI interfaces and enhance GIC handlingAmlal El Mahrouss
- Replace ambiguous WordLength templates with DataKind in `ke_dma_read/write`. - Streamline AHCI driver initialization by directly assigning port implementations. - Rename AHCI methods for clarity (`SetPi` → `SetPortsImplemented`). - Standardize MMIO access by replacing `hal_mmio_read/write` with unified `ke_dma_read/write`. - Improve GIC interrupt handler on ARM64 by explicitly handling scheduler interrupts and ensuring interrupts are ended correctly. - Add debug breakpoint in infinite loop within AP setup for improved debugging. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-19AHCI+Generic.cc: Remove redundant drv_compute_disk_ahci call.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-19ADD: AHCI+Generic.cc: ahci_enable_and_probe has been added to apply theAmlal El Mahrouss
DRY principle on drv_std_init_ahci. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-19AHCI+Generic.cc: Remove unused variable 'kAHCICommandIssued'Amlal El Mahrouss
2025-03-18AHCI+Generic.cc: Don't mix Drive and Disk, when logging metadata.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-18feat(AHCI, HAL): Improve AHCI error handling & optimize HAL initializationAmlal El Mahrouss
- Refactored `sk_acquire_ahci_device(Int32 drv_index)` to return `ErrorOr<AHCIDeviceInterface>` for proper error handling instead of returning a raw object. - Moved `sk_init_ahci_device(BOOL atapi)` into the `NeOS` namespace for better encapsulation. - Reduced `HbaMem::Ports` array size from `Ports[32]` to `Ports[1]` to optimize memory usage for single-port AHCI controllers. - Removed manual constructor initialization (`__CTOR_LIST__`, `__DTOR_LIST__`) from HAL, simplifying kernel startup. - Updated `hal_real_init()` to initialize AHCI storage (`sk_init_ahci_device(NO)`) before userland execution. - Refactored `hal_get_phys_address(void* virtual_address)` to use `VoidPtr` for type safety. - Fixed incorrect buffer size (`kSzIdent`) in AHCI driver initialization from `kib_cast(1)` to `512`, ensuring correct sector identification. - Removed redundant drive model string parsing logic. - Refactored AHCI PRD iteration loop to use `prd_i` instead of `i`, improving readability. - Optimized `drv_std_input_output` by simplifying wait loop logic. Overall, this commit improves AHCI error handling, reduces redundant initialization, optimizes memory usage, and cleans up HAL and storage code. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-17META: Ran run_format.shAmlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-16AHCI: FIX: Place det || ipm condition before checking for ATAPI/SATA.Amlal El Mahrouss
AHCI: Finish .drawio design of AHCI driver. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-16AHCI+Generic.cc: Remove duplicate Cmd (FIS recv enable + Start Command tbl)Amlal El Mahrouss
2025-03-16AHCI.cc: FIX: Avoid looking on DMA directly.Amlal El Mahrouss
2025-03-16AHCI+Generic.cc: Fix formula for kSATASectorCount.Amlal El Mahrouss
2025-03-14TQ-24 && TQ-16: Add build scripts for MBCI, MBCI+Flash, and UFS.Amlal El Mahrouss
META: Along other tweaks and important ARM64 patches. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-14Kernel: Patch UserProcess::Delete, and AHCI identify command.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-14AHCI: Important tweaks.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-14AHCI.cc: Check Is for an HBA error.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-12ADD: Scheduler bug fixes, and working on deadlock prevention.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-12AHCI.cc: Don't panic when disk fails (AHCI)Amlal El Mahrouss
2025-03-12AHCI.cc: Better AHCI driver.Amlal El Mahrouss
Build: Use FAT32 emulated on a USB-stick. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-12AHCI.cc: Replace Highest LBA with Sector Count.Amlal El Mahrouss
2025-03-11ADD: A better AHCI driver.Amlal El Mahrouss
2025-03-11Many AHCI improvements and IPC tweaks.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-10AHCI.cc Organize file.Amlal El Mahrouss
2025-03-10AHCI.cc: Clear kACHICommandIssued once Ci is clear.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-09RAN format command, and fix DiskImage framework.Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-07NeFS.h: Tailor header to private specifications.Amlal El Mahrouss
make_fs/CommandLine.cc: Include NEFS_ROOT_PARTITION_BLOCK too.
2025-03-07Replace endl with kendl, and add make_fs; a tool to format aAmlal El Mahrouss
filesystem under the EPM. -> EPM + NeFS, HPFS, ext? Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-04Fix namespace.Amlal El Mahrouss
2025-03-04CHORE&FEAT: Kernel/SCI: Lots of Chore and feat, see below.Amlal El Mahrouss
- Add traits for CmdListEntry in GPU's SCI. (GPU.h) - Set standard user directory as /user/ instead of /usr/. (User.cc/User.h) - Replace fSourcePid with fPID. (HardwareThreadScheduler.cc/HardwareThreadScheduler.h)
2025-03-03AHCI: Improvements and tweaks.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-03-03ADD: Format source code and define __wm_msg struct (public version)Amlal El Mahrouss
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-03-03ADD: AHCI: New AHCI Driver API, and refactor AHCIDeviceInterface classAmlal El Mahrouss
from SK. NEXT: System Call Table for Kernel to User interaction. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
2025-02-26ADD: Tweaks and improvements.Amlal
2025-02-25AHCI.cc: Update copyright holder.Amlal
2025-02-24ADD: ARM64: MBCI 'FLSH' driver.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-24AHCI.cc: Use legal name of company now.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-24AHCI.cc: Fix missing return on type warning.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-22Use UInt16 instead of UInt32 (AHCI).Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-22AHCI.cc: Use UInt32 instead of auto.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-22AHCI.cc: Improvements on the AHCI Device class.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-22ADD: More improvements now on DeviceMgr.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-22New DeviceMgr, other APIs have been reworked as a result.Amlal
AHCI becomes the first module to be available in StorageKit. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-21ADD: Better documentation.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-21ADD: Explicit types instead of auto.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
2025-02-21ADD: AHCI improvementsAmlal
2025-02-21AHCI.cc: Taking care of command header now.Amlal
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>