diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-14 22:45:47 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-14 23:00:39 -0400 |
commit | aa2df9c1bbf014e243abdc726aae593a7ef1e363 (patch) | |
tree | 123f1771c1c038be297bb85659c26c68f332254f /sys/arch/amd64/pci | |
parent | 645ac2f02163fb48cd7de52fa143fabcfcdd7e9d (diff) |
kernel: Introduce disk management framework
This commit introduces the initial Hyra disk management framework. The
goal of this framework is to provide a simplistic API for the management
of storage devices in a way that is more suitable for complex operations.
Upon detection and initialization of a block-based storage medium, the
driver may create a named disk object using the 'disk_add()' function.
Disks that have been registered with the system may be acquired via the
'disk_get_id()' function.
As of the current revision, each disk is given a monotonically incremental
ID for identification and lookups. A disk ID of zero indicates a primary disk
on the system.
Disks may be written to or read from using the 'disk_read()' and 'disk_write()'
functions. Memory buffers used for these operations must be created with the
'disk_buf_alloc()' function and freed with the 'disk_buf_free()' function.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/pci')
0 files changed, 0 insertions, 0 deletions