Lioncash
a06bfb74a7
kernel/random: Avoid casting away const in the U8TO32_LITTLE macro
...
This macro is only ever used with const input data within chachaInit(),
which causes -Wcast-qual warnings. This is trivial enough to fix, by
preserving the qualifier within the cast.
2018-09-18 01:13:04 +02:00
fincs
4645ef7004
gfx: Add gfxAppendFence. Remove obsolete comments related to double buffering.
2018-09-16 18:03:35 +02:00
fincs
a50942509f
NvGpfifo: Redesign API to allow for submitting multiple entries at once
2018-09-16 16:35:57 +02:00
plutooo
4a13ee3e62
Fix function name to not cause linker problems due to symbol truncation issues
2018-09-15 08:42:32 +02:00
Lioncash
9ff32e3260
Resolve trivial -Wmissing-prototypes warnings
...
Gets rid of trivial warnings caused by headers not being included into
the relevant .c file, empty parameter lists missing void, or functions
missing a prototype in the header.
2018-09-14 19:07:34 +02:00
fincs
e7ae7ea846
nv wrappers: Handle cacheability settings properly, more details:
...
- nvAddressSpaceMapBuffer now accepts a flags parameter instead of
hardcoding NvMapBufferFlags_IsCacheable.
- NvBufferFlags was incorrect and was thus removed.
- nvBufferCreate/nvBufferCreateRw replaced with nvBufferCreate, with
an extra 'is_cacheable' bool parameter. There's no such thing as a
"read-only/read-write" buffer.
- nvBufferMakeCpuUncached/nvBufferMakeCpuCached were removed.
2018-09-14 18:09:58 +02:00
fincs
f469fa7458
Add nvioctlChannel_KickoffPb (uses Ioctl2)
2018-09-14 02:15:55 +02:00
fincs
cae1954ebc
nv: add cloned session handle used with certain requests; add Ioctl2
2018-09-14 02:15:24 +02:00
fincs
1cbc67e650
NvBuffer: actually unmap and free the buffer in nvBufferFree
2018-09-13 20:05:55 +02:00
Rajko Stojadinovic
dcdb5c28a4
Fix fsOpenFileSystem ( #153 )
...
* Fix fsOpenFileSystem
* Make fsOpenFileSystem and fsOpenFileSystemWithId work on all firmware versions
* Add some comments for fsOpenFileSystem(WithId)
2018-09-09 19:56:38 +02:00
Random
122fec028c
Added nsListApplicationRecord and nsListContentMetaStatus ( #163 )
2018-09-09 19:56:16 +02:00
neonsea
20a39ef86c
Add appletBeginBlockingHomeButton() and appletEndBlockingHomeButton() ( #165 )
2018-09-09 19:55:53 +02:00
XorTroll
cd813ddb60
Add psm service and psmGetBatteryChargePercentage function (fixed) ( #166 )
2018-09-09 19:55:36 +02:00
Michael Scire
6ef26bff1a
Implement kernelAbove600()
2018-09-09 19:55:12 +02:00
fincs
81d56a9e23
console: disable forced flush/swap/vblank due to performance reasons
2018-09-08 14:19:24 +02:00
fincs
52c0cee10c
Add nvioctlChannel_SetTimeout & nvChannelSetTimeout
2018-09-08 14:17:54 +02:00
fincs
999edaa8b2
Changes to NvCmdList and NvGpfifo, see details:
...
- NvCmdList:
- Added 'offset' parameter: start of the cmdlist within the buffer
- Added nvCmdListReset for resetting a cmdlist (offset/num_cmds cleared)
- NvGpfifo:
- nvGpfifoCreate: disabled fence wait
- nvGpfifoSubmit -> nvGpfifoSubmitCmdList:
- Added fence_incr parameter
- Cleaned up flags and gpfifo entry creation
- Now advances cmdlist offset by the number of cmds submitted
instead of going back to the beginning
2018-09-07 17:27:15 +02:00
fincs
7f4001bec2
Potentially fix race condition nvGpfifoCreate by waiting on the fence returned by nvioctlChannel_AllocGpfifoEx2
2018-09-05 14:00:28 +02:00
fincs
d718a8dd28
NvBufferFlags_Nintendo doesn't exist, it's a misreading of the alignment parameter
2018-09-05 13:59:50 +02:00
fincs
e3a7187973
gfx: Remove gfxSetDrawFlip. Make 0 the default transform instead of FLIP_V.
2018-08-31 20:14:50 +02:00
fincs
0d1b8bd723
BqQueueBufferInput: add swapInterval field (purpose currently unknown)
2018-08-31 20:11:53 +02:00
fincs
651dd72ac1
Add bqCancelBuffer and use it in gfx.c
2018-08-31 14:14:54 +02:00
fincs
c8ebe8a3b5
buffer_producer: convert Binder error codes to Result values
2018-08-31 14:05:04 +02:00
fincs
a62fae427b
Introduce Module_LibnxBinder result codes (based on Android status_t) and binderConvertErrorCode
2018-08-31 13:59:18 +02:00
fincs
819a6f0d89
display/binder.h: refactoring and other changes:
...
- Removed session_handle/native_handle state
- Consequence of the above: simplified binderCreate/binderInitSession
- Now using viGetSession_IHOSBinderDriverRelay internally
- Changed binderGetNativeHandle to return an Event
- Added readable aliases for binderAdjustRefcount
- gfx: now using async bqDequeueBuffer when the binder event is available
2018-08-31 13:05:23 +02:00
fincs
60cbb68f46
gfx: use new NvFence waiting code
2018-08-31 13:05:23 +02:00
fincs
a70acdd445
Implement nvFence
2018-08-31 13:05:23 +02:00
fincs
57e1f5f4cb
nvioctlNvhostCtrl: add EventWaitAsync, EventUnregister; fix EventRegister
2018-08-31 13:05:23 +02:00
fincs
99f37184fb
nvQueryEvent: return an Event instead of a raw Handle
2018-08-31 13:05:23 +02:00
fincs
7f8b6af64c
runtime/newlib.c: use armGetSystemTick instead of svcGetSystemTick
2018-08-31 13:05:23 +02:00
fincs
b26bb6ce76
viGetDisplayVsyncEvent: return an Event instead of a raw handle
2018-08-31 13:05:22 +02:00
fincs
88e9d3bb83
kernel/event.h: several fixes, including autoclear support
2018-08-31 13:05:22 +02:00
fincs
f2f59c75c0
display/gfx.h & buffer_producer.h: Start major refactor, highly WIP
2018-08-31 13:05:22 +02:00
fincs
10684e205a
nvidia/fence.h: sketching on NvFence/NvMultiFence {not implemented}
2018-08-31 13:05:22 +02:00
fincs
30e2ca8ec3
Introduce nvidia/types.h & move NvBufferKind to it (renamed to NvKind)
2018-08-31 13:05:22 +02:00
fincs
27f5aecea8
nvgfx: Strip down to bare minimum - remove unused logic
2018-08-31 13:05:22 +02:00
fincs
4e7159ce02
VI service: major revamp, see details:
...
- Added viOpenDefaultDisplay.
- Replaced viOpenLayer with viCreateLayer.
- NativeWindow parcel data is now parsed by viCreateLayer, and the
ViLayer struct contains a new igbp_binder_obj_id field.
- LayerFlags/LayerId parameters replaced by weak global variables
__nx_vi_layer_id/__nx_vi_stray_layer_flags.
- The root vi:* session is closed on startup.
- Simplified corresponding gfx code.
- Misc style fixes
2018-08-31 13:05:22 +02:00
fincs
180cd9b550
display/parcel.h: publish ParcelHeader struct
2018-08-31 13:05:22 +02:00
fincs
a0b3d3e193
source/nvidia/: do NOT include <switch.h>
2018-08-31 13:05:22 +02:00
Jules Blok
e234129598
gfx: Add a buffer index to gfxGetFramebufferHandle().
2018-08-31 13:05:22 +02:00
Jules Blok
4f331eb9f7
gfx: Add function to query framebuffer pitch.
2018-08-31 13:05:22 +02:00
Jules Blok
06e50f74ab
gfx: Add a call to get the framebuffer nvmap handle.
2018-08-31 13:05:22 +02:00
Jules Blok
d93c45a18d
gpfifo: Reset the command buffer after submission.
...
Don't forget to wait on the fence before re-using the buffer.
2018-08-31 13:05:22 +02:00
Jules Blok
9ce884f29e
cmd_list: The number of entries is the number of ints.
2018-08-31 13:05:22 +02:00
Jules Blok
3a750138c5
buffer: Align the size based on the param.
2018-08-31 13:05:22 +02:00
Jules Blok
cd85610ebb
Fix nvBuffer memory allocation failure
2018-08-31 13:05:22 +02:00
plutooo
de93886c56
Buildfix
2018-08-31 13:05:22 +02:00
plutooo
a3a2e57fc2
More updates to nvidia
2018-08-31 13:05:22 +02:00
plutooo
1c88d99131
Implement cmd list
2018-08-31 13:05:22 +02:00
plutooo
d6dbb59872
Change code style
2018-08-31 13:05:22 +02:00
plutooo
9c234d4d40
Started sketching on cmd lists
2018-08-31 13:05:22 +02:00
plutooo
50718ddccb
Bad cleanup in gpu.c
2018-08-31 13:05:22 +02:00
plutooo
6d21700ff7
Get rid of flag todo
2018-08-31 13:05:22 +02:00
plutooo
28cac45af8
Completing error notifier
2018-08-31 13:05:22 +02:00
plutooo
267e4e509b
Error notifier bringup
2018-08-31 13:05:22 +02:00
plutooo
d22bc791f4
Nv fixes
2018-08-31 13:05:22 +02:00
plutooo
d6f2e1118c
Zcull context works
2018-08-31 13:05:22 +02:00
plutooo
420d445a84
Minor fixes, now gets to whitescreen
2018-08-31 13:05:22 +02:00
plutooo
577a76dc06
Minor fixes, adding custom flag to buffer allocation
2018-08-31 13:05:22 +02:00
plutooo
1a22b484f8
Implemented zcull_ctx, 3d_ctx, random fixes
2018-08-31 13:05:21 +02:00
plutooo
cff044f497
Implement 3d_ctx
2018-08-31 13:05:21 +02:00
plutooo
87d29bdeb3
gpu takes reference on singletons
2018-08-31 13:05:21 +02:00
plutooo
f62f6e8b54
Add refcounting to nvidia stuff
2018-08-31 13:05:21 +02:00
plutooo
e7daaf1e71
Hide nv tmem size from gfx
2018-08-31 13:05:21 +02:00
plutooo
74958c57ce
Use reference counting across services
2018-08-31 13:05:21 +02:00
plutooo
194e335532
Let nv reference applet
2018-08-31 13:05:21 +02:00
plutooo
efacee6956
Simplify nv
2018-08-31 13:05:21 +02:00
plutooo
4b20f609a9
Stubbed 3d_ctx
2018-08-31 13:05:21 +02:00
plutooo
1660f99afe
Stubbed gpfifo, zcull_ctx
2018-08-31 13:05:21 +02:00
plutooo
4bd1d3313c
Fix nvgfx, add nvinfo
2018-08-31 13:05:21 +02:00
plutooo
f6aa4e3d52
Minimize nvgfx.c
2018-08-31 13:05:21 +02:00
plutooo
b24f6babbb
Make compilable
2018-08-31 13:05:21 +02:00
plutooo
61ebd9ddfd
Started implementing channels
2018-08-31 13:05:21 +02:00
plutooo
9a759c26f5
Rename nvmap->buffer
2018-08-31 13:05:21 +02:00
plutooo
04751087ca
Stylechanges to binder, and implemented gpu address space
2018-08-31 13:05:21 +02:00
plutooo
cd753b1b58
Implemented nvmap.c
2018-08-31 13:05:21 +02:00
plutooo
112b2b5d8e
Move nvidia driver to nvidia/
2018-08-31 13:05:21 +02:00
plutooo
d8bb563546
Renamed gfx/ to display/
2018-08-31 13:05:21 +02:00
plutooo
978c3f7f15
Style fixes, use structs for parsing parcels, renamed bufferProducer to bq
2018-08-31 13:05:21 +02:00
fincs
772c839c8c
Add audio/ ("AudioDriver"), a high level wrapper around audren
2018-08-31 13:05:21 +02:00
fincs
6fbf25fb62
Add audren:u IPC service wrapper with structure definitions
2018-08-31 13:05:21 +02:00
fincs
80439a186b
Add MOD0 header to crt0
2018-08-31 13:05:21 +02:00
plutooo
68a77ac950
Close sm session properly
2018-08-28 21:29:55 +02:00
David Marcec
d91c315f77
Fixed nifm not initializing properly for < 3.0.0
2018-08-27 16:10:53 +02:00
XorTroll
722450ae25
Add bpc service with ShutdownSystem and RebootSystem commands ( #144 )
2018-08-24 16:21:16 +02:00
Juan Antonio Hernández Cánovas
377683acd5
Add rwlockInit ( #155 )
2018-08-24 16:20:01 +02:00
yellows8
3513c91c3c
Added the remaining init for AppletType_SystemApplet.
2018-08-17 21:55:37 -04:00
yellows8
a7ba75ea1a
Added comment regarding the AppletType_Application double-init issue.
2018-08-15 16:32:11 -04:00
plutooo
fb42ebe53a
Fix memory leak in tmemCreate
2018-08-11 15:01:12 +02:00
Lioncash
d3f388d2c8
socket: Correct missing break within _socketParseBsdResult()
2018-08-09 14:53:41 +02:00
Lioncash
12a473ecbe
hid: Correct bitwise AND for pro controllers in hidInitializeVibrationDevices()
...
LAYOUT_PROCONTROLLER is a value of zero, so the bitwise AND condition
here would always be false (TYPE_PROCONTROLLER, on the other hand is a
value of 1)
2018-08-09 14:53:26 +02:00
fincs
f3b530cea3
C11 threads: enable preemptive scheduler and load balancing
2018-08-06 17:59:51 +02:00
fincs
b181d725ac
Use revised CondVar API in C11 threads impl
2018-08-05 14:32:10 +02:00
fincs
1e349b6ce8
Change CondVar API to have the mutex be passed to condvarWait* instead of condvarInit
2018-08-05 14:31:31 +02:00
fincs
062ef2b188
Add svcGetThreadCoreMask and svcSetThreadCoreMask
2018-08-05 14:30:08 +02:00
fincs
d255fe730b
Experimental partial C11 threads support
2018-08-05 13:23:08 +02:00
plutooo
9fc5e85c88
Event bringup
2018-08-05 13:23:08 +02:00
Jakob Dietrich
8e19bb5b0d
Fix semaphoreTryWait
2018-08-04 12:14:02 +02:00
Michael Scire
81e6972ae1
Fatal: fix marshalling
2018-07-28 18:24:19 -07:00
Rajko Stojadinovic
d726c7c55c
Implement some missing fs functions ( #141 )
2018-07-28 17:49:14 +02:00
klockee
27b8868646
Wrapped and implemented fsOpenBisFilesystem() ( #140 )
2018-07-28 17:08:42 +02:00
Rajko Stojadinovic
01fb4218ba
Add ncmContentStorageGetPlaceHolderPath and ncmContentStorageCleanupAllPlaceHolder
2018-07-27 18:14:43 +02:00
Rajko Stojadinovic
1b7acba590
add ncmContentStorageDisableForcibly and ncmContentMetaDatabaseDisableForcibly
2018-07-27 18:14:43 +02:00
Rajko Stojadinovic
c3278ffd34
Add ncmContentStorage functions needed for writing content
2018-07-27 18:14:43 +02:00
Jakob Dietrich
a180a36cb3
Fixed hid in sysmodules ( #135 )
2018-07-27 18:01:41 +02:00
Dave Murphy
be509f62ce
return through libc exit rather than __libnx_exit directly ( #139 )
2018-07-26 18:01:40 +02:00
Rajko Stojadinovic
e1d50dc129
Fix signature of ncmContentMetaDatabaseSet/Get, add ncmContentMetaDatabaseList ( #134 )
...
* Fix ncmContentMetaDatabaseSet/ncmContentMetaDatabaseGet, add ncmContentMetaDatabaseList
2018-07-25 20:15:54 -04:00
Oliver Kuckertz
1eafa1b283
Fix data race by reordering in _CacheValues
2018-07-22 17:03:36 +02:00
Joel16
2bcede91ba
Add fsFsCleanDirectoryRecursively
2018-07-19 11:33:56 -04:00
Dave Murphy
aa3c35e6e3
adjust fsdev_fixpath for cwd changes ( #132 )
...
* adjust fsdev_fixpath for cwd changes
2018-07-19 11:31:51 -04:00
Adubbz
d48cf6aa2e
Added ncm to switch.h, fixed wrong order in ncmContentMetaDatabaseListApplication
2018-07-19 11:29:48 -04:00
tesnos
9530da3237
Add fsOpenBisStorage and fsStorageGetSize ( #130 )
...
* add fsOpenBisStorage and fsStorageGetSize
2018-07-19 11:16:38 -04:00
Adubbz
e4c3f7d3a2
Added ncm commands ( #129 )
2018-07-07 04:03:48 +02:00
Daniel Edwards
ffc404a7f6
Added accountGetUserCount and accountListAllUsers ( #103 )
...
* Added accountGetUserCount and accountListAllUsers
2018-07-01 16:34:21 -04:00
Kevoot
fbe2c1f2ce
Add Semaphore ( #125 )
2018-07-01 00:45:41 +02:00
SciresM
97b295acbc
Fatal: Only exit process if required, exit cleanly. ( #127 )
...
* Fatal: Only exit process if required, exit cleanly.
2018-06-26 11:28:07 -04:00
Dave Murphy
35be7ac772
allow user additions to init/exit code ( #124 )
...
* allow user additions to init/exit code
2018-06-25 12:42:52 -04:00
SciresM
dbbaf64ad3
ns:dev: Add TerminateProcess and TerminateProgram ( #122 )
...
* ns:dev: Add TerminateProcess and TerminateProgram
2018-06-25 12:02:08 -04:00
Michael Scire
9770f4bb18
Implement svcGetThreadList
2018-06-25 11:18:07 -04:00
Michael Scire
481d27d1f1
Implement svcGetDebugThreadParam
2018-06-25 11:18:07 -04:00
gdkchan
b55317511c
Fix mutexUnlock
2018-06-25 11:12:45 -04:00
Michael Scire
c26e410ed8
Fatal: Make fatalSimple not create report, add FatalType enum
2018-06-25 12:33:15 +02:00
Dave Murphy
8b2b12b454
fix _IOC cast
2018-06-14 18:26:29 -04:00
Dave Murphy
4e4d2fe3c6
translate horizon errno to newlib errno
2018-06-14 18:25:52 -04:00
Dave Murphy
70cd9e017d
fix ioctl
2018-06-14 01:51:36 +02:00
Joel16
eb3c264e88
Add setsysSetColorSetId and region codes
2018-06-13 19:34:20 -04:00
Dave Murphy
9860ad331c
implement nanosleep
2018-06-14 00:49:20 +02:00
jarulo
8b793729fc
Fix inet_pton4
2018-06-12 13:08:27 +02:00
Somebody Whoisbored
ad4af954c2
Added nifm service ( #110 )
...
* Added nifm service
* Properly implemented gethostid
* Implemented gethostname
2018-06-07 18:00:51 -04:00
Joel
3c6344d7f3
Add more set:sys Get*/Set* functions ( #108 )
...
* Use setsysGetFlag/setsysSetFlag instead of setsysGet*/setsysSet*.
* Added more setsys Flags (now handled via an enum).
2018-06-07 16:06:36 -04:00
Dave Murphy
3326d5e62d
Time fixes ( #102 )
...
* provide microseconds to gettimeofday
* implement clock functions
2018-06-07 15:35:41 -04:00
Joel
1abfb02460
Add nsGetSpace commands ( #111 )
...
* Add nsGetSpace commands
2018-06-05 22:15:52 -04:00
Adubbz
d3889fb9ed
Added a few misc IPC wrappers ( #107 )
...
* Added a few misc IPC wrappers
2018-06-04 22:05:51 -04:00
jarulo
a5381e43c0
Fix incorrect pointer reference in socketDeserializeAddrInfo
2018-05-29 15:29:39 -04:00
Joel
deab92d486
Add some setsysGet* functions ( #98 )
...
* Add some setsysGet* functions
2018-05-22 11:33:45 -04:00
yellows8
b11288ea44
In jitTransitionToWritable() and jitTransitionToExecutable(), only run the JitType_CodeMemory handling code when it's actually needed. Actually free j->rx_addr in jitClose() for JitType_JitMemory.
2018-05-21 16:59:49 -04:00
yellows8
a12eb11eab
Sync jit SVC names with wiki + updated the comment for JitType_JitMemory in jit.h.
2018-05-21 14:32:02 -04:00
yellows8
93957370a9
Disable using JitType_JitMemory on 5.0.0+, resulting in falling back to JitType_CodeMemory if available.
2018-05-21 14:04:20 -04:00
yellows8
726f8adfe3
Replaced the hard-coded timeout error constant in nvgfxEventWait() with the one from result.h. This fixes an issue caused by a past commit.
2018-05-19 21:45:18 -04:00
Joel
3605e40dbd
Add string.h to remove compile error ( #96 )
...
* Add string.h to remove compile error
2018-05-19 15:41:15 -04:00
Joel
c28cae95cd
Add setGetSerialNumber ( #95 )
2018-05-19 16:50:00 +02:00
yellows8
df203f0697
Added hidMergeSingleJoyAsDualJoy().
2018-05-18 18:42:48 -04:00
Dave Murphy
28ebb9ed0c
implement nxlink stdio redirect ( #94 )
2018-05-17 00:22:47 +02:00
Dave Murphy
71036319a7
translate crlf eol markers to lf for consistency
2018-05-15 12:27:25 +02:00
yellows8
fdf0949562
Fixed parsing in _socketDeserializeHostent().
2018-05-15 02:10:13 -04:00
Matthew Bell
61d4140773
Implement pm:info ( #88 )
...
* Added pm:info and GetTitleId
2018-05-14 21:09:43 -04:00
yellows8
5ebe01191e
Fixed hang in _socketDeserializeHostent().
2018-05-14 12:37:56 -04:00
yellows8
ce718b3ac2
Set h_errno and errno for the socket.c 'Unimplementable functions'.
2018-05-14 12:32:07 -04:00
yellows8
3f75b79803
Copy the HidControllerHeader for each controller into hid state. Added disabled hidGetControllerType().
2018-05-12 13:53:11 -04:00
yellows8
c548a76763
In select(), use pollinfo revents instead of events when processing poll() output.
2018-05-10 20:11:07 -04:00