summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-16 12:32:15 +0200
committerAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-16 12:32:15 +0200
commit684197d4bcb66e94c1dbf37591ed2a984792e51d (patch)
treec0d086f05f3b59f847c7be1d06cde71e411f1da0
parent84aea90cff9952dbafcf147b7741c1985622a8d2 (diff)
MHR-31: Add ARM64 executable type for newoskrnl's PEF implementation.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
-rw-r--r--Boot/makefile2
-rw-r--r--Kernel/KernelKit/PEF.hpp1
-rw-r--r--Kernel/NewKit/Defines.hpp6
-rw-r--r--Kernel/NewKit/String.hpp2
-rw-r--r--Kernel/Sources/FileManager.cxx4
-rw-r--r--Kernel/Sources/String.cxx2
-rw-r--r--Kernel/makefile2
7 files changed, 7 insertions, 12 deletions
diff --git a/Boot/makefile b/Boot/makefile
index 98726bbe..37ac3704 100644
--- a/Boot/makefile
+++ b/Boot/makefile
@@ -28,7 +28,7 @@ BIOS=OVMF.fd
IMG=epm.img
IMG_2=epm-slave.img
-EMU_FLAGS=-net none -smp 4 -m 4G -M q35 \
+EMU_FLAGS=-net none -smp 4 -m 4G -M q35 -d int \
-bios $(BIOS) -device piix3-ide,id=ide \
-drive id=disk,file=$(IMG),format=raw,if=none \
-device ide-hd,drive=disk,bus=ide.0 -drive \
diff --git a/Kernel/KernelKit/PEF.hpp b/Kernel/KernelKit/PEF.hpp
index 0713e7c5..005c7673 100644
--- a/Kernel/KernelKit/PEF.hpp
+++ b/Kernel/KernelKit/PEF.hpp
@@ -36,6 +36,7 @@ namespace NewOS
kPefArch64x0, /* 64x0. ISA */
kPefArch32x0, /* 32x0. ISA */
kPefArchPowerPC,
+ kPefArchARM64,
kPefArchCount = (kPefArchPowerPC - kPefArchIntel86S) + 1,
kPefArchInvalid = 0xFF,
};
diff --git a/Kernel/NewKit/Defines.hpp b/Kernel/NewKit/Defines.hpp
index 96f13fd9..3210f1ef 100644
--- a/Kernel/NewKit/Defines.hpp
+++ b/Kernel/NewKit/Defines.hpp
@@ -133,12 +133,6 @@ namespace NewOS
};
} // namespace NewOS
-/// @note this is for the purpose of having a common namespace alongside zeta's codebase.
-namespace ma::zeta::kernel
-{
- using namespace NewOS;
-}
-
#define DEDUCE_ENDIAN(address, value) \
(((reinterpret_cast<NewOS::Char*>(address)[0]) == (value)) \
? (NewOS::Endian::kEndianBig) \
diff --git a/Kernel/NewKit/String.hpp b/Kernel/NewKit/String.hpp
index 644a1394..14286ca0 100644
--- a/Kernel/NewKit/String.hpp
+++ b/Kernel/NewKit/String.hpp
@@ -35,7 +35,7 @@ namespace NewOS
StringView(const StringView&) = default;
Char* Data();
- const Char* CData();
+ const Char* CData() const;
Size Length() const;
bool operator==(const Char* rhs) const;
diff --git a/Kernel/Sources/FileManager.cxx b/Kernel/Sources/FileManager.cxx
index 6e61a65d..ee285ae1 100644
--- a/Kernel/Sources/FileManager.cxx
+++ b/Kernel/Sources/FileManager.cxx
@@ -90,7 +90,7 @@ namespace NewOS
NEWOS_UNUSED(flags);
- auto dataForkName = "FileData";
+ auto dataForkName = kNewFSDataFork;
if ((reinterpret_cast<NewCatalog*>(node))->Kind == kNewFSCatalogKindFile)
fImpl->WriteCatalog(reinterpret_cast<NewCatalog*>(node), data, size,
@@ -112,7 +112,7 @@ namespace NewOS
NEWOS_UNUSED(flags);
- auto dataForkName = "FileData";
+ auto dataForkName = kNewFSDataFork;
if ((reinterpret_cast<NewCatalog*>(node))->Kind == kNewFSCatalogKindFile)
return fImpl->ReadCatalog(reinterpret_cast<NewCatalog*>(node), sz,
diff --git a/Kernel/Sources/String.cxx b/Kernel/Sources/String.cxx
index 08ca1036..fab12226 100644
--- a/Kernel/Sources/String.cxx
+++ b/Kernel/Sources/String.cxx
@@ -15,7 +15,7 @@ namespace NewOS
return fData;
}
- const Char* StringView::CData()
+ const Char* StringView::CData() const
{
return fData;
}
diff --git a/Kernel/makefile b/Kernel/makefile
index 16a36013..1f749323 100644
--- a/Kernel/makefile
+++ b/Kernel/makefile
@@ -25,7 +25,7 @@ ifneq ($(AHCI_SUPPORT), )
DISKDRIVER = -D__AHCI__
endif
-ifeq ($(RELEASE_SUPPORT), )
+ifneq ($(DEBUG_SUPPORT), )
DEBUG = -D__DEBUG__
endif