[rtems-docs commit] bsp-howto: Add target hash chapter

Sebastian Huber sebh at rtems.org
Thu Apr 22 05:46:32 UTC 2021


Module:    rtems-docs
Branch:    master
Commit:    29ce2900b0b1781489b7b60378a417862c96639c
Changeset: http://git.rtems.org/rtems-docs/commit/?id=29ce2900b0b1781489b7b60378a417862c96639c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb 24 14:11:21 2021 +0100

bsp-howto: Add target hash chapter

Update #4267.

---

 bsp-howto/index.rst       |  1 +
 bsp-howto/target-hash.rst | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/bsp-howto/index.rst b/bsp-howto/index.rst
index e95c1b8..d095fc7 100644
--- a/bsp-howto/index.rst
+++ b/bsp-howto/index.rst
@@ -28,6 +28,7 @@ RTEMS BSP and Driver Guide (|version|).
 	initilization_code
 	console
 	clock
+	target-hash
 	getentropy
 	i2c
 	spi
diff --git a/bsp-howto/target-hash.rst b/bsp-howto/target-hash.rst
new file mode 100644
index 0000000..bcb651b
--- /dev/null
+++ b/bsp-howto/target-hash.rst
@@ -0,0 +1,17 @@
+.. SPDX-License-Identifier: CC-BY-SA-4.0
+
+.. Copyright (C) 2021 embedded brains GmbH <rtems at embedded-brains.de>
+
+Target Hash
+***********
+
+Each BSP must provide an implementation of the :c:func:`rtems_get_target_hash`
+directive.  The
+`default implementation <https://git.rtems.org/rtems/tree/bsps/shared/start/gettargethash-default.c>`_
+is based on the CPU counter frequency.  A BSP-specific implementation may be
+provided which covers also for example the device tree, settings of the memory
+controller, processor and bus frequencies, a serial number of a chip, etc.  For
+a BSP-specific implementation start with the default implementation and add
+more values to the target hash using the functions :c:func:`_Hash_Add_data` and
+:c:func:`_Hash_Add_string`.  The target hash can be used to distinguish test
+suite results obtained from different target systems.



More information about the vc mailing list