tree: b938299055d0704d2373bc9697ae837d9959287b [path history] [tgz]
  1. freestanding/
  2. testing/
  3. abs_mmio.c
  4. abs_mmio.h
  5. bitfield.c
  6. bitfield.h
  7. BUILD
  8. csr.h
  9. csr_registers.h
  10. hardened.c
  11. hardened.h
  12. hardened_memory.c
  13. hardened_memory.h
  14. hardened_memory_unittest.cc
  15. hardened_unittest.cc
  16. macros.h
  17. math.c
  18. math.h
  19. math_builtins.c
  20. math_builtins_unittest.cc
  21. math_unittest.cc
  22. memory.c
  23. memory.h
  24. meson.build
  25. mmio.c
  26. mmio.h
  27. multibits.h
  28. multibits_asm.h
  29. random_order.c
  30. random_order.h
  31. README.md
  32. stdasm.h
sw/device/lib/base/README.md

title: “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 uesful 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.