summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/KPC.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-28 09:39:45 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-28 09:39:45 +0100
commit5f82d24d5887e2d87100cea1afbab758073d9a5a (patch)
tree0a736bf2932ddce2b47c4486a5ac4b91f3e580fe /dev/kernel/src/KPC.cc
parent9034d32c7b60dedbdbdb66f42d9b147cb2aa9a60 (diff)
ahci: WIP - refactor AHCI command engine, fix PRDT setup and LBA logic
This patch begins a major cleanup and enhancement of AHCI I/O handling: - Refactored AHCI command setup logic to prepare FIS and PRDT entries more correctly. - Fixed miscalculation of 48-bit LBA extraction from IDENTIFY response. - Rewrote PRDT loop to increment physical address per entry instead of recomputing offsets. - Replaced read/write/identify branching with unified ternary logic for clarity. - Ensured proper stopping and reinitialization of command engine before issuing commands. - Explicitly remap and zero command list base, FIS base, and command table areas. - Made command slot lookup more robust. - Added fallback wait after command completion to avoid SRBSY/SRDRQ residue. - Dropped misused `YES` flag in read/write call sites — now passed only when needed. Also includes: - Minor cleanup in `BootKit.h` (whitespace). - NeFS debug message clarified to avoid accidental fork overwrites. This is a **work-in-progress** rework of the AHCI path. Next steps will involve: - More robust error recovery. - Support for non-512 sector drives. - Support for multiple ports and NCQ. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/KPC.cc')
0 files changed, 0 insertions, 0 deletions