mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 09:02:46 +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,45 @@
|
||||
#
|
||||
# Automatically generated by SUB-OS Kconfig for x86_64
|
||||
#
|
||||
CONFIG_ARCH=x86_64
|
||||
CONFIG_ARCH_X86_64=y
|
||||
CONFIG_BPF_VM=y
|
||||
CONFIG_DRV_AHCI=y
|
||||
CONFIG_DRV_ATA=y
|
||||
CONFIG_DRV_BOCHS_VBE=y
|
||||
CONFIG_DRV_CANVAS_2D=y
|
||||
CONFIG_DRV_E1000=y
|
||||
CONFIG_DRV_HWMON=y
|
||||
CONFIG_DRV_NVME=y
|
||||
CONFIG_DRV_PTY=y
|
||||
CONFIG_DRV_RAMDISK=y
|
||||
CONFIG_DRV_RTL8139=y
|
||||
CONFIG_DRV_SOUND_AC97=y
|
||||
CONFIG_DRV_SOUND_HDA=y
|
||||
CONFIG_DRV_USB_XHCI=y
|
||||
CONFIG_DRV_VIRTIO_BLK=y
|
||||
CONFIG_DRV_VIRTIO_NET=y
|
||||
CONFIG_DRV_VIRTIO_RNG=y
|
||||
CONFIG_FS_DEVFS=y
|
||||
CONFIG_FS_EXT2=y
|
||||
CONFIG_FS_FAT32=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_RAMFS=y
|
||||
CONFIG_FS_SYSFS=y
|
||||
CONFIG_FS_VFS=y
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_MM_PMM=y
|
||||
CONFIG_MM_SLAB=y
|
||||
CONFIG_MM_VMA=y
|
||||
CONFIG_NET_FILTER=y
|
||||
CONFIG_NET_HTTPD=y
|
||||
CONFIG_NET_SSHD=y
|
||||
CONFIG_NET_STACK=y
|
||||
CONFIG_OPTIMIZATION="-O2"
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_SECURITY_KEYRING=y
|
||||
CONFIG_SECURITY_LSM=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SUBOS_HOSTNAME="sub-os"
|
||||
CONFIG_SUBOS_VERSION="0.2.0-lts"
|
||||
CONFIG_USERLAND_LAZYBOX=y
|
||||
@@ -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