Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5055

Bare metal, Assembly language • Re: rpi4 os: context switch breaks irq

$
0
0
I dont really understand what you mean by the first question, but right before the context switch I call:
you dont want irq's enabled during the context switch

the context switch is a very sensitive operation, and interrupting it can cause things to malfunction in all kinds of ways

you need to save the current irq state, and disable irq's
then do the context switch
then RESTORE the irq state to its previous value (not enable them)

ive broken some of my own kernels, because i just unconditionally enabled the irq after a block of code, when it should have stayed disabled

Statistics: Posted by cleverca22 — Fri Oct 18, 2024 11:33 pm



Viewing all articles
Browse latest Browse all 5055

Trending Articles