From eb45735d15253a2b058ec5a064fbec6c815035cf Mon Sep 17 00:00:00 2001 From: "Zone.N" Date: Wed, 7 Aug 2024 09:25:33 +0000 Subject: [PATCH] fix: aarch64 compile Signed-off-by: Zone.N --- src/boot/boot.cpp | 2 +- src/kernel/arch/aarch64/include/cpu.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/boot/boot.cpp b/src/boot/boot.cpp index ffea71e6..60a96480 100644 --- a/src/boot/boot.cpp +++ b/src/boot/boot.cpp @@ -19,7 +19,7 @@ #include "project_config.h" // efi 使用的全局变量 -#if defined(__x86_64__) +#if defined(__x86_64__) || defined(__aarch64__) uintptr_t ImageBase = 0; #endif diff --git a/src/kernel/arch/aarch64/include/cpu.hpp b/src/kernel/arch/aarch64/include/cpu.hpp index 1983913a..c48d5ce3 100644 --- a/src/kernel/arch/aarch64/include/cpu.hpp +++ b/src/kernel/arch/aarch64/include/cpu.hpp @@ -83,7 +83,7 @@ class ReadOnlyRegBase { if constexpr (std::is_same::value) { __asm__ volatile("mov %0, x29" : "=r"(value) : :); } else { - Err("No Type\n"); + log::Err("No Type\n"); throw; } return value; @@ -120,7 +120,7 @@ class WriteOnlyRegBase { if constexpr (std::is_same::value) { __asm__ volatile("mv fp, %0" : : "r"(value) :); } else { - Err("No Type\n"); + log::Err("No Type\n"); throw; } }