Commit Graph

15 Commits

Author SHA1 Message Date
3233169f25 dev: implement reading from block devices
reading from block devices is done using the block cache (bcache).
This cache stores sectors from a block device in pages of memory
marked as 'cached', which will allow them to be reclaimed when
memory pressure is high (TODO).

while block device drivers implement callbacks allowing reading/writing
at block-granularity, the device subsystem uses the block cache to
implement reading/writing at byte-granularity in a driver-agnostic way.

block drivers can disable the block cache for their devices, but this
will require that any clients communicate with the devices at
block-granularity.

also added an offset parameter to device and object read/write functions/callbacks.
2023-07-09 21:58:40 +01:00
929560e055 obj: fix kmalloc'd namespace paths not being null-terminated 2023-06-06 21:50:06 +01:00
577abf3bba obj: implement link objects 2023-06-02 19:34:33 +01:00
d02d05d922 obj: add read() and write() object callbacks 2023-05-14 21:11:32 +01:00
ad8865fe66 obj: implement object_namespace_get_object() 2023-05-10 20:33:08 +01:00
a79d109fcc obj: add header-offset field to object_type
this allows the object header to be placed anywhere within the larger
object structure.

the object system now also ensures that the object is zero-initialised
during allocation.
2023-05-06 22:22:05 +01:00
f52ca2f1e2 obj: object header is no longer allocated automatically 2023-05-06 19:48:14 +01:00
b6f8c1ccaa kernel: don't use typedef for enums or non-opaque structs 2023-04-13 11:40:52 +01:00
5d9f193aa2 obj: objects can now be published in the namespace root 2023-04-09 20:35:17 +01:00
b1b16ba19c kernel: reduce log message spam during boot 2023-04-09 17:14:19 +01:00
2bfb6bcd78 kernel: add c++ support 2023-03-20 20:41:39 +00:00
8285506e58 obj: use ref-counting in set objects 2023-03-05 18:26:05 +00:00
bc1bc9fec5 obj: add set and namespace object callbacks 2023-02-25 19:12:09 +00:00
8c87e78797 obj: add more set and namespace functions 2023-02-25 17:57:53 +00:00
ef10ed5cd2 kernel: add initial object manager definitions 2023-02-17 19:36:14 +00:00