Commit Graph

293 Commits

Author SHA1 Message Date
Michael Scire
dc59a2d2e5 kern: build with -Wextra 2020-09-07 10:51:36 -07:00
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