Zephyr Project Requirements
Hardware Architecture Interface

Hardware Architecture Interface

UID:
VERSION:
CLASSIFICATION:
PREFIX:
ZEP-SRS-19-
Type
Level
UID
STATUS
TYPE
COMPONENT
REFS
Title
Statement
USER_STORY
TEXT

SPDX-License-Identifier: Apache-2.0

REQUIREMENT
1
ZEP-SRS-19-1
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-1
Atomic Operations

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

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

REQUIREMENT
2
ZEP-SRS-19-2
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-2
Thread Context Switching

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

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.

REQUIREMENT
3
ZEP-SRS-19-3
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-3
Software Exceptions

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

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

REQUIREMENT
4
ZEP-SRS-19-28
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-28
32-bit and 64-bit architectures

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

SECTION
5
User Mode Support
REQUIREMENT
5.1
ZEP-SRS-19-4
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-4
Entering user mode

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

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.

REQUIREMENT
5.2
ZEP-SRS-19-13
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-13
Execution mode query

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

REQUIREMENT
5.3
ZEP-SRS-19-14
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-14
System call invocation

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.

SECTION
6
Cache Management
REQUIREMENT
6.1
ZEP-SRS-19-5
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-5
Data cache flush

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.

REQUIREMENT
6.2
ZEP-SRS-19-15
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-15
Data cache invalidation

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.

REQUIREMENT
6.3
ZEP-SRS-19-16
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-16
Combined data cache flush and invalidation

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.

REQUIREMENT
6.4
ZEP-SRS-19-6
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-6
Instruction cache flush

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.

REQUIREMENT
6.5
ZEP-SRS-19-17
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-17
Instruction cache invalidation

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.

REQUIREMENT
6.6
ZEP-SRS-19-18
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-18
Combined instruction cache flush and invalidation

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.

REQUIREMENT
6.7
ZEP-SRS-19-7
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-7
Enabling the data cache

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

REQUIREMENT
6.8
ZEP-SRS-19-21
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-21
Disabling the data cache

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

REQUIREMENT
6.9
ZEP-SRS-19-19
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-19
Enabling the instruction cache

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

REQUIREMENT
6.10
ZEP-SRS-19-22
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-22
Disabling the instruction cache

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

REQUIREMENT
6.11
ZEP-SRS-19-8
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-8
Data cache line size query

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

REQUIREMENT
6.12
ZEP-SRS-19-20
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-20
Instruction cache line size query

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

REQUIREMENT
6.13
ZEP-SRS-19-9
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-9
Memory coherence reporting

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.

SECTION
7
Memory Barriers
REQUIREMENT
7.1
ZEP-SRS-19-25
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-25
Full data memory barrier

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).

REQUIREMENT
7.2
ZEP-SRS-19-26
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-26
Data synchronization barrier

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

REQUIREMENT
7.3
ZEP-SRS-19-27
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-27
Cross-core synchronization barrier

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

SECTION
8
Diagnostics and Debug
REQUIREMENT
8.1
ZEP-SRS-19-10
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-10
Call stack unwinding

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.

REQUIREMENT
8.2
ZEP-SRS-19-11
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-11
Core dump processor state capture

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.

REQUIREMENT
8.3
ZEP-SRS-19-12
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-12
Debugger access to processor registers

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

REQUIREMENT
8.4
ZEP-SRS-19-23
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-23
Debugger breakpoint control

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

REQUIREMENT
8.5
ZEP-SRS-19-24
Draft
Functional
Hardware Architecture Interface
ZEP-SRS-19-24
Debugger single-step execution

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