OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcResetSystem.c File Reference
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcDirectResetLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcStringLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Guid/GlobalVariable.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI OcResetToFirmwareSettingsSupported (VOID)
 
EFI_STATUS EFIAPI OcResetSystem (IN CHAR16 *Mode)
 

Detailed Description

Reset system.

Copyright (c) 2020-2024, vit9696. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file OcResetSystem.c.

Function Documentation

◆ OcResetSystem()

EFI_STATUS EFIAPI OcResetSystem ( IN CHAR16 * Mode)

Reset the system. Fails to reset if firmware mode is requested but not supported. Defaults to cold reset when other reset fails, or unknown reset mode is requested.

Parameters
[in]ModeReset mode. Supported modes are:
  • "firmware" - reboot to UEFI firmware settings, if supported
  • "warmreset" - warm reset
  • "coldreset" - cold reset
  • "shutdown" - shut down
Return values
EFI_SUCCESSSystem was reset.
otherSystem could not be reset.

< Unreachable

Definition at line 55 of file OcResetSystem.c.

◆ OcResetToFirmwareSettingsSupported()

EFI_STATUS EFIAPI OcResetToFirmwareSettingsSupported ( VOID )

Tests whether reset to firmware settings is supported.

Return values
EFI_SUCCESSReset to firmware settings is supported.
otherReset to firmware settings is not supported.

Definition at line 22 of file OcResetSystem.c.