Remove invisible walls [jawa]
#3
@Seeky Just to make sure I understand your post, does "Context Switch" refer to an external interrupt (of any sort) occurring on one of the first two instructions of his manual disable interrupts code? When I see Context Switch, I personally keep thinking of Context Synchronization (isync), lol.

Also, are you saying he should function call OSDisableInterrupts or any such task? Or are you saying to function call OSSave/Load Context which itself later on calls OSDisable/Restore Interrupts ?

Because if it's the former, then yes that would make sense. He would either need to call OSDisableInterrupts, or just execute the exact function manually (so r3 and r4 are used/filled accordingly if a external interrupt does indeed happen during this time).

At the end of his code, the method in which he restores interrupts shouldn't matter as long as he grabs the latest MSR and re-inserts the original MSR EE bit since interrupts are disabled at this moment in time. In essence, the Restore Interrupts function is "silly" for its need to check r3 (old EE bit) and branch. A simple bit re-insertion should work.

I just woke up, so apologies if I'm missing something obvious. Regardless, I share your same final thought, I'm not sure why Interrupts are being disabled at all?

---

@Jawa Nice work on learning some of the more advanced stuff on PPC Assembly. Was there a weird issues occurring in your code before you added in the Interrupt stuff?
Reply


Messages In This Thread
Remove invisible walls [jawa] - by jawa - 11-19-2022, 07:37 PM
RE: Remove invisible walls [jawa] - by Seeky - 11-20-2022, 01:07 PM
RE: Remove invisible walls [jawa] - by jawa - 11-21-2022, 02:53 PM
RE: Remove invisible walls [jawa] - by Vega - 11-20-2022, 02:25 PM
RE: Remove invisible walls [jawa] - by Seeky - 11-20-2022, 08:00 PM
RE: Remove invisible walls [jawa] - by Vega - 11-21-2022, 02:17 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)