summaryrefslogtreecommitdiffhomepage
path: root/Private
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-21 13:39:23 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-21 13:39:55 +0100
commit051e2cfb8df4f2fc1ef711ca7351e7018b4c6e1c (patch)
treebd220c371991418bdb8c0a7de2fc9547c3009708 /Private
parent333fed96b7ccd3ee4f5f097445408dde34d330db (diff)
unstable: secret: Start work on AHCI driver, getting it to initialize
first. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private')
-rw-r--r--Private/HALKit/AMD64/HalACPIFactoryInterface.cxx8
-rw-r--r--Private/HALKit/AMD64/Storage/.gitkeep0
-rw-r--r--Private/HALKit/ARM64/Storage/.gitkeep0
-rw-r--r--Private/HALKit/RISCV/Storage/.gitkeep0
-rw-r--r--Private/HALKit/X86S/ACPI/.gitkeep0
-rw-r--r--Private/HALKit/X86S/Storage/.gitkeep0
6 files changed, 5 insertions, 3 deletions
diff --git a/Private/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Private/HALKit/AMD64/HalACPIFactoryInterface.cxx
index f3e120b6..204274b9 100644
--- a/Private/HALKit/AMD64/HalACPIFactoryInterface.cxx
+++ b/Private/HALKit/AMD64/HalACPIFactoryInterface.cxx
@@ -16,8 +16,8 @@ ACPIFactoryInterface::ACPIFactoryInterface(voidPtr rsdPtr) : m_Rsdp(rsdPtr), m_E
MUST_PASS(_rsdPtr->Revision >= 2);
}
-void ACPIFactoryInterface::Shutdown() {}
-void ACPIFactoryInterface::Reboot() {}
+Void ACPIFactoryInterface::Shutdown() {}
+Void ACPIFactoryInterface::Reboot() {}
/// @brief Finds a descriptor table inside ACPI XSDT.
ErrorOr<voidPtr> ACPIFactoryInterface::Find(const char *signature) {
@@ -32,10 +32,12 @@ ErrorOr<voidPtr> ACPIFactoryInterface::Find(const char *signature) {
auto xsdt = rsdPtr->XsdtAddress;
SizeT num = (rsdPtr->Length + sizeof(SDT)) / 8;
+ constexpr short ACPI_SIGNATURE_LENGTH = 4;
+
for (Size index = 0; index < num; ++index) {
SDT *sdt = reinterpret_cast<SDT *>(xsdt + sizeof(SDT) + index * 8);
- if (!Checksum(sdt->Signature, 4)) ke_stop(RUNTIME_CHECK_ACPI);
+ if (!Checksum(sdt->Signature, ACPI_SIGNATURE_LENGTH)) ke_stop(RUNTIME_CHECK_ACPI);
if (StringBuilder::Equals(const_cast<const char *>(sdt->Signature),
signature))
diff --git a/Private/HALKit/AMD64/Storage/.gitkeep b/Private/HALKit/AMD64/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/AMD64/Storage/.gitkeep
diff --git a/Private/HALKit/ARM64/Storage/.gitkeep b/Private/HALKit/ARM64/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/ARM64/Storage/.gitkeep
diff --git a/Private/HALKit/RISCV/Storage/.gitkeep b/Private/HALKit/RISCV/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/RISCV/Storage/.gitkeep
diff --git a/Private/HALKit/X86S/ACPI/.gitkeep b/Private/HALKit/X86S/ACPI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/X86S/ACPI/.gitkeep
diff --git a/Private/HALKit/X86S/Storage/.gitkeep b/Private/HALKit/X86S/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/X86S/Storage/.gitkeep