Line 3: |
Line 3: |
| When a service is registered, [[SVC|svcCreatePort]] is used without a port-name. This means that the port is inaccessible via the port SVCs outside of sm-module. See below for getting a session handle for sending commands to services. | | When a service is registered, [[SVC|svcCreatePort]] is used without a port-name. This means that the port is inaccessible via the port SVCs outside of sm-module. See below for getting a session handle for sending commands to services. |
| | | |
− | Processes with PID less than or equal to the number of NATIVE_FIRM built-in modules (fs, sm, pm, pxi, ldr) have access to all services. This value is obtained from [[SVC|svcGetSystemInfo]]. | + | Processes with PID less than or equal to the number of NATIVE_FIRM built-in modules (fs, sm, pm, pxi, ldr) have access to all services. This value is obtained from [[SVC|svcGetSystemInfo]]. Other processes are limited to access services listed in their [[NCCH/Extended_Header#ARM11_Local_System_Capabilities|service access control list]], as passed to [[SRVPM:RegisterProcess]]. |
| | | |
− | Attempting to use [[SRV:GetServiceSession|GetServiceSession]] with a service that the process has access to when that service isn't registered, results in [[SVC|svcSendSyncRequest]] never returning(the exact cause is unknown). | + | Attempting to use [[SRV:GetServiceHandle|GetServiceHandle]] with a service that the process has access to when that service isn't registered will block until it is registered. |
| | | |
| ==Service Manager Port "srv:"== | | ==Service Manager Port "srv:"== |
Line 55: |
Line 55: |
| | [[SRV:IsServiceRegistered|IsServiceRegistered]] | | | [[SRV:IsServiceRegistered|IsServiceRegistered]] |
| |} | | |} |
| + | |
| + | It appears these "port" commands can be used for transferring arbitrary handles, however [[SRV:GetPort|GetPort]] still uses the same service-access-control validation as [[SRV:GetServiceHandle|GetServiceHandle]]. Despite this fact, it appears that a "port" and a service with the same name can coexist independently. |
| | | |
| ==Service Manager Process-Manager Port/Service "srv:pm"== | | ==Service Manager Process-Manager Port/Service "srv:pm"== |
Line 89: |
Line 91: |
| |- | | |- |
| | 0x100 | | | 0x100 |
− | | This indicates that all processes must terminate: power-off, reboot, or [[FIRM]]-launch. | + | | This indicates that the recipient must terminate. Does not require subscription. |
| + | |- |
| + | | 0x101 |
| + | | Signaled to NS on sleep mode entry. |
| + | |- |
| + | | 0x103 |
| + | | Fired on sleep mode entry, subscribed to by NS, CSND, NWM, AC and NIM. |
| |- | | |- |
| | 0x104 | | | 0x104 |
Line 96: |
Line 104: |
| | 0x105 | | | 0x105 |
| | This indicates that the system has exited sleep mode. | | | This indicates that the system has exited sleep mode. |
| + | |- |
| + | | 0x106 |
| + | | Fired after sleep mode exit, subscribed to by NS, MIC, AC, NEWS, CECD and BOSS. |
| |- | | |- |
| | 0x107 | | | 0x107 |
Line 107: |
Line 118: |
| |- | | |- |
| | 0x10C | | | 0x10C |
− | | Unknown. | + | | Sent by PM after it starts a regular application. |
| |- | | |- |
| | 0x110-0x11F | | | 0x110-0x11F |
− | | Unknown. See [[PMApp:LaunchTitle#Launch_Flags|PM launch flags]]. | + | | Sent to NS on application exit. See [[PMApp:LaunchTitle#Launch_Flags|PM launch flags]]. |
| |- | | |- |
| | 0x179 | | | 0x179 |
| | Unknown. | | | Unknown. |
| + | |- |
| + | | 0x200 |
| + | | Signaled just before sleep mode is exited from, subscribed to by NS. |
| |- | | |- |
| | 0x202 | | | 0x202 |
Line 141: |
Line 155: |
| | 0x20A | | | 0x20A |
| | Game cartridge removed | | | Game cartridge removed |
| + | |- |
| + | | 0x211 |
| + | | Battery Related? (Published by PTM module) |
| + | |- |
| + | | 0x212 |
| + | | Battery Related? (Published by PTM module) |
| |- | | |- |
| | 0x20B | | | 0x20B |
| | Game cartridge inserted or removed | | | Game cartridge inserted or removed |
| + | |- |
| + | | 0x20C |
| + | | mcu-module publishes this on a (fatal) hardware condition?, ptm throws fatal error F960D407 in receipt of this |
| |- | | |- |
| | 0x20D | | | 0x20D |
− | | ? (Subscribed to by GSP) | + | | Charger plugged out |
| |- | | |- |
| | 0x20E | | | 0x20E |
− | | ? (Subscribed to by GSP) | + | | Charger plugged in |
| |- | | |- |
| | 0x213 | | | 0x213 |
− | | ? (Subscribed to by GSP) | + | | Signaled after exiting sleep mode and early during system boot. Subscribed to by CODEC, HID, GSP, CAMERA, MIC, NDM and PTM. GSP powers LCD on in receipt to this, etc. |
| |- | | |- |
| | 0x214 | | | 0x214 |
− | | ? (Subscribed to by GSP) | + | | Signaled before entering sleep mode. Subscribed to by CODEC, HID, GSP, CAMERA, MIC, NDM and PTM. GSP shutdowns LCD in receipt to this, etc. |
| + | |- |
| + | | 0x300 |
| + | | Signaled after sleep mode exit and during system boot, subscribed to by NDM. |
| + | |- |
| + | | 0x301 |
| + | | Signaled just before sleep mode is exited from, subscribed to by FRIENDS and NDM. |
| |- | | |- |
| | 0x302 | | | 0x302 |
− | | Unknown. Signaled by nwm module. | + | | Unknown. Signaled by nwm/AC module. |
| |- | | |- |
| | 0x303 | | | 0x303 |