Page 1 of 1

[Solved] ACPICA : Unable to shutdown (AE_NOT_EXIST)

Posted: Sun Jul 24, 2016 6:10 am
by wichtounet
Hi,

I've implemented the ACPICA OSL for my OS and performed a full initialization of ACPICA. The initialization seems to work. This is what is printed during initialization:
TRACE: Initializing Namespace objects:
: 8.8s] (id ) - 4382992 Objects with 1 Devices, 96 Regions, 15 Methods (3/31/14 Serial/Non/Cvt)
TRACE: Table [SSDT7: 8.8s] (id ) - 4390657 Objects with 2 Devices, 1 Regions, 0 Methods (0/0/0 Serial/Non/Cvt)
TRACE: Completing Region/Field/Buffer/Package initialization:
TRACE: Initialized 3/3 Regions 0/0 Fields 6/6 Buffers 4/4 Packages (106 nodes)
TRACE: Initializing Device/Processor/Thermal objects and executing _INI/_STA methods:
TRACE: Executed 0 _INI methods requiring 0 _STA executions (examined 18 objects)
However, I'm not able to shutdown the system. Here is my shutdown code:

Code: Select all

    auto status = AcpiEnterSleepStatePrep(5);

    if(ACPI_FAILURE(status)){
        logging::logf(logging::log_level::ERROR, "acpica: Impossible to prepare sleep state: error: %s\n", AcpiGbl_ExceptionNames_Env[status].Name);
        return;
    }

    size_t rflags;
    arch::disable_hwint(rflags);
    status = AcpiEnterSleepState(5);

    if(ACPI_FAILURE(status)){
        logging::logf(logging::log_level::ERROR, "acpica: Impossible to enter sleep state: error: %s\n", AcpiGbl_ExceptionNames_Env[status].Name);
        return;
    }

    k_print_line("acpi poweroff failed.");
    arch::enable_hwint(rflags);
The call to AcpiEnterSleepState returns AE_NOT_EXIST

Is there anything else I have to do for ACPICA shutdown ?

Thanks

Re: ACPICA : Unable to shutdown (AE_NOT_EXIST)

Posted: Sun Jul 24, 2016 7:31 am
by wichtounet
I found the issue :)

I had to replace:

Code: Select all

    status = AcpiInitializeTables(nullptr, 16, false);
by

Code: Select all

    status = AcpiInitializeTables(nullptr, 16, true);
I guess there was too many tables, so the resize is allowing more tables.