Commit Graph

143 Commits

Author SHA1 Message Date
bjorn3 437b70838f Replace uses of atomic_* intrinsics with Atomic* types 2023-07-10 17:02:01 +02:00
bjorn3 0d01f7be57 Use core::ptr wrappers instead of the unstable volatile_* intrinsics 2023-07-10 17:02:01 +02:00
Jeremy Soller cb58500b68 Update for new Rust 2023-02-11 14:50:55 -07:00
Jeremy Soller ee6c9f4020 Fix compilation on i686 2022-11-11 13:23:07 -07:00
Jeremy Soller 8e0f54cb31 Clippy fixes 2022-11-11 13:19:14 -07:00
Jeremy Soller 515a03b870 Fix warnings 2022-11-11 12:51:07 -07:00
Jeremy Soller 6dbb85d4c9 Static mapping of some CPU devices outside of physmap 2022-08-26 11:08:13 -06:00
Jeremy Soller 5d55d4eb87 Fix warnings 2022-07-29 18:33:54 -06:00
Jeremy Soller 0c80643077 Make graphical_debug arch independent and fix lots of warnings 2022-07-29 15:56:44 -06:00
4lDO2 5bbfdcda6b Add mmap-min-addr and support unmapping parent PTs. 2022-07-27 10:52:45 +02:00
4lDO2 b766501896 Fix deadlock while starting APs. 2022-07-27 10:52:29 +02:00
4lDO2 0aec4d3341 Partial: migrate ACPI to RMM. 2022-07-27 10:52:23 +02:00
4lDO2 23f49414bd Fix phys offset, lock grants correctly. 2022-07-27 10:51:45 +02:00
4lDO2 f7f722f81c Don't use identity mapping for ACPI.
This is so that any process can use pointers to ACPI tables, since they
now point to the universally-accessible KERNEL_OFFSET+physaddr virtual
addresses.
2022-07-27 10:51:44 +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 7ac5bdbae0 WIP: Implement userspace-driven shutdown. 2021-05-06 19:49:58 +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 b9448274fc Switch to using RMM PageFlags 2021-05-03 17:28:08 -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 f90033e0e1 Use PHYS_OFFSET instead of KERNEL_OFFSET to refer to the physmap 2021-04-13 20:38:54 -06:00
Jeremy Soller 334584b3d5 Use rmm::PhysicalAddress and rmm::VirtualAddress directly 2021-01-09 21:16:11 -07:00
Wren Turkal 5301057324 Convert some println -> log::info!.
Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-08-08 21:18:18 -07:00
Jeremy Soller c78b69969f Include trampoline in kernel to fix multi_core on EFI 2020-07-15 21:46:15 -06:00
4lDO2 e7d00d4735 Fix various kernel warnings. 2020-06-11 12:58:03 +02:00
Jeremy Soller abf971eaee Only require alignment of 4 bytes for rsdp 2020-04-19 08:49:42 -06:00
4lDO2 d1ece2c811 Add a basic acpi: scheme, currently only for MCFG. 2020-04-19 09:39:57 +02:00
4lDO2 dc3452650c Execute AML code after IOAPIC init,
which tells the firmware that the I/O APIC is used rather than the 8259
PIC.
2020-04-18 23:17:37 +02:00
4lDO2 290098b5a4 impl Debug for AmlValue. 2020-04-18 18:21:04 +02:00
4lDO2 f0b5d51793 Use the I/O APIC when applicable. 2020-04-18 16:36:18 +02:00
4lDO2 da6de394e4 Add a new backwards-compatible v2 boot protocol. 2020-04-18 11:28:11 +02:00
Jeremy Soller 7658193271 Remove some warnings 2020-02-07 20:06:33 -07:00
Jeremy Soller 63e2a835e0 Fix clippy.sh script and fix a number of clippy warnings 2019-10-06 11:04:06 -06:00
Jeremy Soller 3694395dfb Fix compilation of acpi feature 2019-08-12 19:33:03 -06:00
Jeremy Soller 6dfed91ac3 Fix index check for accessfield 2018-03-11 12:58:43 -06:00
Jeremy Soller 402266e3e4 Check length on more objects 2018-03-11 12:56:48 -06:00
Jeremy Soller 74e673e68d Return errors if data is too small when parsing acpi objects 2018-03-11 12:52:30 -06:00
Jeremy Soller 58e1d92eb5 Add clippy lints, action some clippy items 2017-12-24 22:19:00 -07:00
Jeremy Soller c2644adf3d Improve multi_core support 2017-12-05 21:26:45 -07:00
Tibor Nagy e6b9f850d1 Migrate from collections 2017-10-28 02:42:08 +02:00
Jeremy Soller ef70cd257c Uncomment AML value variant 2017-10-22 19:41:31 -06:00
Jeremy Soller 58c6ef0ecf Merge branch 'master' of https://github.com/redox-os/kernel 2017-10-21 20:30:26 -06:00
Jeremy Soller 51339cb8c9 Cleanup warnings
Implement interrupt on signal in pipe:
2017-10-21 20:30:20 -06:00
Gabriel Majeri 305e7980d8 Update to bitflags 1.0 2017-10-11 15:59:14 +03:00
Jeremy Soller a5f3e5057b Remove warnings
Improve error information
Cleanup interrupt macros
2017-09-13 21:32:08 -06:00
Connor Wood 7145e2390c Converted DDB handle to integer and vice versa 2017-08-31 11:25:08 +01:00
Connor Wood 1cce42b691 Moved DDB handles over to using signature scheme 2017-08-31 11:07:01 +01:00
Connor Wood 1bcd8530d2 Stored signature to include OEM signature and OEM table ID 2017-08-31 10:52:59 +01:00
Connor Wood 5592484d07 Eliminated dead code 2017-08-30 19:09:08 +01:00