bjorn3
eecfbb19d2
Share the functions in interrupt/mod.rs between x86 and x86_64
2024-02-25 14:48:28 +01:00
bjorn3
fbe2980b3d
Share interrupt/ipi.rs between x86 and x86_64
2024-02-25 14:48:15 +01:00
bjorn3
62614db9ac
Share interrupt/trace.rs between x86 and x86_64
2024-02-25 14:48:12 +01:00
bjorn3
c1d0c11a1b
Fix typo in irq.rs
2024-02-25 14:31:52 +01:00
bjorn3
3610dd7e03
Remove unused interrupt handler
2024-02-25 14:31:28 +01:00
bjorn3
e9e3b4487d
Reduce the difference of idt.rs between x86 and x86_64
2024-02-25 14:31:28 +01:00
Jeremy Soller
39c20720ee
Fix compilation on x86_64
2024-02-16 22:05:57 -07:00
Jeremy Soller
e4eb4031bd
Fix APIC offsets for x86 32-bit
2024-02-16 22:02:47 -07:00
Jeremy Soller
6c6fc18f8e
Format
2024-02-16 21:40:42 -07:00
bjorn3
58314e6a47
Share a whole lot more code between x86 and x86_64
2024-01-25 13:34:04 +00:00
bjorn3
785975089b
Dedup the last remaining piece of code in the driver module between x86 and x86_64
2024-01-25 13:34:04 +00:00
bjorn3
0d86348e41
Dedup the apic code between x86 and x86_64
2024-01-25 13:34:04 +00:00
bjorn3
86fb4208f2
Dedup some more code between x86 and x86_64
2024-01-25 13:34:04 +00:00
bjorn3
0d092d7921
Dedup code for most x86 and x86_64 device drivers
2024-01-25 13:34:04 +00:00
bjorn3
9404e9f892
Mark the sections used by alternative!() as allocated
...
This prevents the linker from discarding any function which uses the
alternative!() macro which would result in runtime relocation crashing.
2024-01-25 11:51:34 +01:00
bjorn3
5e71f6f9df
Correctly mark unaligned write as such to avoid UB
2024-01-24 19:43:34 +01:00
Jeremy Soller
45f1c4e29e
Add rustfmt from relibc and apply it with cargo fmt
2024-01-17 13:52:01 -07:00
4lDO2
529c491fa0
Allow disabling profiling at compile time.
2023-12-17 00:49:28 +01:00
4lDO2
fac0e783ef
Refactor profiling code.
2023-12-17 00:49:28 +01:00
4lDO2
99ad6a0a2c
Support toggling profiling.
2023-12-17 00:49:28 +01:00
4lDO2
14abf0cbc6
Exclude kmain from profile.
2023-12-17 00:49:27 +01:00
4lDO2
f973bc4128
Profiling
2023-12-17 00:49:24 +01:00
bjorn3
2d065083df
Use HashMap instead of BTreeMap where possible
...
This shrinks the kernel from 905840 bytes to 862408 bytes.
2023-12-13 19:55:20 +01:00
bjorn3
a7165f822f
Switch from the memoffset crate to the offset_of feature
...
The memoffset crate requires const_refs_to_cell to work in const
contexts. This feature has some known issues around it's semantics. The
offset_of feature however is currently on track for stabilization.
2023-12-12 20:21:31 +00:00
bjorn3
6b1c154847
Use kernel_executable_offsets on AArch64 and x86
2023-12-12 15:01:29 +00:00
bjorn3
017702d3d2
Remove a lot of dead code
2023-12-12 15:01:29 +00:00
Jeremy Soller
4e3103a48a
x86: fix enter/exit gs and usercopy asm
2023-12-11 15:25:54 -07:00
Ivan Tan
1f1a57e1f7
support userspace program ioremapping device memory
2023-12-11 16:07:53 +00:00
Ivan Tan
9b6197d686
aarch64: code clean up
2023-12-11 16:07:53 +00:00
Ivan Tan
a8329956ca
support raspi3b+ serial && uart interrupt
2023-12-11 16:07:53 +00:00
Ivan Tan
44b14f994a
fix qemu-arm64 run error
2023-12-11 16:07:53 +00:00
Ivan Tan
1c1c541f0e
bringup raspi3b+, add device memory, disable uart init
2023-12-11 16:07:53 +00:00
Ivan Tan
bfbf435546
draft: aarch64: add irq_bcm2835. Need refactoring
2023-12-11 16:07:53 +00:00
Ivan Tan
9a5b9798ca
remove qemu-aarch64-virt hard code
2023-12-11 16:07:53 +00:00
Ivan Tan
ed68c98b42
aarch64: add irq-bcm2836 for raspi3b+ && refactor irq module
2023-12-11 16:07:53 +00:00
Ivan Tan
b65a7e9103
move gic into irqchip module
2023-12-11 16:07:53 +00:00
Ivan Tan
01d0e9a4b5
aarch64: add irqchip module to initialize all irq chip.
2023-12-11 16:07:53 +00:00
4lDO2
6f6f69c728
Fix test instruction reg length in paranoid swapgs.
2023-10-08 11:21:23 +02:00
Enver Balalic
750e566a27
Get aarch64 to compile
...
Fixes enough errors to get the kernel to compile
2023-10-01 23:55:24 +02:00
Jeremy Soller
e794f2fe9b
Fix panic when there is no xsave support
2023-09-18 15:01:39 -06:00
Ivan Tan
eb0d48ac81
aarch64: add dtb scheme
2023-09-18 20:45:23 +00:00
Ivan Tan
a76cbc9f31
aarch64: trap msr, mrs or system instruction
2023-09-18 20:45:23 +00:00
4lDO2
5eace9997a
Compile successfully on i686 as well.
2023-09-16 10:48:25 +02:00
4lDO2
0b9c5bbf49
Pass both original and padded length in altrelocs.
2023-09-16 10:33:09 +02:00
4lDO2
ed3d2d7832
Allow disabling overwrite-based optimizations.
2023-09-14 16:44:12 +02:00
4lDO2
ce0d474cb9
Fail if a feature is force-enabled but unsupported.
2023-09-14 16:28:14 +02:00
4lDO2
dfc372d241
Replace with rdgsbase dynamically in paranoid ISRs.
2023-09-14 14:43:46 +02:00
4lDO2
d90aeef62e
Fix nop-filling code.
2023-09-14 14:34:04 +02:00
4lDO2
dde8f78903
Support XSAVE, XSAVEOPT, and AVX2.
2023-09-14 10:54:30 +02:00
4lDO2
38e669c807
Dynamic fsgsbase support, enable by default.
2023-09-14 09:25:30 +02:00