summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2024-03-23 14:53:22 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-23 13:06:02 +0100
commit1adea9ccce9e07037506d069a73f048b50c40561 (patch)
treeb52eb77328f6e00447c017e8d08ea5bc2bef8bc8 /boot
parente652799da09e4bade166476ad4cee13e49722ec9 (diff)
boot: Add support for AArch64
Message-ID: <20240323115322.69075-10-bugaevc@gmail.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/userland-boot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/boot/userland-boot.c b/boot/userland-boot.c
index f407f0a6..496628eb 100644
--- a/boot/userland-boot.c
+++ b/boot/userland-boot.c
@@ -334,6 +334,17 @@ boot_script_exec_cmd (void *hook,
thread_set_state (thread, ALPHA_THREAD_STATE,
(thread_state_t) &regs, reg_size);
}
+#elif defined (AARCH64_THREAD_STATE_COUNT)
+ {
+ struct aarch64_thread_state regs;
+ reg_size = AARCH64_THREAD_STATE_COUNT;
+ thread_get_state (thread, AARCH64_THREAD_STATE,
+ (thread_state_t) &regs, &reg_size);
+ regs.sp = (long) arg_pos;
+ regs.pc = (long) startpc;
+ thread_set_state (thread, AARCH64_THREAD_STATE,
+ (thread_state_t) &regs, reg_size);
+ }
#else
# error needs to be ported
#endif