summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorjbranso@dismail.de <jbranso@dismail.de>2024-10-12 10:36:49 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-10-13 23:38:08 +0200
commit168d8955145bb010c1b162c1e23af8a1e9f4fb2d (patch)
tree61c3ce96aee26fbc091883f2207289c89bedb538 /hurd
parent16b9a3b8bd8f2c1e4312133dbce05d0a96fa5b73 (diff)
document libmachdev
* hurd/libmachdev.mdwn: new file. * hurd/documentation.mdwn: link to libmachdev Message-ID: <20241012143852.2101-2-jbranso@dismail.de>
Diffstat (limited to 'hurd')
-rw-r--r--hurd/documentation.mdwn1
-rw-r--r--hurd/libmachdev.mdwn28
2 files changed, 29 insertions, 0 deletions
diff --git a/hurd/documentation.mdwn b/hurd/documentation.mdwn
index b79ddb0a..68914697 100644
--- a/hurd/documentation.mdwn
+++ b/hurd/documentation.mdwn
@@ -74,6 +74,7 @@ is included in the section entitled
* [[libstore]]
* [[libchannel]]
* [[libtrivfs]]
+ * [[libmachdev]]
* [[libnetfs]] -- short introductory material
* [[libdiskfs]]
* [[libihash]]
diff --git a/hurd/libmachdev.mdwn b/hurd/libmachdev.mdwn
new file mode 100644
index 00000000..3f8634e4
--- /dev/null
+++ b/hurd/libmachdev.mdwn
@@ -0,0 +1,28 @@
+[[!meta copyright="Copyright © 2024 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+GNU/Linux is a monolithic kernel, meaning that a lot of functionality
+is baked into the kernel, including filesystems like `ext4` or `xfs`.
+Alternatively, the Hurd's filesystems are in userspace, but our disk
+device drivers are baked into the GNU Mach kernel image (via
+[[DDE|hurd/dde]]). With [[rumpdisk|hurd/rump/rumpdisk]], the Hurd can
+use SSDs with userspace device drivers! RumpDisk uses `libmachdev` as
+a helper library.
+
+`libmachdev` exposes devices to userspace via some Mach `device-*` RPC
+calls. `libmachdev` provides a trivfs that intercepts the
+`device_open` RPC, which the `/dev` node uses. It also fakes a
+filesystem node, so you can mount a `netfs` onto it. You still have
+to implement `device_read` and `device_write` yourself, but that code
+runs in userspace. An example of this can be found in
+`rumpdisk/block-rump.c`.
+
+If [[serverboot V2|open_issues/serverbootv2]] is written, then
+`libmachdev` could be simplified or maybe removed.