Skip to content
Snippets Groups Projects
  1. Jul 04, 2021
    • rahix's avatar
      feat(lifecycle): Allow core 1 to disable interrupts during API calls · 7fb48178
      rahix authored
      When interrupts are disabled during API calls on core 1, we can only
      trigger a core 1 reset when there is no API call ongoing.  This means
      that the lifecycle machinery needs to allow any running API calls to
      complete before it has a chance to see its reset interrupt delivered.
      
      This is complicated because we cannot synchronize on core 1 triggering
      an API call - the best we can do is stop the dispatcher, check whether
      our reset interrupt was delivered, and if not, give it another chance to
      process an API call.
      
      Additionally, "give it another chance to process an API call" means that
      the IDLE task must run, because this is currently a prerequisite to
      scheduling the dispatcher (see [1]).  The only way to facilitate this is
      with a sleep that is long enough that it will eventually let core 0 go
      idle.  It seems that an 8 tick delay does the job quite fine.
      
      Thus, implement a busy loop which provides the above requirements and
      with that makes Epicardium prepared for payloads which perform API calls
      with interrupts disabled.
      
      [1]: https://firmware.card10.badge.events.ccc.de/epicardium/overview.html#internals
      7fb48178
    • rahix's avatar
      chore(core1-control): Split out core1_is_ready() · f26b9987
      rahix authored
      This function is useful on its own for more complex lifecycle management
      in Epicardium.  Split it out of core1_wait_ready() so it can be used.
      f26b9987
  2. Apr 11, 2021
  3. Apr 09, 2021
  4. Apr 08, 2021
  5. Apr 07, 2021
  6. Apr 04, 2021
  7. Apr 03, 2021
  8. Apr 02, 2021
Loading