Commit Graph

589 Commits

Author SHA1 Message Date
Jeremy Soller 853b77e3a4 Unmap owned grants, use owned grants to calculate memory usage 2020-08-25 10:35:55 -06:00
Aaron Janse dc6132dc06 elaborate error message for initfs chdir failure 2020-08-17 03:24:56 -07:00
Aaron Janse dfcf5be778 use logging instead of println 2020-08-17 02:55:40 -07:00
jD91mZM2 da7b813fa9 Investigate why user heap isn't mapped
Took me way too long to spot this :D
2020-08-15 17:22:34 +02:00
jD91mZM2 78e5c71103 Deprecate the original fmap/funmap
The cool thing here is that we're temporarily binary compatible with the
old stuff, so if anyone would use an old version of redox_syscall we can
easily find them with these prints.
2020-08-14 15:18:47 +02:00
Jeremy Soller 2057b889ae Merge branch 'log_experiment' into 'master'
Log experiment

See merge request redox-os/kernel!144
2020-08-09 13:01:39 +00:00
Wren Turkal 4c009530a8 Make x86_64 log writer not use println!.
This opens the door to completely elimnating println! usage from the
kernel.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-09 00:00:26 -07:00
Wren Turkal 5301057324 Convert some println -> log::info!.
Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 21:18:18 -07:00
Wren Turkal dafd2e9f98 Add a way to customize how logging is done.
Each architecture may have a different method to enable logging. Now
that can be customized with a function passed to the init_logger
function.

Also, provide a minimal x86_64 implementation.

This is the first commit where you can see logging coming from the log
crate.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 21:18:15 -07:00
Wren Turkal 29a9592e7b Re-export log::set_max_level.
Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 20:50:55 -07:00
Wren Turkal 50675842af Add logger init and initialize on x86_64.
Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 20:50:53 -07:00
Wren Turkal 03e60f7da6 Add log crate and add a generic logger.
This is the first step of integrating the log crate as the main way to
log messages from the kernel.

Also, reexport all log macros. This module should eventually be the
only logging API used in the kernel.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 20:48:41 -07:00
Jeremy Soller d8a0a8182d Merge branch 'add_debug_to_structs' into 'master'
Implement Debug for a couple structs.

See merge request redox-os/kernel!142
2020-08-08 12:55:53 +00:00
Jeremy Soller ad6035c7de Merge branch 'idiomatic-rust' into 'master'
Replace llvm_asm with asm

See merge request redox-os/kernel!141
2020-08-03 15:09:08 +00:00
Wren Turkal efb5b47463 Implement Debug for a couple structs.
I am finding it useful to be able to pretty print Mappers and
ActivePageTable structs.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-02 22:13:24 -07:00
Jeremy Soller 1a8f47330e Add a message when user heap is not mapped, do not panic 2020-08-02 17:07:57 -06:00
Jeremy Soller ec1809e7c0 Add memory: to null namespace, temporarily 2020-08-02 17:05:17 -06:00
Jeremy Soller 6f3094cb2b Work around unmapping user heap 2020-08-02 16:33:56 -06:00
Jeremy Soller 220e53c24d Show CPU and PID in kernel panic 2020-08-02 12:12:59 -06:00
jD91mZM2 f07603902d Replace all llvm_asm! uses with asm! 2020-08-01 14:56:46 +02:00
jD91mZM2 fbeb297949 Fix compilation since last rust
Thanks to @4lDO2 for all this. I just moved his changes to io_uring onto
the master branch of the kernel. I take no credit.
2020-08-01 13:00:52 +02:00
jD91mZM2 93856b43b9 s/\basm!/llvm_asm!/g 2020-08-01 12:31:56 +02:00
jD91mZM2 55c3377c5c Use VirtualAddress wrapper in user.rs 2020-07-30 14:21:57 +02:00
jD91mZM2 3fca287bcc Remove debug prints 2020-07-30 13:21:17 +02:00
jD91mZM2 34194e2b79 Implement partial funmap-ing for user schemes 2020-07-30 13:08:03 +02:00
jD91mZM2 0ffa9b0be6 Track region instead of address in user.rs 2020-07-30 11:42:49 +02:00
jD91mZM2 9eb2aebd43 Implement unmapping multiple whole maps 2020-07-28 11:34:50 +02:00
jD91mZM2 639e603c4f WIP: Add funmap2 2020-07-25 22:29:21 +02:00
jD91mZM2 a811774c58 Add necessary functions for funmap2 2020-07-23 16:45:35 +02:00
jD91mZM2 ccc577b3a1 Abstract over finding nice addresses 2020-07-23 11:22:54 +02:00
jD91mZM2 57c167d2fa Make grants be a BTreeSet 2020-07-22 15:09:28 +02:00
Jeremy Soller 2f94031221 Merge branch 'auxv' into 'master'
Implement auxiliary vector

See merge request redox-os/kernel!136
2020-07-21 14:16:05 +00:00
jD91mZM2 9c41424d3a Apply suggestion to src/syscall/process.rs 2020-07-21 14:10:58 +00:00
jD91mZM2 2782a5a7a9 Apply suggestion to src/syscall/process.rs 2020-07-21 14:10:43 +00:00
jD91mZM2 5dc65a920f Add restrictions on fmap 2020-07-21 16:08:28 +02:00
jD91mZM2 cf709783d6 Reverse mod/syscall.rs 2020-07-20 11:17:36 +02:00
jD91mZM2 07baf70c7a Don't push interpreter as argv[0] 2020-07-20 11:09:56 +02:00
Jeremy Soller 854149ee97 Support for debugging to system76 EC 2020-07-19 10:24:15 -06:00
jD91mZM2 ff5354b5b5 Fix mmap when using out-of-place address 2020-07-18 15:03:23 +02:00
jD91mZM2 2d63009ba4 Add debug entry for fmap2 2020-07-18 13:40:12 +02:00
jD91mZM2 310a425c65 Merge branch 'master' into auxv 2020-07-18 12:19:11 +02:00
jD91mZM2 615e516585 Add extra assembler metadata 2020-07-16 17:13:30 +02:00
jD91mZM2 11f26140f5 Fix most MR concerns 2020-07-16 16:59:58 +02:00
jD91mZM2 895a4a5656 Deprecate int 0x80
Mainly because I think the code could be cleaner if we can remove
support entirely :)
2020-07-16 16:33:25 +02:00
jD91mZM2 4fbe86a9ce Fix random userspace page faults
I was an idiot and forgot rbx wasn't always backed up. As a result, we
should never ever write to it
2020-07-16 16:32:48 +02:00
jD91mZM2 acebd1a8d1 Merge remote-tracking branch 'origin/master' into global-asm 2020-07-16 15:35:42 +02:00
jD91mZM2 b00456dbb9 WIP: Continue trying to fix clone_ret 2020-07-16 13:46:53 +02:00
Jeremy Soller c78b69969f Include trampoline in kernel to fix multi_core on EFI 2020-07-15 21:46:15 -06:00
Jeremy Soller 1e44f157d0 Fix graphical_debug feature 2020-07-15 16:10:51 -06:00
jD91mZM2 145c1898be Merge branch 'master' into global-asm 2020-07-15 12:05:34 +02:00