Commit Graph

871 Commits

Author SHA1 Message Date
4lDO2 0d1ca687fb Use the correct interrupt method for spurious IRQs. 2020-05-03 16:57:03 +02:00
4lDO2 1165445602 Add spurious IRQ handling, using a visible counter. 2020-05-03 16:56:50 +02:00
Jeremy Soller dd4e82f4ce Merge branch 'cpuid' into 'master'
bump raw-cpuid dep to avoid pulling in serde

See merge request redox-os/kernel!121
2020-05-02 17:41:05 +00:00
Graham MacDonald 0614d3298d bump raw-cpuid dep to avoid pulling in serde 2020-05-02 14:11:23 +01:00
Jeremy Soller 582e3fd8eb Unlock CONTEXT_SWITCH_LOCK after loading registers but before switch 2020-04-21 21:03:17 -06:00
Jeremy Soller c79f308f07 Unlock CONTEXT_SWITCH_LOCK after switch happens 2020-04-21 20:45:15 -06:00
Jeremy Soller 0bfd830f3c Work around spurious nanosleep wakes 2020-04-20 21:08:56 -06:00
Jeremy Soller dd0633a3d2 Kernel reading of ps2 bytes 2020-04-20 13:10:06 -06:00
Jeremy Soller 2fa85ed303 Remove unused import 2020-04-19 21:47:58 -06:00
Jeremy Soller fa58651b70 Add serio scheme, based on debug scheme, for supporting ps2 devices 2020-04-19 21:40:12 -06:00
Jeremy Soller 5fd8f0430b Cleanup debug scheme 2020-04-19 21:39:53 -06:00
Jeremy Soller 02abd58c10 Merge branch 'multi_core' into 'master'
Multi core

See merge request redox-os/kernel!118
2020-04-19 20:28:15 +00:00
Jeremy Soller e528aa8fdc Fix order of masking IRQ and eoi 2020-04-19 10:50:03 -06:00
Jeremy Soller abf971eaee Only require alignment of 4 bytes for rsdp 2020-04-19 08:49:42 -06:00
Jeremy Soller 315343be41 Add a way to snapshot context state 2020-04-19 08:46:50 -06:00
Jeremy Soller 123918ed43 Track the namespace that a description was opened from 2020-04-19 08:46:50 -06:00
Jeremy Soller 051a275c94 Remove unused import 2020-04-19 08:46:50 -06:00
Jeremy Soller 3c86af57b7 Allow contexts sharing process space to run on different CPUs 2020-04-19 08:46:50 -06:00
Jeremy Soller fdf46d8043 Fix multi_core livelocks and add livelock debugging 2020-04-19 08:46:50 -06:00
Jeremy Soller 9d67e3dc28 Merge branch 'ioapic' into 'master'
Support the I/O APIC alongside the 8259 PIC

See merge request redox-os/kernel!117
2020-04-19 13:02:42 +00:00
4lDO2 9413475119 Don't use the I/O APIC by default,
since this would require pcid to know the _PRT (PCI routing table) to
use and map the interrupt pins to the correct IRQs. xhcid is unaffected
by this though, since it uses MSI-X.

All ACPI handling will be done in userspace before the infrastructure
necessary would make sense (I don't think adding serde to the kernel
would be optimal, and how else would all of the ACPI namespace be
parsed?).
2020-04-19 13:25:43 +02:00
4lDO2 00312bdf32 Revert to old default-features. 2020-04-19 13:21:59 +02:00
4lDO2 3bc4b9a691 Allow the MADT to be read from userspace,
and fix a typo that prevented multiple tables from being listed
correctly.
2020-04-19 09:41:42 +02:00
4lDO2 02ca8edfc5 Execute AML code after IOAPIC init,
which tells the firmware that the I/O APIC is used rather than the 8259
PIC.
2020-04-19 09:41:40 +02:00
4lDO2 8c351e0768 Use the I/O APIC when applicable. 2020-04-19 09:41:09 +02:00
4lDO2 45fe040625 rustfmt. 2020-04-19 09:39:57 +02: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 5490de9fd2 Fix a page fault. 2020-04-18 17:33:03 +02:00
4lDO2 de4b66150d Remove unnecessary kernel args. 2020-04-18 17:06:45 +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 5d4aa75133 Merge branch 'schemes-no-arc-box' into 'master'
Replace Arc<Box<dyn Scheme>> with Arc<dyn Scheme>.

See merge request redox-os/kernel!116
2020-04-11 12:09:20 +00:00
4lDO2 0e2e515dbd Replace Arc<Box<dyn Scheme>> with Arc<dyn Scheme>. 2020-04-11 12:29:35 +02:00
Jeremy Soller 0ccf3b4e53 Merge branch 'lapic' into 'master'
Extend the IRQ scheme to allow allocation of all available interrupt vectors.

See merge request redox-os/kernel!115
2020-04-04 12:54:44 +00:00
4lDO2 0fd24f6061 Cleanup. 2020-04-04 10:57:00 +02:00
4lDO2 b716ec4bc1 Remove currently unused APIC timer code. 2020-03-28 13:37:03 +01:00
4lDO2 d23ed0cfc3 Remove debug local APIC functions. 2020-03-28 13:37:03 +01:00
4lDO2 157a3e5c0d Improve MSI. 2020-03-28 13:37:03 +01:00
4lDO2 772003138d Add a backwards-compatible interface for more IRQs. 2020-03-28 13:37:03 +01:00
4lDO2 c154effd1c Get a working local apic timer. 2020-03-28 13:37:03 +01:00
4lDO2 c11d6d9e46 Update the x86 crate. 2020-03-28 13:37:03 +01:00
4lDO2 65e8abb449 Allow multiple processes to share IRQs.
I haven't been able to receive xhc interrupt anyway.
2020-03-28 13:37:03 +01:00
Jeremy Soller 53570f0164 Merge branch 'fix-warnings' into 'master'
Fix warnings

See merge request redox-os/kernel!114
2020-03-06 20:46:01 +00:00
Skallwar ae14eda866 Run rustfmt 2020-03-06 21:05:26 +01:00
Skallwar b82f596ef6 Fix unnecessary syntax 2020-03-06 21:02:20 +01:00
Skallwar 7671e92216 Fix borrow of packed field 2020-03-06 21:01:18 +01:00
Jeremy Soller b616fdb067 Keep track of ticks each context uses 2020-02-18 21:16:53 -07:00
Jeremy Soller d4d14c78c3 Ensure page table locking at runtime 2020-02-12 20:34:49 -07:00