diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-02 07:04:53 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-02 07:04:53 +0200 |
| commit | f0811b1e200293c5ccc387d866d0ad49a41bba17 (patch) | |
| tree | a31adbc1d14465e08088a98f1b4b8ebd0936db16 /Private/HALKit | |
| parent | d445096b8403ad0bdbf0095c50f66ba01fde9f33 (diff) | |
Kernel: New commit, see below.
- Implement FileManager's NewFilesystemManager.
- Add ATA-DMA and ATA-PIO APIs.
- Add the two raw call (fs_newfs_read_raw, fs_newfs_write_raw) to the
NewFS API.
- Add kPRDTTransferStatus to tell if PRD is in use.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/HALKit')
| -rw-r--r-- | Private/HALKit/AMD64/Storage/ATA-DMA.cxx | 37 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/Storage/ATA-PIO.cxx | 4 | ||||
| l--------- | Private/HALKit/PC | 1 |
3 files changed, 41 insertions, 1 deletions
diff --git a/Private/HALKit/AMD64/Storage/ATA-DMA.cxx b/Private/HALKit/AMD64/Storage/ATA-DMA.cxx index e69de29b..4189e467 100644 --- a/Private/HALKit/AMD64/Storage/ATA-DMA.cxx +++ b/Private/HALKit/AMD64/Storage/ATA-DMA.cxx @@ -0,0 +1,37 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +/** + * @file ATA-DMA.cxx + * @author Amlal El Mahrouss (amlalelmahrouss@icloud.com) + * @brief ATA driver (DMA mode). + * @version 0.1 + * @date 2024-02-02 + * + * @copyright Copyright (c) Mahrouss Logic + * + */ + +#include <StorageKit/PRDT.hpp> + +#include <Builtins/ATA/Defines.hxx> +#include <ArchKit/ArchKit.hpp> + +using namespace NewOS; + +EXTERN_C Int32 kPRDTTransferStatus; + +#ifdef __ATA_DMA__ + +#ifdef __ATA_PIO__ +# error You can't have both PIO and DMA enabled! +#endif /* ifdef __ATA_PIO__ */ + +#ifdef __AHCI__ +# error You can't have both ATA and AHCI enabled! +#endif /* ifdef __AHCI__ */ + +#endif /* ifdef __ATA_DMA__ */ diff --git a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx index 0f8a0d75..2344cd86 100644 --- a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx +++ b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx @@ -18,6 +18,8 @@ #include <Builtins/ATA/Defines.hxx> #include <ArchKit/ArchKit.hpp> +#ifdef __ATA_PIO__ + using namespace NewOS; using namespace NewOS::HAL; @@ -175,3 +177,5 @@ Void drv_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, /// @check is ATA detected? Boolean drv_ata_detected(Void) { return kATADetected; } + +#endif /* ifdef __ATA_PIO__ */
\ No newline at end of file diff --git a/Private/HALKit/PC b/Private/HALKit/PC deleted file mode 120000 index 4af647a3..00000000 --- a/Private/HALKit/PC +++ /dev/null @@ -1 +0,0 @@ -AMD64/
\ No newline at end of file |
