summary refs log tree commit diff stats
path: root/rust/hw/char/pl011/README.md
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-10 16:11:28 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-10-11 12:32:17 +0200
commitd0f0cd5b1f7e9780753344548e17ad4df9fcf5d8 (patch)
tree2277cf9eb89fb49f1c981ac122a0374b94cebf19 /rust/hw/char/pl011/README.md
parent2b74dd918007d91f5fee94ad0034b5e7a30ed777 (diff)
downloadfocaccia-qemu-d0f0cd5b1f7e9780753344548e17ad4df9fcf5d8.tar.gz
focaccia-qemu-d0f0cd5b1f7e9780753344548e17ad4df9fcf5d8.zip
rust: add PL011 device model
This commit adds a re-implementation of hw/char/pl011.c in Rust.

How to build:

1. Configure a QEMU build with:
   --enable-system --target-list=aarch64-softmmu --enable-rust
2. Launching a VM with qemu-system-aarch64 should use the Rust version
   of the pl011 device

Co-authored-by: Junjie Mao <junjie.mao@intel.com>
Co-authored-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Link: https://lore.kernel.org/r/6ec1d4fb8db2a1d7ba94c73e65d9770371b7857d.1727961605.git.manos.pitsidianakis@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char/pl011/README.md')
-rw-r--r--rust/hw/char/pl011/README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/rust/hw/char/pl011/README.md b/rust/hw/char/pl011/README.md
new file mode 100644
index 0000000000..cd7dea3163
--- /dev/null
+++ b/rust/hw/char/pl011/README.md
@@ -0,0 +1,31 @@
+# PL011 QEMU Device Model
+
+This library implements a device model for the PrimeCell® UART (PL011)
+device in QEMU.
+
+## Build static lib
+
+Host build target must be explicitly specified:
+
+```sh
+cargo build --target x86_64-unknown-linux-gnu
+```
+
+Replace host target triplet if necessary.
+
+## Generate Rust documentation
+
+To generate docs for this crate, including private items:
+
+```sh
+cargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu
+```
+
+To include direct dependencies like `bilge` (bitmaps for register types):
+
+```sh
+cargo tree --depth 1 -e normal --prefix none \
+ | cut -d' ' -f1 \
+ | xargs printf -- '-p %s\n' \
+ | xargs cargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu
+```