Document Revision History - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

7–20
Linux Conventions
System Calls
The Linux system call interface relies on the trap instruction with immediate
argument zero. The system call number is passed in register r2. The arguments are
passed in r4, r5, r6, r7, r8, and r9 as necessary. The return value is written in r2 on
success, or a positive error number is written to r2 on failure. A flag indicating
successful completion, to distinguish error values from valid results, is written to r7; 0
indicates syscall success and 1 indicates r2 contains a positive errno value.
Userspace Breakpoints
Userspace breakpoints are accomplished using the trap instruction with immediate
operand 31 (all ones). The OS must distinguish this instruction from a trap 0 system
call and generate a trap signal.
Atomic Operations
The Nios II architecture does not have atomic operations (such as load linked and
store conditional). Atomic operations are emulated using a kernel system call via the
trap instruction. The toolchain provides intrinsic functions which perform the system
call. Applications must use those functions rather than the system call directly.
Atomic operations may be added in a future processor extension.
Processor Requirements
Linux requires that a hardware multiplier be present. The full 64-bit multiplier (mulx
instructions) is not required.
Development Environment
The following symbols are defined:
__nios2
__nios2__
__NIOS2
__NIOS2__

Document Revision History

Table 7–9. Document Revision History (Part 1 of 2)
Date
Version
February 2014
13.1.0
May 2011
11.0.0
December 2010
10.1.0
Nios II Processor Reference Handbook
Removed references to SOPC Builder.
Maintenance release.
Added Linux ABI section.
Chapter 7: Application Binary Interface
Document Revision History
Changes
February 2014 Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents