Skip to content

Instantly share code, notes, and snippets.

@neobrain
Forked from TuxSH/svcBindInterrupt_body.c
Created November 16, 2016 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neobrain/cac0c1dd5ad845953cdc064f63738114 to your computer and use it in GitHub Desktop.
Save neobrain/cac0c1dd5ad845953cdc064f63738114 to your computer and use it in GitHub Desktop.
if ( !levelHighActive_ )
{
LABEL_10:
if ( interruptID == 15 )
{
if ( sub_FFF0D1F8(&stru_FFF2E0A0.threadPairsPerPriority[3].last, 0, 1) )
{
res = 0xD8A007F0;
}
// PrivateInterruptEvent 00000010 Auto struct {InterruptEvent interruptEvent;KEvent *event;bool isLevelHighActive;bool otherFlag;}
else
{
fiqEvent.event = event;
fiqEvent.isLevelHighActive = levelHighActive_;
fiqEvent.otherFlag = 0;
KAutoObject::IncrementReferenceCount_0(&event->syncObject.autoObject);
event->interruptNumber = 15;
res = InterruptManager::mapInterrupt(
(InterruptManager *)&InterruptManagerStruct,
&fiqEvent.interruptEvent, // aka fiqEvent + 0, I'm using the "super" notation here
0xFu,
coreID,
priority,
0,
0);
if ( (res & 0x80000000 & 0x80000000) == 0 )
{
vFFFC6104 &= 0xFDu;
}
else
{
event->interruptNumber = -1;
event->syncObject.autoObject.vtable->DecrementReferenceCount((struct KAutoObject *)event);
fiqEvent.event = 0;
sub_FFF0D260((unsigned __int8 *)&stru_FFF2E0A0.threadPairsPerPriority[3].last, 0);
}
}
}
else
{
res = KProcess::mapPublicInterrupt(&currentKProcess, event, interruptID, coreID, priority, levelHighActive_);
}
goto LABEL_17;
}
res = 0xD8E007EE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment