summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/HALKit/ARM64/Processor.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:13:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:15:17 +0100
commita13e1c0911c0627184bc38f18c7fdda64447b3ad (patch)
tree073a62c09bf216e85a3f310376640fa1805147f9 /dev/Kernel/HALKit/ARM64/Processor.h
parent149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff)
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/ARM64/Processor.h')
-rw-r--r--dev/Kernel/HALKit/ARM64/Processor.h91
1 files changed, 0 insertions, 91 deletions
diff --git a/dev/Kernel/HALKit/ARM64/Processor.h b/dev/Kernel/HALKit/ARM64/Processor.h
deleted file mode 100644
index 940cfbe9..00000000
--- a/dev/Kernel/HALKit/ARM64/Processor.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Array.h>
-#include <NewKit/Defines.h>
-#include <NewKit/Utils.h>
-#include <FirmwareKit/Handover.h>
-
-#define kCPUBackendName "ARMv8"
-
-namespace NeOS::HAL
-{
- struct PACKED Register64 final
- {
- UShort Limit;
- UIntPtr Base;
- };
-
- /// @brief Memory Manager mapping flags.
- enum
- {
- kMMFlagsPresent = 1 << 0,
- kMMFlagsWr = 1 << 1,
- kMMFlagsUser = 1 << 2,
- kMMFlagsNX = 1 << 3,
- kMMFlagsCount = 3,
- };
-
- /// @brief Set a PTE from pd_base.
- /// @param virt_addr a valid virtual address.
- /// @param phys_addr point to physical address.
- /// @param flags the flags to put on the page.
- /// @return Status code of page manip.
- EXTERN_C Int32 mm_map_page(VoidPtr virtual_address, VoidPtr physical_address, UInt32 flags);
-
- typedef UIntPtr Reg;
- typedef Register64 Register;
-
- /// @note let's keep the same name as AMD64 HAL.
- struct PACKED StackFrame final
- {
- Reg R8{0};
- Reg R9{0};
- Reg R10{0};
- Reg R11{0};
- Reg R12{0};
- Reg R13{0};
- Reg R14{0};
- Reg R15{0};
- Reg SP{0};
- Reg BP{0};
- };
-
- typedef StackFrame* StackFramePtr;
-
- inline Void rt_halt() noexcept
- {
- while (Yes)
- {
- }
- }
-
- template <typename DataKind>
- inline void hal_dma_write(UIntPtr address, DataKind value)
- {
- *reinterpret_cast<volatile DataKind*>(address) = value;
- }
-
- template <typename DataKind>
- inline DataKind hal_dma_read(UIntPtr address)
- {
- return *reinterpret_cast<volatile DataKind*>(address);
- }
-
- inline Void hal_wfi(Void)
- {
- asm volatile("wfi");
- }
-} // namespace NeOS::HAL
-
-inline NeOS::VoidPtr kKernelBitMpStart = nullptr;
-inline NeOS::UIntPtr kKernelBitMpSize = 0UL;
-
-inline NeOS::VoidPtr kKernelPhysicalStart = nullptr;
-
-#include <HALKit/ARM64/Paging.h>