Difference between revisions of "Services API"

From Nintendo Switch Brew
Jump to navigation Jump to search
(by sysmodule)
Line 103: Line 103:
 
| u1: User, su: Admin
 
| u1: User, su: Admin
 
|-
 
|-
| aoc:u
+
| appletAE, appletOE, omm, spsm
| AddOn Content services  
+
| Applet services, [[OMM services]]
 
|
 
|
 
|-
 
|-
| appletAE, appletOE
+
| aoc:u, mii:u, mii:e, ns:am, ns:su, ns:dev, pl:u, ovln:rcv, ovln:snd, pdm:ntfy, pdm:qry
| Applet services
+
| [[NS Services]]
|
+
| am: Application Manager, su: System Update
 
|-
 
|-
| apm, apm:p, apm:sys
+
| apm, apm:p, apm:sys, fgm, fgm:0, fgm:9
 
| ?
 
| ?
 
|
 
|
 
|-
 
|-
| arp:r, arp:w
+
| arp:r, arp:w, bgtc:t, bgtc:sc
| Activity Report services?
+
|
 
| r: Reader, w: Writer
 
| r: Reader, w: Writer
 
|-
 
|-
| audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl
+
| audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl, codecctl, hwopus
 
| Audio services
 
| Audio services
 
|
 
|
 
|-
 
|-
| bcat:a, bcat:u, bcat:m, bcat:s
+
| <nowiki>bcat:a, bcat:u, bcat:m, bcat:s, news:a, news:c, news:m, news:p, news:v, prepo:u, prepo:s, prepo:m, prepo:a</nowiki>
| BCAT services
+
| News services
 
|
 
|
 
|-
 
|-
| bgtc:t, bgtc:sc
+
| bpc, bpc:r, pcv, pcv:imm, time:u, time:a, time:s
| Task services
 
|
 
|-
 
| bpc, bpc:r
 
 
| [[BPC services]]
 
| [[BPC services]]
 
|
 
|
 
|-
 
|-
| bsd:u, bsd:s, bsdcfg
+
| bsd:u, bsd:s, bsdcfg, ethc:c, ethc:i, nsd:u, nsd:a, sfdnsres
| [[Sockets services]]
+
| [[Sockets services]], [[NSD services]]
 
|
 
|
 
|-
 
|-
Line 144: Line 140:
 
|-
 
|-
 
| btm, btm:dbg, btm:sys
 
| btm, btm:dbg, btm:sys
| Bluetooth Manager services?
+
| Battery services?
 
|  
 
|  
 
|-
 
|-
| caps:a, caps:c, caps:sc, caps:ss
+
| caps:a, caps:c
 
| Capture services
 
| Capture services
 
| a: Album, ss: Screenshot
 
| a: Album, ss: Screenshot
 
|-
 
|-
| codecctl
+
| caps:sc, caps:ss, mm:u, vi:m, vi:s, vi:u
| Codec services
+
| [[Display services]]
| Tegra hardware service
+
|
 
|-
 
|-
 
| csrng
 
| csrng
Line 167: Line 163:
 
|
 
|
 
|-
 
|-
| ethc:c, ethc:i
+
| fan, psm, tc, ts
| Ethernet Controller services?
+
|
 
|
 
|
|-
 
| fan
 
| Fan services
 
| Tegra hardware service
 
 
|-
 
|-
 
| fatal:u, fatal:p
 
| fatal:u, fatal:p
 
| Fatal Error services
 
| Fatal Error services
 
| u: User, p: Privileged?
 
| u: User, p: Privileged?
|-
 
| fgm, fgm:0, fgm:9
 
| Foreground Manager services
 
|
 
 
|-
 
|-
 
| friend:u, friend:v, friend:m, friend:s, friend:a
 
| friend:u, friend:v, friend:m, friend:s, friend:a
Line 191: Line 179:
 
| srv: Main, ldr: Loader, pr: Program Registry
 
| srv: Main, ldr: Loader, pr: Program Registry
 
|-
 
|-
| gpio
+
| gpio, i2c, i2c:pcv, pinmux, pwm, uart
| GPIO services
+
| [[I2C services]], [[UART services]]
| Tegra hardware service
+
|
 
|-
 
|-
| hid, hid:dbg, hid:sys
+
| hid, hid:dbg, hid:sys, irs, irs:sys
 
| [[HID services]]
 
| [[HID services]]
 
|
 
|
|-
 
| hwopus
 
| Hardware Support services?
 
| Tegra hardware service
 
|-
 
| i2c, i2c:pcv
 
| [[I2C services]]
 
| Tegra hardware service
 
|-
 
| irs, irs:sys
 
| IR Sensor services?
 
|
 
 
|-
 
|-
 
| lbl
 
| lbl
Line 227: Line 203:
 
|
 
|
 
|-
 
|-
| lr
+
| lr, ncm
| ?
+
| [[Content Manager services]]
 
|
 
|
|-
 
| mii:u, mii:e
 
| Mii services
 
|
 
|-
 
| ncm
 
| [[Content Manager services]]
 
|
 
|-
 
| <nowiki>news:a, news:c, news:m, news:p, news:v</nowiki>
 
| News services
 
|
 
 
|-
 
|-
 
| nfc:am, nfc:mf:u, nfc:user, nfc:sys
 
| nfc:am, nfc:mf:u, nfc:user, nfc:sys
Line 251: Line 215:
 
|  
 
|  
 
|-
 
|-
| nim, nim:shp
+
| nim, nim:shp, ntc
 
| NIM services
 
| NIM services
 
| shp: eShop
 
| shp: eShop
Line 259: Line 223:
 
|
 
|
 
|-
 
|-
| ns:am, ns:su, ns:dev
+
| nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvmemp
| [[NS Services]]
 
| am: Application Manager, su: System Update
 
|-
 
| nsd:u, nsd:a
 
| [[NSD services]]
 
|
 
|-
 
| ntc
 
| ?
 
|
 
|-
 
| nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvmemp, mm:u
 
 
| [[NV services]]
 
| [[NV services]]
 
|
 
|
|-
 
| omm
 
| [[OMM services]]
 
|
 
|-
 
| ovln:rcv, ovln:snd
 
| Overlay Notification services
 
| rcv: Receiver, snd: Sender
 
 
|-
 
|-
 
| pcie
 
| pcie
 
| [[PCIe services]]
 
| [[PCIe services]]
| Tegra hardware service
+
|
 
|-
 
|-
 
| pctl, pctl:a, pctl:s, pctl:r
 
| pctl, pctl:a, pctl:s, pctl:r
 
| Parental Control services
 
| Parental Control services
|
 
|-
 
| pcv, pcv:imm
 
| ?
 
|
 
|-
 
| pdm:ntfy, pdm:qry
 
| Play Log services
 
|
 
|-
 
| pinmux
 
| Pinmux services
 
| Tegra hardware service
 
|-
 
| pl:u
 
| Shared Font services
 
 
|
 
|
 
|-
 
|-
 
| pm:bm, pm:shell
 
| pm:bm, pm:shell
 
| [[Process Manager services]]
 
| [[Process Manager services]]
|
 
|-
 
| prepo:u, prepo:s, prepo:m, prepo:a
 
| [[Play Report services]]
 
 
|
 
|
 
|-
 
|-
Line 318: Line 242:
 
| ?
 
| ?
 
|  
 
|  
|-
 
| psm
 
| Power Supply services?
 
| Tegra hardware service
 
|-
 
| pwm
 
| Pulse Width Modulation services
 
| Tegra hardware service
 
 
|-
 
|-
 
| set, set:fd, set:cal, set:sys
 
| set, set:fd, set:cal, set:sys
 
| [[Settings services]]
 
| [[Settings services]]
 
| cal: Calendar?, sys: System Settings
 
| cal: Calendar?, sys: System Settings
|-
 
| sfdnsres
 
| DNS resolver services
 
|
 
|-
 
| spsm
 
| Screen Power Supply services?
 
| Tegra hardware service
 
 
|-
 
|-
 
| ssl
 
| ssl
Line 346: Line 254:
 
| [[SPL services]]
 
| [[SPL services]]
 
|  
 
|  
|-
 
| tc
 
| ?
 
|
 
|-
 
| time:u, time:a, time:s
 
| Time services
 
|
 
|-
 
| ts
 
| ?
 
|
 
|-
 
| uart
 
| [[UART services]]
 
| Tegra hardware service
 
 
|-
 
|-
 
| usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm
 
| usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm
 
| USB services
 
| USB services
 
|  
 
|  
|-
 
| vi:m, vi:s, vi:u
 
| [[Display services]]
 
|
 
 
|}
 
|}
  
 
[[Category:Services]]
 
[[Category:Services]]

Revision as of 14:40, 23 June 2017

Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).

Handles for services are retrieved from the service manager port, "sm:". Manager service "sm:m" also exists. Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.

sm:

Cmd Name
0 #Initialize
1 #GetService
2 #RegisterService
3 #UnregisterService

Initialize

Word Value
0 0x00000004
1 0x8000000A
2 0x00000001
0-1 Pid
0 "SFCI"
1 0x00000000
2 Always 0.

GetService

Word Value
0 0x00000004
1 0x0000000A
0 "SFCI"
1 0x00000001
2 Service name, zero padded and casted to u64.

RegisterService

Word Value
0 0x00000004
1 0x0000000C
0 "SFCI"
1 0x00000002
2 Service name, zero padded and casted to u64.
3 Max sessions? 32-bit integer.
4 Unknown bool

UnregisterService

Word Value
0 0x00000004
1 0x0000000A
0 "SFCI"
1 0x00000003
2 Service name, zero padded and casted to u64.

sm:m

This service is presumably equivalent to 3DS "srv:pm".

Service List

Service names Description Notes
acc:u0, acc:u1, acc:aa, acc:su Account services u1: User, su: Admin
appletAE, appletOE, omm, spsm Applet services, OMM services
aoc:u, mii:u, mii:e, ns:am, ns:su, ns:dev, pl:u, ovln:rcv, ovln:snd, pdm:ntfy, pdm:qry NS Services am: Application Manager, su: System Update
apm, apm:p, apm:sys, fgm, fgm:0, fgm:9 ?
arp:r, arp:w, bgtc:t, bgtc:sc r: Reader, w: Writer
audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl, codecctl, hwopus Audio services
bcat:a, bcat:u, bcat:m, bcat:s, news:a, news:c, news:m, news:p, news:v, prepo:u, prepo:s, prepo:m, prepo:a News services
bpc, bpc:r, pcv, pcv:imm, time:u, time:a, time:s BPC services
bsd:u, bsd:s, bsdcfg, ethc:c, ethc:i, nsd:u, nsd:a, sfdnsres Sockets services, NSD services
btdrv Bluetooth Driver services?
btm, btm:dbg, btm:sys Battery services?
caps:a, caps:c Capture services a: Album, ss: Screenshot
caps:sc, caps:ss, mm:u, vi:m, vi:s, vi:u Display services
csrng Secure RNG services
erpt:c, erpt:r Error Report services
es ETicket services?
fan, psm, tc, ts
fatal:u, fatal:p Fatal Error services u: User, p: Privileged?
friend:u, friend:v, friend:m, friend:s, friend:a Friend services
fsp-srv, fsp-ldr, fsp-pr Filesystem services srv: Main, ldr: Loader, pr: Program Registry
gpio, i2c, i2c:pcv, pinmux, pwm, uart I2C services, UART services
hid, hid:dbg, hid:sys, irs, irs:sys HID services
lbl Backlight services
ldn:m, ldn:s, ldn:u Local Network Monitor services
ldr:pm, ldr:ro, ldr:shel, ldr:dmnt Loader services
lm Log services
lr, ncm Content Manager services
nfc:am, nfc:mf:u, nfc:user, nfc:sys NFC services
nifm:u, nifm:a, nifm:s Network Interface services
nim, nim:shp, ntc NIM services shp: eShop
npns:u, npns:s ?
nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvmemp NV services
pcie PCIe services
pctl, pctl:a, pctl:s, pctl:r Parental Control services
pm:bm, pm:shell Process Manager services
psc:c, psc:m ?
set, set:fd, set:cal, set:sys Settings services cal: Calendar?, sys: System Settings
ssl SSL services
spl: SPL services
usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm USB services