github.com/racerxdl/gonx@v0.0.0-20210103083128-c5afc43bcbd2/admin/svc.go (about)

     1  package admin
     2  
     3  // SvcDumpInfo Causes the kernel to dump debug information.
     4  //
     5  // This is a privileged syscall.
     6  // Only on firmware 1.0.0 to 3.0.2
     7  // svc 0x3C
     8  //export svcDumpInfo
     9  func SvcDumpInfo(dumpInfoType uint32, arg0 uint64)
    10  
    11  // SvcKernelDebug Performs a debugging operation on the kernel.
    12  //
    13  // This is a privileged syscall.
    14  // Only on firmware 4.0.0+
    15  // svc 0x3C
    16  //export svcKernelDebug
    17  func SvcKernelDebug(kernelDebugType uint32, arg0, arg1, arg2 uint64)
    18  
    19  // SvcChangeKernelTraceState Performs a debugging operation on the kernel
    20  //
    21  // This is a privileged syscall.
    22  // Only on firmware 4.0.0+
    23  // svc 0x3D
    24  //export svcChangeKernelTraceState
    25  func SvcChangeKernelTraceState(kernelTraceState uint32)
    26  
    27  // SvcCreateSession Creates an IPC session.
    28  //
    29  // This is a privileged syscall.
    30  // svc 0x40
    31  //export svcCreateSession
    32  func SvcCreateSession(serverHandle, clientHandle *uint32, unk0 uint32, unk1 uint64) uint64
    33  
    34  // SvcAcceptSession Accepts an IPC session.
    35  //
    36  // This is a privileged syscall.
    37  // svc 0x41
    38  //export svcAcceptSession
    39  func SvcAcceptSession(serverHandle *uint32, portHandle uint32) uint64
    40  
    41  // SvcReplyAndReceiveLight Performs light IPC input/output.
    42  //
    43  // This is a privileged syscall.
    44  // svc 0x42
    45  //export svcReplyAndReceiveLight
    46  func SvcReplyAndReceiveLight(handle uint32) uint64
    47  
    48  // SvcReplyAndReceive Performs light IPC input/output.
    49  //
    50  // This is a privileged syscall.
    51  // svc 0x43
    52  //export svcReplyAndReceive
    53  func SvcReplyAndReceive(index *int32, handles *uint32, handleCount uint32, replyTarget uint32, timeout uint64) uint64
    54  
    55  // SvcReplyAndReceiveWithUserBuffer Performs IPC input/output from an user allocated buffer
    56  //
    57  // This is a privileged syscall.
    58  // svc 0x44
    59  //export svcReplyAndReceiveWithUserBuffer
    60  func SvcReplyAndReceiveWithUserBuffer(index *int32, userBuffer uintptr, size uint64, handles *uint32, handleCount uint32, replyTarget uint32, timeout uint64) uint64
    61  
    62  // SvcCreateEvent  Creates a system event.
    63  //
    64  // This is a privileged syscall.
    65  // svc 0x45
    66  //export svcCreateEvent
    67  func SvcCreateEvent(serverHandle, clientHandle *uint32) uint64
    68  
    69  // SvcMapPhysicalMemoryUnsafe Maps unsafe memory (usable for GPU DMA) for a system module at the desired address.
    70  //
    71  // Only on firmware 5.0.0+
    72  // This is a privileged syscall.
    73  // svc 0x48
    74  //export svcMapPhysicalMemoryUnsafe
    75  func SvcMapPhysicalMemoryUnsafe(addr, size uintptr) uint64
    76  
    77  // SvcMapPhysicalMemoryUnsafe Undoes the effects of SvcMapPhysicalMemoryUnsafe
    78  //
    79  // Only on firmware 5.0.0+
    80  // This is a privileged syscall.
    81  // svc 0x49
    82  //export svcUnmapPhysicalMemoryUnsafe
    83  func SvcUnmapPhysicalMemoryUnsafe(addr, size uintptr) uint64
    84  
    85  // SvcSetUnsafeLimit Sets the system-wide limit for unsafe memory mappable using svcMapPhysicalMemoryUnsafe.
    86  //
    87  // Only on firmware 5.0.0+
    88  // This is a privileged syscall.
    89  // svc 0x4A
    90  //export svcSetUnsafeLimit
    91  func SvcSetUnsafeLimit(size uintptr) uint64
    92  
    93  // SvcCreateCodeMemory  Creates code memory in the caller's address space
    94  //
    95  // Only on firmware 4.0.0+
    96  // This is a privileged syscall.
    97  // svc 0x4B
    98  //export svcCreateCodeMemory
    99  func SvcCreateCodeMemory(handle *uint32, srcAddr, size uintptr) uint64
   100  
   101  // SvcControlCodeMemory Maps code memory in the caller's address space
   102  //
   103  // Only on firmware 4.0.0+
   104  // This is a privileged syscall.
   105  // svc 0x4C
   106  //export svcControlCodeMemory
   107  func SvcControlCodeMemory(codeHandle uint32, op uint64, dstAddr, size uintptr, perm uint64) uint64
   108  
   109  // SvcSleepSystem Causes the system to enter deep sleep.
   110  //
   111  // This is a privileged syscall.
   112  // svc 0x4D
   113  //export svcSleepSystem
   114  func SvcSleepSystem()
   115  
   116  // SvcReadWriteRegister Reads/writes a protected MMIO register.
   117  //
   118  // This is a privileged syscall.
   119  // svc 0x4E
   120  //export svcReadWriteRegister
   121  func SvcReadWriteRegister(outVal *uint32, regAddr uint64, rwMask, inVal uint32) uint64
   122  
   123  // SvcSetProcessActivity Configures the pause/unpause status of a process.
   124  //
   125  // This is a privileged syscall.
   126  // svc 0x4F
   127  //export svcSetProcessActivity
   128  func SvcSetProcessActivity(process uint32, paused bool) uint64
   129  
   130  // SvcCreateSharedMemory Creates a block of shared memory.
   131  //
   132  // This is a privileged syscall.
   133  // svc 0x50
   134  //export svcCreateSharedMemory
   135  func SvcCreateSharedMemory(handle *uint32, size uintptr, localPerm, otherPerm uint32) uint64
   136  
   137  // SvcMapTransferMemory Maps a block of transfer memory.
   138  //
   139  // This is a privileged syscall.
   140  // svc 0x51
   141  //export svcMapTransferMemory
   142  func SvcMapTransferMemory(tmemHandle uint32, addr, size uintptr, perm uint32) uint64
   143  
   144  // SvcUnmapTransferMemory Unmaps a block of transfer memory.
   145  //
   146  // This is a privileged syscall.
   147  // svc 0x52
   148  //export svcUnmapTransferMemory
   149  func SvcUnmapTransferMemory(tmemHandle uint32, addr, size uintptr) uint64
   150  
   151  // SvcCreateInterruptEvent Creates an event and binds it to a specific hardware interrupt.
   152  //
   153  // This is a privileged syscall.
   154  // svc 0x53
   155  //export svcCreateInterruptEvent
   156  func SvcCreateInterruptEvent(handle *uint32, irqNum uint64, flag uint32) uint64
   157  
   158  // SvcQueryPhysicalAddress Queries information about a certain virtual address, including its physical address.
   159  //
   160  // This is a privileged syscall.
   161  // svc 0x54
   162  //export svcQueryPhysicalAddress
   163  func SvcQueryPhysicalAddress(out uintptr, virtaddr uintptr) uint64