summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2024-08-12kernel/amd64: proc: Set curtd upon thread kickIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-29kernel/amd64: Don't try IPIs with null cpu_infoIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-29kernel/amd64: cpu: Write cpu_info to IA32_GS_BASEIan Moffett
Instead of writing cpu_info to IA32_KERNEL_GS_BASE then using SWAPGS, write the cpu_info pointer directly to IA32_GS_BASE Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-29kernel/amd64: Use only defines + handle err codesIan Moffett
- Use only defines in frame.h - Improve handling of trap error codes Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-16kernel/amd64: trap: Set IPL_HIGH in trap_handler()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-16kernel/amd64: mp: Lock only around cpu_startup()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-11kernel/amd64: pci: Add support for PCI MSI-XIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-11kernel/amd64: bus: Move MMIO_OFFSET to bus.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-10kernel/amd64: reboot: Halt all with REBOOT_HALTIan Moffett
This commit changes how reboot() handles REBOOT_HALT. Now instead of one core being halted, all cores will be halted through an IPI to a halt vector. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-10kernel/amd64: mp: Add missing "static"Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-10kernel/amd64: bus: Fix memory mapping conflictsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-09kernel/amd64: pci: Add function to map BARsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-09kernel/amd64: bus: Add bus abstraction layerIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-09kernel/amd64: Add function to set cache policyIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-09kernel: Add PCI driverIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-07kernel/amd64: Add serial debug loggingIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-06kernel/amd64: Add 8250 UART driverIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-04kernel/amd64: Add syscall support + SYS_exitIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-02kernel/amd64: machdep: Fix mistake in commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-02kernel/amd64: proc: Fix typo in commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-02kernel/amd64: Handle the user GS segment registerIan Moffett
This commit introduces usage of swapgs to switch out the GS register with the user GS register. An md_td_kick() function is also introduced to start up user threads. The this_cpu() function uses the GS register to read the current CPU structure using a new "self" field. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-02kernel/amd64: Add INTRENTRY() and TRAPENTRY()Ian Moffett
Add macros that perform certain operations before invoking the actual handler. This will be useful in the future for more complicated operations that need to be done before the handler is ran. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-02kernel/amd64: Add missing copyrightIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-07-01kernel/amd64: proc: Add stack init func for execIan Moffett
Add stack initialization code for exec functions. This new code initializes values on the stack, including argc, argv, and the auxiliary vector. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-30kernel/amd64: proc: Add setregs()Ian Moffett
This function will be useful for things like exec in order to setup registers which are machine dependent. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-30kernel/amd64: pmap: Add pmap_destroy_vas()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-29kernel/amd64: lapic: Improve accuracy of commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-29kernel/amd64: lapic: Add support for IPIsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-29kernel/amd64: proc: Update outdated commentIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-28kernel/amd64: Focus md_td_init() to fork MD codeIan Moffett
Rename md_td_init() to md_fork() and change up what it does to keep things as simple as possible. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-28kernel/amd64: Make splraise() return previous IPLIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-28kernel/amd64: Convert kernel stack base to vaddrIan Moffett
This fixes an issue where the TSS kernel stack base is a physical address instead of being a virtual address like it's supposed to. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-23kernel/amd64: Add machdep thread init functionIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-23kernel/amd64: pmap: Add function to create new VASIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-20kernel/amd64: intr: Add splraise/splx supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-13kernel/amd64: pmap: Fixup and improve consistencyIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-09kernel/amd64: pmap: Add initial pmap codeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-08kernel/amd64: Prepare for schedulerIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-08kernel/amd64: Pass CPU info to cpu_startup()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-08kernel/amd64: lapic: Add End-Of-Interrupt helperIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-08kernel/amd64: lapic: Don't test register_timer()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-08kernel/amd64: lapic: Serialize lapic_timer_init()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-07kernel: Add __cacheline_aligned macroIan Moffett
This commit introduces a "__cacheline_aligned" macro which aligns data by the cache line size (COHERENCY_UNIT bytes). This is useful for heavily contended locks. Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-06kernel/amd64: lapic: Assign timer to IST_SCHEDIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-06kernel/amd64: tss: Add support for TSSIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-06kernel/amd64: lapic: Add support for LAPIC timerIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-06kernel/amd64: intr: Add intr_alloc_vector()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-06kernel/amd64: isa: Add i8254 driverIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-05kernel/amd64: Add initial LAPIC codeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-04kernel/amd64: spectre: Disable IBRS by defaultIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>