Difference between revisions of "Services API"

From Nintendo Switch Brew
Jump to navigation Jump to search
(hwopus, alphabetize)
Line 124: Line 124:
 
|-
 
|-
 
| bcat:a, bcat:u, bcat:m, bcat:s
 
| bcat:a, bcat:u, bcat:m, bcat:s
| ?
+
| BCAT services
 
|
 
|
 
|-
 
|-
Line 144: Line 144:
 
|-
 
|-
 
| btm, btm:dbg, btm:sys
 
| btm, btm:dbg, btm:sys
| Bluetooth services?
+
| Bluetooth Manager services?
 
|  
 
|  
 
|-
 
|-
Line 150: Line 150:
 
| Capture services
 
| Capture services
 
| a: Album, ss: Screenshot
 
| a: Album, ss: Screenshot
 +
|-
 +
| codecctl
 +
| Codec services
 +
| Tegra hardware service
 
|-
 
|-
 
| csrng
 
| csrng
Line 164: Line 168:
 
|-
 
|-
 
| ethc:c, ethc:i
 
| ethc:c, ethc:i
| ?
+
| Ethernet Controller services?
 
|
 
|
 
|-
 
|-
 
| fan
 
| fan
| ?
+
| Fan services
|  
+
| Tegra hardware service
 
|-
 
|-
 
| fatal:u, fatal:p
 
| fatal:u, fatal:p
Line 176: Line 180:
 
|-
 
|-
 
| fgm, fgm:0, fgm:9
 
| fgm, fgm:0, fgm:9
| ?
+
| Foreground Manager services
 
|  
 
|  
 
|-
 
|-
Line 189: Line 193:
 
| gpio
 
| gpio
 
| GPIO services
 
| GPIO services
|  
+
| Tegra hardware service
 
|-
 
|-
 
| hid, hid:dbg, hid:sys
 
| hid, hid:dbg, hid:sys
Line 196: Line 200:
 
|-
 
|-
 
| hwopus
 
| hwopus
| ?
+
| Hardware Support services?
|
+
| Tegra hardware service
 
|-
 
|-
 
| i2c, i2c:pcv
 
| i2c, i2c:pcv
 
| [[I2C services]]
 
| [[I2C services]]
|  
+
| Tegra hardware service
 
|-
 
|-
 
| irs, irs:sys
 
| irs, irs:sys
Line 236: Line 240:
 
|-
 
|-
 
| <nowiki>news:a, news:c, news:m, news:p, news:v</nowiki>
 
| <nowiki>news:a, news:c, news:m, news:p, news:v</nowiki>
| News Services
+
| News services
 
|  
 
|  
 
|-
 
|-
Line 272: Line 276:
 
|-
 
|-
 
| omm
 
| omm
| ?
+
| [[OMM services]]
 
|  
 
|  
 
|-
 
|-
Line 281: Line 285:
 
| pcie
 
| pcie
 
| [[PCIe services]]
 
| [[PCIe services]]
|  
+
| Tegra hardware service
 
|-
 
|-
 
| pctl, pctl:a, pctl:s, pctl:r
 
| pctl, pctl:a, pctl:s, pctl:r
Line 296: Line 300:
 
|-
 
|-
 
| pinmux
 
| pinmux
| ?
+
| Pinmux services
|
+
| Tegra hardware service
 
|-
 
|-
 
| pl:u
 
| pl:u
Line 316: Line 320:
 
|-
 
|-
 
| psm
 
| psm
| ?
+
| Power Supply services?
|  
+
| Tegra hardware service
 
|-
 
|-
 
| pwm
 
| pwm
| ?
+
| Pulse Width Modulation services
|  
+
| Tegra hardware service
 
|-
 
|-
 
| set, set:fd, set:cal, set:sys
 
| set, set:fd, set:cal, set:sys
Line 332: Line 336:
 
|-
 
|-
 
| spsm
 
| spsm
| Screen power-supply services?
+
| Screen Power Supply services?
|  
+
| Tegra hardware service
 
|-
 
|-
 
| ssl
 
| ssl
Line 357: Line 361:
 
| uart
 
| uart
 
| [[UART services]]
 
| [[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

Revision as of 16:55, 15 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
aoc:u AddOn Content services
appletAE, appletOE Applet services
apm, apm:p, apm:sys ?
arp:r, arp:w Activity Report services? 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 Audio services
bcat:a, bcat:u, bcat:m, bcat:s BCAT services
bgtc:t, bgtc:sc Task services
bpc, bpc:r BPC services
bsd:u, bsd:s, bsdcfg Sockets services
btdrv Bluetooth Driver services?
btm, btm:dbg, btm:sys Bluetooth Manager services?
caps:a, caps:c, caps:sc, caps:ss Capture services a: Album, ss: Screenshot
codecctl Codec services Tegra hardware service
csrng Secure RNG services
erpt:c, erpt:r Error Report services
es ETicket services?
ethc:c, ethc:i Ethernet Controller services?
fan Fan services Tegra hardware service
fatal:u, fatal:p Fatal Error services u: User, p: Privileged?
fgm, fgm:0, fgm:9 Foreground Manager services
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 GPIO services Tegra hardware service
hid, hid:dbg, hid:sys HID services
hwopus Hardware Support services? Tegra hardware service
i2c, i2c:pcv I2C services Tegra hardware service
irs, irs:sys IR Sensor 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 ?
mii:u, mii:e Mii services
ncm Content Manager services
news:a, news:c, news:m, news:p, news:v News services
nfc:am, nfc:mf:u, nfc:user, nfc:sys NFC services
nifm:u, nifm:a, nifm:s Network Interface services
nim, nim:shp NIM services shp: eShop
npns:u, npns:s ?
ns:am, ns:su, ns:dev 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
omm OMM services
ovln:rcv, ovln:snd Overlay Notification services rcv: Receiver, snd: Sender
pcie PCIe services Tegra hardware service
pctl, pctl:a, pctl:s, pctl:r 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 Process Manager services
prepo:u, prepo:s, prepo:m, prepo:a Play Report services
psc:c, psc:m ?
psm Power Supply services? Tegra hardware service
pwm Pulse Width Modulation services Tegra hardware service
set, set:fd, set:cal, set:sys Settings services cal: Calendar?, sys: System Settings
sfdnsres DNS resolver services
spsm Screen Power Supply services? Tegra hardware service
ssl SSL services
spl: 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 services
vi:m, vi:s, vi:u Display services