<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>jabara Wiki  - Recent changes [en]</title>
		<link>https://wiki.zelda.sr/wiki/Special:RecentChanges</link>
		<description>Track the most recent changes to the wiki in this feed.</description>
		<language>en</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Wed, 22 Jul 2026 02:20:56 GMT</lastBuildDate>
		<item>
			<title>Design</title>
			<link>https://wiki.zelda.sr/index.php?title=Design&amp;diff=40&amp;oldid=39</link>
			<guid isPermaLink="false">https://wiki.zelda.sr/index.php?title=Design&amp;diff=40&amp;oldid=39</guid>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;CPU: &lt;/span&gt; Fix minor mistakes and inconsistencies&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:45, 13 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Tegra X1 contains four [[wikipedia:ARM_Cortex-A57|ARM Cortex-A57]] cores used by the NX, as well as four unused [[wikipedia:ARM_Cortex-A53|ARM Cortex-A53]] cores. The Cortex-A57 implements the [[wikipedia:ARM_architecture_family#Armv8-A|Armv8-A]] instruction set architecture (ISA). Only its 64-bit mode (&amp;#039;&amp;#039;&amp;#039;AArch64&amp;#039;&amp;#039;&amp;#039;) is used by HOS, so the target of jabara&amp;#039;s CPU emulation is to emulate an AArch64 core. The instruction set used by AArch64 is known as &amp;#039;&amp;#039;&amp;#039;A64&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Tegra X1 contains four [[wikipedia:ARM_Cortex-A57|ARM Cortex-A57]] cores used by the NX, as well as four unused [[wikipedia:ARM_Cortex-A53|ARM Cortex-A53]] cores. The Cortex-A57 implements the [[wikipedia:ARM_architecture_family#Armv8-A|Armv8-A]] instruction set architecture (ISA). Only its 64-bit mode (&amp;#039;&amp;#039;&amp;#039;AArch64&amp;#039;&amp;#039;&amp;#039;) is used by HOS, so the target of jabara&amp;#039;s CPU emulation is to emulate an AArch64 core. The instruction set used by AArch64 is known as &amp;#039;&amp;#039;&amp;#039;A64&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Naively, the [[wikipedia:Instruction_cycle|instruction cycle]] may be emulated to interpret A64 code on a per-instruction basis. While providing the most accurate CPU emulation, interpretation does, however, also carry drastic overhead in its slow and repetitive nature. jabara instead emulates A64 using [[wikipedia:Binary_translation#Dynamic_binary_translation|dynamic binary translation]] (DBT), in which [[wikipedia:Basic_block|basic blocks]] of A64 code are collectively translated to the ISA of the emulator (&quot;host&quot;) machine, providing performance often better than that of the NX within basic blocks. Existing NX emulators commonly accomplish this using the [https://github.com/lioncash/dynarmic dynarmic] [[wikipedia:Dynamic_recompilation|dynamic recompiler]]. However, due to the difficulty of using [https://isocpp.org C++] libraries in Rust codebases, as well as the aforementioned issues present in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;the buildsystem of yuzu that stem partially from that of dynarmic, the [http://github.com/unicorn-engine/unicorn Unicorn] CPU emulator framework, which provides [https://github.com/unicorn-engine/unicorn/tree/master/bindings/rust/unicorn-engine Rust bindings] for its underlying [https://www.c-language.org C] implementation, was chosen for jabara. Unicorn emulates various architectures, including AArch64, using [[wikipedia:Just-in-time_compilation|just-in-time compilation]] (JIT), a DBT technique also used by dynarmic that makes Unicorn a sufficiently performant framework for Tegra X1 emulation. It is based on [https://www.qemu.org QEMU], a widely-used generic machine emulator framework that achieves near-native performance in many scenarios.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Naively, the [[wikipedia:Instruction_cycle|instruction cycle]] may be emulated to interpret A64 code on a per-instruction basis. While providing the most accurate CPU emulation, interpretation does, however, also carry drastic overhead in its slow and repetitive nature. jabara instead emulates A64 using [[wikipedia:Binary_translation#Dynamic_binary_translation|dynamic binary translation]] (DBT), in which [[wikipedia:Basic_block|basic blocks]] of A64 code are collectively translated to the ISA of the emulator (&quot;host&quot;) machine, providing performance often better than that of the NX within basic blocks. Existing NX emulators commonly accomplish this using the [https://github.com/lioncash/dynarmic dynarmic] [[wikipedia:Dynamic_recompilation|dynamic recompiler]]. However, due to the difficulty of using [https://isocpp.org C++] libraries in Rust codebases, as well as the aforementioned issues present in the buildsystem of yuzu that stem partially from that of dynarmic, the [http://github.com/unicorn-engine/unicorn Unicorn] CPU emulator framework, which provides [https://github.com/unicorn-engine/unicorn/tree/master/bindings/rust/unicorn-engine Rust bindings] for its underlying [https://www.c-language.org C] implementation, was chosen for jabara. Unicorn emulates various architectures, including AArch64, using [[wikipedia:Just-in-time_compilation|just-in-time compilation]] (JIT), a DBT technique also used by dynarmic that makes Unicorn a sufficiently performant framework for Tegra X1 emulation. It is based on [https://www.qemu.org QEMU], a widely-used generic machine emulator framework that achieves near-native performance in many scenarios.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AArch64 implements privilege as [https://developer.arm.com/documentation/102412/0103/Privilege-and-Exception-levels/Exception-levels Exception &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;levels&lt;/del&gt;] (ELs) numbered &amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;. In this exception model, exceptions may only be raised to an EL identical to that of the caller, and may only be returned from to an EL lower than that of the callee. The NX mostly follows the typical AArch64 EL software model in which userland code runs at &amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt;, the OS at &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;, the hypervisor at &amp;lt;code&amp;gt;EL2&amp;lt;/code&amp;gt;, and the [https://developer.arm.com/documentation/100935/0100/Switching-betwen-the-Normal-and-Secure-worlds- Secure Monitor] at &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;, though the NX lacks a hypervisor, so exceptions raised by &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; are taken directly to &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;. Because jabara emulates HOS itself, its implementation of HOS functionality can be thought of as &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; code—however, as this code is entirely invisible to the guest system, it is not actually running at any EL. Exceptions raised to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; must hence be handled by jabara, and higher ELs—of which only &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt; is used by the NX—can be ignored.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;AArch64 implements privilege as [https://developer.arm.com/documentation/102412/0103/Privilege-and-Exception-levels/Exception-levels Exception &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Levels&lt;/ins&gt;] (ELs) numbered &amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;. In this exception model, exceptions may only be raised to an EL identical to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or higher than &lt;/ins&gt;that of the caller, and may only be returned from to an EL lower than that of the callee. The NX mostly follows the typical AArch64 EL software model in which userland code runs at &amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt;, the OS at &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;, the hypervisor at &amp;lt;code&amp;gt;EL2&amp;lt;/code&amp;gt;, and the [https://developer.arm.com/documentation/100935/0100/Switching-betwen-the-Normal-and-Secure-worlds- Secure Monitor] at &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;, though the NX lacks a hypervisor, so exceptions raised by &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; are taken directly to &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt;. Because jabara emulates HOS itself, its implementation of HOS functionality can be thought of as &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; code—however, as this code is entirely invisible to the guest system, it is not actually running at any EL. Exceptions raised to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; must hence be handled by jabara, and higher ELs—of which only &amp;lt;code&amp;gt;EL3&amp;lt;/code&amp;gt; is used by the NX—can be ignored.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In AArch64, SVCs are implemented as exceptions raised to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; by the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111182/2025-09_ASL1/Base-Instructions/SVC--Supervisor-call-?lang=en SVC]&amp;lt;/code&amp;gt; (&quot;supervisor call&quot;) A64 instruction. As raising execution to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; is required for userland (&amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt;) applications to call kernel (&amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;) functionality, SVCs are used for all userland calls to kernel code, and hence must be implemented in jabara in order to run userland NX applications. The Rust bindings for Unicorn expose &amp;lt;code&amp;gt;[https://docs.rs/unicorn-engine/latest/unicorn_engine/struct.Unicorn.html#method.add_intr_hook Unicorn&amp;lt;&#039;a, D&amp;gt;::add_intr_hook]&amp;lt;/code&amp;gt;, which hooks guest interrupts and exceptions, passing a &amp;lt;code&amp;gt;u32&amp;lt;/code&amp;gt; interrupt code to the hook function. The interrupt codes are defined in &amp;lt;code&amp;gt;[https://git.zelda.sr/jabara/unicorn/src/commit/3811fdcb861dc7686dde0ec0a7624bb92e277647/qemu/target/arm/cpu.h#L32-L52 qemu/target/arm/cpu.h]&amp;lt;/code&amp;gt;, with &amp;lt;code&amp;gt;EXCP_SWI&amp;lt;/code&amp;gt; (&#039;&#039;&#039;s&#039;&#039;&#039;oft&#039;&#039;&#039;w&#039;&#039;&#039;are &#039;&#039;&#039;i&#039;&#039;&#039;nterrupt) being the code used for guest exceptions. If a caught interrupt is a software interrupt, the details of the exception raised are available via the Exception Syndrome Register for the current &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exception level&lt;/del&gt;; for &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exceptions, this is &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;, so the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en ESR_EL1]&amp;lt;/code&amp;gt; (Exception Syndrome Register (EL1)) register must be read. &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exceptions can be identified by an &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-31_26 EC]&amp;lt;/code&amp;gt; (Exception Class) value of &amp;lt;code&amp;gt;0b010101&amp;lt;/code&amp;gt; (&quot;&amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; instruction execution in AArch64 state&quot;), located at bits &amp;lt;code&amp;gt;26&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;31&amp;lt;/code&amp;gt;, and an &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-25_25 IL]&amp;lt;/code&amp;gt; (Instruction Length) value of &amp;lt;code&amp;gt;0b1&amp;lt;/code&amp;gt; (&quot;32-bit instruction trapped&quot;), located at bit &amp;lt;code&amp;gt;25&amp;lt;/code&amp;gt;. The immediate argument, &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111182/2025-09_ASL1/Base-Instructions/SVC--Supervisor-call-?lang=en#imm imm16]&amp;lt;/code&amp;gt;, of a caught &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exception is encoded in the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-24_0_11 ISS]&amp;lt;/code&amp;gt; (Instruction Specific Syndrome) field, located at bits &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;imm16&amp;lt;/code&amp;gt; is then used to uniquely identify the called SVC, allowing the correct SVC implementation in jabara to be called. Exception Syndrome Registers are not exposed by Unicorn&#039;s AArch64 API, so Unicorn was forked to [https://git.zelda.sr/jabara/unicorn jabara/unicorn] to add this functionality, exposing an &amp;lt;code&amp;gt;ESR&amp;lt;/code&amp;gt; read-only pseudoregister that accesses the Exception Syndrome Register for the current &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exception level&lt;/del&gt;, always &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; in jabara. This allows SVCs to be implemented per immediate (&amp;lt;code&amp;gt;imm16&amp;lt;/code&amp;gt;) in native Rust code, callable by the guest machine with the &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; instruction.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In AArch64, SVCs are implemented as exceptions raised to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; by the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111182/2025-09_ASL1/Base-Instructions/SVC--Supervisor-call-?lang=en SVC]&amp;lt;/code&amp;gt; (&quot;supervisor call&quot;) A64 instruction. As raising execution to &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; is required for userland (&amp;lt;code&amp;gt;EL0&amp;lt;/code&amp;gt;) applications to call kernel (&amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;) functionality, SVCs are used for all userland calls to kernel code, and hence must be implemented in jabara in order to run userland NX applications. The Rust bindings for Unicorn expose &amp;lt;code&amp;gt;[https://docs.rs/unicorn-engine/latest/unicorn_engine/struct.Unicorn.html#method.add_intr_hook Unicorn&amp;lt;&#039;a, D&amp;gt;::add_intr_hook]&amp;lt;/code&amp;gt;, which hooks guest interrupts and exceptions, passing a &amp;lt;code&amp;gt;u32&amp;lt;/code&amp;gt; interrupt code to the hook function. The interrupt codes are defined in &amp;lt;code&amp;gt;[https://git.zelda.sr/jabara/unicorn/src/commit/3811fdcb861dc7686dde0ec0a7624bb92e277647/qemu/target/arm/cpu.h#L32-L52 qemu/target/arm/cpu.h]&amp;lt;/code&amp;gt;, with &amp;lt;code&amp;gt;EXCP_SWI&amp;lt;/code&amp;gt; (&#039;&#039;&#039;s&#039;&#039;&#039;oft&#039;&#039;&#039;w&#039;&#039;&#039;are &#039;&#039;&#039;i&#039;&#039;&#039;nterrupt) being the code used for guest exceptions. If a caught interrupt is a software interrupt, the details of the exception raised are available via the Exception Syndrome Register for the current &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;EL&lt;/ins&gt;; for &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exceptions, this is &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt;, so the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en ESR_EL1]&amp;lt;/code&amp;gt; (Exception Syndrome Register (EL1)) register must be read. &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exceptions can be identified by an &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-31_26 EC]&amp;lt;/code&amp;gt; (Exception Class) value of &amp;lt;code&amp;gt;0b010101&amp;lt;/code&amp;gt; (&quot;&amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; instruction execution in AArch64 state&quot;), located at bits &amp;lt;code&amp;gt;26&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;31&amp;lt;/code&amp;gt;, and an &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-25_25 IL]&amp;lt;/code&amp;gt; (Instruction Length) value of &amp;lt;code&amp;gt;0b1&amp;lt;/code&amp;gt; (&quot;32-bit instruction trapped&quot;), located at bit &amp;lt;code&amp;gt;25&amp;lt;/code&amp;gt;. The immediate argument, &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111182/2025-09_ASL1/Base-Instructions/SVC--Supervisor-call-?lang=en#imm imm16]&amp;lt;/code&amp;gt;, of a caught &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; exception is encoded in the &amp;lt;code&amp;gt;[https://developer.arm.com/documentation/111180/2025-09_ASL1/AArch64-Registers/ESR-EL1--Exception-Syndrome-Register--EL1-?lang=en#fieldset_0-24_0_11 ISS]&amp;lt;/code&amp;gt; (Instruction Specific Syndrome) field, located at bits &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;imm16&amp;lt;/code&amp;gt; is then used to uniquely identify the called SVC, allowing the correct SVC implementation in jabara to be called. Exception Syndrome Registers are not exposed by Unicorn&#039;s AArch64 API, so Unicorn was forked to [https://git.zelda.sr/jabara/unicorn jabara/unicorn] to add this functionality, exposing an &amp;lt;code&amp;gt;ESR&amp;lt;/code&amp;gt; read-only pseudoregister that accesses the Exception Syndrome Register for the current &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;EL&lt;/ins&gt;, always &amp;lt;code&amp;gt;EL1&amp;lt;/code&amp;gt; in jabara. This allows SVCs to be implemented per immediate (&amp;lt;code&amp;gt;imm16&amp;lt;/code&amp;gt;) in native Rust code, callable by the guest machine with the &amp;lt;code&amp;gt;SVC&amp;lt;/code&amp;gt; instruction.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Notes ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Notes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key jabara_wiki:diff:1.41:old-39:rev-40:php=table --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 13 Jul 2026 11:45:24 GMT</pubDate>
			<dc:creator>Mako</dc:creator>
			<comments>https://wiki.zelda.sr/wiki/Talk:Design</comments>
		</item>
</channel></rss>