au-ts / sddf

A collection of interfaces, libraries and tools for writing device drivers for seL4 that allow accessing devices securely and with low overhead.
Other
23 stars 18 forks source link

Multicore #255

Open Courtney3141 opened 2 months ago

Courtney3141 commented 2 months ago

This PR adds two multicore configurations to the echo server - imx8mm_evk_4_cores and odroidc4_4_cores. The purpose of the changes to the surrounding files is to make the echo server easily generalise to single and multicore configurations.

The most significant changes are to the benchmark process benchmark.c. It has been restructured so that:

The rest of the changes aim to be the minimal required to support the change to the benchmarking process. They are:

  1. The addition of 2 extra system files for the new boards.
  2. Changes to utilization_socket.c to track the total and idle cycles of all cores which have PDs on them, rather than just one core.
  3. The addition of a new config file core_config.h that provides the benchmark processes and the utilization socket information about what PDs are in the system and what core they are on. Changing which PD is on which core is simply a matter of updating the pd_core_info array. Two core_config files are included - one for single core configurations, and one for the specific multicore configuration in the mutlicore system files.
  4. Since in a multicore configuration there needs to be one benchmark process per core, and the benchmark processes require access to the serial subsystem to output results, this means for a multicore system there are now 6 serial clients rather than 3. To avoid adding complexity to the serial config file, a new serial config file has been created that resides in a new serial_config_smp directory.
  5. Makefile changes incorporating the new boards and config files. When a multicore board is selected, the CONFIG_INCLUDE directories are appended with _smp to include the multicore config files.

When built in a single core board, both utilization_socket.c and the benchmark.c behave almost unchanged, but they have been restructured so that no changes are required to the files in a multicore configuration - only to the system file, core config file and serial config file.

Note that this PR is based off https://github.com/au-ts/sddf/pull/254, and should be merged secondary to that.