Commit Graph

1234 Commits

Author SHA1 Message Date
b0e5d02c9a
kernel: Turn off console logging before starting the init process
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2023-01-08 15:32:59 +01:00
a620b00b18
Unify libc header descriptions 2023-01-08 15:29:30 +01:00
8de59138ef
We are platform-agnostic now (kind of)
All checks were successful
continuous-integration/drone/push Build is passing
Still tied to x86_64, but because there's no other platform implemented.

Also making this commit just to test CI with the new toolchain.
2023-01-07 21:42:57 +01:00
0c5a84f932
toolchain: Update to binutils 2.39
Some checks failed
continuous-integration/drone/push Build is failing
CI will fail, it's normal. Wait for me to build a new toolchain for it.
2023-01-07 21:23:01 +01:00
0c73d69a70
Kernel: Fix shadow 12GiB reserved entry when running QEMU without KVM on
All checks were successful
continuous-integration/drone/push Build is passing
Fix inspired by: https://github.com/serenityos/serenity/pull/16345
2023-01-07 20:58:12 +01:00
c97f588d44
Fix TRY() with Option 2023-01-07 20:53:23 +01:00
fde1727218
KernelVM: Expand the available VM range
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 12:33:00 +01:00
8ee634d19b
Kernel/Scheduler: Display addresses starting with 0x when creating threads
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 12:02:14 +01:00
471103e4f3
Remove the word 'header' from libc header descriptions
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 11:39:15 +01:00
12dc96b4a5
Fix comment typo
All checks were successful
continuous-integration/drone/push Build is passing
My bad :(
2023-01-07 11:31:08 +01:00
b70bbc0ba6
More libc commenting
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 11:21:53 +01:00
7e377ef712
Implement printf()
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-07 01:49:26 +01:00
29bd8a69fa
MemoryManager: Add helper functions to validate arbitrary ranges of userspace memory 2023-01-07 01:39:33 +01:00
7fb2807d0c
libc: Implement time() using clock_gettime().
All checks were successful
continuous-integration/drone/push Build is passing
The cool POSIX kids use clock_gettime() now because it has NANOSECONDS (and different clocks!),
but ANSI C prefers this function.

We can still implement it based on clock_gettime(), we just have to discard the NANOSECONDS.
2023-01-07 00:27:23 +01:00
a8a64863c8
kernel, libc: Add clock_gettime() 2023-01-07 00:21:08 +01:00
6e9b4491a6
MemoryManager: Add copy_to_user() and copy_to_user_typed() 2023-01-07 00:17:16 +01:00
b851dcf9b9
libc: Implement mbstowcs() using Utf8StringDecoder
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 21:01:37 +01:00
8891304509
libc: Add ctype.h 2023-01-06 20:48:08 +01:00
80f5c790f8
Implement string formatting into libc :)
All checks were successful
continuous-integration/drone/push Build is passing
Of course, using <luna/Format.h> makes it so simple. No need for duplicate code!
2023-01-06 20:15:43 +01:00
367a2ce521
libc: header documentation for supported functions
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 20:02:07 +01:00
c3653cd4e6
More stdlib.h implementation + commenting + atexit()
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 19:40:25 +01:00
50509baea6
More c_cpp_properties.json
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 19:06:47 +01:00
65d2f1c041
Update c_cpp_properties.json
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 19:03:35 +01:00
0a472000be
Fix CI by providing a host C++ compiler
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 19:00:32 +01:00
83651b4b90
CMake: Respect the ARCH env variable
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 18:59:59 +01:00
bdfe7dac17
libc: Remove crti.o and crtn.o
Some checks failed
continuous-integration/drone/push Build is failing
Looks like these are now provided by the compiler.
2023-01-06 17:59:54 +01:00
8838e2cf22
Bring back the OS-Specific Toolchain on restart :^)
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 17:35:07 +01:00
e37280b0e5
ELFLoader: Set both the read-write and execute flags if the section has both
Not good for W^X, but the compiler decides to squash everything into a single program header :(
2023-01-06 17:34:24 +01:00
87a4bc91d8
arch/x86_64: Nicer display for page faults that shows a human-readable version of the error code 2023-01-06 17:31:22 +01:00
a01b56ed39
CString: Support strcpy(), strcat() and strchr() 2023-01-06 16:20:35 +01:00
30555f8e5a
Skip these because CI needed a toolchain rebuild
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 15:00:49 +01:00
7acef24494
Make libc depend on crt{0,i,n}.o
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 14:32:38 +01:00
71414c0653
Explicitly set the link path to make it build on CI
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 14:28:53 +01:00
db1941140c
Explicitly include system headers to make it build on CI
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 13:40:53 +01:00
08608d2344
Depend on libc headers
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 13:38:48 +01:00
f1923ce5bd
Install headers before compilation
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 13:35:57 +01:00
129e3c434a
Switch to C for userspace, with a very bare-bones libc!!
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-06 13:31:14 +01:00
b27cefb9c5
SystemError: Define _LUNA_SYSTEM_ERROR_EXTENSIONS to compile properly in hosted envs 2023-01-06 13:30:49 +01:00
293b979e75
ELFLoader: Do not crash on non-page-aligned sections 2023-01-06 13:30:17 +01:00
fd8a0175d9
Add a syscall infrastructure (our baby program can print to the console now!)
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-05 22:39:56 +01:00
caa3fe8c45
MemoryManager: Add validate_userspace_string()
A bit crude, should be replaced by a strdup_from_user() helper to avoid touching userspace memory directly.
But it'll do for now.
2023-01-05 22:39:09 +01:00
0ea9974512
First user process!
All checks were successful
continuous-integration/drone/push Build is passing
Putting it all together, we have a user process that successfully calls sys_exit() w/o crashing.
2023-01-05 21:55:21 +01:00
0aac6c888d
x86_64: Basic exit() syscall!
User processes need to do something, amirite?
2023-01-05 21:53:48 +01:00
a33a72915e
Scheduler: Creation, destruction and switching of userspace tasks :))
From a TarStream. Not optimal, but OK for the moment.
2023-01-05 21:52:26 +01:00
ea89b92675
Store a bit more stuff in a thread :) 2023-01-05 21:50:53 +01:00
31ea030c7f
MMU: Add functions to create and delete userspace page directories 2023-01-05 21:50:26 +01:00
c53bba0392
MemoryManager: Add an unmap_weak_and_free_vm() helper function
This function mirrors unmap_owned_and_free_vm(), but using weak unmapping (does not free the underlying physical memory)
2023-01-05 21:50:06 +01:00
d3c414af4e
ELFLoader: Do not keep track of segments
This reduces calls to kmalloc() since segment data is heap-allocated, and the segments loaded will be deleted when deleting the page directory.
2023-01-05 21:46:03 +01:00
f0e14cf7e9
Update year range in LICENSE :)
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-02 13:08:42 +01:00
5854e5e530
Add newlines at end-of-file 2023-01-02 13:07:29 +01:00