4lDO2
e28fef09e3
Improve aarch64 debugger.
2023-07-28 13:23:44 +02:00
4lDO2
d16569110e
Don't mess up x18 in aarch64 exc handler.
2023-07-28 12:56:55 +02:00
4lDO2
ce35deed4b
Support aarch64 page consistency checking.
2023-07-28 12:38:25 +02:00
4lDO2
f454df38eb
Fix get_page_info.
2023-07-28 10:47:18 +02:00
4lDO2
ec9c24f841
WIP: aarch64
2023-07-27 19:05:33 +02:00
4lDO2
8b7fc8a468
Compile and mostly run properly on i686.
2023-07-27 16:45:36 +02:00
4lDO2
f4bdb5388e
Remove AtomicU64 requirement for starting APs.
2023-07-27 16:44:52 +02:00
4lDO2
885f88b777
Fix futex for non-AtomicU64-capable targets.
2023-07-27 16:44:26 +02:00
4lDO2
25d26b3b93
Arch-independent x86-modeled page fault handler.
2023-07-27 15:56:45 +02:00
4lDO2
7a3b453fbb
Declare __usercopy_{start,end} as functions.
2023-07-27 15:34:33 +02:00
4lDO2
4d2cd6ce0f
Remove redundant log msg.
2023-07-27 15:25:51 +02:00
4lDO2
a4a84775d6
Fix MMAP_PREP order.
2023-07-26 22:31:56 +02:00
4lDO2
d6e1732d44
Stop using feature(arbitrary_self_types).
2023-07-25 11:22:36 +02:00
4lDO2
3cfec39b47
Pass MunmapFlags to scheme.
2023-07-25 10:52:24 +02:00
4lDO2
c9aa5ca851
WIP: Add SYS_MREMAP.
2023-07-25 10:52:24 +02:00
4lDO2
2660c3e07a
WIP: Pin fmap grants that are borrowed too.
...
This might not be the most ideal solution, since a GiB grant can be
EBUSY blocked if a single page is used by an indefinitely-blocking
UserScheme. But, the alternatives would impose lots of additional
complexity, such as increasing the PageInfo size, adding more
refcounting arrays to grants, etc.
2023-07-25 10:52:24 +02:00
4lDO2
e054a5b211
Add debugger checks for correct CoW page flags.
2023-07-25 10:52:24 +02:00
4lDO2
37579601b2
Remove one level of indirection in get_page_info.
2023-07-25 10:52:24 +02:00
4lDO2
e2b736140f
Make PageInfo atomic once again.
2023-07-25 10:52:24 +02:00
4lDO2
d58ddc35fe
Complete PageInfo cleanup.
...
This enables proper CoW ^ shared enforcement, so that e.g. acquiring a
new CoW page from already shared memory, or vice versa, will enforce
that they aren't both simultaneously.
2023-07-25 10:52:23 +02:00
4lDO2
0f1b5b9b6f
WIP: Make cow/shared refcounts mutually exclusive.
2023-07-25 10:52:23 +02:00
4lDO2
113cb5ed4e
Ensure pages cannot be both CoW and shared.
2023-07-25 10:52:23 +02:00
4lDO2
d3ecedefd9
Notify schemes when mmaps are unmapped.
2023-07-25 10:52:23 +02:00
4lDO2
02f04752e8
Use proper locks for PageInfo.
2023-07-25 10:52:23 +02:00
4lDO2
7bdf5e9af3
Pass unaligned length to scheme for fmap.
2023-07-25 10:52:23 +02:00
4lDO2
afa3d7dc7b
Support anonymous MAP_SHARED mmaps.
2023-07-25 10:52:23 +02:00
4lDO2
70b4d99c96
Implement MAP_FIXED without MAP_FIXED_NOREPLACE.
2023-07-25 10:52:23 +02:00
4lDO2
f0341280f7
Fix frame deallocation.
2023-07-25 10:52:23 +02:00
4lDO2
3a80528d13
Fix MAP_LAZY mappings.
2023-07-25 10:52:23 +02:00
4lDO2
cbec83215a
Lazy-evaluate pages returned by fmap.
2023-07-25 10:52:22 +02:00
4lDO2
9182722f84
WIP: Allow listing address space grants again.
2023-07-25 10:52:22 +02:00
4lDO2
0466e87e59
Error if scheme fmap returns unaligned address.
2023-07-25 10:52:22 +02:00
4lDO2
ba62c0606e
Pin PhysBorrowed head/tail UserScheme grants too.
2023-07-25 10:52:22 +02:00
4lDO2
329d60848c
WIP: Support CoW fmap.
2023-07-25 10:52:22 +02:00
4lDO2
b24cf821c2
Support transferring grants again.
2023-07-25 10:52:22 +02:00
4lDO2
55f1829e77
Call funmap if applicable.
2023-07-25 10:52:22 +02:00
4lDO2
4ec8712fb0
Adjust fmap offsets in Grant::extract.
2023-07-25 10:52:22 +02:00
4lDO2
c5eb44d968
Increase refcount for borrowed fmap too.
2023-07-25 10:52:22 +02:00
4lDO2
b3a6a6744a
Pin grants that are used in UserScheme.
2023-07-25 10:52:22 +02:00
4lDO2
954a8d00fe
Make page fault handler recursive.
...
This is probably a bad idea, but it works for now, and can only cause
problems, if grants that borrow grants that borrow grants etc., are
used.
2023-07-25 10:52:21 +02:00
4lDO2
da6f6a316c
Return only one grant, External, for Grant::borrow.
2023-07-25 10:52:21 +02:00
4lDO2
b5430359d8
Forbid scheme calls with non-RAM physmapped memory.
2023-07-25 10:52:21 +02:00
4lDO2
43c433a3f0
Remove FmapCtxt.
2023-07-25 10:52:21 +02:00
4lDO2
bf6ad5c41a
Disable debugging again.
2023-07-25 10:52:21 +02:00
4lDO2
8553bc7a59
WIP: Support userspace-backed borrowing mmaps.
2023-07-25 10:52:21 +02:00
4lDO2
024f3e3828
Fix deadlock, booting to shell works now.
2023-07-25 10:52:21 +02:00
4lDO2
ad78dcc5a1
WIP: Rudimentary MAP_SHARED fmap implementation.
2023-07-25 10:52:21 +02:00
4lDO2
afa61601c4
Add ContextStatus::HardBlocked.
2023-07-25 10:52:21 +02:00
4lDO2
23fede5db0
Remove scheme funmap methods.
2023-07-25 10:52:20 +02:00
4lDO2
0c365f54e6
WIP: FmapBorrowed.
2023-07-25 10:52:20 +02:00