mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
feat(arch): Add AArch64 / ARMv8i CPU support, cross-compilation & Linux Kconfig TUI
- Implement AArch64 HAL, vector table (16 aligned vectors), GICv2, Generic Timer, Stage-1 MMU (39-bit VA), PL011 UART - Build unified multi-architecture abstraction layer in include/arch/arch.h - Create interactive Linux-like Kconfig TUI menuconfig in scripts/kconfig/menuconfig.py - Support make menuconfig, defconfig, x86_64_defconfig, aarch64_defconfig - Update master Makefile for cross-compiling x86_64 (x86_64-elf-) and AArch64 (aarch64-linux-gnu-) - Dynamic architecture awareness across printk, uname, neofetch, and LazyBox
This commit is contained in:
1 parent
125a891621
commit
70d5925b16
41 files changed
+1926
-187
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#include <arch/arch.h>
|
||||
#include <arch/x86_64/gdt.h>
|
||||
#include <arch/x86_64/idt.h>
|
||||
#include <arch/x86_64/isr.h>
|
||||
#include <arch/x86_64/pic.h>
|
||||
#include <arch/x86_64/pit.h>
|
||||
#include <arch/x86_64/cpuid.h>
|
||||
#include <kernel/timer.h>
|
||||
|
||||
void arch_early_init(void) {
|
||||
// x86_64 serial and tty initialized in main
|
||||
}
|
||||
|
||||
void arch_init(void) {
|
||||
gdt_init();
|
||||
idt_init();
|
||||
isr_init();
|
||||
pic_init();
|
||||
pit_init(100);
|
||||
timer_wheel_init();
|
||||
arch_enable_interrupts();
|
||||
}
|
||||
|
||||
const char* arch_get_name(void) {
|
||||
return "x86_64 (AMD64)";
|
||||
}
|
||||
|
||||
uint32_t arch_get_cpu_id(void) {
|
||||
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
|
||||
cpuid(1, &eax, &ebx, &ecx, &edx);
|
||||
return (ebx >> 24) & 0xFF;
|
||||
}
|
||||
Reference in new issue
Block a user