Commit Graph

392 Commits

Author SHA1 Message Date
Michael Scire
9f7bc49438 ams: avoid UB infinite loops 2020-08-14 17:36:37 -07:00
Michael Scire
5d51dfdd6c kernel_ldr: use unoptimized memcpy before mmu bringup (closes #1102)
Before the MMU is up, all reads/writes must be aligned; the optimized
memcpy implementation does not guarantee all reads/writes it performs
are aligned.

This commit splits the libc impl to be separate for kernel/kernel_ldr,
and so now only kernel will use the optimized impl. This is safe,
as the MMU is brought up before kernel begins executing.
2020-08-02 15:02:55 -07:00
Michael Scire
b5c915a6f2 kern: complete final SVC stubs (KernelDebug/Trace debug-impl still TODO) 2020-08-01 15:31:46 -07:00
Michael Scire
227b9603cd kern: SvcReturnFromException 2020-08-01 15:31:46 -07:00
Michael Scire
2243c43449 kern: fix dynamic calculation of slab heap size 2020-08-01 15:31:45 -07:00
Michael Scire
f80eb2c26f kern SvcGetDebugThreadContext, SvcSetDebugThreadContext 2020-08-01 15:31:45 -07:00
Michael Scire
ff9d3ee1d6 kern: SvcGetDebugThreadParam 2020-08-01 15:31:45 -07:00
Michael Scire
bb044b1934 kern: clean up majority of TODOs 2020-08-01 15:31:44 -07:00
Michael Scire
d50efee2c7 kern: resolve final non-user-exception MESOSPHERE_UNIMPLEMENTED 2020-08-01 15:31:44 -07:00
Michael Scire
1c733577b4 kern: SvcGetDebugEventInfo64From32 2020-08-01 15:31:44 -07:00
Michael Scire
c7f108082b kern: resolve MESOSPHERE_UNIMPLEMENTEDs other than UserException 2020-08-01 15:31:44 -07:00
Michael Scire
3d5f2b7258 kern: Add real SvcBreak implementation 2020-08-01 15:31:43 -07:00
Michael Scire
b576737418 kern: SvcBreakDebugProcess, SvcTerminateDebugProcess 2020-08-01 15:31:43 -07:00
Michael Scire
179427687b kern: SvcSetHardwareBreakPoint 2020-08-01 15:31:43 -07:00
Michael Scire
3b9403f3fc kern: Svc(Legacy)ContinueDebugEvent 2020-08-01 15:31:42 -07:00
Michael Scire
349346ef34 kern: Add 4.x InitialProcessIdRange to SvcGetInfo 2020-08-01 15:31:42 -07:00
Michael Scire
a5d7e8328b kern: SvcQueryPhysicalAddress 2020-08-01 15:31:42 -07:00
Michael Scire
35af9a4996 kern: style parity for return in GetThreadList 2020-08-01 15:31:42 -07:00
Michael Scire
83020ce2c4 kern: SvcGetThreadList 2020-08-01 15:31:41 -07:00
Michael Scire
a0de667005 kern: SvcGetLastThreadInfo, SvcGetDebugFutureThreadInfo 2020-08-01 15:31:41 -07:00
Michael Scire
641e92e6a0 kern: SvcFlushDataCache, SvcFlushEntireDataCache 2020-08-01 15:31:41 -07:00
Michael Scire
ef6ede3aeb kern: SvcReadDebugProcessMemory, SvcWriteDebugProcessMemory 2020-08-01 15:31:40 -07:00
Michael Scire
8019804c7f kern: automatic PC alignment on ERET is implementation defined 2020-08-01 15:31:39 -07:00
Michael Scire
911a81430a kern: switch memset to optimized impl 2020-08-01 15:31:39 -07:00
Michael Scire
4a38e5d4b6 kern: use optimized memcmp/memcpy implementations 2020-08-01 15:31:39 -07:00
Michael Scire
c39da750f2 SvcQueryDebugProcessMemory 2020-08-01 15:31:38 -07:00
Michael Scire
85932bb91e kern: fix ARM vs THUMB mode selection on 32-bit entry 2020-08-01 15:31:38 -07:00
Michael Scire
fe1ab3785f kern: fix whoops in light ipc 2020-08-01 15:31:38 -07:00
Michael Scire
e8021705d8 kern: SendSyncRequestLight, ReplyAndReceiveLight 2020-08-01 15:31:37 -07:00
Michael Scire
395976f705 kern: fix bug in server handle cleanup 2020-08-01 15:31:37 -07:00
Michael Scire
ed54603dad kern: fix nonsensical copy/pasted comments in QueryMemory 2020-08-01 15:31:37 -07:00
Michael Scire
7368d41603 kern: QueryMemory64From32, QueryProcessMemory64From32 2020-08-01 15:31:36 -07:00
Michael Scire
fcee459e40 kern: add KCodeMemory code left out of previous commit 2020-08-01 15:31:36 -07:00
Michael Scire
a7de710f09 kern: implement KCodeMemory (and SVCs) 2020-08-01 15:31:36 -07:00
Michael Scire
1a5513760b kern: SvcGetSystemTick 2020-08-01 15:31:35 -07:00
Michael Scire
c64e490663 kern: implement SvcGetThreadContext3 2020-08-01 15:31:35 -07:00
Michael Scire
2cee81697c kern: correct behavior when setting activity/core mask for pinned thread 2020-08-01 15:31:35 -07:00
Michael Scire
be1314cb88 kern: implement thread pinning/SvcSynchronizePreemptionState 2020-08-01 15:31:34 -07:00
Michael Scire
371a273988 kern: fix building under release config 2020-08-01 15:31:34 -07:00
Michael Scire
b98450c9cf kern: Map L1/L2 blocks when possible 2020-08-01 15:31:34 -07:00
Michael Scire
89cc6468f9 kern: improve KLightLock accuracy 2020-08-01 15:31:34 -07:00
Michael Scire
e096d11e3a kern: fix assertion in KThread::(Try)Suspend 2020-08-01 15:31:33 -07:00
Michael Scire
52e5e0866a kern: fix bug in page table mapping calculations 2020-08-01 15:31:33 -07:00
Michael Scire
6935929c33 kern: SvcMapPhysicalMemoryUnsafe, SvcUnmapPhysicalMemoryUnsafe 2020-08-01 15:31:33 -07:00
Michael Scire
a56e8ca4b0 kern: General system stability improvements to enhance the user's experience. 2020-08-01 15:31:32 -07:00
Michael Scire
c624611487 kern: update interrupt manager 2020-08-01 15:31:32 -07:00
Michael Scire
10415aefee kern: SvcUnmapPhysicalMemory, cleanup thread pinning 2020-08-01 15:31:31 -07:00
Michael Scire
85a5cdd6a5 kern: SvcQueryProcessMemory64, notification SvcBreaks 2020-08-01 15:31:31 -07:00
Michael Scire
dc8fccd168 kern: implement SvcMapPhysicalMemory 2020-08-01 15:31:31 -07:00
Michael Scire
4822da6fea kern: finish SvcGetInfo 2020-08-01 15:31:30 -07:00
Michael Scire
b2af44006f kern: Implement SecureMemory (system resource) 2020-08-01 15:31:30 -07:00
Michael Scire
a22d1d04f2 kern: implement SvcSleepSystem 2020-08-01 15:31:30 -07:00
Michael Scire
16ce69e333 kern: SvcInvalidateProcessDataCache 2020-08-01 15:31:30 -07:00
Michael Scire
4c5bab3a5b kern: fix resource leak bugs 2020-08-01 15:31:29 -07:00
Michael Scire
c0c9fe5fd3 kern: SvcMapProcessCodeMemory, SvcUnmapProcessCodeMemory 2020-08-01 15:31:29 -07:00
Michael Scire
52d15eecd8 kern: Fix bug when reducing heap size 2020-08-01 15:31:29 -07:00
Michael Scire
600a069f00 kern SvcGetCurrentProcessorNumber, SvcSetProcessActivity, half of SvcSetThreadActivity 2020-08-01 15:31:29 -07:00
Michael Scire
bfca682c3f kern: SvcGetThreadCoreMask, SvcSetThreadCoreMask 2020-08-01 15:31:28 -07:00
Michael Scire
c9588f5739 kern: SvcSetMemoryPermission 2020-08-01 15:31:28 -07:00
Michael Scire
0cfdef738d kern: implement transfer memory (and SVCs) 2020-08-01 15:31:28 -07:00
Michael Scire
670824fa0a kern: implement process exit 2020-08-01 15:31:27 -07:00
Michael Scire
24eb07e72c kern: add SvcFlushProcessDataCache, SvcStoreProcessDataCache 2020-08-01 15:31:27 -07:00
Michael Scire
417ed5f01c kern: implement SvcSetMemoryAttribute 2020-08-01 15:31:27 -07:00
Michael Scire
4d03635829 kern: fix bugs in interrupt permittance, DpcManager init 2020-08-01 15:31:26 -07:00
Michael Scire
df019af185 kern: SvcGetProcessInfo, SvcTerminateProcess 2020-08-01 15:31:26 -07:00
Michael Scire
0013041509 kern: KConditionVariable::SignalImpl 2020-08-01 15:31:26 -07:00
Michael Scire
fe48b9163d kern: fully implement KSharedMemory (and Svcs) 2020-08-01 15:31:25 -07:00
Michael Scire
e5d0e2863b kern: add SvcStartProcess 2020-08-01 15:31:25 -07:00
Michael Scire
8cad49ee02 kern: add KProcess::Initialize (for non-kip processes) 2020-08-01 15:31:25 -07:00
Michael Scire
fcffa49fd5 kern: implement first half of SvcCreateProcess 2020-08-01 15:31:25 -07:00
Michael Scire
e760bd7038 kern: implement SvcMapProcessMemory, SvcUnmapProcessMemory 2020-08-01 15:31:24 -07:00
Michael Scire
4b3fb40ed9 kern: implement KThread::Finalize 2020-08-01 15:31:24 -07:00
Michael Scire
b26547b38c kern: KDevicePageTable::Finalize, InfoType_RandomEntropy 2020-08-01 15:31:24 -07:00
Michael Scire
19e2128cb8 kern: fix attribute checks in device unmap 2020-08-01 15:31:24 -07:00
Michael Scire
f8476cc761 kern: finish SvcGetSystemInfo 2020-08-01 15:31:23 -07:00
Michael Scire
69274df795 kern: dump page table on user exception 2020-08-01 15:31:23 -07:00
Michael Scire
d0a4bdba02 kern: implement ResourceLimit Svcs 2020-08-01 15:31:22 -07:00
Michael Scire
5bfe2eba66 kern: add ResourceLimit to svcGetInfo 2020-08-01 15:31:22 -07:00
Michael Scire
767a3fca3a kern: fix incorrect cache routines, implement SvcSetProcessMemoryPermission 2020-08-01 15:31:22 -07:00
Michael Scire
e30c8b6ac8 kern: implement SvcCancelSynchronization 2020-08-01 15:31:22 -07:00
Michael Scire
80f8b8b9b0 kern: fix bug in SvcSetThreadPriority 2020-08-01 15:31:21 -07:00
Michael Scire
ae68a9c38d kern: SvcCreateSession, KDebug finalization 2020-08-01 15:31:21 -07:00
Michael Scire
eeb12eb4a2 kern: implement SvcDebugActiveProcess, svcGetDebugEvent, SvcWaitProcessWideKeyAtomic 2020-08-01 15:31:21 -07:00
Michael Scire
ba1d964100 kern: fix bug in KPageTableBase::SetupForIpcServer 2020-08-01 15:31:20 -07:00
Michael Scire
e721b4494c kern: implement SvcSetThreadPriority 2020-08-01 15:31:20 -07:00
Michael Scire
29a3bafb6f kern: fix kscheduler interrupt api, adjust debug logging 2020-08-01 15:31:20 -07:00
Michael Scire
900a90a843 kern: fix bug in up/downcasting of scoped auto objects 2020-08-01 15:31:19 -07:00
Michael Scire
a22c0a84dd kern: implement SvcSignalToAddress, SvcWaitForAddress 2020-08-01 15:31:19 -07:00
Michael Scire
811cf0768a kern: add KAddressArbiter::WaitIfEqual 2020-08-01 15:31:19 -07:00
Michael Scire
e36b225951 kern: implement SvcSetHeapSize 2020-08-01 15:31:18 -07:00
Michael Scire
a572354a13 kern: implement all device address space svcs 2020-08-01 15:31:18 -07:00
Michael Scire
e179b5e1fa kern: retrieve target firmware from exosphere instead of hardcoding 2020-08-01 15:31:18 -07:00
Michael Scire
8295d4830d kern: implement DetachDeviceAddressSpace, skeleton other das funcs in KDevicePageTable 2020-08-01 15:31:18 -07:00
Michael Scire
d501c3832a kern: add infra (but not impl) for all DeviceAddressSpace svcs 2020-08-01 15:31:17 -07:00
Michael Scire
e7f2bd582b kern: qualify inherited KAutoObjectWithListContainer accessor typenames 2020-08-01 15:31:17 -07:00
Michael Scire
fd486a5efd kern: implement SvcGetProcessList 2020-08-01 15:31:17 -07:00
Michael Scire
d72564d522 kern: add SvcCreateDeviceAddressSpace, SvcAttachDeviceAddressSpace 2020-08-01 15:31:17 -07:00
Michael Scire
df104ecc34 kern: implement SvcCreateInterruptEvent 2020-08-01 15:31:16 -07:00
Michael Scire
160cec7cd8 kern: implement SvcCreateEvent, SvcSignalEvent, SvcClearEvent, SvcResetSignal 2020-08-01 15:31:16 -07:00
Michael Scire
f8b115eab6 kern: add SvcCreatePort, SvcConnectToPort 2020-08-01 15:31:16 -07:00
Michael Scire
e1f094d49e kern: add SvcReadWriteRegister 2020-08-01 15:31:16 -07:00
Michael Scire
03d30f5b15 kern: patch svc tables via asm, instead of relying on compiler to be nice 2020-08-01 15:31:15 -07:00
Michael Scire
ba0da382ad kern: Implement QueryIoMapping logic for < 8.0.0 2020-08-01 15:31:15 -07:00
Michael Scire
8dbdf596bc kern: Support older SVC ABIs 2020-08-01 15:31:15 -07:00
Michael Scire
1a8393e8b2 kern: add SvcQueryIoMapping (NOTE: pre-10.x, ABI needs update) 2020-08-01 15:31:11 -07:00
Michael Scire
dbc6d39d85 kern: fix/add InfoType_(Total/Used)(NonSystem/)MemorySize 2020-08-01 15:31:10 -07:00
Michael Scire
c9719ffac0 kern: assert correctness for complete class hierarchy 2020-08-01 15:31:10 -07:00
Michael Scire
262e992650 kern: fix bugs in Receive/Exchange ipc buffers 2020-08-01 15:31:10 -07:00
Michael Scire
cf5248957b kern: fix UpdateLock perms for ipc 2020-08-01 15:31:09 -07:00
Michael Scire
e0383c961f kern: fix unaligned map alias buffers 2020-08-01 15:31:09 -07:00
Michael Scire
9e2cecb4f6 kern: fix bugs in MapAlias ipc mappings 2020-08-01 15:31:09 -07:00
Michael Scire
cfece6452c kern: implement IPC KPageTable functionality 2020-08-01 15:31:09 -07:00
Michael Scire
756bc0e52e kern: fix bug in ToMessageBuffer pointer transfer selection 2020-08-01 15:31:08 -07:00
Michael Scire
5d3f416451 kern/KScheduler: implement special yields 2020-08-01 15:31:08 -07:00
Michael Scire
d5310407ad kern: implement SvcSleepThread for ns > 0 2020-08-01 15:31:08 -07:00
Michael Scire
2a8979b6a1 kern: implement KPageTableBase::CopyHeapToHeap(WithoutCheckDestination) 2020-08-01 15:31:08 -07:00
Michael Scire
7a57010993 kern: add KPageTableBase::CopyMemory Linear <-> User and Linear <-> Kernel 2020-08-01 15:31:07 -07:00
Michael Scire
9fdf063039 kern: mostly implement thread exit 2020-08-01 15:31:07 -07:00
Michael Scire
09305d147a kern/ipc: fix bug in SendMessage 2020-08-01 15:31:07 -07:00
Michael Scire
17c04d234d kern/ipc: implement remaining KServerSession reply code 2020-08-01 15:31:06 -07:00
Michael Scire
a574c00d5f kern: add SvcExitThread, SvcSendAsyncRequestWithUserBuffer, SvcReplyAndReceiveWithUserBuffer 2020-08-01 15:31:06 -07:00
Michael Scire
47a4b18b76 kern/ipc: implement most of reply 2020-08-01 15:31:06 -07:00
Michael Scire
d51693b539 kern/ipc: implement SendReply, declare SendMessage 2020-08-01 15:31:06 -07:00
Michael Scire
a8a16c6a69 kern/ipc: add Atmosphere's mitm pid passthrough logic 2020-08-01 15:31:05 -07:00
Michael Scire
652be6087e ipc/receive: trivially correct result return codeflow 2020-08-01 15:31:05 -07:00
Michael Scire
27d1e6e549 kern/ipc: finish Receive part of ReplyAndReceive 2020-08-01 15:31:05 -07:00
Michael Scire
67c18a0008 ipc: add MapAlias processing logic for Receive 2020-08-01 15:31:04 -07:00
Michael Scire
6a6b989dd2 ipc::Reply -> implement Pointer handling logic 2020-08-01 15:31:04 -07:00
Michael Scire
f7b9ea9ff5 ipc::Reply -> add raw data copy logic 2020-08-01 15:31:04 -07:00
Michael Scire
50fd330bad kern: implement remaining non-KServerSession:: part of Reply/Receive 2020-08-01 15:31:04 -07:00
Michael Scire
2692299372 kern: partially implement Receive half of ReplyAndReceive 2020-08-01 15:31:03 -07:00
Michael Scire
d986b698d4 kern: implement SvcSendSyncRequest(WithUserBuffer) 2020-08-01 15:31:03 -07:00
Michael Scire
8479ff4a1a kern: implement SvcArbitrateLock, SvcArbitrateUnlock 2020-08-01 15:31:03 -07:00
Michael Scire
2415b68748 kern: skeleton SvcReplyAndReceive 2020-08-01 15:31:02 -07:00
Michael Scire
70291b4608 kern: partially implement SvcSignalProcessWideKey 2020-08-01 15:31:02 -07:00
Michael Scire
f752db8379 kern: implement SvcCreateThread, SvcStartThread 2020-08-01 15:31:02 -07:00
Michael Scire
3c386e8ab3 kern: implement SvcMapMemory 2020-08-01 15:31:02 -07:00
Michael Scire
139e043abc kern: implement SvcAcceptSession 2020-08-01 15:31:01 -07:00
Michael Scire
c5e4c7c921 kern: implement SvcWaitSynchronization 2020-08-01 15:31:01 -07:00
Michael Scire
98ac3c7efc kern: implement KEvent, KWritableEvent, KServerSession::OnClientClosed 2020-08-01 15:31:01 -07:00
Michael Scire
88142a11c4 kern: implement SvcCloseHandle 2020-08-01 15:31:01 -07:00
Michael Scire
72d4c01501 kern: SvcConnectToNamedPort 2020-08-01 15:31:00 -07:00
Michael Scire
b9fb29e1c7 kern: svcOutputDebugString, svcGetThreadPriority, svcGetThreadId 2020-08-01 15:31:00 -07:00
Michael Scire
191e233745 kern: implement SvcUnmapMemory, more of SvcGetInfo 2020-08-01 15:31:00 -07:00
SciresM
7d041e853d Switch atmosphere's build target to C++20. (#952)
* ams: update to build with gcc10/c++20

* remove mno-outline-atomics

* ams: take care of most TODO C++20s

* fusee/sept: update for gcc10

* whoosh, your code now uses pre-compiled headers

* make: dependency fixes
2020-05-12 15:44:19 -07:00
Michael Scire
01cdea9498 kern: fix link error 2020-05-12 15:44:17 -07:00
Michael Scire
2914752dcc kern: implement SvcSetUnsafeLimit 2020-04-27 10:34:06 -07:00
Michael Scire
71027e463a kern: implement 10.x perm change, fix many page table bugs 2020-04-24 17:29:10 -07:00
Michael Scire
ac1302256b kern: randomize dynamic slab heaps to reflect 10.x changes 2020-04-24 17:29:10 -07:00
Michael Scire
08b4ed8daf kern: Update init to reflect 10.0.0 changes 2020-04-24 17:29:09 -07:00
Michael Scire
4c1dc00766 kern: Update page bitmaps/alloc to reflect 10.0.0 changes 2020-04-24 17:29:09 -07:00
Michael Scire
a56309680c kern: amend syntax 2020-04-16 20:05:56 -07:00
Michael Scire
6777a7229b mesosphere: implement KMemoryBlockManager::UpdateLock 2020-04-16 20:05:56 -07:00
Michael Scire
bc9c0c255c kern: Implement SvcManageNamedPort 2020-03-18 00:15:04 -07:00
Michael Scire
95ca6eb402 memset: use neon-less impl, reformat other asm 2020-03-18 00:15:03 -07:00
Michael Scire
af011bd277 libmesosphere: use ARM-software/optimized-routines for memcpy/memset/memcmp 2020-03-18 00:15:03 -07:00
Michael Scire
b5f8d04924 kern: implement CallSecureMonitor, some of GetInfo/GetSystemInfo 2020-03-18 00:15:02 -07:00
Adubbz
aec0f45bdb Implement the NCM sysmodule (closes #91)
* Implement NCM

* Modernize ncm_main

* Remove unnecessary smExit

* Give access to svcCallSecureMonitor

* Stack size bump

* Fix incorrect setup for NandUser's content storage entry

* Fix a potential data abort when flushing the placeholder accessor cache

* Fix HasFile and HasDirectory

* Use r+b, not w+b

* Misc fixes

* errno begone

* Fixed more stdio error handling

* More main fixes

* Various command improvements

* Make dispatch tables great again

* Fix logic inversion

* Fixed content path generation

* Bump heap size, fix CleanupAllPlaceHolder

* Various fixes. Note: This contains debug stuff which will be removed later. I was getting tired of having to cherrypick tiny changes

* Fixed placeholder/content deletion

* Fixed incorrect content manager destruction

* Prevent automatic placeholder creation on open

* Fixed List implementation. Also lots of debug logging.

* Removed debug code

* Added a scope guard for WritePlaceHolder

* Manually prevent placeholder/content appending

* Revert "Removed debug code"

This reverts commit d6ff261fcc8c1f26968e894b02c17a01a12ec98b.

* Always cache placeholder file. Switch to ftell for preventing appending

* Universally use EnsureEnabled

* Abstract away file writing logic

* Misc cleanup

* Refactor placeholder cacheing

* Remove debug code (again)

* Revert "Remove debug code (again)"

This reverts commit 168447d80e9640768fb1b43f04a385507c1bb5ab.

* Misc changes

* Fixed file modes

* Fixed ContentId/PlaceHolderId alignment

* Improved type safety

* Fixed reinitialization

* Fixed doubleup on path creation

* Remove debug code

* Fixed 1.0.0 booting

* Correct amount of add on content

* Correct main thread stack size

* lr: Introducing registered data

* Reorder stratosphere Makefile

* Move results to libstrat

* lr: Cleanup lr_redirection

* lr: lr_manager tweaks

* lr: Imrpoved path handling and adjust ResolveAddOnContentPath order

* lr: Organise types

* Add eof newlines

* lr: Eliminate unnecessary vars

* lr: Unnecessary vars 2 electric boogaloo

* lr: Various helpers

* lr: RegisteredLocationResolver helpers

* ncm: Move ncm_types to libstrat

* ncm: Misc cleanup

* Implement NCM

* Modernize ncm_main

* Remove unnecessary smExit

* Give access to svcCallSecureMonitor

* Stack size bump

* Fix incorrect setup for NandUser's content storage entry

* Fix a potential data abort when flushing the placeholder accessor cache

* Fix HasFile and HasDirectory

* Use r+b, not w+b

* Misc fixes

* errno begone

* Fixed more stdio error handling

* More main fixes

* Various command improvements

* Make dispatch tables great again

* Fix logic inversion

* Fixed content path generation

* Bump heap size, fix CleanupAllPlaceHolder

* Various fixes. Note: This contains debug stuff which will be removed later. I was getting tired of having to cherrypick tiny changes

* Fixed placeholder/content deletion

* Fixed incorrect content manager destruction

* Prevent automatic placeholder creation on open

* Fixed List implementation. Also lots of debug logging.

* Removed debug code

* Added a scope guard for WritePlaceHolder

* Manually prevent placeholder/content appending

* Revert "Removed debug code"

This reverts commit d6ff261fcc8c1f26968e894b02c17a01a12ec98b.

* Always cache placeholder file. Switch to ftell for preventing appending

* Universally use EnsureEnabled

* Abstract away file writing logic

* Misc cleanup

* Refactor placeholder cacheing

* Remove debug code (again)

* Revert "Remove debug code (again)"

This reverts commit 168447d80e9640768fb1b43f04a385507c1bb5ab.

* Misc changes

* Fixed file modes

* Fixed ContentId/PlaceHolderId alignment

* Improved type safety

* Fixed reinitialization

* Fixed doubleup on path creation

* Remove debug code

* Fixed 1.0.0 booting

* Correct amount of add on content

* Correct main thread stack size

* lr: Introducing registered data

* Reorder stratosphere Makefile

* Move results to libstrat

* lr: Cleanup lr_redirection

* lr: lr_manager tweaks

* lr: Imrpoved path handling and adjust ResolveAddOnContentPath order

* lr: Organise types

* Add eof newlines

* lr: Eliminate unnecessary vars

* lr: Unnecessary vars 2 electric boogaloo

* lr: Various helpers

* lr: RegisteredLocationResolver helpers

* ncm: Move ncm_types to libstrat

* ncm: Misc cleanup

* Updated AddOnContentLocationResolver and RegisteredLocationResolver to 9.0.0

* Finished updating lr to 9.0.0

* Updated NCM to 9.0.0

* Fix libstrat includes

* Fixed application launching

* title_id_2 -> owner_tid

* Updated to new-ipc

* Change to using pure virtuals

* Title Id -> Program Id

* Fixed compilation against master

* std::scoped_lock<> -> std::scoped_lock

* Adopted R_UNLESS and R_CONVERT

* Prefix namespace to Results

* Adopt std::numeric_limits

* Fixed incorrect error handling in ReadFile

* Adopted AMS_ABORT_UNLESS

* Adopt util::GenerateUuid()

* Syntax improvements

* ncm_types: Address review

* Address more review comments

* Updated copyrights

* Address more feedback

* More feedback addressed

* More changes

* Move dispatch tables out of interface files

* Addressed remaining comments

* lr: move into libstratosphere

* ncm: Fix logic inversion

* lr: Add comments

* lr: Remove whitespace

* ncm: Start addressing feedback

* ncm: Cleanup InitializeContentManager

* lr: support client-side usage

* lr_service -> lr_api

* ncm: Begin refactoring content manager

* ncm: More content manager improvements

* ncm: Content manager mount improvements

* ldr: use lr bindings

* lr bindings usage: minor fixes

* ncm/lr: Pointer placement

* ncm: placeholder accessor cleanup

* ncm: minor fixes

* ncm: refactor rights cache

* ncm: content meta database cleanup

* ncm: move content meta database impl out of interface file

* ncm: Use const ContentMetaKey &

* ncm: fix other non-const ContentMetaKey references

* ncm: content meta database cleanup

* ncm: content storage fixes for 2.0.0

* ncm: add missing end of file newlines

* ncm: implement ContentMetaReader

* ncm: client-side api

* ncm: trim trailing spaces

* ncm: FS_MAX_PATH-1 -> fs::EntryNameLengthMax

* ncm: Use PathString and Path

* fs: implement accessor wrappers for ncm

* fs: implement user fs wrappers

* fs: add MountSdCard

* ncm: move to content manager impl

* ncm: fix up main

* kvdb: use fs::

* fs: Add wrappers needed for ncm

* ncm: use fs bindings, other refactoring

* ncm: minor fixes

* fsa: fix ReadFile without size output

* fs: add substorage, rom path tool

* ncm: fix dangling fsdev usage

* fs: fix bug in Commit

* fs: fixed incorrect mode check

* fs: implement Mount(System)Data

* ncm: don't delete hos

* results: add R_SUCCEED_IF

* ams-except-ncm: use R_SUCCEED_IF

* ncm: added comments

* ncm: fix api definitions

* ncm: use R_SUCCEED_IF

* pm: think of the savings

* ncm: employ kernel strats

* ncm: Nintendo has 5 MiB of heap. Give ourselves 4 to be safe, pending analysis

* ncm: refactor IDs, split types header into many headers

* ams.mitm: use fs bindings instead of stdio

* fs: SystemData uses SystemDataId

* ncm: improve meta-db accuracy

* ncm: inline getlatestkey

* fs: improve UnsupportedOperation results

* fs: modernize mount utils

* ams: misc fixes for merge-errors

* fs: improve unsupportedoperation results

* git subrepo pull emummc

subrepo:
  subdir:   "emummc"
  merged:   "d12dd546"
upstream:
  origin:   "https://github.com/m4xw/emuMMC"
  branch:   "develop"
  commit:   "d12dd546"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"

* util: add boundedmap

* ncm: minor style fixes

* ncm: don't unmount if mounting fails

* lr: bug fixes

* ncm: implement ncm.for-initialize + ncm.for-safemode

* lr: ncm::ProgramId::Invalid -> ncm::InvalidProgramId

* ncm: fix open directory mode on 1.0.0

* ncm: fix fs use, implement more of < 4.0.0 for-initialize/safemode

* ncm: implement packagedcontent -> content for building metadb

* ncm: fix save data flag management

* ncm: address some review suggestions (thanks @leoetlino!)

* updater: use fs bindings

* fs: implement MountCode

* fs: prefer make_unique to operator new

* ncm: implement remaining ContentMetaDatabaseBuilder functionality

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-09 18:03:38 -07:00
Michael Scire
807c68664b pm/fusee: add support for 9.2.0 2020-03-02 19:51:11 -08:00
Michael Scire
3c8d569f0a kern: mem access prep for svc streams, TODO_IMPLEMENT -> UNIMPLEMENTED 2020-03-02 19:51:02 -08:00
Michael Scire
85efb6005c kern: paranoid assertions about the class tokens 2020-03-02 19:51:02 -08:00
Michael Scire
ee9d50232c kern: correct KClassToken generation 2020-03-02 19:51:02 -08:00
Michael Scire
79b9793fcd kern: minor fixes to prevent core0-2 panics during boot 2020-03-02 19:51:01 -08:00
Michael Scire
1dbea5db13 kern: fix building without debugging turned on 2020-03-02 19:51:01 -08:00
Michael Scire
feae39aa2e kern: implement KUserPointer (and test with QueryMemory) in advance of svc dev 2020-03-02 19:51:01 -08:00
Michael Scire
29b3c509fb kern: implement large page group mapping, fix debug flag cap 2020-03-02 19:51:01 -08:00
Michael Scire
2e23abe83d kern: implement user thread start, el0 code now runs 2020-03-02 19:51:01 -08:00
Michael Scire
485ea8eb83 kern: fix supervisor page table activation 2020-03-02 19:51:00 -08:00
Michael Scire
fb23bfc77f kern: implement unsuspension of init threads 2020-03-02 19:51:00 -08:00
Michael Scire
cba973f859 kern: implement KProcess::Run 2020-03-02 19:51:00 -08:00
Michael Scire
67c77d92f7 kern: implement SetProcessMemoryPermission 2020-03-02 19:51:00 -08:00
Michael Scire
46258eaf63 kern: finish KProcess::Initialize() for KIPs 2020-03-02 19:51:00 -08:00
Michael Scire
a385be8301 kern: implement MapIo 2020-03-02 19:50:59 -08:00
Michael Scire
bd81af7439 kern: implement capabilities parsing 2020-03-02 19:50:59 -08:00
Michael Scire
b530ddbdbe kern: correct alloc region size 2020-03-02 19:50:59 -08:00
Michael Scire
40619b2eeb kern: implement process(pagetable) init 2020-03-02 19:50:58 -08:00
Michael Scire
375d5ecd08 kern: add KProcess members 2020-03-02 19:50:58 -08:00
Michael Scire
733b13441d kern: implement IsValidPageGroup 2020-03-02 19:50:58 -08:00
Michael Scire
868f2aa1b9 kern: implement page group unmapping 2020-03-02 19:50:58 -08:00
Michael Scire
89772b2eca kern: change decompression asserts -> audits 2020-03-02 19:50:57 -08:00
Michael Scire
d3a47ce27a kern: implement through kip decompression 2020-03-02 19:50:57 -08:00
Michael Scire
a35f47e61d kern: skeleton initial process loading 2020-03-02 19:50:57 -08:00
Michael Scire
a599e2f892 kern: implement smmu init 2020-03-02 19:50:57 -08:00
Michael Scire
c87812ef8a kern: switch->nx, implement sleep manager init 2020-03-02 19:50:56 -08:00
Michael Scire
103122ab4c kern: kern::arm64 -> kern::arch::arm64 2020-03-02 19:50:56 -08:00
Michael Scire
b550f2c3cd kern: implement lightlock slowpath (works on hw) 2020-03-02 19:50:56 -08:00
Michael Scire
e2e7594b3a kern: improve panic output 2020-03-02 19:50:56 -08:00
Michael Scire
0ec0d0db8d kern: implement KWorkerTaskManager 2020-03-02 19:50:56 -08:00
Michael Scire
fe32c9d12d kern: implement interrupt thread init 2020-03-02 19:50:55 -08:00
Michael Scire
6b778d39ec kern: use TinyMT instead of mt19937_t 2020-03-02 19:50:55 -08:00
Michael Scire
049ae760ab libmesosphere: move .s to kernel (prevent manifesting in kernelldr) 2020-03-02 19:50:55 -08:00
Michael Scire
f2b38254d3 kern: implement enough of KPageTable to initialize a thread 2020-03-02 19:50:55 -08:00
Michael Scire
ce92f9d6b0 vapours: add time primitives, fix result name 2020-03-02 19:50:54 -08:00
Michael Scire
4c78b8f7af kern: implement KMemoryBlockManager::Update 2020-03-02 19:50:54 -08:00
Michael Scire
1f655ad760 kern: implement init through InterruptTaskManager.Initialize() 2020-03-02 19:50:54 -08:00
Michael Scire
2f285ec86b kern: implement KMemoryBlockManager init 2020-03-02 19:50:54 -08:00
Michael Scire
870fe26090 kern: add KPageTableBase members 2020-03-02 19:50:53 -08:00
Michael Scire
74950d85d1 kern: begin skeletoning page table types 2020-03-02 19:50:53 -08:00
Michael Scire
308ce70af7 kern: print build date/time, git revision 2020-03-02 19:50:53 -08:00
Michael Scire
6ff5a3fda7 kern: print layout for debug during startup 2020-03-02 19:50:53 -08:00