Jeremy Soller
ae3bdea4bc
Update raw-cpuid
2022-03-01 18:12:06 -07:00
Jeremy Soller
d234df37c9
Improve RMM logging
2022-03-01 17:57:03 -07:00
Jeremy Soller
fe468aa1ab
Improvements for graphical debug and system76 EC debug
2022-03-01 16:25:15 -07:00
Jeremy Soller
2b5aa1f375
Cleanup of graphical debug to allow it to run much earlier
2022-03-01 15:50:26 -07:00
Jeremy Soller
ae0d48d9ab
Identity map ACPI
2022-03-01 12:52:06 -07:00
Jeremy Soller
81e700708d
Get memory areas as argument instead of from hardcoded pointer
2022-02-14 11:52:02 -07:00
Jeremy Soller
933b3b8fc0
Respect min flag to allocate_frames_complex
2022-02-14 10:29:12 -07:00
Jeremy Soller
c1aa76bf3c
Fill in st_dev in fstat
2022-02-14 09:57:24 -07:00
Jeremy Soller
52ad689d37
Notify debug: readers of new input after all input is processed
2022-02-14 08:49:34 -07:00
Jeremy Soller
1aae949fc4
Support for getting live disk from bootloader
2022-02-10 15:49:34 -07:00
Jeremy Soller
9e6664fb82
Fix additional page mapping in graphical debug
2022-02-10 14:48:52 -07:00
Jeremy Soller
7d9a33c63a
Add debugger (dumps all kernel state)
2022-02-10 14:10:04 -07:00
Jeremy Soller
f92fe90069
Use requested page table in trampoline
2022-02-07 17:49:23 -07:00
Jeremy Soller
1b2a28a4f0
Use FRAMEBUFFER variables for graphical debug
2022-02-07 17:38:52 -07:00
Jeremy Soller
413238a0a6
Prevent re-use of real mode areas, adjust areas instead of panic
2022-02-07 16:36:05 -07:00
Jeremy Soller
b109263e77
Ensure ACPI RSDPs are not re-used
2022-02-05 19:59:02 -07:00
Jeremy Soller
308c5ad3d9
Make sure kernel, stack, and env are identity mapped
2022-02-04 11:16:54 -07:00
Jeremy Soller
941f59283b
Map kernel to KERNEL_OFFSET, remove bump_offset
2022-02-03 20:21:00 -07:00
Jeremy Soller
5104437423
WIP: changes for rust bios bootloader
2022-02-03 17:15:28 -07:00
Jeremy Soller
bbc4a4aefe
workaround for crash on graphical debug finish
2022-01-28 09:47:47 -07:00
Jeremy Soller
3f2a9f7f0a
Fix graphical debug feature
2022-01-28 09:15:03 -07:00
Jeremy Soller
0ab4529eaa
Make register dumps lowercase
2021-12-01 09:53:33 -07:00
Jeremy Soller
cd3dcf153e
Do not print interpreter
2021-12-01 08:40:11 -07:00
Jeremy Soller
63fcc204cb
x86 paging refactor for debugger
2021-11-30 20:56:55 -07:00
Jeremy Soller
77b8215a66
Getter for Grant region, remove set_mapped, and make region_mut private
2021-11-30 20:06:45 -07:00
Jeremy Soller
4f259e3589
Workaround for thread race conditions
2021-11-30 18:03:34 -07:00
Jeremy Soller
515cab03eb
Fix a number of warnings
2021-11-29 20:01:27 -07:00
Jeremy Soller
61279db991
Remove no_threaded_syscalls feature
2021-10-27 20:48:16 -06:00
Jeremy Soller
61d8b0ff32
Fix allocator race condition
2021-10-27 20:29:00 -06:00
Jeremy Soller
063881d2ca
Show context name and syscall when panicking
2021-10-27 20:28:40 -06:00
Jeremy Soller
9ea278997c
Disable threaded syscalls until threaded allocation issues are solved
2021-10-20 20:05:47 -06:00
Jeremy Soller
64f1533d6f
Implement anonymous fmap
2021-09-22 21:04:04 -06:00
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
df145ea0a9
Utilize linear_phys_to_virt where applicable.
2021-08-11 17:46:40 +02:00
4lDO2
16a31b0cd1
Add linear_phys_to_virt and vice versa.
...
However, since not all platforms will allow the entire physical address
space to be simultaneously mapped to part of the virtual address space,
we may still require some dynamic mapping.
2021-08-11 17:46:40 +02:00
4lDO2
5f4978a6dc
Return ENOMEM rather than panicking for PML4 alloc.
2021-08-11 17:46:40 +02:00
4lDO2
67cc6799bd
Fix possible UB by checking for null allocating FX.
...
Namely, the global allocator API in Rust, actually only returns a null
pointer on failure, rather than wrapping it in a Result, which AllocRef
does. Since Box::from_raw(null) is direct UB, this can in theory lead to
very strange behavior.
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
f94dc3beb8
Allow current process to access its own proc data
2021-08-10 16:33:49 -06:00
4lDO2
1a80351a2c
Fix TLS in paranoid entries.
2021-08-09 14:25:15 +02:00
4lDO2
41d5a2a786
Use naked functions in syscall inst handler too.
2021-08-06 18:08:04 +02:00
4lDO2
d7a1c6255b
Fix possible race condition in paranoid ISRs.
...
Additionally, because it turned out to be infeasible to rely on
link-time constants in global_asm! code, I have also converted the
interrupt handlers to naked fns. This removes the proc-macro-reliant
"paste" dependency, but inserts a tiny ud2 at the end of every ISR.
2021-08-06 17:34:56 +02:00
4lDO2
1047728f35
Only set process regs for faults from ring 3.
...
This fixes a deadlock that might occur if a page fault is triggered
while a lock to the current context is held.
2021-08-06 15:41:38 +02:00
4lDO2
87241a9d3c
Pass AT_PHDR via a grant rather than the stack.
2021-08-01 14:57:41 +02:00
4lDO2
3eedbeb14d
WIP: Let userspace manage fsbase/gsbase and TLS.
2021-08-01 12:09:22 +02:00
4lDO2
0968e4f87e
Support fsgsbase at compile time.
2021-07-31 10:12:59 +02:00
4lDO2
bbe6b4650a
Futex: check for lower-half addrs manually.
2021-07-08 16:08:02 +02:00
4lDO2
9e9d025bb5
Add support for FUTEX_WAIT64.
2021-07-08 13:28:46 +02:00