// === CODE ===
void SyscallHandler(tSyscallRegs *Regs)
{
- Uint ret=0, err=0;
+ Uint64 ret = 0;
+ Uint err = 0;
#if DEBUG
ENTER("iThread iNum", gCurrentThread->TID, Regs->Num);
if(Regs->Num < NUM_SYSCALLS)
ret = -1;
break;
+ case SYS_GETPHYS:
+ ret = MM_GetPhysAddr(Regs->Arg1);
+ break;
// -- Map an address
case SYS_MAP: MM_Map(Regs->Arg1, Regs->Arg2); break;
// -- Allocate an address
ret = -1;
break;
}
+ #if BITS < 64
+ Regs->Return = ret&0xFFFFFFFF;
+ Regs->RetHi = ret >> 32;
+ #else
Regs->Return = ret;
+ #endif
Regs->Error = err;
#if DEBUG
LOG("SyscallHandler: err = %i", err);