EPOS for RISC-V, with new scheduling framework, multicore and u-kernel.

** API

  • memory.h, address_space.cc, segment.cc
  • Address_Space(pd) made private. Apps use Task::self()->address_space() instead.
  • Segment(pt) added to recover page tables created by SETUP for the first Thread at Tread::init().
  • process.h
  • Thread::lock() and unlock() now take Spins as parameters, so fine-grain locking can be achieved.
  • time.h
  • Alarm::lock() and unlock() are now done over Alarm::_lock to achieve a finer grain locking of the whole system.
  • thread.cc
  • There was an old issue on Thread::dispatch() when debugging the previous thread's context, which was not yet saved. The Context::save() used in some versions was indeed pushing and extra context onto the stack, which was not being removed. Now Context::save() saves a temporary context as an ordinary object, just for printing. An empty default constructor for Context was added for this purpose.
  • scheduler.cc
  • Explicit template instantiation of FCFS::FCFS() to cope with the undefined symbol reference in different compilation units.

** INIT

  • init_first.cc init_begin.cc init_end.cc system_scaffold.cc
  • First_Object was moved from the system's scaffold to a separate unit called init_begin.cc for more control on ordering while linking.
  • init_first.cc was renamed init_end.cc, the last step of INIT.
  • init_system.cc
  • Kernels use a smaller system's heap, leaving more memory for apps.
  • The system's heap can now be mapped to arbitrary locations in the address space for non-kernel configurations.
  • init_application.cc
  • Init_Application now handles the case in which GCC eliminates the data segment even for NMAGIC linkages, something that is currently happening for RISC-V.

** FRAMEWORK

  • agent.h
  • Recovered lost agents for Mutex and Semaphore.
  • BUGFIX: Segment was fixed.
  • message.h and meta.h
  • Reference to rvalue was changed to const reference to lvalue. The need for handling rvalues seems to have vanished. Better keep an eye on this!

** ARCHITECTURES

  • mmu.h
  • An universal implementation for no-MMU machines is now modeled as No_MMU to be reused at will.
  • MMU::Translation added as a powerful debugging object that performs manual address translations.
  • BUGFIX: page_tables() and align_directory() were broken.
  • ia32_mmu.h
  • Made compatible with new mmu.h.
  • Added Translation (but not fully tested).
  • rv32_cpu.h (added)
  • A new design of CPU::context handling aming mostly at isolating the problems that haunt the multicore version. Now threads are created with two pushed contexts, the first used transparently by context_switch just to reach _int_leave inside IC::entry().
  • rv32_mmu.h (added)
  • Implements RV32 in conformance with new MMU interface.
  • rv32_tsc.h (added)
  • Temporary implementation based on MTIME. A PMU counter is available and will be investigated next.
  • rv32_traits.h (added)
  • Initial setup, with (very) arbitrary clock.
  • _crtbeging.c and _crtend.c
  • These were now identical for all architectures, so they were unified and moved to a common folder.
  • amrv7_mmu_init.cc
  • Validate replacement by No_MMU::init().

** MACHINES

  • _info.h and info.h
  • A System_Info_Common was created to easy the maintainance of mkbi.
  • _memory_map.h
  • Unused constants were removed and names for similar ones accross machines were unified.
  • _traits.h
  • Unused constants were removed and names for similar ones accross machines were unified.
  • setup_binding.cc
  • Handle bindings just like kernel and application bindings for SETUP.
  • pc_machine.h
  • pre_init() implementation moved to .cc to easy debugging.
  • legacy_pc_memory_map.h
  • Kernel address space spread away to align components (e.g. CODE, DATA) and easy debugging. The space inside the kernel's page table was unusable anyway.
  • legacy_pc_traits.h
  • Default heap system reduced from 16 MB to 4 MB.
  • scb.h
  • Validate replacing SYS_CODE by VECTOR_TABLE. The first seemed wrong, but it was working apparently.

** SETUP

  • setup_legacy_pc.cc
  • Adjusted to match new System_Info.
  • eposcc eposmkbi.c
  • Adjusted to match new System_Info and to support in-image System_Info (in contrast to a separate disk sector as used in PC).

** TESTS

  • makefile
  • Now make buildtest stops on first error.

  • Newer versions of GCC demanded (too) many (apparently silly) changes. Each of which was revised to confirm validity.