vaseboot/VasEBoot-core/lib/efi/halt.c

40 lines
1.3 KiB
C

/* efi.c - generic EFI support */
/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
*
* VasEBoot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VasEBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#include <VasEBoot/efi/api.h>
#include <VasEBoot/efi/efi.h>
#include <VasEBoot/misc.h>
#include <VasEBoot/mm.h>
#include <VasEBoot/kernel.h>
#include <VasEBoot/acpi.h>
#include <VasEBoot/loader.h>
void
VasEBoot_halt (void)
{
VasEBoot_machine_fini (VasEBoot_LOADER_FLAG_NORETURN);
#if !defined(__ia64__) && !defined(__arm__) && !defined(__aarch64__)
VasEBoot_acpi_halt ();
#endif
efi_call_4 (VasEBoot_efi_system_table->runtime_services->reset_system,
VasEBoot_EFI_RESET_SHUTDOWN, VasEBoot_EFI_SUCCESS, 0, NULL);
while (1);
}