Skip to content
  • Philippe Gerum's avatar
    cobalt/kernel, lib/cobalt: introduce built-in drivers for user-mapped heaps · 79d53fb8
    Philippe Gerum authored
    We change the way application processes bind to the private and shared
    memory heaps used in fastsync support. Aside of an obscure and
    outdated implementation, using /dev/rtheap for this purpose led to a
    couple of nasty issues:
    
    - the requirement for abusing mmap()'s offset argument in the no-MMU
      case, so that different processes can map in distinct private heap
      areas.
    
    - as a consequence of the previous point, the exposure of kernel
      addresses to userland (passed as differenciating "area" tags in the
      mapping offset) creates an issue with mixed 32/64bit ABI models.
    
    To fix this, we introduce built-in, RTDM-based memory device drivers
    in the Cobalt kernel (aka "UMM" for user-mapped memory), which expose
    mmap() interfaces for binding to the proper private or shared
    heap. The drivers are called by lib/cobalt when initializing a new
    application process, to perform all the necessary mappings.
    
    In addition, a third built-in driver honors (read-only) requests to
    get status information about the system heap.
    79d53fb8