Commit Graph

1162 Commits

Author SHA1 Message Date
4lDO2 bcfd7b175e Update rmm. 2021-07-08 13:47:16 +02:00
4lDO2 9e9d025bb5 Add support for FUTEX_WAIT64. 2021-07-08 13:28:46 +02:00
Jeremy Soller b973c5db95 Merge branch 'dont-hardcode-reg-offsets' into 'master'
Use offset_of! in context::arch::switch_to.

See merge request redox-os/kernel!180
2021-06-21 19:06:56 +00:00
4lDO2 3e5cf387d5 Use offset_of! in context::arch::switch_to.
This is definitely better than hardcoding the offsets!
2021-06-21 10:16:41 +02:00
4lDO2 6039026349 Merge branch 'update_toolchain' into 'master'
Update toolchain

See merge request redox-os/kernel!179
2021-06-18 15:15:15 +00:00
4lDO2 ecfcedb9bf Remove explicit .intel_syntax directive.
It is now default, and the new compiler generated a lot of warnings now
that Intel syntax has (luckily) become the default.
2021-06-18 09:20:13 +02:00
4lDO2 1cf5f5ea22 Update dependencies to work with latest nightly. 2021-06-17 22:42:54 +02:00
4lDO2 2dc899dc3b Update paste and align interrupt handlers. 2021-06-17 22:42:50 +02:00
4lDO2 7594dd60d2 Remove compare_and_swap from int_like!. 2021-06-17 22:42:44 +02:00
4lDO2 7d4defa5e5 Use weak CAS and use abort() in context::switch.
Previously context::switch used compare_and_swap for acquiring the
global context switch lock, but given its deprecation in more recent
Rust versions, it has been replaced with compare_exchange_weak (which
can be further optimized on some architectures).

It also replaces panic!() with abort() in switch_finish_hook, because
unwinding from assembly is not that fun.
2021-06-17 22:42:38 +02:00
4lDO2 cc6f792a03 Use options(noreturn) in all naked functions. 2021-06-17 22:42:31 +02:00
4lDO2 dc5f1fe055 Update toolchain. 2021-06-17 22:42:23 +02:00
Jeremy Soller d3cf4db47b Prerequisites for risv64 support 2021-05-12 20:23:53 -06:00
Jeremy Soller 0a79c17307 Show meaning of CODE on page fault 2021-05-10 11:34:14 -06:00
Jeremy Soller 8130e4752b Map TSS using RMM 2021-05-07 09:13:25 -06:00
Jeremy Soller 77f6887fbc Debug use of memory map and env data 2021-05-07 08:54:36 -06:00
Jeremy Soller 38f7884e21 Improvements for aarch64 serial driver on real hardware 2021-05-06 21:25:15 -06:00
Jeremy Soller 2c474f98f9 Merge branch 'higher_half_percpu' into 'master'
Put the KPCRs in high memory, in their own PML4.

See merge request redox-os/kernel!173
2021-05-06 19:25:16 +00:00
4lDO2 36b3a4a49e Add KERNEL_PERCPU_PML4 on AArch64. 2021-05-06 21:22:48 +02:00
4lDO2 558109a9cb Put the KPCRs in high memory, in their own PML4.
This also removes the need to do another semi-expensive remap when
cloning processes, since the KPCRs (for kernel TLS) are no longer stored
in the user PML4.
2021-05-06 21:21:37 +02:00
Jeremy Soller 2e38fab913 Do not hardcode aarch64 uart 2021-05-06 13:16:50 -06:00
Jeremy Soller c4617c0bce Merge branch 'outsource-most-acpi' into 'master'
Move most of ACPI to userspace

See merge request redox-os/kernel!175
2021-05-06 18:36:06 +00:00
4lDO2 3eacbdda2a Remove unnecessary exit() diff. 2021-05-06 19:49:58 +02:00
4lDO2 fd97fa80bb Move pid back to inner scope in exit() handler. 2021-05-06 19:49:58 +02:00
4lDO2 a771ca699a Move all DMAR parsing to userspace.
We may also want to do this with the MADT and the HPET tables, and let
user drivers specify what the tables mean independent of ACPI. That is,
adding an interface for registering new CPUs, and specifying the main
timer IRQ.
2021-05-06 19:49:58 +02:00
4lDO2 e816d4801f Remove the empty fadt module. 2021-05-06 19:49:58 +02:00
4lDO2 9b4ce0d0cc WIP: Fix userspace ACPI shutdown. 2021-05-06 19:49:58 +02:00
4lDO2 b2e131b57b Fix ACPI scheme fevent warning. 2021-05-06 19:49:58 +02:00
4lDO2 7ac5bdbae0 WIP: Implement userspace-driven shutdown. 2021-05-06 19:49:58 +02:00
4lDO2 64b2dd238a Rename the kernel ACPI scheme to kernel/acpi:. 2021-05-06 19:49:57 +02:00
4lDO2 bea6747643 Move all AML code to userspace.
Currently, there are some things that need to be set up by userspace
that the kernel previously did. These include telling firmware when the
I/O APIC is used, and most importantly, shutting down the system.

The former is not particularly important, but for the latter I think
that we could implement this using a "shutdown pipe". Essentially it
will be a file that triggers an event shutting down, which would be used
to notify to acpid that the kernel is requesting a shutdown.
2021-05-06 19:49:57 +02:00
Jeremy Soller 28d1d7e847 Update version to 0.2.8 2021-05-05 21:21:57 -06:00
Jeremy Soller 46a364471c Re-init aarch64 serial port for interrupts 2021-05-05 20:46:51 -06:00
Jeremy Soller 11a3315255 Re-enable acpi feature and gate it for x86_64 only 2021-05-04 08:33:00 -06:00
Jeremy Soller ac8c7834ef Update linked branch of rmm and syscall 2021-05-04 08:14:43 -06:00
Jeremy Soller bdccce4a1b Update rmm and syscall 2021-05-04 08:12:18 -06:00
Jeremy Soller 3dc08c878f Fix aarch64 switch_to function 2021-05-04 08:07:44 -06:00
Jeremy Soller b9a89f2160 More fixes for building aarch64 2021-05-03 22:07:40 -06:00
Jeremy Soller 8f50785781 Fixes for building aarch64 2021-05-03 21:57:45 -06:00
Jeremy Soller c646cb76e5 Update rmm 2021-05-03 21:29:44 -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 17c261553b Fixes for building x86_64 2021-05-03 20:43:18 -06:00
Jeremy Soller dfdb562e6b Use RMM PhysicalAddress 2021-05-03 20:33:31 -06:00
Jeremy Soller 9f0532b1d5 Remove unused flags from old EntryFlags 2021-05-03 17:29:55 -06:00
Jeremy Soller b9448274fc Switch to using RMM PageFlags 2021-05-03 17:28:08 -06:00
Jeremy Soller 826180659c Update rmm and syscall 2021-05-03 17:16:59 -06:00
Jeremy Soller ff8cb8abe8 Enforce must_use 2021-05-03 15:02:32 -06:00
Jeremy Soller dd0616cc8f Use RMM for TLB flushing 2021-05-03 12:42:16 -06:00
Jeremy Soller 29460e0bff Use RMM for some arch-specific paging functions 2021-05-03 12:14:49 -06:00