Zephyr Project Requirements
Hardware Architecture Interface

SPDX-License-Identifier: Apache-2.0

ZEP-SRS-19-1
1. Atomic Operations UID: ZEP-SRS-19-1 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide an interface to access memory while ensuring mutual exclusion.

USER_STORY:

As a Zephyr RTOS user I want to read from or write into a memory areas without being disturbed by other threads or ISRs.

ZEP-SRS-19-2
2. Thread Context Switching UID: ZEP-SRS-19-2 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism for context switching between threads.

USER_STORY:

As a Zephyr RTOS user I want to execute code concurrently in one or more threads and when interrupted at a code location in a thread, to continue at the very same location.

ZEP-SRS-19-3
3. Software Exceptions UID: ZEP-SRS-19-3 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide an interface to implement software exceptions.

USER_STORY:

As a Zephyr RTOS user I want to catch any software exception and handle it according to my application needs.

ZEP-SRS-19-28
4. 32-bit and 64-bit architectures UID: ZEP-SRS-19-28 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall support processor architectures with 32-bit and with 64-bit native word sizes.

5. User Mode Support

ZEP-SRS-19-4
5.1. Entering user mode UID: ZEP-SRS-19-4 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where user mode is supported, the Zephyr RTOS shall provide an interface to transition the executing thread from supervisor mode to user mode.

USER_STORY:

As a Zephyr RTOS user I want the kernel to execute code at the appropriate processor privilege level (for example supervisor and user mode) so that privileged and unprivileged execution are kept separate.

ZEP-SRS-19-13
5.2. Execution mode query UID: ZEP-SRS-19-13 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where user mode is supported, the Zephyr RTOS shall provide an interface to query whether the current execution context is running in user mode.

ZEP-SRS-19-14
5.3. System call invocation UID: ZEP-SRS-19-14 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where user mode is supported, the Zephyr RTOS shall provide an interface for user mode code to invoke system calls that execute in supervisor mode.

6. Cache Management

ZEP-SRS-19-5
6.1. Data cache flush UID: ZEP-SRS-19-5 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to flush the data cache, over the entire cache or a specified address range.

ZEP-SRS-19-15
6.2. Data cache invalidation UID: ZEP-SRS-19-15 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to invalidate the data cache, over the entire cache or a specified address range.

ZEP-SRS-19-16
6.3. Combined data cache flush and invalidation UID: ZEP-SRS-19-16 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to flush and invalidate the data cache in a single operation, over the entire cache or a specified address range.

ZEP-SRS-19-6
6.4. Instruction cache flush UID: ZEP-SRS-19-6 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to flush the instruction cache, over the entire cache or a specified address range.

ZEP-SRS-19-17
6.5. Instruction cache invalidation UID: ZEP-SRS-19-17 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to invalidate the instruction cache, over the entire cache or a specified address range.

ZEP-SRS-19-18
6.6. Combined instruction cache flush and invalidation UID: ZEP-SRS-19-18 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to flush and invalidate the instruction cache in a single operation, over the entire cache or a specified address range.

ZEP-SRS-19-7
6.7. Enabling the data cache UID: ZEP-SRS-19-7 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to enable the data cache.

ZEP-SRS-19-21
6.8. Disabling the data cache UID: ZEP-SRS-19-21 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to disable the data cache.

ZEP-SRS-19-19
6.9. Enabling the instruction cache UID: ZEP-SRS-19-19 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to enable the instruction cache.

ZEP-SRS-19-22
6.10. Disabling the instruction cache UID: ZEP-SRS-19-22 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to disable the instruction cache.

ZEP-SRS-19-8
6.11. Data cache line size query UID: ZEP-SRS-19-8 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a data cache is present, the Zephyr RTOS shall provide an interface to obtain the data cache line size.

ZEP-SRS-19-20
6.12. Instruction cache line size query UID: ZEP-SRS-19-20 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where an instruction cache is present, the Zephyr RTOS shall provide an interface to obtain the instruction cache line size.

ZEP-SRS-19-9
6.13. Memory coherence reporting UID: ZEP-SRS-19-9 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where the architecture can determine memory coherence, the Zephyr RTOS shall provide an interface to report whether the memory at a given address is coherent with respect to the data cache.

7. Memory Barriers

ZEP-SRS-19-25
7.1. Full data memory barrier UID: ZEP-SRS-19-25 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism to enforce sequentially consistent ordering of memory accesses around a point in the program (a full data memory barrier).

ZEP-SRS-19-26
7.2. Data synchronization barrier UID: ZEP-SRS-19-26 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism to ensure that all outstanding memory accesses complete before subsequent instructions execute (a data synchronization barrier).

ZEP-SRS-19-27
7.3. Cross-core synchronization barrier UID: ZEP-SRS-19-27 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

The Zephyr RTOS shall provide a mechanism to synchronize memory accesses across all cores (a system-wide synchronization barrier).

8. Diagnostics and Debug

ZEP-SRS-19-10
8.1. Call stack unwinding UID: ZEP-SRS-19-10 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where stack unwinding is supported, the Zephyr RTOS shall provide an interface to walk the call stack of a thread and report each stack frame to a caller-supplied function.

ZEP-SRS-19-11
8.2. Core dump processor state capture UID: ZEP-SRS-19-11 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where core dump support is enabled, the Zephyr RTOS shall provide an interface to capture architecture-specific processor state for inclusion in a core dump.

ZEP-SRS-19-12
8.3. Debugger access to processor registers UID: ZEP-SRS-19-12 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a debug stub is enabled, the Zephyr RTOS shall provide an interface for an external debugger to read and write the processor registers.

ZEP-SRS-19-23
8.4. Debugger breakpoint control UID: ZEP-SRS-19-23 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a debug stub is enabled, the Zephyr RTOS shall provide an interface for an external debugger to set and remove breakpoints.

ZEP-SRS-19-24
8.5. Debugger single-step execution UID: ZEP-SRS-19-24 STATUS: Draft TYPE: Functional COMPONENT: Hardware Architecture Interface RELATIONS (Parent): STATEMENT:

Where a debug stub is enabled, the Zephyr RTOS shall provide an interface for an external debugger to single-step execution.