Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 10 years ago

Closed 5 years ago

Last modified 5 years ago

#39 closed enhancement (fixed)

Implement support for LEON CPUs (sparc32)

Reported by: Martin Decky Owned by: Martin Decky
Priority: major Milestone: 0.6.0
Component: helenos/kernel/sparc32 Version: mainline
Keywords: socis13 Cc:
Blocker for: Depends on:
See also:

Description (last modified by Martin Decky)

Implement support for LEON2 and/or LEON3 CPUs (sparc32 big-endian architecture).

The LEON CPU is a 32bit CPU microarchitecture based on the SPARCv8 RISC architecture and instruction set. It was designed by ESTEC (European Space Research and Technology Centre) which is part of ESA (European Space Agency) and later by Gaisler Research. The CPU is described in a synthesizable and configurable VHDL with generics, licensed under GPL/LGPL. Various variants of the LEON CPU are used for space on-board software and for ground development of such software (as fault-tolerant radiation hardened ASICs if used actually in space and usually as FPGAs for the development).

There are several generations of the LEON CPU. LEON2 and LEON3 are the most frequently used. Each CPU design (IP core) is also accomplished by the infrastructure (support cores) with which the processor is packaged (e.g. an interrupt controller, memory controller, timers, UARTs, I/O ports, plug-and-play AMBA bus, etc.).

The goal of this ticket is to pick a generic LEON distribution and port HelenOS to it. At least basic system functionality is required, i.e. support for booting, memory management, scheduling, user space, IPC and user input/output (via a serial console or similar). The microarchitecture and instruction set of LEON CPUs is reasonably similar to the 64bit SPARCv9 that is already supported by HelenOS. The main differences are:

  • 32 bits instead of 64 bits (registers, word size, etc.)
  • no trap nesting, trap inside trap would cause watchdog reset
  • on SPARCv9 non-register window traps will not do a SAVE while on SPARCv8 they will
  • registers controlling the register stack engine move in the opposite direction
What Gains and Benefits will this bring?
The LEON CPUs are used for space missions both by ESA and NASA, it is also an excellent example of a clean embedded SoC design (arguably better and more open than many ARM SoC designs). Thus implementing LEON support for HelenOS might make it a possible operating system of choice for some embedded applications.
Required skills
While the complete designs of LEON CPUs are readily available, there are many configuration options of the design and many ways how to deploy the design in physical hardware (i.e. on a FPGA). There are also several LEON emulators (TSIM, EGOS, etc.) with different feature sets. Therefore a successful applicant will need to have very good skills in programming in the C language and the ability to learn and reuse know-how contained in specifications, VHDL, reverse-engineered code of other operating system projects, etc.
We have an FPGA board that is capable to host the LEON2 design. It is available for development, debugging and testing.
Possible mentors
HelenOS Core Team, Martin Decky

Change History (4)

comment:1 Changed 6 years ago by Martin Decky

Component: helenos/unspecified
Description: modified (diff)
Keywords: socis13 added

comment:2 Changed 6 years ago by Martin Decky

Summary: Add support for LEON CPUs (sparc32)Implement support for LEON CPUs (sparc32)

comment:3 Changed 5 years ago by Jakub Jermář

Resolution: fixed
Status: newclosed

Initial support for sparc32/LEON was merged in mainline,2046.

comment:4 Changed 5 years ago by Jakub Jermář

Component: helenos/unspecifiedhelenos/kernel/sparc32
Note: See TracTickets for help on using tickets.