tree: c4775110e3ce8c4dd08b173708c4130916cdbb0c [path history] [tgz]
  1. freestanding/
  2. testing/
  3. bitfield.c
  4. bitfield.h
  5. BUILD
  6. csr.h
  7. csr_registers.h
  8. hardened.c
  9. hardened.h
  10. macros.h
  11. memory.c
  12. memory.h
  13. meson.build
  14. mmio.c
  15. mmio.h
  16. README.md
  17. 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.