From 328487312fbbeb7a2cdf0b5508c74a43cdb5d499 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 23 Mar 2025 19:49:20 +0100 Subject: kernel(platform): Remove AXP platform. public(CF.fwrk): Add btb file to CF framework. Signed-off-by: Amlal El Mahrouss --- .../HALKit/ARM64/Storage/MBCI+Flash+IO+Generic.cc | 119 --------------------- dev/kernel/HALKit/AXP/CR.s | 11 -- dev/kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp | 0 dev/kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp | 24 ----- dev/kernel/HALKit/AXP/HAL.s | 13 --- dev/kernel/HALKit/AXP/Processor.h | 7 -- dev/kernel/HALKit/AXP/SYSCALL.s | 10 -- dev/kernel/HALKit/AXP/VM.s | 5 - 8 files changed, 189 deletions(-) delete mode 100644 dev/kernel/HALKit/ARM64/Storage/MBCI+Flash+IO+Generic.cc delete mode 100644 dev/kernel/HALKit/AXP/CR.s delete mode 100644 dev/kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp delete mode 100644 dev/kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp delete mode 100644 dev/kernel/HALKit/AXP/HAL.s delete mode 100644 dev/kernel/HALKit/AXP/Processor.h delete mode 100644 dev/kernel/HALKit/AXP/SYSCALL.s delete mode 100644 dev/kernel/HALKit/AXP/VM.s (limited to 'dev/kernel/HALKit') diff --git a/dev/kernel/HALKit/ARM64/Storage/MBCI+Flash+IO+Generic.cc b/dev/kernel/HALKit/ARM64/Storage/MBCI+Flash+IO+Generic.cc deleted file mode 100644 index 94d20878..00000000 --- a/dev/kernel/HALKit/ARM64/Storage/MBCI+Flash+IO+Generic.cc +++ /dev/null @@ -1,119 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#ifdef NE_USE_MBCI_FLASH - -#include -#include -#include -#include - -/// @file MBCI+Flash.cc -/// @brief MBCI Flash support. - -#define MBCI_MAX_SLOTS (8U) - -namespace NeOS -{ - /// /Mount/Flash/n - constexpr auto kFlashBridgeMagic = 0x70768372; - constexpr auto kFlashBridgeRevision = 1; - - STATIC BOOL kFlashEnabled = NO; - STATIC SizeT kFlashSize[MBCI_MAX_SLOTS] = {}; - STATIC SizeT kFlashSectorSz[MBCI_MAX_SLOTS] = {}; - STATIC IMBCIHost* kFlashMetaPackets[MBCI_MAX_SLOTS] = {}; - STATIC IMBCIHost* kFlashDataPackets[MBCI_MAX_SLOTS] = {}; - - STATIC Void drv_std_io(Int32 slot, UInt64 lba, Char* buf, SizeT sector_sz, SizeT buf_sz); - - /// @brief Enable flash memory builtin. - STATIC Void drv_enable_flash(Int32 slot); - - /// @brief Disable flash memory builtin. - STATIC Void drv_disable_flash(Int32 slot); - - /// @brief get slot sector count. - /// @return slot sector count. - SizeT drv_get_sector_count(Int32 slot) - { - if (slot > MBCI_MAX_SLOTS) - return 0; - - return kFlashSectorSz[slot]; - } - - /// @brief get slot full size (in bytes). - /// @return drive slot size - SizeT drv_get_size(Int32 slot) - { - if (slot > MBCI_MAX_SLOTS) - return 0; - - return kFlashSize[slot]; - } - - /// @brief Enable flash memory at slot. - BOOL drv_enable_at(Int32 slot) - { - if (slot > MBCI_MAX_SLOTS) - return NO; - - kFlashMetaPackets[slot]->InterruptEnable = YES; - - kout << "Enabled hardware slot at: " << number(slot) << kendl; - - return YES; - } - - /// @brief Disable flash memory at slot. - BOOL drv_disable_at(Int32 slot) - { - if (slot > MBCI_MAX_SLOTS) - return NO; - - kFlashMetaPackets[slot]->InterruptEnable = NO; - - kout << "Disabled hardware slot at: " << number(slot) << kendl; - - return YES; - } - - STATIC Void drv_std_io(Int32 slot, UInt64 lba, Char* buf, SizeT sector_sz, SizeT buf_sz) - { - UInt64* packet_frame = (UInt64*)kFlashDataPackets[slot]->BaseAddressRegister; - - if (packet_frame[0] != (UInt64)kFlashBridgeMagic) - return; - - if (packet_frame[8] != (UInt64)kFlashBridgeRevision) - return; - - packet_frame[16 + 0] = lba; - packet_frame[16 + 4] = sector_sz; - packet_frame[16 + 8] = lba; - packet_frame[16 + 12] = buf_sz; - packet_frame[16 + 14] = (UIntPtr)HAL::hal_get_phys_address(buf); - - while (packet_frame[0] == lba) - ; - } - - Void drv_std_read(Int32 slot, UInt64 lba, Char* buf, SizeT sector_sz, SizeT buf_sz) - { - rt_set_memory(buf, 0, buf_sz); - - drv_std_io(slot, lba, buf, sector_sz, buf_sz); - } - - Void drv_std_write(Int32 slot, UInt64 lba, Char* buf, SizeT sector_sz, SizeT buf_sz) - { - drv_std_io(slot, lba, buf, sector_sz, buf_sz); - } - -} // namespace NeOS - -#endif // if NE_USE_MBCI_FLASH diff --git a/dev/kernel/HALKit/AXP/CR.s b/dev/kernel/HALKit/AXP/CR.s deleted file mode 100644 index 4d68257d..00000000 --- a/dev/kernel/HALKit/AXP/CR.s +++ /dev/null @@ -1,11 +0,0 @@ -.globl read_lr1 -.globl read_lr0 - -.section .text - read_lr0: - movq %r30, %cr3 - ret - - hal_read_cr0: - movq %r30, %cr0 - ret \ No newline at end of file diff --git a/dev/kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp b/dev/kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/dev/kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp deleted file mode 100644 index f77186fd..00000000 --- a/dev/kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#include -#include - -/// @brief Internal call for syscall, to work with C++. -/// @param stack -/// @return nothing. -EXTERN_C void rt_syscall_handle(NeOS::HAL::StackFrame* stack) -{ - if (stack->Rcx <= (kSyscalls.Count() - 1)) - { - kout << "syscall: enter.\r"; - - if (kSyscalls[stack->Rcx].Leak().Leak().fHooked) - (kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack); - - kout << "syscall: exit.\r"; - } -} diff --git a/dev/kernel/HALKit/AXP/HAL.s b/dev/kernel/HALKit/AXP/HAL.s deleted file mode 100644 index 0178527f..00000000 --- a/dev/kernel/HALKit/AXP/HAL.s +++ /dev/null @@ -1,13 +0,0 @@ -.globl rt_wait_400ns - -.section .text -rt_wait_400ns: - jmp .L -.L: - jmp .L2 - wtint ;; wait for interrupt -.L2: - - ret - - diff --git a/dev/kernel/HALKit/AXP/Processor.h b/dev/kernel/HALKit/AXP/Processor.h deleted file mode 100644 index bb14c9c6..00000000 --- a/dev/kernel/HALKit/AXP/Processor.h +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once diff --git a/dev/kernel/HALKit/AXP/SYSCALL.s b/dev/kernel/HALKit/AXP/SYSCALL.s deleted file mode 100644 index 19cab808..00000000 --- a/dev/kernel/HALKit/AXP/SYSCALL.s +++ /dev/null @@ -1,10 +0,0 @@ -.section .text -system_handle_user_call: - .cfi_startproc - - push %r0 - jmp %r1 - mov %r30, %r2 - - .cfi_endproc - retsys \ No newline at end of file diff --git a/dev/kernel/HALKit/AXP/VM.s b/dev/kernel/HALKit/AXP/VM.s deleted file mode 100644 index 7024086b..00000000 --- a/dev/kernel/HALKit/AXP/VM.s +++ /dev/null @@ -1,5 +0,0 @@ -.global hal_flush_tlb - -.section .text -hal_flush_tlb: - swppal \ No newline at end of file -- cgit v1.2.3