OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ResetNvramEntry.c File Reference
#include <Guid/AppleVariable.h>
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/OcDirectResetLib.h>
#include <Library/OcVariableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Protocol/OcBootEntry.h>

Go to the source code of this file.

Macros

#define OC_MENU_RESET_NVRAM_ID   "reset_nvram"
 
#define OC_MENU_RESET_NVRAM_ENTRY   "Reset NVRAM"
 

Functions

STATIC VOID WaitForChime (IN OUT OC_PICKER_CONTEXT *Context)
 
STATIC EFI_STATUS SystemActionResetNvram (IN OUT OC_PICKER_CONTEXT *PickerContext)
 
STATIC EFI_STATUS EFIAPI ResetNvramGetBootEntries (IN OUT OC_PICKER_CONTEXT *PickerContext, IN CONST EFI_HANDLE Device OPTIONAL, OUT OC_PICKER_ENTRY **Entries, OUT UINTN *NumEntries)
 
STATIC CHAR8 *EFIAPI ResetNvramCheckHotKeys (IN OUT OC_PICKER_CONTEXT *Context, IN UINTN NumKeys, IN APPLE_MODIFIER_MAP Modifiers, IN APPLE_KEY_CODE *Keys)
 
EFI_STATUS EFIAPI UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC BOOLEAN mUseApple = FALSE
 
STATIC BOOLEAN mPreserveBoot = FALSE
 
STATIC OC_PICKER_ENTRY mResetNvramBootEntries [1]
 
STATIC OC_BOOT_ENTRY_PROTOCOL mResetNvramBootEntryProtocol
 

Detailed Description

Boot entry protocol implementation of Reset NVRAM boot picker entry.

Copyright (c) 2022, Mike Beaton. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause

Definition in file ResetNvramEntry.c.

Macro Definition Documentation

◆ OC_MENU_RESET_NVRAM_ENTRY

#define OC_MENU_RESET_NVRAM_ENTRY   "Reset NVRAM"

Definition at line 20 of file ResetNvramEntry.c.

◆ OC_MENU_RESET_NVRAM_ID

#define OC_MENU_RESET_NVRAM_ID   "reset_nvram"

Definition at line 19 of file ResetNvramEntry.c.

Function Documentation

◆ ResetNvramCheckHotKeys()

STATIC CHAR8 *EFIAPI ResetNvramCheckHotKeys ( IN OUT OC_PICKER_CONTEXT * Context,
IN UINTN NumKeys,
IN APPLE_MODIFIER_MAP Modifiers,
IN APPLE_KEY_CODE * Keys )

Definition at line 119 of file ResetNvramEntry.c.

◆ ResetNvramGetBootEntries()

STATIC EFI_STATUS EFIAPI ResetNvramGetBootEntries ( IN OUT OC_PICKER_CONTEXT * PickerContext,
IN CONST EFI_HANDLE Device OPTIONAL,
OUT OC_PICKER_ENTRY ** Entries,
OUT UINTN * NumEntries )

Definition at line 94 of file ResetNvramEntry.c.

◆ SystemActionResetNvram()

STATIC EFI_STATUS SystemActionResetNvram ( IN OUT OC_PICKER_CONTEXT * PickerContext)

Definition at line 41 of file ResetNvramEntry.c.

◆ UefiMain()

EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE * SystemTable )

Definition at line 155 of file ResetNvramEntry.c.

◆ WaitForChime()

STATIC VOID WaitForChime ( IN OUT OC_PICKER_CONTEXT * Context)

Definition at line 27 of file ResetNvramEntry.c.

Variable Documentation

◆ mPreserveBoot

STATIC BOOLEAN mPreserveBoot = FALSE

Definition at line 23 of file ResetNvramEntry.c.

◆ mResetNvramBootEntries

STATIC OC_PICKER_ENTRY mResetNvramBootEntries[1]
Initial value:
= {
{
.Path = NULL,
.Arguments = NULL,
.Auxiliary = TRUE,
.Tool = FALSE,
.TextMode = FALSE,
.RealPath = FALSE,
.SystemAction = SystemActionResetNvram,
}
}
#define OC_VOICE_OVER_AUDIO_FILE_RESET_NVRAM
Definition OcAudio.h:65
#define OC_VOICE_OVER_AUDIO_BASE_TYPE_OPEN_CORE
Definition OcAudio.h:38
#define OC_FLAVOUR_RESET_NVRAM
#define OC_MENU_RESET_NVRAM_ID
STATIC EFI_STATUS SystemActionResetNvram(IN OUT OC_PICKER_CONTEXT *PickerContext)
#define OC_MENU_RESET_NVRAM_ENTRY

Definition at line 74 of file ResetNvramEntry.c.

◆ mResetNvramBootEntryProtocol

STATIC OC_BOOT_ENTRY_PROTOCOL mResetNvramBootEntryProtocol
Initial value:
= {
NULL,
}
#define OC_BOOT_ENTRY_PROTOCOL_REVISION
Definition OcBootEntry.h:31
STATIC CHAR8 *EFIAPI ResetNvramCheckHotKeys(IN OUT OC_PICKER_CONTEXT *Context, IN UINTN NumKeys, IN APPLE_MODIFIER_MAP Modifiers, IN APPLE_KEY_CODE *Keys)
STATIC EFI_STATUS EFIAPI ResetNvramGetBootEntries(IN OUT OC_PICKER_CONTEXT *PickerContext, IN CONST EFI_HANDLE Device OPTIONAL, OUT OC_PICKER_ENTRY **Entries, OUT UINTN *NumEntries)

Definition at line 146 of file ResetNvramEntry.c.

◆ mUseApple

STATIC BOOLEAN mUseApple = FALSE

Definition at line 22 of file ResetNvramEntry.c.