a cow based x86_64 operating system, using limine and stivale2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
756 B

#pragma once
#include <stdint.h>
#include <stddef.h>
struct driver;
struct storage_interface {
struct driver* driver;
void (*read)(struct driver *,
uint64_t lba,
void* buf,
size_t count);
void (*write)(struct driver *,
uint64_t lba,
const void* buf,
size_t count);
// can have wait timings,
// but far less than read
// call sync when needing every
// operation to terminate
void (*async_read)(struct driver *,
uint64_t lba,
void* buf,
size_t count);
void (*sync)(struct driver *);
unsigned capacity;
unsigned lbashift;
};