Advertisement
Guest User

Untitled

a guest
Mar 20th, 2023
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.50 KB | None | 0 0
  1. // The function waits until core_start_ptr is non-null and then jumps to it.
  2. // [[noreturn]] void aux_core_wait();
  3. .global aux_core_wait
  4. aux_core_wait:
  5.     // load core_start_ptr until non-null
  6.     // use atomic load
  7.     adrp x5, core_start_ptr
  8.     add x5, x5, :lo12:core_start_ptr
  9. aux_core_wait_loop:
  10.     ldar x4, [x5] // load core_start_ptr with acquire ordering
  11.     cbnz x4, aux_core_wait_done
  12.     wfe
  13.     b aux_core_wait
  14. aux_core_wait_done:
  15.     clrex
  16.     // jump to core_start_ptr
  17.     br x4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement