PCV services: Difference between revisions
No edit summary |
No edit summary |
||
| Line 362: | Line 362: | ||
|- | |- | ||
| 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClock]]. | | 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClock]]. | ||
|- | |||
| 5 || [4.0.0+] GetEphemeralNetworkSystemClock || Returns an [[#ISystemClock]]. | |||
|- | |||
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset || | |||
|- | |- | ||
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled || | | 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled || | ||
|- | |- | ||
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled || | | 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled || | ||
|- | |||
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear || | |||
|- | |- | ||
| 200 || IsStandardNetworkSystemClockAccuracySufficient || | | 200 || IsStandardNetworkSystemClockAccuracySufficient || | ||
|- | |- | ||
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint || | |||
|- | |||
| 400 || [4.0.0+] GetClockSnapshot || | |||
|- | |||
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext || | |||
|- | |||
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser || | |||
|- | |||
| 501 || [4.0.0+] CalculateSpanBetween || | |||
|} | |} | ||
== ISteadyClock == | == ISteadyClock == | ||
This is "nn::timesrv::detail::service::ISteadyClock". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 390: | Line 407: | ||
| 200 || GetInternalOffset || No input, returns an output [[#TimeSpanType]]. | | 200 || GetInternalOffset || No input, returns an output [[#TimeSpanType]]. | ||
|- | |- | ||
| 201 || SetInternalOffset || Takes an input [[#TimeSpanType]], no output. | | 201 || SetInternalOffset || Takes an input [[#TimeSpanType]], no output. Removed in [4.0.0+]. | ||
|} | |} | ||
| Line 401: | Line 417: | ||
== ISystemClock == | == ISystemClock == | ||
This is "nn::timesrv::detail::service::ISystemClock". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 422: | Line 440: | ||
== ITimeZoneService == | == ITimeZoneService == | ||
This is "nn::timesrv::detail::service::ITimeZoneService". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Revision as of 22:21, 27 March 2018
bpc
This is "nn::bpc::IBoardPowerControlManager".
| Cmd | Name |
|---|---|
| 0 | ShutdownSystem |
| 1 | RebootSystem |
| 2 | GetWakeupReason |
| 3 | GetShutdownReason |
| 4 | GetAcOk |
| 5 | GetBoardPowerControlEvent |
| 6 | GetSleepButtonState |
| 7 | GetPowerEvent |
| 8 | |
| 9 | |
| 10 |
bpc:r
This is "nn::bpc::IRtcManager".
| Cmd | Name |
|---|---|
| 0 | GetExternalRtcValue |
| 1 | SetExternalRtcValue |
| 2 | ReadExternalRtcResetFlag |
| 3 | ClearExternalRtcResetFlag |
GetExternalRtcValue / SetExternalRtcValue directly accesses the max77620_rtc0 device.
pcv
This is "nn::pcv::detail::IPcvService".
| Cmd | Name |
|---|---|
| 0 | SetPowerEnabled |
| 1 | SetClockEnabled |
| 2 | SetClockRate |
| 3 | GetClockRate |
| 4 | GetState |
| 5 | GetPossibleClockRates |
| 6 | SetMinVClockRate |
| 7 | SetReset |
| 8 | SetVoltageEnabled |
| 9 | GetVoltageEnabled |
| 10 | GetVoltageRange |
| 11 | SetVoltageValue |
| 12 | GetVoltageValue |
| 13 | GetTemperatureThresholds |
| 14 | SetTemperature |
| 15 | Initialize |
| 16 | IsInitialized |
| 17 | Finalize |
| 18 | PowerOn |
| 19 | PowerOff |
| 20 | ChangeVoltage |
| 21 | GetPowerClockInfoEvent |
| 22 | GetOscillatorClock |
| 23 | GetDvfsTable |
| 24 | GetModuleStateTable |
| 25 | GetPowerDomainStateTable |
| 26 | GetFuseInfo |
User Name to Block Maps
Power Switch / Clocking / Reset
| Name | Block | Rail | Notes |
|---|---|---|---|
| 0 | CpuBus | vdd_cpu | |
| 1 | GPU | vdd_gpu | |
| 2 | I2S1 | vdd_soc | |
| 3 | I2S2 | vdd_soc | |
| 4 | I2S3 | vdd_soc | |
| 5 | PWM | vdd_soc | |
| 6 | I2C1 | vdd_soc | |
| 7 | I2C2 | vdd_soc | |
| 8 | I2C3 | vdd_soc | |
| 9 | I2C4 | vdd_soc | |
| 10 | I2C5 | vdd_soc | |
| 11 | I2C6 | vdd_soc | |
| 12 | SPI1 | vdd_soc | |
| 13 | SPI2 | vdd_soc | |
| 14 | SPI3 | vdd_soc | |
| 15 | SPI4 | vdd_soc | |
| 16 | DISP1 | vdd_soc | |
| 17 | DISP2 | vdd_soc | |
| 20 | SDMMC1 | vdd_soc | |
| 21 | SDMMC2 | vdd_soc | |
| 22 | SDMMC3 | vdd_soc | |
| 23 | SDMMC4 | vdd_soc | |
| 24 | - | - | Not actual block. Used for debug and stuff. |
| 25 | CSITE | vdd_soc | |
| 26 | TSEC | vdd_soc | |
| 27 | MSELECT | vdd_soc | |
| 28 | HDA2CODEC_2X | vdd_soc | |
| 29 | ACTMON | vdd_soc | |
| 30 | I2C_SLOW | vdd_soc | |
| 31 | SOR1 | vdd_soc | |
| 33 | HDA | vdd_soc | |
| 34 | XUSB_CORE_HOST | vdd_soc | |
| 35 | XUSB_FALCON | vdd_soc | |
| 36 | XUSB_FS | vdd_soc | |
| 37 | XUSB_CORE_DEV | vdd_soc | |
| 38 | XUSB_SS_HOSTDEV | vdd_soc | |
| 39 | UARTA | vdd_soc | |
| 40 | UARTB | vdd_soc | |
| 41 | UARTC | vdd_soc | |
| 42 | UARTD | vdd_soc | |
| 43 | HOST1X | vdd_soc | |
| 44 | ENTROPY | vdd_soc | |
| 45 | SOC_THERM | vdd_soc | |
| 46 | VIC | vdd_soc | |
| 47 | NVENC | vdd_soc | |
| 48 | NVJPG | vdd_soc | |
| 49 | NVDEC | vdd_soc | |
| 50 | QSPI | vdd_soc | |
| 52 | TSECB | vdd_soc | |
| 53 | APE | vdd_soc | |
| 54 | ACLK | vdd_soc | |
| 55 | UARTAPE | vdd_soc | |
| 56 | EMC | vdd_soc | |
| 57 | PLLE0 | vdd_soc | |
| 58 | PLLE0 | vdd_soc | |
| 59 | DSI | vdd_soc | |
| 60 | MAUD | vdd_soc | |
| 61 | DPAUX1 | vdd_soc | |
| 62 | MIPI_CAL | vdd_soc | |
| 63 | UART_FST_MIPI_CAL | vdd_soc | |
| 64 | OSC | vdd_soc | |
| 65 | SCLK | vdd_soc | |
| 66 | SOR_SAFE | vdd_soc | |
| 67 | XUSB_SS | vdd_soc | |
| 68 | XUSB_HOST | vdd_soc | |
| 69 | XUSB_DEV | vdd_soc | |
| 70 | EXTPERIPH1 | vdd_soc | |
| 71 | AHUB | vdd_soc | |
| 72 | HDA2HDMICODEC | vdd_soc | |
| 73 | PLLP5 | vdd_soc | |
| 74 | USBD | vdd_soc | |
| 75 | USB2 | vdd_soc | |
| 76 | PCIE | vdd_soc | |
| 77 | AFI | vdd_soc | |
| 78 | PCIEXCLK | vdd_soc | |
| 79 | PEX_USB_UPHY | vdd_soc | |
| 80 | XUSB_PADCTL | vdd_soc | |
| 81 | APBDMA | vdd_soc | |
| 82 | USB2_TRK | vdd_soc | |
| 83 | PLLE0 | vdd_soc | |
| 84 | PLLE0 | vdd_soc | |
| 85 | CEC | vdd_soc |
Voltage
| Name | Block | Notes |
|---|---|---|
| 0 | max77620_sd0 | |
| 1 | max77620_sd1 | |
| 2 | max77620_sd2 | |
| 3 | max77620_sd3 | |
| 4 | max77620_ldo0 | |
| 5 | max77620_ldo1 | |
| 6 | max77620_ldo2 | |
| 7 | max77620_ldo3 | |
| 8 | max77620_ldo4 | |
| 9 | max77620_ldo5 | |
| 10 | max77620_ldo6 | |
| 11 | max77620_ldo7 | |
| 12 | max77620_ldo8 | |
| 13 | max77621_cpu | |
| 14 | max77621_gpu |
Note: max77620 GPIOs are only used internally by the driver during init, and not exposed via an API.
pcv:arb
This is "nn::pcv::IArbitrationManager".
| Cmd | Name |
|---|---|
| 0 | ReleaseControl |
pcv:imm
This is "nn::pcv::IImmediateManager".
| Cmd | Name |
|---|---|
| 0 | SetClockRate |
time:u, time:a, time:s
This is "nn::timesrv::detail::service::IStaticService".
| Cmd | Name | Notes |
|---|---|---|
| 0 | GetStandardUserSystemClock | Returns an #ISystemClock. |
| 1 | GetStandardNetworkSystemClock | Returns an #ISystemClock. |
| 2 | GetStandardSteadyClock | Returns an #ISteadyClock. |
| 3 | GetTimeZoneService | Returns an #ITimeZoneService. |
| 4 | GetStandardLocalSystemClock | Returns an #ISystemClock. |
| 5 | [4.0.0+] GetEphemeralNetworkSystemClock | Returns an #ISystemClock. |
| 50 | [4.0.0+] SetStandardSteadyClockInternalOffset | |
| 100 | IsStandardUserSystemClockAutomaticCorrectionEnabled | |
| 101 | SetStandardUserSystemClockAutomaticCorrectionEnabled | |
| 102 | [5.0.0+] GetStandardUserSystemClockInitialYear | |
| 200 | IsStandardNetworkSystemClockAccuracySufficient | |
| 300 | [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint | |
| 400 | [4.0.0+] GetClockSnapshot | |
| 401 | [4.0.0+] GetClockSnapshotFromSystemClockContext | |
| 500 | [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser | |
| 501 | [4.0.0+] CalculateSpanBetween |
ISteadyClock
This is "nn::timesrv::detail::service::ISteadyClock".
| Cmd | Name | Notes |
|---|---|---|
| 0 | GetCurrentTimePoint | No input, returns an output #SteadyClockTimePoint. |
| 2 | GetTestOffset | No input, returns an output #TimeSpanType. |
| 3 | SetTestOffset | Takes an input #TimeSpanType, no output. |
| 100 | GetRtcValue | No input, returns an output s64. |
| 101 | IsRtcResetDetected | No input, returns an output u8 bool. |
| 102 | GetSetupResultValue | No input, returns an output u32. |
| 200 | GetInternalOffset | No input, returns an output #TimeSpanType. |
| 201 | SetInternalOffset | Takes an input #TimeSpanType, no output. Removed in [4.0.0+]. |
SteadyClockTimePoint
This is a 0x18-byte struct.
TimeSpanType
This is an u64.
ISystemClock
This is "nn::timesrv::detail::service::ISystemClock".
| Cmd | Name | Notes |
|---|---|---|
| 0 | GetCurrentTime | Returns an output #PosixTime. |
| 1 | SetCurrentTime | Takes an input #PosixTime. |
| 2 | GetSystemClockContext | Returns an output #SystemClockContext. |
| 3 | SetSystemClockContext | Takes an input #SystemClockContext. |
PosixTime
This is an u64 for UTC POSIX time.
SystemClockContext
This is an 0x20-byte struct.
ITimeZoneService
This is "nn::timesrv::detail::service::ITimeZoneService".
| Cmd | Name | Notes |
|---|---|---|
| 0 | GetDeviceLocationName | No input, returns an output #LocationName. |
| 1 | SetDeviceLocationName | Takes an input #LocationName, no output. |
| 2 | GetTotalLocationNameCount | No input, returns an output s32. |
| 3 | LoadLocationNameList | |
| 4 | LoadTimeZoneRule | Takes an input #LocationName and a type-0x16 output buffer for #TimeZoneRule, no output. |
| 5 | GetTimeZoneRuleVersion | No input, returns an output #TimeZoneRuleVersion. |
| 100 | ToCalendarTime | Takes an input #PosixTime and a type-0x15 input buffer for #TimeZoneRule, returns an output #CalendarTime and #CalendarAdditionalInfo. |
| 101 | ToCalendarTimeWithMyRule | Takes an input #PosixTime, returns an output #CalendarTime and #CalendarAdditionalInfo. |
| 200 | ToPosixTime | Takes an input #CalendarTime, a type-0x15 input buffer for #TimeZoneRule, an type-0xA output buffer for #PosixTime array, and returns an output s32. |
| 201 | ToPosixTimeWithMyRule | Takes an input #CalendarTime, an type-0xA output buffer for #PosixTime array, and returns an output s32. |
LoadLocationNameList
Takes an input s32 LocationName_index and a type-0x6 output buffer for #LocationName, returns an output s32 for total output entries.
LocationName
| Offset | Size | Description |
|---|---|---|
| 0x0 | 0x10 | Location name string, no NUL-terminator. |
| 0x10 | ? | |
| 0x18 | 0x8? | ? |
| 0x20 | ? | ? |
This is an 0x24-byte struct.
TimeZoneRule
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
TimeZoneRuleVersion
This is an u128.
CalendarTime
| Offset | Size | Description |
|---|---|---|
| 0x0 | 0x2 | Year |
| 0x2 | 0x1 | Month |
| 0x3 | 0x1 | Day |
| 0x4 | 0x1 | Hour |
| 0x5 | 0x1 | Minute |
| 0x6 | 0x1 | Second |
| 0x7 | 0x1 | Padding / unknown? |
This is an 0x8-byte struct.
CalendarAdditionalInfo
| Offset | Size | Description |
|---|---|---|
| 0x0 | 0x4 | 0-based day-of-week. |
| 0x4 | 0x4 | 0-based day-of-year. |
| 0x8 | ? | Timezone name string. |
| 0x10 | 0x4 | 0 = no DST, 1 = DST. |
| 0x14 | 0x4 | s32 seconds relative to UTC for this timezone. |
This is an 0x18-byte struct. This stores timezone info.