summaryrefslogtreecommitdiff
path: root/src/sys/arch/amd64
AgeCommit message (Collapse)Author
2025-09-15sys: mman: Add PROT_USER flagIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: lapic: Panic if MMIO base has movedIan Moffett
Verify the edge case where firmware may want to move/remap the Local APIC MMIO base as we are making an assumption that the base starts at 0xFEE00000. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: cpu: Add initial SMP startup codeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: Move i8259/uart init to chipset_init()Ian Moffett
These are chipset specific and independent of the processor, therefore they must only be initialized once. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: gdt: Load GDT before setting GS_BASEIan Moffett
If we update the GDTR after setting GS_BASE, we wont be referencing any valid data anymore. Switch out the GDTR early on. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: lapic: Add LAPIC timer supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: intel: Add i8254 PIT driverIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: ioapic: Add one to nredirIan Moffett
The redirection entry count within the IOAPICVER register is zero-based, therefore one must be added to make it absolute. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kernel/amd64: Add task state segment logicIan Moffett
This commit implements the task state segment and splits up processor initialization into two seperate stages. The cpu_conf() function is apart of the first stage and sets up things that should be going by the time the kernel is started / early init. The cpu_init() function runs later functions that initialize further platform specific subsystems. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: lapic: Initialize percore Local APICIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: boot: Initialize I/O APIC *once*Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kernel/amd64: Move ioapic_read_madt() to acpi_subrIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: ioapic: Add IRQ to vector routingIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: Improve ioapic_read_madt() scalabilityIan Moffett
This commit improves the scalability of ioapic_read_madt() while retaining as much simplicity as possible. - Add callback argument - Add optional argument to callback ioapic_read_madt() now returns the value given back by a callback. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: Add I/O APIC initialization codeIan Moffett
This commit introduces the initial I/O APIC driver code that does basic initialization i.e., grabbing base address from MADT, masking each pin, etc. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: boot: Disable the i8259 chip on bootIan Moffett
To avoid interrupt conflicts on some machines with the I/O APIC, disable the legacy i8259 chip by default Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: Add exception handlersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: Add interrupt descriptor table coreIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern/amd64: mmu: Add creddit blockIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15os/amd64: Make MMU header standard per archIan Moffett
Lunos's virtual memory system is split into two parts, the machine dependent MMU layer and the machine independent layer. The MMU side exposes a standard bridge header that allows the MI layer to interface with the MD layer. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14kern/amd64: mmu: Enable support for 5-level pagingIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14kern/amd64: mmu: Use CR4 not CR0 for CR4.L57Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14kern: vm: Implement page mapping and VASesIan Moffett
This commit implements an interface to allow other parts of Lunos to talk to the MMU: - Added the 'vas' structure as the virtual address space - Added MMU specific prot flags - Added mmu_map_single() to map pages - Added mmu_this_vas() to grab the current VAS ... Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14kern/amd64: cpu: Add routine to get current coreIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14project: Correct copyright authorIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14kern/amd64: vm: Add initial MMU skeleton logicIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-14build: Do not have per subsystem libsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13os/amd64: Add panic()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13build: Link with kernel libstringIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kern/amd64: Add platform and UART initIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kern/amd64: Define the GDTIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kern/amd64: cpu: Remove trailing newlineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kern/amd64: cpu: Initialize GDTIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kern/amd64: Move locore.S to mainbus/Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13project: Remove empty linkIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13project: Use limine as headstartIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13kernel/amd64: Add port I/O helpersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-13build: 'i386' -> 'amd64'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>