Changes

419 bytes added ,  18:34, 7 March 2023
no edit summary
Line 263: Line 263:     
== Cmd10100 ==
 
== Cmd10100 ==
Takes a type-0x9 input buffer containing an EventId string, a type-0x5 input buffer containing the Report, an input [[NCM_services#ProgramId|ProgramId]], no output.
+
Takes a type-0x9 input buffer containing the [[#SystemReport|SystemReport]] EventId string, an input [[NCM_services#ProgramId|ProgramId]] from the [[#SystemReport|SystemReport]] and a type-0x5 input buffer containing the [[#SystemReport|SystemReport]] Report. No output.
    
The EventId buffer size must be 0x1-0x20, and the last byte in the buffer must be NUL. <code>nn::srepo::detail::VerifyEventId</code> is then used with the EventId buffer, throwing error on failure.
 
The EventId buffer size must be 0x1-0x20, and the last byte in the buffer must be NUL. <code>nn::srepo::detail::VerifyEventId</code> is then used with the EventId buffer, throwing error on failure.
Line 272: Line 272:     
== Cmd10101 ==
 
== Cmd10101 ==
Takes a type-0x9 input buffer containing an EventId string, a type-0x5 input buffer containing the Report, an 0x10-byte input struct, an input [[NCM_services#ProgramId|ProgramId]], no output.
+
Takes a type-0x9 input buffer containing the [[#SystemReport|SystemReport]] EventId string, an input [[NCM_services#ProgramId|ProgramId]] from the [[#SystemReport|SystemReport]], a type-0x5 input buffer containing the [[#SystemReport|SystemReport]] Report and an 0x10-byte input struct. No output.
    
Same as [[#Cmd10100]] except instead of calling the processing func with struct=all-zero, the input struct is passed instead (which must be non-zero).
 
Same as [[#Cmd10100]] except instead of calling the processing func with struct=all-zero, the input struct is passed instead (which must be non-zero).
    
== Cmd10200 ==
 
== Cmd10200 ==
Takes a type-0x9 input buffer containing an EventId string, a type-0x5 input buffer containing the Report, an input [[NCM_services#ProgramId|ProgramId]], no output.
+
Takes a type-0x9 input buffer containing the [[#SystemReport|SystemReport]] EventId string, an input [[NCM_services#ProgramId|ProgramId]] from the [[#SystemReport|SystemReport]] and a type-0x5 input buffer containing the [[#SystemReport|SystemReport]] Report. No output.
   −
Same as [[#Cmd10100]] except the second param passed to the processing func is value 1 instead of 0.
+
Same as [[#Cmd10100]] except the [[#SystemReport|SystemReport]] Version field is 1 instead of 0.
    
== Cmd10201 ==
 
== Cmd10201 ==
Takes a type-0x9 input buffer containing an EventId string, a type-0x5 input buffer containing the Report, an 0x10-byte input struct, an input [[NCM_services#ProgramId|ProgramId]], no output.
+
Takes a type-0x9 input buffer containing the [[#SystemReport|SystemReport]] EventId string, an input [[NCM_services#ProgramId|ProgramId]] from the [[#SystemReport|SystemReport]], a type-0x5 input buffer containing the [[#SystemReport|SystemReport]] Report and an 0x10-byte input struct. No output.
   −
Same as [[#Cmd10101]] except the second param passed to the processing func is value 1 instead of 0.
+
Same as [[#Cmd10101]] except the [[#SystemReport|SystemReport]] Version field is 1 instead of 0.
    
== Cmd10300 ==
 
== Cmd10300 ==
Takes a total of 0x28-bytes of input, a type-0x9 input buffer, a TransferMemory handle, returns an output [[#IAsyncContext]].
+
Takes a total of 0x28-bytes of input, a type-0x9 input buffer and a TransferMemory handle. Returns an output [[#IAsyncContext]].
    
The mapped TransferMemory buffer is used with <code>nn::srepo::detail::VerifyReport</code>, returning an error on failure.
 
The mapped TransferMemory buffer is used with <code>nn::srepo::detail::VerifyReport</code>, returning an error on failure.
    
== Cmd11000 ==
 
== Cmd11000 ==
Takes a type-0x9 input buffer containing an array of a 0x10-byte struct, no output.
+
Takes a type-0x9 input buffer containing an array of a 0x10-byte struct. No output.
    
The Sf handler code (func which calls the serv obj vfunc) will throw an error if the buffer size is >0x8F (that is, >8 entries).
 
The Sf handler code (func which calls the serv obj vfunc) will throw an error if the buffer size is >0x8F (that is, >8 entries).
Line 299: Line 299:     
== Cmd11001 ==
 
== Cmd11001 ==
Takes a 0x10-byte input struct, no output.
+
Takes a 0x10-byte input struct. No output.
    
This calls the same state-reset func as [[#Cmd11000]], except this passes the input struct instead. Then this returns 0.
 
This calls the same state-reset func as [[#Cmd11000]], except this passes the input struct instead. Then this returns 0.
    
== Cmd11002 ==
 
== Cmd11002 ==
Takes a 0x10-byte input struct, no output.
+
Takes a 0x10-byte input struct. No output.
    
This calls the same state-writing func as [[#Cmd11000]], except this passes the input struct instead. Then this returns 0.
 
This calls the same state-writing func as [[#Cmd11000]], except this passes the input struct instead. Then this returns 0.
    
== Cmd11003 ==
 
== Cmd11003 ==
Takes a 0x10-byte input struct, no output.
+
Takes a 0x10-byte input struct. No output.
    
== Cmd11004 ==
 
== Cmd11004 ==
Takes a 0x10-byte input struct, no output.
+
Takes a 0x10-byte input struct. No output.
    
Identical to [[#Cmd11003]] except different input is passed to the called func (1 instead of 0).
 
Identical to [[#Cmd11003]] except different input is passed to the called func (1 instead of 0).
    
== Cmd11005 ==
 
== Cmd11005 ==
Takes a total of 0x18-bytes of input, no output.
+
Takes a total of 0x18-bytes of input. No output.
    
This replaces [[#Cmd11003]].
 
This replaces [[#Cmd11003]].
    
== Cmd11006 ==
 
== Cmd11006 ==
Takes a total of 0x18-bytes of input, no output.
+
Takes a total of 0x18-bytes of input. No output.
    
Identical to [[#Cmd11005]] except different input is passed to the called func (1 instead of 0).
 
Identical to [[#Cmd11005]] except different input is passed to the called func (1 instead of 0).
Line 329: Line 329:     
== Cmd12001 ==
 
== Cmd12001 ==
Takes an input u64, no output.
+
Takes an input u64. No output.
    
The input u64 is only used for comparing with a field in list entries.
 
The input u64 is only used for comparing with a field in list entries.
    
== OpenSyslogLogger ==
 
== OpenSyslogLogger ==
Takes a type-0x5 input buffer, no output.
+
Takes a type-0x5 input buffer. No output.
   −
[9.0.0+] No input, returns 3 u32s of output (sharedmem_size, out1, out2), an [[#ISyslogLogger]], and a SharedMemory handle.
+
[9.0.0+] No input. Returns 3 u32s of output (sharedmem_size, out1, out2), an [[#ISyslogLogger]], and a SharedMemory handle.
    
The SharedMemory is mapped with the returned size and with permissions=RW.
 
The SharedMemory is mapped with the returned size and with permissions=RW.
    
== Cmd13001 ==
 
== Cmd13001 ==
Takes a total of 0x10-bytes of input, no output.
+
Takes a total of 0x10-bytes of input. No output.
    
== Cmd20100 ==
 
== Cmd20100 ==
Takes a type-0xA output buffer and a type-0x6 output buffer, returns a total of 0x10-bytes of output.
+
Takes a type-0xA output buffer and a type-0x6 output buffer. Returns a total of 0x10-bytes of output.
    
[6.0.0+] This now returns an additional 0x18-bytes of output.
 
[6.0.0+] This now returns an additional 0x18-bytes of output.
Line 353: Line 353:     
== Cmd20200 ==
 
== Cmd20200 ==
No input, returns an output Event handle.
+
No input. Returns an output Event handle.
    
This is only usable with srepo:a.
 
This is only usable with srepo:a.
Line 363: Line 363:     
== Cmd20400 ==
 
== Cmd20400 ==
Takes an input u32 index, returns two output u64s.
+
Takes an input u32 index. Returns two output u64s.
    
The input index must be <=1. This gets data from a state array with the specified index.
 
The input index must be <=1. This gets data from a state array with the specified index.
    
== Cmd20401 ==
 
== Cmd20401 ==
No input, returns two output u64s.
+
No input. Returns two output u64s.
    
The first u64 is a constant value, while the second u64 is from state.
 
The first u64 is a constant value, while the second u64 is from state.
    
== Cmd20402 ==
 
== Cmd20402 ==
Takes an input s64 and u64, no output.
+
Takes an input s64 and u64. No output.
    
The input s64 must be >=1. The two input fields are written into global state, and various state is also cleared.
 
The input s64 must be >=1. The two input fields are written into global state, and various state is also cleared.
    
== Cmd20500 ==
 
== Cmd20500 ==
No input, returns two output u64s.
+
No input. Returns two output u64s.
    
This gets two u64s from global state.
 
This gets two u64s from global state.
    
== Cmd20600 ==
 
== Cmd20600 ==
Takes a 0x10-byte input struct and a Result, no output.
+
Takes a 0x10-byte input struct and a Result. No output.
    
This goes through the global list of [[#IAsyncContext]] looking for an entry with data matching the input struct, then writes the input Result into that [[#IAsyncContext]]. This Result would then be returned by [[#GetResult]] - the Event from [[#GetSystemEvent]] is also signaled.
 
This goes through the global list of [[#IAsyncContext]] looking for an entry with data matching the input struct, then writes the input Result into that [[#IAsyncContext]]. This Result would then be returned by [[#GetResult]] - the Event from [[#GetSystemEvent]] is also signaled.
Line 402: Line 402:     
=== Cmd0 ===
 
=== Cmd0 ===
No input, returns two output u32s.
+
No input. Returns two output u32s.
    
This does the same entry-allocation in sharedmem as [[#OpenSyslogLogger]].
 
This does the same entry-allocation in sharedmem as [[#OpenSyslogLogger]].