Commit Graph

168 Commits

Author SHA1 Message Date
Robin Randhawa 3da345867a aarch64: paging: Derive Debug, PartialEq for VirtualAddressType
This makes asserts on VirtualAddressType equality possible.
2021-01-21 11:38:46 +00:00
Robin Randhawa 452196b81f aarch64: consts: Use the same USER_TLS_SIZE as x86_64 2021-01-21 11:37:32 +00:00
Robin Randhawa c188a60871 aarch64: Fix clone_ret
FIXME: Explain the magic numbers here later.
2021-01-18 21:47:28 +00:00
Robin Randhawa 67d72532a9 aarch64: usermode: Remove tpidr_el0 manipulation
Was using the incorrect USER_TLS_OFFSET instead of USER_TCB_OFFSET. In
any case, this is better done in process::clone.
2021-01-17 10:06:04 +00:00
Robin Randhawa 3585f620b0 aarch64: clone: Fix incorrect stack offset in clone_ret 2021-01-17 10:03:50 +00:00
Robin Randhawa 208fb681f4 aarch64: vectors: Manage unhandled exceptions
So we can more clearly see when things go wrong.
2021-01-17 10:01:34 +00:00
Jeremy Soller 17fd135017 Merge branch 'pagetabletype-and-misc-fixes' into 'aarch64-rebase'
Pagetabletype and misc fixes

See merge request redox-os/kernel!158
2021-01-15 19:50:13 +00:00
Robin Randhawa 6677cfbf1e aarch64: Make interrupt::pause use nop so we can move ahead before interrupts are enabled 2021-01-15 19:02:43 +00:00
Robin Randhawa ae3a55f5d1 Introduce a PageTableType enum to help distinguish User and Kernel Tables 2021-01-15 09:12:30 -07:00
Robin Randhawa 76129ddf75 aarch64: Mirror PRESENT and VALID bits in Page and Table descriptors 2021-01-15 15:54:25 +00:00
Robin Randhawa 9c3f6e3660 Introduce a PageTableType enum to help distinguish User and Kernel Tables 2021-01-15 15:49:04 +00:00
Jeremy Soller bdea7f553a Remove PRESENT flag from aarch64 descriptors 2021-01-15 06:57:02 -07:00
Jeremy Soller 5f8b004476 Fix typo in InterruptStack parameter 2021-01-15 06:56:36 -07:00
Robin Randhawa 02c37d3fae WIP: aarch64 rebase 2021-01-15 05:54:42 -07:00
Jeremy Soller 6c4c19a95c Move consts to arch 2021-01-12 19:57:42 -07:00
Jeremy Soller ea6b1e7f8b Update redox_syscall to 0.2.4 2021-01-11 07:01:05 -07:00
Jeremy Soller 334584b3d5 Use rmm::PhysicalAddress and rmm::VirtualAddress directly 2021-01-09 21:16:11 -07:00
Jeremy Soller 9033902830 Better messaging about which timer is used 2020-12-23 10:33:09 -07:00
Jeremy Soller 04cc8a2d9c Simplify reserved memory hack 2020-12-23 09:55:03 -07:00
Jeremy Soller 7355ae1671 Hack to ensure kernel is mapped even if it uses reserved memory 2020-12-23 09:46:34 -07:00
Jeremy Soller f5ac405db6 Support for RMM 2020-11-27 16:49:39 +00: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 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
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 6f3094cb2b Work around unmapping user heap 2020-08-02 16:33:56 -06:00
jD91mZM2 f07603902d Replace all llvm_asm! uses with asm! 2020-08-01 14:56:46 +02:00
jD91mZM2 93856b43b9 s/\basm!/llvm_asm!/g 2020-08-01 12:31:56 +02:00
Jeremy Soller 854149ee97 Support for debugging to system76 EC 2020-07-19 10:24:15 -06: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 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
jD91mZM2 3bb234009a WIP: Ensure clone_ret correctness 2020-07-15 11:43:17 +02:00
Jeremy Soller 93303af931 Merge branch 'catch-kernel-signal' into 'master'
Catch kernel signal

See merge request redox-os/kernel!135
2020-07-14 12:53:46 +00:00
Jeremy Soller 6b2302f92e Merge branch 'paging-packed-use-unsafe' into 'master'
Wrap borrows of page table entries in unsafe

See merge request redox-os/kernel!126
2020-07-14 12:53:21 +00:00
jD91mZM2 ca3ddcdeca Add TODOs for mapping PTI properly
I think we need to reimplement these functions in assembly :(
2020-07-14 09:14:16 +02:00
jD91mZM2 701c31cee0 Fix PTI compilation
It's broken on master anyway
2020-07-13 15:49:37 +02:00
jD91mZM2 5927743ff8 fixup! WIP: Rewrite interrupts as global assembly 2020-07-13 15:25:15 +02:00
jD91mZM2 fbdfcd2ba0 WIP: Rewrite interrupts as global assembly
Because the way we were using inline assembly was technically incorrect
and breaking the laws of rust

This *finally* compiles. That doesn't mean it works!
2020-07-11 16:15:25 +02:00
jD91mZM2 56f55a3b97 Always save proccess registers
Not sure if this is going to be required, and I'm not sure if this will
hurt performance, y'know, *always* doing this.
2020-07-08 11:47:12 +02:00
jD91mZM2 103ed1b17f Make interrupt stack readable on kernel signals 2020-07-08 11:44:04 +02:00