summaryrefslogtreecommitdiffstats
path: root/docs/devel
diff options
context:
space:
mode:
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/memory.txt13
-rw-r--r--docs/devel/testing.rst6
2 files changed, 12 insertions, 7 deletions
diff --git a/docs/devel/memory.txt b/docs/devel/memory.txt
index c1dee1252c..42577e1d86 100644
--- a/docs/devel/memory.txt
+++ b/docs/devel/memory.txt
@@ -326,8 +326,15 @@ visible as the pci-hole alias clips it to a 0.5GB range.
MMIO Operations
---------------
-MMIO regions are provided with ->read() and ->write() callbacks; in addition
-various constraints can be supplied to control how these callbacks are called:
+MMIO regions are provided with ->read() and ->write() callbacks,
+which are sufficient for most devices. Some devices change behaviour
+based on the attributes used for the memory transaction, or need
+to be able to respond that the access should provoke a bus error
+rather than completing successfully; those devices can use the
+->read_with_attrs() and ->write_with_attrs() callbacks instead.
+
+In addition various constraints can be supplied to control how these
+callbacks are called:
- .valid.min_access_size, .valid.max_access_size define the access sizes
(in bytes) which the device accepts; accesses outside this range will
@@ -342,5 +349,3 @@ various constraints can be supplied to control how these callbacks are called:
- .impl.unaligned specifies that the *implementation* supports unaligned
accesses; if false, unaligned accesses will be emulated by two aligned
accesses.
- - .old_mmio eases the porting of code that was formerly using
- cpu_register_io_memory(). It should not be used in new code.
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 727c4019b5..a227754f86 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -43,15 +43,13 @@ add a new unit test:
3. Add the test to ``tests/Makefile.include``. First, name the unit test
program and add it to ``$(check-unit-y)``; then add a rule to build the
- executable. Optionally, you can add a magical variable to support ``gcov``.
- For example:
+ executable. For example:
.. code::
check-unit-y += tests/foo-test$(EXESUF)
tests/foo-test$(EXESUF): tests/foo-test.o $(test-util-obj-y)
...
- gcov-files-foo-test-y = util/foo.c
Since unit tests don't require environment variables, the simplest way to debug
a unit test failure is often directly invoking it or even running it under
@@ -61,6 +59,7 @@ variable (which affects memory reclamation and catches invalid pointers better)
and gtester options. If necessary, you can run
.. code::
+
make check-unit V=1
and copy the actual command line which executes the unit test, then run
@@ -118,6 +117,7 @@ and using gdb on the test is still simple to do: find out the actual command
from the output of
.. code::
+
make check-qtest V=1
which you can run manually.