Commit Graph

35 Commits

Author SHA1 Message Date
4lDO2 307fcf3ad7 Remove now unused TLS struct. 2021-08-11 17:46:40 +02:00
4lDO2 d6e1797620 Make Mapper::map fallible. 2021-08-11 17:46:40 +02:00
4lDO2 465c461b60 WIP: Stop using recursive mapping.
Note that this is very preliminary, and I merely got my already freezing
kernel branch not to triple fault, but I would probably apply this patch
to upstream.

What is changed here, is that rather than relying on recursive mapping
for accessing page table frames, it now uses linear translation
(virt=phys+KERNEL_OFFSET). The only problem is that the paging code now
makes assumptions that the entire physical address space remains mapped,
which is not necessarily the case on x86_64 architecturally, even though
systems with RAM more than a PML4 are very rare. We'd probably lazily
(but linearly) map physical address space using huge pages.
2021-08-11 17:46:33 +02:00
Jeremy Soller 0c3542ff51 Store funmap data with the context's grants 2021-08-10 20:46:30 -06:00
Jeremy Soller 8d61c79b23 Use RMM TableKind and fix x86_64 compilation 2021-05-03 21:15:46 -06:00
Jeremy Soller 2aa4d8caf5 Merge remote-tracking branch 'origin/aarch64-rebase' into riscv64 2021-05-03 20:52:59 -06:00
Jeremy Soller b9448274fc Switch to using RMM PageFlags 2021-05-03 17:28:08 -06:00
Jeremy Soller dd0616cc8f Use RMM for TLB flushing 2021-05-03 12:42:16 -06:00
Robin Randhawa 65448c2d48 aarch64: context: memory: Grant::map_inactive: Bugfix
When mapping one (from) virtual address range to another (to) virtual
address range, be mindful of which mapper type to use for each range.

Before this, the same mapper type was used for both ranges. This meant
that if from and to were different (as in not both kernel virtual
addresses or user virtual addresses) then it would appear that either
from or to was not mapped previously and the kernel would panic.
2021-01-21 11:41:26 +00:00
Robin Randhawa ae3a55f5d1 Introduce a PageTableType enum to help distinguish User and Kernel Tables 2021-01-15 09:12:30 -07:00
Jeremy Soller 334584b3d5 Use rmm::PhysicalAddress and rmm::VirtualAddress directly 2021-01-09 21:16:11 -07:00
Jeremy Soller 853b77e3a4 Unmap owned grants, use owned grants to calculate memory usage 2020-08-25 10:35:55 -06:00
jD91mZM2 34194e2b79 Implement partial funmap-ing for user schemes 2020-07-30 13:08:03 +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
4lDO2 01041a5d8a Implement (mostly) fmap2 for memory: 2020-07-08 20:49:16 +02:00
Jeremy Soller 63e2a835e0 Fix clippy.sh script and fix a number of clippy warnings 2019-10-06 11:04:06 -06:00
jD91mZM2 fe705d9b63 Switch to 2018 edition
Most of this was generated by the absolutely extraordinary `cargo fix`
subcommand. There were still 2 errors and a few warnings to patch up,
but compared to the normal 600+ errors, I'd say the fixer did a damn
good job! I'm also amazed that I could still start the VM after this,
I half expected some kinds of runtime failure...
2019-06-21 12:12:01 +02:00
Jeremy Soller dc198cef6e Keep track of leaked grants and allow for cloning of grants 2019-04-15 20:42:41 -06:00
Jeremy Soller f36506613b Update funmap support 2019-04-06 20:13:55 -06:00
Jeremy Soller 504e93d11b Store file descriptor for mapped files until they are unmapped 2019-01-28 19:27:20 -07:00
Jeremy Soller 30f1265c36 Add pages to use for head and tail of buffers in userscheme 2019-01-01 12:37:23 -07:00
Jeremy Soller 257e4a6eb5 WIP: improve speed of Grant::map_inactive
Use recursive page table address to calculate p4 entry
2019-01-01 12:28:45 -07:00
Jeremy Soller a31af81f8b Update fmap support 2018-12-28 15:35:21 -07:00
Jeremy Soller 5b31bf57be Update to latest rust 2018-11-08 17:25:57 -07:00
Jeremy Soller 3b1bf1bac1 Call TLB IPI when mapping grants 2018-09-25 20:58:24 -06:00
Tibor Nagy e6b9f850d1 Migrate from collections 2017-10-28 02:42:08 +02:00
Gabriel Majeri 305e7980d8 Update to bitflags 1.0 2017-10-11 15:59:14 +03:00
Jeremy Soller 917d30c193 Fix the mapping of TLS - it will now be page aligned 2017-09-13 22:16:02 -06:00
Jeremy Soller 66120cf201 Fix deallocation issues by ignoring deallocation on temporary page 2017-04-15 19:56:48 -06:00
Jeremy Soller 2087544ea7 Move all files to src 2017-04-03 21:47:01 -06:00
Jeremy Soller 0c8ba636f4 Cleanup Redox repo, update Rust, remove old target 2017-01-03 15:55:00 -07:00