Commit Graph

229 Commits

Author SHA1 Message Date
Jeremy Soller 12688a929e Context switch optimization
- Contexts for other CPUs will never be evaluated for switch
- Running contexts will never be evaluated for switch
- Arc::clone is only called for previous and next context when there is a context to switch to
- Lots of cleanup to the switch function
2023-03-09 14:30:12 -07:00
4lDO2 ac913e49f9 Pin kmain contexts to corresponding CPUs. 2023-02-24 23:05:11 +01:00
4lDO2 8d14d54fa9 Support scheduler CPU affinity. 2023-02-15 14:50:01 +01:00
Jeremy Soller 33aa263deb Fixes for hpet counter read, choose better PIT divisor 2022-11-14 13:58:55 -07:00
Jeremy Soller 31868077f0 Use u128 for time, store CPU time of processes 2022-11-14 10:10:17 -07:00
Jeremy Soller 8e0f54cb31 Clippy fixes 2022-11-11 13:19:14 -07:00
Jeremy Soller 515a03b870 Fix warnings 2022-11-11 12:51:07 -07:00
Jeremy Soller 6753251af3 Do not allow mmap with page_count 0 2022-08-31 16:14:27 -06:00
Jeremy Soller 80b8382cd7 Fix aarch64 kfx size 2022-08-25 18:40:19 -06:00
Jeremy Soller 82ac7a66f7 Only save preserved regs in aarch64 context switch 2022-08-25 18:23:51 -06:00
Jeremy Soller afd82ba4bb Save/restore aarch64 FPU regs 2022-08-25 09:30:53 -06:00
Jeremy Soller 31680bf5b9 Do not set tpidr_el0 from kernel 2022-08-25 08:46:26 -06:00
Jeremy Soller f7e8026494 Set aarch64 thread pointers 2022-08-24 19:21:36 -06:00
Jeremy Soller b20a71113c Implement aarch64 switch_to_inner using naked function 2022-08-24 13:24:37 -06:00
Jeremy Soller 0ed9f03317 Use push/pop scratch for aarch64 signal handler 2022-08-24 12:29:48 -06:00
Jeremy Soller 613968dc30 Use push/pop scratch for x86 signal handler 2022-08-24 11:39:31 -06:00
Jeremy Soller 113a7164bb Use push/pup scratch for x86_64 signal handler 2022-08-24 11:11:50 -06:00
Jeremy Soller c750ee26a8 Implement setting FS/GS offset on x86 2022-08-20 21:21:32 -06:00
Jeremy Soller 01e4bc899e Fix compilation on x86 2022-08-20 18:11:57 -06:00
Jeremy Soller 9dd069c8ca Support proc partially with aarch64 2022-08-20 14:45:45 -06:00
Jeremy Soller 44d5e6573a Updated utable switching code for aarch64 2022-08-20 13:31:20 -06:00
Jeremy Soller fe7def2797 Update to use TableKind on x86_64 2022-08-20 13:16:23 -06:00
Jeremy Soller 01df1c20da Use TableKind everywhere 2022-08-20 13:06:52 -06:00
Jeremy Soller c7e5466bd7 Fix aarch64 switch_to_inner functino definition 2022-08-20 09:15:26 -06:00
Jeremy Soller 157dbc7b4d Convert aarch64 context switching to asm macro 2022-08-20 09:08:14 -06:00
Jeremy Soller 49fcafac45 Fix building on aarch64 2022-08-19 16:12:42 -06:00
Jeremy Soller 6b2439f1b9 Improved 32-bit x86 support 2022-08-18 14:57:15 -06:00
Jeremy Soller c09be1770b Use registers for switch_to_inner instead of stack 2022-08-18 09:09:11 -06:00
Jeremy Soller 4bd137f36e Fixes for x86 32-bit 2022-08-17 10:48:23 -06:00
4lDO2 431407aff0 Remove SYS_CHMOD and cwd related syscalls/files. 2022-08-13 19:44:44 +02:00
Jeremy Soller 2191308d15 setup_new_utable for aarch64 2022-07-29 18:58:19 -06:00
Jeremy Soller 5d55d4eb87 Fix warnings 2022-07-29 18:33:54 -06:00
Jeremy Soller be12d0f1bd Add initial i686 arch module 2022-07-29 18:12:49 -06:00
Jeremy Soller e99cbcf5d2 Fixes for compiling aarch64 2022-07-29 18:06:53 -06:00
Jeremy Soller 0c80643077 Make graphical_debug arch independent and fix lots of warnings 2022-07-29 15:56:44 -06:00
Jeremy Soller 059f2a0d07 Support ContextList::spawn on i686 2022-07-29 09:27:35 -06:00
4lDO2 f3faf33e3f Add a workaround to treat bootstrap mem as owned. 2022-07-28 14:17:02 +02:00
4lDO2 99362f98d2 Add a better interface for modifying addrspaces. 2022-07-27 10:52:52 +02:00
4lDO2 5bbfdcda6b Add mmap-min-addr and support unmapping parent PTs. 2022-07-27 10:52:45 +02:00
4lDO2 308c2cc711 Support modifying processes' sigactions.
This is, other than vfork, the last piece of functionality that the
previous clone() offered (CLONE_SIGHAND) which previously was not
implemented.
2022-07-27 10:52:29 +02:00
4lDO2 dc8ce1c22b Partial: migrate context handling code to RMM. 2022-07-27 10:52:23 +02:00
4lDO2 8970ce1fe7 Benefit from addrspace abstraction in switch. 2022-07-27 10:52:22 +02:00
4lDO2 351d77ad9b Improve floating point handling. 2022-07-27 10:52:22 +02:00
4lDO2 94578efd1e Use alloc_zeroed when allocating FX. 2022-07-27 10:52:22 +02:00
4lDO2 4aea0cfd0c Fix AddrSpace memory leak. 2022-07-27 10:52:22 +02:00
4lDO2 59d74689dc Copy filetable more efficiently. 2022-07-27 10:52:22 +02:00
4lDO2 0b67997c7b Fix "id == current" check in set_addr_space. 2022-07-27 10:52:21 +02:00
4lDO2 cb40eb3792 Support reading all grants and transferring grants. 2022-07-27 10:52:10 +02:00
4lDO2 b50495bfa5 WIP: Support clone in userspace
Everything seems to work for the most part, but now there are tons of
daemons which rely on syscall::clone, which is now implemented in relibc
:(
2022-07-27 10:52:04 +02:00
4lDO2 283ada82a0 WIP: Remove SYS_CLONE (to be done in userspace). 2022-07-27 10:52:03 +02:00