a3d0fa7d0a
UserVM: Validate the entire range when freeing multiple VM pages
continuous-integration/drone/push Build is passing
2023-01-16 21:16:38 +01:00
631cdd0204
x86_64/CPU: Skip null instruction pointers on stack trace generation
continuous-integration/drone/push Build is passing
2023-01-16 20:44:45 +01:00
c374c25523
Convert some FIXMEs into NOTES
continuous-integration/drone/push Build is passing
2023-01-16 20:30:35 +01:00
1d92784608
luna, kernel: Replace some uses of char by truly 1-byte wide types
continuous-integration/drone/push Build is passing
2023-01-16 19:52:34 +01:00
329e8ab182
luna/Heap: Scrub reallocations properly
2023-01-16 19:50:35 +01:00
1b807a4e06
arch/Timer: Make sure ARCH_TIMER_FREQ is a power of two
...
(avoid division and modulo, division is slow)
Fortunately, GCC will optimize divisions by powers of two to simple bitwise shifts :)
2023-01-16 19:43:05 +01:00
d0600f5714
luna: Make Utf8StringEncoder short-circuit instead of failing when hitting the length limit
continuous-integration/drone/push Build is passing
2023-01-14 12:07:08 +01:00
e3ef29e80d
libc: Implement wcstombs()
continuous-integration/drone/push Build is passing
2023-01-14 11:59:08 +01:00
00ee8314b3
luna: Make Utf8String{De,En}coders return the number of bytes written
...
This means we can avoid a call to code_points() in mbstowcs(),
which would parse a string twice.
2023-01-14 11:55:19 +01:00
da805eec83
Describe what check() and expect() are
continuous-integration/drone/push Build is passing
2023-01-14 10:59:30 +01:00
eb35abfa52
Vector: Assigment, copy&move constructors, and destructor
2023-01-14 10:50:28 +01:00
3b4b750cbf
luna: Vector is here!!
continuous-integration/drone/push Build is passing
2023-01-13 22:28:03 +01:00
28bde216c4
libc: Implement perror()
continuous-integration/drone/push Build is passing
2023-01-13 21:08:10 +01:00
e676fb8299
libc: Add a wide range of time manipulation functions, including reentrant variants
2023-01-13 21:06:27 +01:00
2d2db300b0
libc: Add malloc(), calloc(), realloc() and free()
continuous-integration/drone/push Build is passing
2023-01-13 20:00:20 +01:00
5fb2ff09c7
kernel, luna, libc: Move the heap code to a common zone, to be used by both kernel and userspace
2023-01-13 19:27:53 +01:00
d864bda751
libc: Add (de)allocate_memory wrappers located in sys/mman.h
2023-01-13 19:08:02 +01:00
139c0b5eb1
Kernel: Make a UserVM wrapper around Bitmap and use that to allocate user VM
...
This lets us allocate more than one page of memory from the user side.
2023-01-13 19:05:20 +01:00
7462b764d8
Kernel: Add __cxa_atexit iomplementation
2023-01-13 18:56:05 +01:00
09dc8bd522
Bitmap: Add find_region() and find_and_toggle_region()
2023-01-13 18:55:31 +01:00
59db656f25
size_t -> usize
2023-01-13 18:55:05 +01:00
16a62552db
SharedPtr: Add a nullptr constructor
2023-01-13 18:54:39 +01:00
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