arm64: Renames the aarch64 directory to arm64

The term "aarch64" is the formal name for Armv8-A architecture. However,
I found that the establish convention across the wider open source
ecosystem is to use the short name "arm64".

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-08-16 17:37:12 -04:00
parent 65f589e853
commit 58587bf754
6 changed files with 28 additions and 9 deletions

View file

@ -3,7 +3,7 @@
#include "memory.h" #include "memory.h"
#include "memory/arena.h" #include "memory/arena.h"
namespace pound::aarch64 namespace pound::arm64
{ {
void take_synchronous_exception(vcpu_state_t* vcpu, uint8_t exception_class, uint32_t iss, uint64_t faulting_address) void take_synchronous_exception(vcpu_state_t* vcpu, uint8_t exception_class, uint32_t iss, uint64_t faulting_address)
{ {
@ -68,7 +68,7 @@ void take_synchronous_exception(vcpu_state_t* vcpu, uint8_t exception_class, uin
* @param memory A pointer to an initialized guest_memory_t struct. * @param memory A pointer to an initialized guest_memory_t struct.
* @return true if all tests pass, false otherwise. * @return true if all tests pass, false otherwise.
*/ */
bool test_guest_ram_access(pound::aarch64::memory::guest_memory_t* memory) bool test_guest_ram_access(pound::arm64::memory::guest_memory_t* memory)
{ {
LOG_INFO(Memory, "--- [ Starting Guest RAM Access Test ] ---"); LOG_INFO(Memory, "--- [ Starting Guest RAM Access Test ] ---");
if (memory == nullptr || memory->base == nullptr || memory->size < 4096) if (memory == nullptr || memory->base == nullptr || memory->size < 4096)
@ -158,10 +158,10 @@ void cpuTest()
pound::memory::arena_t guest_memory_arena = pound::memory::arena_init(GUEST_RAM_SIZE); pound::memory::arena_t guest_memory_arena = pound::memory::arena_init(GUEST_RAM_SIZE);
ASSERT(nullptr != guest_memory_arena.data); ASSERT(nullptr != guest_memory_arena.data);
pound::aarch64::memory::guest_memory_t guest_ram = {}; pound::arm64::memory::guest_memory_t guest_ram = {};
guest_ram.base = static_cast<uint8_t*>(guest_memory_arena.data); guest_ram.base = static_cast<uint8_t*>(guest_memory_arena.data);
guest_ram.size = guest_memory_arena.capacity; guest_ram.size = guest_memory_arena.capacity;
(void)test_guest_ram_access(&guest_ram); (void)test_guest_ram_access(&guest_ram);
} }
} // namespace pound::aarch64 } // namespace pound::armv64

View file

@ -7,7 +7,7 @@
#include "Base/Logging/Log.h" #include "Base/Logging/Log.h"
namespace pound::aarch64 namespace pound::arm64
{ {
/* AArch64 R0-R31 */ /* AArch64 R0-R31 */
#define GP_REGISTERS 32 #define GP_REGISTERS 32
@ -120,4 +120,4 @@ typedef struct alignas(CACHE_LINE_SIZE)
void take_synchronous_exception(vcpu_state_t* vcpu, uint8_t exception_class, uint32_t iss, uint64_t faulting_address); void take_synchronous_exception(vcpu_state_t* vcpu, uint8_t exception_class, uint32_t iss, uint64_t faulting_address);
void cpuTest(); void cpuTest();
} // namespace pound::aarch64 } // namespace pound::arm64

View file

@ -2,7 +2,7 @@
#include "Base/Assert.h" #include "Base/Assert.h"
namespace pound::aarch64::memory namespace pound::arm64::memory
{ {
/* /*

19
core/arm64/mmu.h Normal file
View file

@ -0,0 +1,19 @@
#pragma once
namespace pound::armv8
/**
* kvm_mmu_gva_to_gpa() - Translate a Guest Virtual Address to a Guest Physical Address.
* @vcpu: The vCPU state, containing MMU configuration (TTBR0_EL1, etc.).
* @gva: The Guest Virtual Address to translate.
* @gpa: A pointer to store the resulting Guest Physical Address.
*
* This function is the entry point for the emulated MMU.
*
* For now, this is a stub that implements identity mapping (GVA -> GPA)
* when the MMU is disabled, which is the correct architectural behavior
* on reset.
*
* Return: 0 on success, or a negative error code on a fault.
*/
int kvm_mmu_gva_to_gpa(vcpu_state_t* vcpu, uint64_t gva, uint64_t* gpa);
}

View file

@ -1,7 +1,7 @@
#include "panels.h" #include "panels.h"
#include <math.h> #include <math.h>
#include "Base/Assert.h" #include "Base/Assert.h"
#include "aarch64/isa.h" #include "arm64/isa.h"
#include "imgui.h" #include "imgui.h"
int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* panel, performance_data_t* data, int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* panel, performance_data_t* data,
@ -94,7 +94,7 @@ int8_t gui::panel::render_cpu_panel(bool* show_cpu_result_popup)
if (::ImGui::Button("Run CPU Test", ImVec2(120, 0))) if (::ImGui::Button("Run CPU Test", ImVec2(120, 0)))
{ {
pound::aarch64::cpuTest(); pound::arm64::cpuTest();
*show_cpu_result_popup = true; *show_cpu_result_popup = true;
} }
if (true == *show_cpu_result_popup) if (true == *show_cpu_result_popup)