Line 22: |
Line 22: |
| | 7 || [2.0.0+] GetPowerEvent | | | 7 || [2.0.0+] GetPowerEvent |
| |- | | |- |
− | | 8 || [2.0.0+] | + | | 8 || [2.0.0+] CreateWakeupTimer |
| |- | | |- |
− | | 9 || [2.0.0+] | + | | 9 || [2.0.0+] CancelWakeupTimer |
| |- | | |- |
− | | 10 || [2.0.0+] | + | | 10 || [2.0.0+] [[#EnableWakeupTimerOnDevice]] |
| |- | | |- |
− | | 11 || [3.0.0+] | + | | 11 || [3.0.0+] CreateWakeupTimerEx |
| |- | | |- |
− | | 12 || [3.0.0+] | + | | 12 || [3.0.0+] GetLastEnabledWakeupTimerType |
| |- | | |- |
− | | 13 || [3.0.0+] | + | | 13 || [3.0.0+] CleanAllWakeupTimers |
| |- | | |- |
| | 14 || [6.0.0+] | | | 14 || [6.0.0+] |
| |} | | |} |
| + | |
| + | == EnableWakeupTimerOnDevice == |
| + | No input, returns a total of 0x10-bytes of output. [3.0.0+] Now returns a total of 0xC-bytes of output. |
| | | |
| = bpc:r = | | = bpc:r = |
| This is "nn::bpc::IRtcManager". | | This is "nn::bpc::IRtcManager". |
| + | |
| + | This service no longer exists in [9.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 44: |
Line 49: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || GetExternalRtcValue | + | | 0 || GetRtcTime |
| |- | | |- |
− | | 1 || SetExternalRtcValue | + | | 1 || SetRtcTime |
| |- | | |- |
− | | 2 || ReadExternalRtcResetFlag | + | | 2 || GetRtcResetDetected |
| |- | | |- |
− | | 3 || [2.0.0+] ClearExternalRtcResetFlag | + | | 3 || [2.0.0+] ClearRtcResetDetected |
| |- | | |- |
− | | 4 || [3.0.0+] | + | | 4 || [3.0.0+] SetUpRtcResetOnShutdown |
| |} | | |} |
| | | |
− | GetExternalRtcValue / SetExternalRtcValue directly accesses the max77620_rtc0 device.
| + | GetRtcTime / SetRtcTime directly accesses the max77620_rtc0 device. |
| | | |
| = pcv = | | = pcv = |
Line 118: |
Line 123: |
| | 26 || [3.0.0+] GetFuseInfo | | | 26 || [3.0.0+] GetFuseInfo |
| |- | | |- |
− | | 27 || [5.0.0+] | + | | 27 || [5.0.0+] GetDramId |
| |- | | |- |
− | | [6.0.0-7.0.1] 28 || | + | | [6.0.0-7.0.1] 28 || [[#IsPoweredOn]] |
| |- | | |- |
− | | [6.0.0-7.0.1] 29 || | + | | [6.0.0-7.0.1] 29 || [[#GetVoltage]] |
| |} | | |} |
| | | |
| [7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers, for the following: GetDvfsTable, GetModuleStateTable, and GetPowerDomainStateTable. | | [7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers, for the following: GetDvfsTable, GetModuleStateTable, and GetPowerDomainStateTable. |
| + | |
| + | == IsPoweredOn == |
| + | Takes an u32 '''PowerControlTarget''' and returns a bool indicating the status of the requested [[#Voltage|voltage block]]. |
| + | |
| + | == GetVoltage == |
| + | Takes an u32 '''PowerControlTarget''' and returns an u32 voltage value for the requested [[#Voltage|voltage block]]. |
| | | |
| == Modules == | | == Modules == |
Line 173: |
Line 184: |
| | 17 || 0x40000012 || DISP2 || vdd_soc || | | | 17 || 0x40000012 || DISP2 || vdd_soc || |
| |- | | |- |
− | | 18 || 0x40000013 || - || - || Not an actual block. Used for debug. | + | | 18 || 0x40000013 || ISP || - || Not an actual block. Used for debug. |
| |- | | |- |
− | | 19 || 0x40000014 || - || - || Not an actual block. Used for debug. | + | | 19 || 0x40000014 || VI || - || Not an actual block. Used for debug. |
| |- | | |- |
| | 20 || 0x40000015 || SDMMC1 || vdd_soc || | | | 20 || 0x40000015 || SDMMC1 || vdd_soc || |
Line 185: |
Line 196: |
| | 23 || 0x40000018 || SDMMC4 || vdd_soc || | | | 23 || 0x40000018 || SDMMC4 || vdd_soc || |
| |- | | |- |
− | | 24 || 0x40000019 || - || - || Not an actual block. Used for debug. | + | | 24 || 0x40000019 || OWR || - || Not an actual block. Used for debug. |
| |- | | |- |
| | 25 || 0x4000001A || CSITE || vdd_soc || | | | 25 || 0x4000001A || CSITE || vdd_soc || |
Line 201: |
Line 212: |
| | 31 || 0x40000020 || SOR1 || vdd_soc || | | | 31 || 0x40000020 || SOR1 || vdd_soc || |
| |- | | |- |
− | | 32 || 0x40000021 || - || - || Not an actual block. Used for debug. | + | | 32 || 0x40000021 || SATA || - || Not an actual block. Used for debug. |
| |- | | |- |
| | 33 || 0x40000022 || HDA || vdd_soc || | | | 33 || 0x40000022 || HDA || vdd_soc || |
Line 239: |
Line 250: |
| | 50 || 0x40000033 || QSPI || vdd_soc || | | | 50 || 0x40000033 || QSPI || vdd_soc || |
| |- | | |- |
− | | 51 || 0x40000034 || - || - || Not an actual block. Used for debug. | + | | 51 || 0x40000034 || VI_I2C || - || Not an actual block. Used for debug. |
| |- | | |- |
| | 52 || 0x40000035 || TSECB || vdd_soc || | | | 52 || 0x40000035 || TSECB || vdd_soc || |
Line 346: |
Line 357: |
| |- | | |- |
| | 14 || max77621_gpu || | | | 14 || max77621_gpu || |
| + | |- |
| + | | [6.0.0+] 15 || max77812_cpu || |
| + | |- |
| + | | [6.0.0+] 16 || max77812_gpu || |
| + | |- |
| + | | [6.0.0+] 17 || max77812_dram || |
| |} | | |} |
| | | |
Line 375: |
Line 392: |
| | | |
| = clkrst, clkrst:i = | | = clkrst, clkrst:i = |
− | These are "nn::clkrst::IClkrstManager" and "nn::clkrst::IClkrstImmediateManager". | + | These are "nn::clkrst::IClkrstManager" and "nn::clkrst::IImmediateManager". |
| | | |
| These were added with [8.0.0+]. | | These were added with [8.0.0+]. |
Line 383: |
Line 400: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || OpenSession | + | | 0 || [[#OpenSession]] |
| |- | | |- |
| | 1 || GetTemperatureThresholds | | | 1 || GetTemperatureThresholds |
Line 391: |
Line 408: |
| | 3 || GetPossibleClockRates | | | 3 || GetPossibleClockRates |
| |- | | |- |
− | | 4 || GetPowerClockInfoEvent | + | | 4 || GetClockInfoEvent |
| |- | | |- |
− | | 5 || | + | | 5 || GetClockModuleNumLimit |
| |} | | |} |
| + | |
| + | == OpenSession == |
| + | Takes an u32 '''ModuleID''', an u32 '''ModuleUnk''' and returns an [[#IClkrstSession]]. |
| + | |
| + | == GetClockModuleNumLimit == |
| + | Returns 0x1A. |
| | | |
| == IClkrstSession == | | == IClkrstSession == |
Line 429: |
Line 452: |
| | | |
| = clkrst:a = | | = clkrst:a = |
− | This is "nn::clkrst::IClkrstArbitrationManager". | + | This is "nn::clkrst::IArbitrationManager". |
| | | |
| This was added with [8.0.0+]. | | This was added with [8.0.0+]. |
Line 437: |
Line 460: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || | + | | 0 || [[#ReleaseControl]] |
| |} | | |} |
| + | |
| + | == ReleaseControl == |
| + | Takes an u32 '''ModuleID'''. No output. |
| | | |
| = rgltr = | | = rgltr = |
Line 449: |
Line 475: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || OpenSession | + | | 0 || [[#OpenSession]] |
| |- | | |- |
− | | 1 || | + | | 1 || GetPowerDomainStateTable |
| |- | | |- |
− | | 2 || | + | | 2 || GetPowerInfoEvent |
| |- | | |- |
− | | 3 || | + | | 3 || GetPowerModuleNumLimit |
| |} | | |} |
| + | |
| + | == OpenSession == |
| + | Takes an u32 '''ModuleID''' and returns an [[#IRegulatorSession]]. |
| + | |
| + | == GetPowerModuleNumLimit == |
| + | Returns 0x3. |
| | | |
| == IRegulatorSession == | | == IRegulatorSession == |
Line 477: |
Line 509: |
| | 5 || [[#SetVoltageValue]] | | | 5 || [[#SetVoltageValue]] |
| |- | | |- |
− | | 6 || | + | | 6 || ChangeVoltage |
| |} | | |} |
| | | |
Line 496: |
Line 528: |
| ! Cmd || Name | | ! Cmd || Name |
| |- | | |- |
− | | 0 || | + | | 0 || GetRtcTime |
| |- | | |- |
− | | 1 || | + | | 1 || SetRtcTime |
| |- | | |- |
− | | 2 || | + | | 2 || SetRtcClientUnknownBool |
| |- | | |- |
− | | 3 || | + | | 3 || GetRtcResetDetected |
| |- | | |- |
− | | 4 || | + | | 4 || ClearRtcResetDetected |
| |} | | |} |
| + | |
| + | Commands 0, 1, 3, 4 call the same internal functions as bpc:r, except they take an extra u32 [[Bus_services#Known_Devices_2|device code]], where bpc:r hardcodes 0x3B000001 (max77620_rtc0). |
| + | |
| + | Command 2 takes a u8 bool and a u32 device code; it opens an i2c session to the device code, and sets *(i2c_session_client_object + 0x38) = bool. |
| | | |
| = time:u, time:a, time:s = | | = time:u, time:a, time:s = |
| This is "nn::timesrv::detail::service::IStaticService". | | This is "nn::timesrv::detail::service::IStaticService". |
| + | |
| + | [9.0.0+] These services were moved to [[Glue_services|Glue]] and [[PSC_services|PSC]]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 607: |
Line 645: |
| | 2 || GetSystemClockContext || Returns an output [[#SystemClockContext]]. | | | 2 || GetSystemClockContext || Returns an output [[#SystemClockContext]]. |
| |- | | |- |
− | | 3 || SetSystemClockContext || Takes an input [[#SystemClockContext]]. | + | | 3 || SetSystemClockContext || Takes an input [[#SystemClockContext]]. |
| + | |- |
| + | | 4 || [9.0.0+] GetOperationEventReadableHandle || |
| |} | | |} |
| | | |
| === PosixTime === | | === PosixTime === |
− | This is an u64 for UTC POSIX time. | + | This is an s64 for UTC POSIX time. |
| | | |
| === SystemClockContext === | | === SystemClockContext === |
Line 665: |
Line 705: |
| | | |
| This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure. | | This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure. |
| + | |
| + | The files contained under zoneinfo/ directory are Tzif2 files without Tzif1 header and data at the begining of them (see [https://tools.ietf.org/html/rfc8536 RFC8536] for more information). |
| + | |
| + | The conversion of a Tzif2 file to a TimeZoneRule structure is based on [https://github.com/eggert/tz/blob/master/localtime.c tz database code] with some custom modifications (Leap seconds aren't handled, no usage of "posixrules" and Tzif1 support stripped out). |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset || Size || Description |
| + | |- |
| + | | 0x0 || 0x4 || timecnt |
| + | |- |
| + | | 0x4 || 0x4 || typecnt |
| + | |- |
| + | | 0x8 || 0x4 || charcnt |
| + | |- |
| + | | 0xC || 0x1 || goback |
| + | |- |
| + | | 0xD || 0x1 || goahead |
| + | |- |
| + | | 0xE || 0x2 || Padding |
| + | |- |
| + | | 0x10 || 0x8 * 1000 || ats |
| + | |- |
| + | | 0x1f50 || 0x1 * 1000 || types |
| + | |- |
| + | | 0x2338 || 0x10 * 128 || ttis (time type information), struct ttinfo[1000] |
| + | |- |
| + | | 0x2b38 || 0x1 * 512 || chars |
| + | |- |
| + | | 0x2d38 || 0x4 || defaulttype |
| + | |- |
| + | | 0x2d3c || 0x12c4 || Reserved / Unused |
| + | |} |
| + | |
| + | === ttinfo === |
| + | This is an 0x10-byte struct. |
| + | Represent a Time Type Information used in [[#TimeZoneRule]]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset || Size || Description |
| + | |- |
| + | | 0x0 || 0x4 || tt_gmtoff |
| + | |- |
| + | | 0x4 || 0x1 || tt_isdst |
| + | |- |
| + | | 0x5 || 0x3 || Padding |
| + | |- |
| + | | 0x8 || 0x4 || tt_abbrind |
| + | |- |
| + | | 0xC || 0x1 || tt_ttisstd |
| + | |- |
| + | | 0xD || 0x1 || tt_ttisgmt |
| + | |- |
| + | | 0xE || 0x2 || Padding |
| + | |} |
| | | |
| === TimeZoneRuleVersion === | | === TimeZoneRuleVersion === |