tree: f0670dfd5512b7fa12be74cfdf5ead9360ebca67 [path history] [tgz]
  1. freestanding/
  2. internal/
  3. abs_mmio.c
  4. abs_mmio.h
  5. adv_macros.h
  6. bitfield.c
  7. bitfield.h
  8. BUILD
  9. csr.h
  10. csr_registers.h
  11. global_mock.h
  12. hardened.c
  13. hardened.h
  14. hardened_asm.h
  15. hardened_memory.c
  16. hardened_memory.h
  17. hardened_memory_unittest.cc
  18. hardened_unittest.cc
  19. macros.h
  20. math.c
  21. math.h
  22. math_builtins.c
  23. math_builtins_unittest.cc
  24. math_unittest.cc
  25. memory.c
  26. memory.h
  27. memory_perftest.c
  28. memory_unittest.cc
  29. mmio.c
  30. mmio.h
  31. mock_abs_mmio.cc
  32. mock_abs_mmio.h
  33. mock_mmio.cc
  34. mock_mmio.h
  35. mock_mmio_test.cc
  36. mock_mmio_test_utils.h
  37. multibits.h
  38. multibits_asm.h
  39. random_order.c
  40. random_order.h
  41. README.md
  42. status.c
  43. status.h
  44. status_unittest.cc
  45. stdasm.h
sw/device/lib/base/README.md

libbase: The OpenTitan Standard Library

This subtree provides headers and libraries known collectively as libbase, which serve as OpenTitan's ersatz libc.

Differences from a libc

libbase is not a libc, even though it implements a number of libc symbols, and should not be used as such. libbase is, rather, a place for base libraries which may need to make use of more compiler/platform intrinsics than average, in order to present a safe, stable, and useful interface that other parts of OpenTitan can rely on.

In general, a library exposing general utilities for working close to the hardware should live in this subtree: for example, a library providing memcpy and related symbols. A library for talking to a particular peripheral, like a UART port, is a non-example.