diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-02 09:00:18 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-02 09:00:18 +0200 |
| commit | c34c46598c12b04b2877aa7290dd401cc40a29e3 (patch) | |
| tree | a564821d683b1c906a7d1a8ad9152486bfab91e8 /Kernel/HALKit | |
| parent | 5bc5e4de0d4dcfc52c192315ca5c59a066d678d8 (diff) | |
ACPI: even error codes.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit')
| -rw-r--r-- | Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx index adeeb10d..7bdec117 100644 --- a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx @@ -63,17 +63,15 @@ namespace NewOS MUST_PASS(fRsdp); if (!signature) - return ErrorOr<voidPtr>{-2}; + return ErrorOr<voidPtr>{-1}; if (*signature == 0) - return ErrorOr<voidPtr>{-3}; + return ErrorOr<voidPtr>{-1}; RSDP* rsdPtr = reinterpret_cast<RSDP*>(this->fRsdp); if (rsdPtr->Revision <= 1) - { - return ErrorOr<voidPtr>{-4}; - } + return ErrorOr<voidPtr>{-1}; /// FIXME RSDT* xsdt = (RSDT*)(rsdPtr->RsdtAddress); @@ -82,15 +80,16 @@ namespace NewOS if (num < 1) { - kcout << "ACPI: No entries." << endl; - return ErrorOr<voidPtr>{-6}; + /// stop here, we should have entries... + ke_stop(RUNTIME_CHECK_ACPI); + return ErrorOr<voidPtr>{-1}; } this->fEntries = num; kcout << "ACPI: Number of entries: " << number(this->fEntries) << endl; kcout << "ACPI: Revision: " << number(xsdt->Revision) << endl; - kcout << "ACPI: XSDT: " << xsdt->Signature << endl; + kcout << "ACPI: Signature: " << xsdt->Signature << endl; kcout << "ACPI: Address of XSDT: " << hex_number((UIntPtr)xsdt) << endl; const short cAcpiSignatureLength = 4; @@ -111,7 +110,7 @@ namespace NewOS } } - return ErrorOr<voidPtr>{nullptr}; + return ErrorOr<voidPtr>{-1}; } /*** |
