Commit Graph

210 Commits

Author SHA1 Message Date
31f7eb34a6 Renamed some syscalls 2023-11-08 14:15:46 -06:00
c5ef8c53a7 Started separating important structs from kernel.c 2023-11-08 14:13:03 -06:00
108e04a8f0 Page fault handler now allocates new page tables
Rather than contantly checking if a page table exists before access, the fault handler will automatically allocate them as needed.
2023-11-07 12:44:23 -06:00
091830e508 Added constructor to x86 context 2023-11-07 12:37:33 -06:00
185d3f6677 Added function to delete contents of AVL tree 2023-11-07 12:31:16 -06:00
a5ce86147d Created small static library to wrap system call ABI 2023-09-07 00:58:57 -05:00
112b4204a7 Removed old commented-out lines from heap.c 2023-09-07 00:57:12 -05:00
e258bfcc9f Moved kernel base 4MiB lower 2023-09-07 00:56:40 -05:00
365272e360 Added null pointer check to avltree constructor 2023-09-07 00:54:28 -05:00
08db5fe1f7 Kernel heap now allocates all required pages at once
As opposed to allocating pages individually
2023-09-02 21:51:19 -05:00
29a528780b Added syscalls to map to particular physical address 2023-09-02 21:50:35 -05:00
75b7e08e96 Kernel page allocator and heap use new algorithms 2023-08-31 14:37:38 -05:00
e49bd0ca9c Removed old commented-out code in heap.c 2023-03-03 04:58:44 -06:00
5cf5edd589 Rewrote heap.c to use libmalloc 2023-03-03 04:55:31 -06:00
14415fae9f set_pte_type now correctly sets flags
Previously it erroneously set all flags regardless to `flags` argument
2023-03-03 04:54:54 -06:00
a4e69e9e36 Kernel marks its own text segment as read-only 2023-03-03 04:53:25 -06:00
035960f4d3 Added new linker symbol pointing to end of read-only data 2023-03-03 04:52:58 -06:00
f66810d6ad mmgr.c compatibility with changes to libmalloc 2023-03-03 04:52:26 -06:00
f8cfca588e Fixed inline assembly constraints in msr.c 2023-03-03 04:51:20 -06:00
60775ee007 x86 putc() now copies chars to COM1 2023-01-10 05:37:14 -06:00
6af84b247f Page allocation uses new external library, libmalloc 2023-01-09 01:56:09 -06:00
c2d8f79e61 Fixed spelling error in 64-bit llog2() code 2023-01-07 23:21:36 -06:00
204b345942 Fixed mmgr.c 2022-12-30 17:14:37 -06:00
c069866bc7 Buncha changes and fixes 2022-12-30 17:11:42 -06:00
166841da51 Added usermode interrupt handling 2022-12-21 11:37:13 -06:00
590290f92b Fixes and improvements in mmgr.c
Bug fixes in page allocator
Significant performance improvements
2022-11-20 16:32:25 -06:00
ccc35bc4c2 Deleted now-unused struct page_stack_t 2022-08-24 06:36:30 -05:00
e621624ef0 Changed avl_get() to use loop instead of recursion 2022-08-24 06:35:58 -05:00
8b1d7cb085 Kernel initializes a stack for new processes 2022-08-23 13:13:46 -05:00
bacedbea86 Rewrote physical memory allocator
The physical memory allocator now uses a buddy allocator instead of a stack.

Also moved some of the platform-independent context code to kernel.c.
2022-08-23 13:00:26 -05:00
54e2beefc1 Fixed warning in syscall.c
Cast NULL to 'unsigned long' to get rid of compiler warning.
2022-08-23 12:58:28 -05:00
2f7d39e679 Improved error handling in queue.c 2022-08-23 12:56:45 -05:00
2cc9c6942e Fixed call to __builtin_clz()
ilog2() erroneously called __builtin_clzl() instead of __builtin_clz()
2022-08-23 08:46:34 -05:00
b8cec93721 Put 'math.c' into Makefile.am 2022-08-23 08:42:59 -05:00
21509be9bc Added 'math.c' for optimized math and bit operations 2022-08-23 08:41:53 -05:00
c36f65ce97 Various renaming and refactoring 2022-08-19 22:34:45 -05:00
0337fca749 Moved syscall IDs to separate header 2022-08-19 06:06:48 -05:00
164fb9fcae Added simple IPC syscalls 2022-08-19 03:56:53 -05:00
0ae4f7995d Added basic IPC syscalls 2022-08-17 02:47:41 -05:00
bfb56fcbb3 Added functions to portably manipulate process context 2022-08-17 01:41:59 -05:00
bbf2325a60 Added constructor to queue 2022-08-17 01:41:19 -05:00
5b959c9763 Added queue structure 2022-08-15 20:20:31 -05:00
d84c9c86d0 Removed some unused code 2022-07-05 18:06:19 -05:00
958b717751 Fixed state save after process preemption 2022-07-05 15:19:20 -05:00
d4b36a7c7d Return the previous process to queue after context switch 2022-07-05 15:18:51 -05:00
5c7d002bbf Moved PCB for each process to kernel heap 2022-07-03 13:17:06 -05:00
a52f06f81e Massive backlog of changes 2022-06-15 15:59:31 -05:00
c962a83ff0 WIP on kernel syscalls 2021-05-01 17:09:50 -05:00
7caf49065d page stack constructor takes stack base as argument
initialize() calls new constructors and fills in syscall table
2021-04-19 06:58:02 -05:00
8605f08405 Changed DPL of syscall interrupt to 3 2021-04-19 06:57:05 -05:00