Skip to content
Snippets Groups Projects
Commit a16f535e authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'aarch64-fixups' into 'master'

aarch64: TLS arch_read implementation

See merge request !330
parents f9edc108 886f467a
No related branches found
No related tags found
No related merge requests found
...@@ -208,8 +208,20 @@ impl Tcb { ...@@ -208,8 +208,20 @@ impl Tcb {
#[inline(always)] #[inline(always)]
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
unsafe fn arch_read(offset: usize) -> usize { unsafe fn arch_read(offset: usize) -> usize {
//TODO: aarch64 let mut value = 0usize;
unimplemented!("arch_read not implemented on aarch64"); let mut tmp = 0usize;
llvm_asm!("
mrs $0, tpidr_el0
add $0, $0, $2
ldr $1, [$0]
"
: "=r"(tmp), "=r"(value)
: "r"(offset)
:
: "volatile"
);
value
} }
/// Architecture specific code to read a usize from the TCB - x86_64 /// Architecture specific code to read a usize from the TCB - x86_64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment