Commit Graph

855 Commits

Author SHA1 Message Date
1b3243a80c Add ctype.h functions to the Luna library 2022-11-18 21:12:54 +01:00
762ca844d8 Add CPU::platform_string 2022-11-18 21:04:53 +01:00
109de54822 Provide stubbed handlers for many more x86 exceptions
I am now officially a big-boy OS developer, I read the Intel manuals for this!! (Not that the OSDev wiki doesn't have the information, but it was missing descriptions for some more obscure exceptions)
2022-11-18 20:51:25 +01:00
860f13cd7e Rename align_base to alignment 2022-11-18 18:02:38 +01:00
2e2656a02f Add static assertions to constexpr functions 2022-11-18 17:59:19 +01:00
9d318d50aa Use TRY in MMU.cpp 2022-11-16 20:37:41 +01:00
2c9329928c Replace page_size (function) with ARCH_PAGE_SIZE (constant) 2022-11-16 20:37:32 +01:00
30ac95bcf8 Use usize/isize instead of (s)size_t
Since we're using Rust-style integer types already, why not go all in?
2022-11-16 20:30:34 +01:00
7fc5a6b753 Make kernel rodata and data not executable 2022-11-16 20:02:04 +01:00
7f15ba0ac5 Add some interrupt handling 2022-11-16 17:37:18 +01:00
df8666fd73 Remove unneeded label 2022-11-15 20:47:50 +01:00
bb46cd890b Add GDT and IDT setup and loading + NX if supported 2022-11-15 20:41:59 +01:00
c9feb11366 Introduce a check() method (like assert() but always on) 2022-11-15 19:36:50 +01:00
c319336e3d Add a CPU interface 2022-11-15 19:10:32 +01:00
e16324887f MMU: Properly clear flags 2022-11-15 19:10:19 +01:00
3358454833 Add getters for free, used and reserved memory 2022-11-13 16:56:03 +01:00
6a7097c9ec Add variables for the future 2022-11-13 16:54:07 +01:00
ae235e5538 MMU: unmap and remap for x86_64 2022-11-13 16:51:21 +01:00
ba1bf72e1b Remove unused include 2022-11-13 16:32:28 +01:00
d6c56fb512 Mapping finally works!! 2022-11-13 16:31:32 +01:00
4c4f72b865 More MMU stuff, but writing still fails 2022-11-13 15:33:53 +01:00
d148e0aff7 Initialize MemoryManager instead of MMU directly 2022-11-13 14:29:59 +01:00
705c2747de Add memory manager 2022-11-13 14:29:15 +01:00
6b95307b54 Add init 2022-11-13 12:20:53 +01:00
ffbe5260a5 Add Framebuffer stuff 2022-11-13 11:25:15 +01:00
82c2381ac9 Serial printing!! 2022-11-13 10:30:10 +01:00
cf758fdfdc Initial commit :) 2022-11-13 10:09:09 +01:00
42efc21110 Start implementing read and write support in tmpfs
write seems to work fine, read just hangs there, waiting.
2022-11-12 20:11:26 +01:00
046065c533 Fix tmpfs 2022-11-12 19:05:47 +01:00
3451d50a37 Try building a tmpfs, but weird stuff happens 2022-11-12 18:13:41 +01:00
000ffd1fae Scheduler: Handle weird cases when the task we're iterating on is null 2022-11-12 18:12:42 +01:00
37bb3273ce Kernel: Add a C interface to the logging system 2022-11-12 18:12:18 +01:00
511bb7a8c1 Kernel: Make readdir() available in created InitRD directories 2022-11-12 18:11:58 +01:00
bde9a97db5 sh: Add a sleep command 2022-11-12 17:44:13 +01:00
fa325072ac Kernel: Add __cxa_atexit and __cxa_finalize 2022-11-12 17:43:57 +01:00
e54f033578 libc: Add wcslen (with a test) and wcscat 2022-11-12 14:16:00 +01:00
35829a6998 libc: Remove unnecessary casts in strcat() and strncat() 2022-11-12 14:15:38 +01:00
6ab246a05e libc: Add a basic implementation of pathconf() 2022-11-12 14:15:21 +01:00
9e8a57cec7 libc: Add getdtablesize()
No system call for this, since the limit is fixed right now
2022-11-12 14:15:02 +01:00
f46831f459 libc: Define PATH_MAX
This restriction is actually not enforced by the kernel. It should be.
2022-11-12 14:13:28 +01:00
5fa8569ff9 libc: Add creat() 2022-11-12 14:12:49 +01:00
a3896c2546 libc: Define MB_CUR_MAX 2022-11-12 13:24:04 +01:00
3f867b936e libc: Implement stpcpy
This function is unsafe so it is marked as deprecated, but if programs need it they can use it.
2022-11-12 13:20:28 +01:00
16e6fba2d0 Add a bit more C++ stuff to the C++ app 2022-11-12 13:12:51 +01:00
de2451e553 Kernel: Change up the logging in the kernel's PRNG 2022-11-12 12:56:13 +01:00
11ee01f269 Kernel: Remove "checkpoint logging" in main.cpp 2022-11-12 12:55:47 +01:00
bf1d3d3f05 mkdir: Print newline after usage 2022-11-12 12:53:33 +01:00
5c51b82f6a Kernel: Remove obtain_user_ref and add copy_typed_to and from_user 2022-11-12 12:08:26 +01:00
58fb422161 Kernel: Return a Result in MemoryManager and strdup_from_user 2022-11-12 11:56:40 +01:00
662afad426 Kernel: Add a Result class 2022-11-12 11:30:28 +01:00