Commit Graph

2646 Commits

Author SHA1 Message Date
Robin Randhawa 95bd8f2013 clone: Make stack manipulation arch specific 2021-01-17 10:26:49 +00:00
Robin Randhawa ae0aebd036 aarch64: clone: Return from clone syscall
No CLONE_STACK functionality yet.
2021-01-17 10:12:42 +00:00
Robin Randhawa 67ec6c23e7 aarch64: Move tpidr_el0 setup from spawn to switch 2021-01-17 10:09:03 +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
Jeremy Soller e124fa171b Merge branch 'misc-fixes' into 'aarch64-rebase'
Misc fixes

See merge request redox-os/kernel!160
2021-01-15 19:43:23 +00:00
Robin Randhawa 5bc9dea242 aarch64: context::switch: update the CONTEXT_SWITCH_LOCK 2021-01-15 19:03:42 +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 825bc4a02d aarch64: spawn: split out arch specific mods 2021-01-15 09:12:30 -07:00
Robin Randhawa 14d79927af aarch64: Add a set_tcb method to setup tpidr_el0 2021-01-15 09:12:30 -07: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 c5e077546a aarch64: spawn: split out arch specific mods 2021-01-15 15:51:47 +00:00
Robin Randhawa e0a7471cf8 aarch64: Add a set_tcb method to setup tpidr_el0 2021-01-15 15:50:00 +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 252ec24905 aarch64: Use target-feature for NEON insn suppression and tpidr_el1 use 2021-01-15 06:09:42 -07:00
Robin Randhawa aa3839605f aarch64: Remove code-model from the JSON spec
We use a target-feature for this now.
2021-01-15 06:09:42 -07:00
Robin Randhawa ea21fba3aa build.rs: aarch64: Specify target for cc::Build
Oddly, not specifying this or using aarch64-unknown-none (which would be
the default that cc gets from the TARGET environment variable) both
fail to invoke the appropriate compiler to build the asm code.

Using aarch64-unknown-redox works but shouldn't really be needed. This
is perhaps because of some odd arrangement of KTARGET, TARGET, the
installed prefix toolchain and the kernel target JSON spec.

The early_init asm code shall be replaced by a pure Rust bootloader
eventually so let's move with this for the moment.
2021-01-15 06:09:42 -07:00
Robin Randhawa 02c37d3fae WIP: aarch64 rebase 2021-01-15 05:54:42 -07:00
Jeremy Soller 132d91d3aa Fixed page flags for aarch64 2021-01-14 15:54:51 -07:00
Jeremy Soller cb6b44d69e Use devmap offset for physmap on aarch64 2021-01-14 12:35:27 -07:00
Jeremy Soller 1214f3dcdc Add PageFlags to abstract differences between architectures 2021-01-14 10:01:36 -07:00
Jeremy Soller c5774c5529 Add TableKind for future use 2021-01-14 09:16:46 -07:00
Jeremy Soller dafd9cb3c4 Add ENTRY_FLAG_DEFAULT_PAGE and ENTRY_FLAG_DEFAULT_TABLE 2021-01-14 09:16:37 -07:00
Jeremy Soller fad48af985 WIP: aarch64 support 2021-01-13 10:47:35 -07:00
Jeremy Soller 5e10feeaeb Fix whitespace in linker file 2021-01-12 19:59:05 -07:00
Jeremy Soller 6c4c19a95c Move consts to arch 2021-01-12 19:57:42 -07:00
Jeremy Soller ed55b49093 Update aarch64 target to new Rust 2021-01-12 19:57:07 -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 ccddabadf7 Make x86 specific dependencies, x86 specific 2021-01-09 20:12:59 -07:00
Jeremy Soller e771e6a4d9 Reduce duplication in context::switch 2020-12-27 20:03:13 -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 b1c7b9638d Merge branch 'fix-repr-packed' into 'master'
Fix possible UB by implementing Copy and Clone manually for BuddyEntry.

See merge request redox-os/rmm!1
2020-12-20 16:08:31 +00:00
4lDO2 9a716604fc Implement Copy and Clone manually for BuddyEntry.
This fixes a warning that may in the future become an error, about the
possibility for unaligned references, since the derive macros apparently
rely on creating references to fields. Unaligned references are direct
UB.
2020-12-20 16:36:52 +01:00
Jeremy Soller cff858b455 Merge branch 'rmm' into 'master'
Support for RMM

See merge request redox-os/kernel!155
2020-11-27 16:49:39 +00:00
Jeremy Soller f5ac405db6 Support for RMM 2020-11-27 16:49:39 +00:00
Jeremy Soller cdbeecfffe Remove some warnings 2020-09-14 09:47:29 -06:00
Jeremy Soller 936352a049 FrameCount::new function 2020-09-14 09:47:23 -06:00
Jeremy Soller 8e0df608e2 Add allocator usage information 2020-09-14 09:41:56 -06:00
Jeremy Soller e94d7e7772 Rewrite buddy allocator 2020-09-14 09:41:42 -06:00
Jeremy Soller a775c9e987 Require Arch to implement Clone and Copy 2020-09-14 09:08:28 -06:00
Jeremy Soller a12be1b172 Keep track of last free page 2020-09-09 20:19:28 -06:00
Jeremy Soller f17a1b52bd Test multi-page allocation 2020-09-09 16:02:59 -06:00