SVC

Supervisor Call causes a Supervisor Call exception. For more information, see Supervisor Call (SVC) exception.


Note

SVC was previously called SWI, Software Interrupt, and this name is still found in some documentation.


Software can use this instruction as a call to an operating system to provide a service.

In the following cases, the Supervisor Call exception generated by the SVC instruction is taken to Hyp mode:

In these cases, the HSR, Hyp Syndrome Register identifies that the exception entry was caused by a Supervisor Call exception, EC value 0x11, see Use of the HSR. The immediate field in the HSR:

It has encodings from the following instruction sets: A32 ( A1 ) and T32 ( T1 ) .

A1

313029282726252423222120191817161514131211109876543210
!= 11111111imm24
cond

A1

SVC{<c>}{<q>} {#}<imm>

constant imm32 = ZeroExtend(imm24, 32);

T1

1514131211109876543210
11011111imm8

T1

SVC{<c>}{<q>} {#}<imm>

constant imm32 = ZeroExtend(imm8, 32);

Assembler Symbols

<c>

See Standard assembler syntax fields.

<q>

See Standard assembler syntax fields.

<imm>

For encoding A1: is a 24-bit unsigned immediate, in the range 0 to 16777215, encoded in the "imm24" field. This value is for assembly and disassembly only. SVC handlers in some systems interpret imm24 in software, for example to determine the required service.

For encoding T1: is a 8-bit unsigned immediate, in the range 0 to 255, encoded in the "imm8" field. This value is for assembly and disassembly only. SVC handlers in some systems interpret imm8 in software, for example to determine the required service.

Operation

if ConditionPassed() then EncodingSpecificOperations(); AArch32.CheckForSVCTrap(imm32<15:0>); AArch32.CallSupervisor(imm32<15:0>);


Internal version only: isa v01_31, pseudocode v2024-03_rel ; Build timestamp: 2024-03-25T10:05

Copyright © 2010-2024 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.