445aeed80d
OwnedPtr: Implement assignment operators
2023-01-13 18:54:25 +01:00
9454b65682
allocate_memory: Respect PROT_NONE
2023-01-12 17:59:17 +01:00
586ca19b62
Add a VERY BASIC and hacky way of allocating memory from userspace
...
continuous-integration/drone/push Build is passing
Only supports one-page allocations and doesn't have libc wrappers, which means it has to be invoked using syscall().
2023-01-11 23:02:42 +01:00
0e1e15e85a
Result: Construct a Result from an Option using from_option()
2023-01-11 23:02:42 +01:00
79a5b98d65
Kernel: Keep the user pointer const through copy_from_user()
continuous-integration/drone/push Build is passing
2023-01-11 19:26:53 +01:00
6e4cd6300d
Kernel: Add copy_from_user() and copy_from_user_typed()
continuous-integration/drone/push Build is passing
2023-01-11 19:25:28 +01:00
73ddd0b0c5
tools: Be more arch-agnostic
continuous-integration/drone/push Build is passing
2023-01-11 19:14:35 +01:00
d150c55143
TarStream: Support mode
continuous-integration/drone/push Build is passing
2023-01-11 18:42:50 +01:00
82b555cf5c
TarStream: Refactor the API to get rid of that awful method in Result
...
continuous-integration/drone/push Build is passing
That method being try_set_value_with_specific_error()
2023-01-11 17:30:53 +01:00
6cf042e65e
Result: Remove m_has_value, rely on Option::has_value()
continuous-integration/drone/push Build is passing
2023-01-11 17:09:32 +01:00
67ebb00bd3
Option, Result: Introduce try_move_value(), which is the release_value() equivalent of try_set_value()
2023-01-11 17:06:17 +01:00
84c82a4e75
luna, kernel: More constness
continuous-integration/drone/push Build is passing
2023-01-10 19:31:41 +01:00
5aa667c776
luna: Make OwnedStringView::clone() just call from_string_literal()
continuous-integration/drone/push Build is passing
2023-01-10 19:03:00 +01:00
3ac3d54788
luna: Make check() and expect() output errors in userspace
2023-01-10 19:02:16 +01:00
c82ed5df01
Enable -Os on all targets
2023-01-10 18:13:21 +01:00
feaf9ed19b
Update README.md
continuous-integration/drone/push Build is passing
2023-01-09 18:16:39 +01:00
c83f6c03b5
Bitmap: Add a 'find_and_toggle' method
...
continuous-integration/drone/push Build is passing
Just like find(), but toggles the value when finding it.
Avoids doing this manually in MemoryManager and KernelVM.
2023-01-09 18:08:50 +01:00
4287ec6cb0
Bitmap: Introduce a new method 'find' and use it in MM and KernelVM
...
continuous-integration/drone/push Build is passing
This method looks for the first bit with a value, optionally from a starting index, and returns its index.
This should be (haven't benchmarked) way faster than the manual way,
AKA what MM and KernelVM were doing.
This is due to this method using bit and byte manipulation tricks instead of just calling get() until getting the desired result :)
2023-01-09 17:59:52 +01:00
31ee97b7de
Remove restart from CI configuration
continuous-integration/drone/push Build is passing
2023-01-08 15:55:26 +01:00
15c5b80dc9
Rewrite README.md now that restart is gone
2023-01-08 15:55:01 +01:00
afe9a01bbf
Merge branch 'restart' into main
...
continuous-integration/drone/push Build is passing
Reviewed-on: #21
2023-01-08 15:45:56 +01:00
1f135261e7
Revert "Kernel: Make readdir() available in created InitRD directories"
...
This reverts commit 511bb7a8c1
.
2023-01-08 15:42:48 +01:00
49d1e4f011
Revert "mprotect(): Validate the entire range to protect is in userspace memory"
...
This reverts commit 4ef764e62e
.
2023-01-08 15:41:53 +01:00
401a807551
Revert "Update README.md"
...
This reverts commit 1f4c4f1a0c
.
2023-01-08 15:41:39 +01:00
b0e5d02c9a
kernel: Turn off console logging before starting the init process
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)
...
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
...
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
...
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
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
continuous-integration/drone/push Build is passing
2023-01-07 12:02:14 +01:00
471103e4f3
Remove the word 'header' from libc header descriptions
continuous-integration/drone/push Build is passing
2023-01-07 11:39:15 +01:00
12dc96b4a5
Fix comment typo
...
continuous-integration/drone/push Build is passing
My bad :(
2023-01-07 11:31:08 +01:00
b70bbc0ba6
More libc commenting
continuous-integration/drone/push Build is passing
2023-01-07 11:21:53 +01:00
7e377ef712
Implement printf()
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().
...
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
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 :)
...
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
continuous-integration/drone/push Build is passing
2023-01-06 20:02:07 +01:00
c3653cd4e6
More stdlib.h implementation + commenting + atexit()
continuous-integration/drone/push Build is passing
2023-01-06 19:40:25 +01:00
50509baea6
More c_cpp_properties.json
continuous-integration/drone/push Build is passing
2023-01-06 19:06:47 +01:00
65d2f1c041
Update c_cpp_properties.json
continuous-integration/drone/push Build is passing
2023-01-06 19:03:35 +01:00
0a472000be
Fix CI by providing a host C++ compiler
continuous-integration/drone/push Build is passing
2023-01-06 19:00:32 +01:00
83651b4b90
CMake: Respect the ARCH env variable
continuous-integration/drone/push Build is failing
2023-01-06 18:59:59 +01:00
bdfe7dac17
libc: Remove crti.o and crtn.o
...
continuous-integration/drone/push Build is failing
Looks like these are now provided by the compiler.
2023-01-06 17:59:54 +01:00