PCI IDE driver, new create_volume () syscall, test scripts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s

This commit is contained in:
2026-03-10 18:14:18 +01:00
parent 01c51ac63f
commit 38557bab7d
24 changed files with 726 additions and 39 deletions

58
kernel/device/idedrv.h Normal file
View File

@@ -0,0 +1,58 @@
#ifndef _KERNEL_DEVICE_IDEDRV_H
#define _KERNEL_DEVICE_IDEDRV_H
#include <libk/std.h>
#include <proc/proc.h>
#include <proc/reschedule.h>
#define IDE_PROBE_AVAIL (1 << 0)
#define IDE_PROBE_LBA48 (1 << 1)
struct device;
struct idedrv_init {
bool lba48;
size_t sector_count;
size_t sector_size;
uint16_t io, ctrl;
uint8_t devno;
};
struct idedrv {
bool lba48;
size_t sector_count;
size_t sector_size;
uint16_t io, ctrl;
uint8_t devno;
};
struct ide_probe {
uint16_t flags;
size_t sector_count;
size_t sector_size;
uint16_t io, ctrl;
uint8_t devno;
};
bool idedrv_init (struct device* device, void* arg);
void idedrv_fini (struct device* device);
int idedrv_read (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
void* a2, void* a3, void* a4);
int idedrv_write (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
void* a2, void* a3, void* a4);
int idedrv_get_device_type (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
void* a1, void* a2, void* a3, void* a4);
int idedrv_get_sector_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
void* a1, void* a2, void* a3, void* a4);
int idedrv_get_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
void* a1, void* a2, void* a3, void* a4);
void ide_probe (uint16_t io, uint16_t ctrl, uint8_t devno, struct ide_probe* probe);
#endif // _KERNEL_DEVICE_IDEDRV_H