bsp-howto: Add target hash chapter

Update #4267.
This commit is contained in:
Sebastian Huber 2021-02-24 14:11:21 +01:00
parent 03fc1d6514
commit 29ce2900b0
2 changed files with 18 additions and 0 deletions

View File

@ -28,6 +28,7 @@ RTEMS BSP and Driver Guide (|version|).
initilization_code initilization_code
console console
clock clock
target-hash
getentropy getentropy
i2c i2c
spi spi

17
bsp-howto/target-hash.rst Normal file
View File

@ -0,0 +1,17 @@
.. SPDX-License-Identifier: CC-BY-SA-4.0
.. Copyright (C) 2021 embedded brains GmbH <rtems@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.