tree: a8a8b999468c5e667fcecb6ffe199a91724dda9e [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_status.c
  19. hardened_status.h
  20. hardened_status_unittest.cc
  21. hardened_unittest.cc
  22. macros.h
  23. math.c
  24. math.h
  25. math_builtins.c
  26. math_builtins_unittest.cc
  27. math_unittest.cc
  28. memory.c
  29. memory.h
  30. memory_perftest.c
  31. memory_unittest.cc
  32. mmio.c
  33. mmio.h
  34. mock_abs_mmio.cc
  35. mock_abs_mmio.h
  36. mock_mmio.cc
  37. mock_mmio.h
  38. mock_mmio_test.cc
  39. mock_mmio_test_utils.h
  40. multibits.h
  41. multibits_asm.h
  42. random_order.c
  43. random_order.h
  44. README.md
  45. status.c
  46. status.h
  47. status_unittest.cc
  48. 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.