OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <PiDxe.h>
#include <Library/PcdLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcStringLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/MemoryAllocationLib.h>
#include <Uefi/UefiInternalFormRepresentation.h>
#include <Library/UefiHiiServicesLib.h>
#include <Library/HiiLib.h>
#include <Protocol/HiiFont.h>
#include <Protocol/HiiImage.h>
#include <Protocol/HiiImageEx.h>
#include <Protocol/HiiImageDecoder.h>
#include <Protocol/HiiString.h>
#include <Protocol/HiiDatabase.h>
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/HiiConfigAccess.h>
#include <Protocol/HiiConfigKeyword.h>
#include <Guid/HiiPlatformSetupFormset.h>
Go to the source code of this file.
Data Structures | |
struct | ONE_OF_CONTEXT_ |
Macros | |
#define | CHAR_ESC 0x1B |
#define | DONT_STOP_AT 0xFFFF |
#define | PADD(x, y) |
#define | BUFFER_LENGTH 128 |
Typedefs | |
typedef struct ONE_OF_CONTEXT_ | ONE_OF_CONTEXT |
typedef VOID | OP_CODE_HANDLER(IN EFI_IFR_OP_HEADER *IfrHeader, IN OUT BOOLEAN *Stop OPTIONAL, IN VOID *Context) |
Enumerations | |
enum | { ARG_VERIFY = 0 , ARG_LOCK = 1 , ARG_UNLOCK = 2 , ARG_INTERACTIVE = 8 } |
Functions | |
EFI_STATUS EFIAPI | VerifyMSRE2 (VOID) |
BOOLEAN | ReadYN (VOID) |
CHAR16 | ReadAnyKey (VOID) |
EFI_STATUS | InterpretArguments (VOID) |
VOID | ModifySearchString (IN OUT EFI_STRING *SearchString) |
EFI_HII_PACKAGE_LIST_HEADER * | HiiExportPackageLists (IN EFI_HII_HANDLE Handle) |
VOID | HandleIfrOption (IN EFI_IFR_OP_HEADER *IfrHeader, IN OUT BOOLEAN *Stop OPTIONAL, IN OUT VOID *Context) |
VOID | HandleIfrVariable (IN OUT ONE_OF_CONTEXT *Context) |
EFI_IFR_OP_HEADER * | IterateOpCode (IN EFI_IFR_OP_HEADER *Header, IN UINT8 OpCode, IN OUT BOOLEAN *Stop OPTIONAL, IN VOID *Context, IN OP_CODE_HANDLER Handler) |
Variables | |
UINTN | mArgumentFlags |
Control CFGLock BIOS Option
Copyright (c) 2020, Brumbaer. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file ControlMsrE2.h.
#define BUFFER_LENGTH 128 |
Definition at line 112 of file ControlMsrE2.h.
#define CHAR_ESC 0x1B |
Definition at line 49 of file ControlMsrE2.h.
#define DONT_STOP_AT 0xFFFF |
Definition at line 50 of file ControlMsrE2.h.
Definition at line 110 of file ControlMsrE2.h.
typedef struct ONE_OF_CONTEXT_ ONE_OF_CONTEXT |
Parameters to search in a Form for IfrHeaders which contain a Description and to return the VarStore
SearchText | Text that must be part of the options description |
EfiHandle | Handle of the list the Form is part of |
ListHeader | Pointer to the contents of the handle |
PkgHeader | Pointer to the current package in the list |
FirstIfrHeader | Pointer to first IfrHeader in Package |
IfrVarStore | Pointer to IfrHeader of corresponding varstore in same list |
IfrOneOf | Pointer to IfrHeader of BIOS Option |
StopAt | Find a certain BIOS Option |
Count | Running number of suitable BIOS Options |
typedef VOID OP_CODE_HANDLER(IN EFI_IFR_OP_HEADER *IfrHeader, IN OUT BOOLEAN *Stop OPTIONAL, IN VOID *Context) |
Callback - What to do, when a IfrHeader with a defined OP_CODE is found
[in] | IfrHeader | Current IfrHeader under scrutiny |
[in,out] | Stop | Pointer to Stop flag. If TRUE no further search for opcodes. Can be NULL. |
[in] | Context | Pointer to Handler specific data |
Definition at line 94 of file ControlMsrE2.h.
anonymous enum |
Commandline Arguments
Enumerator | |
---|---|
ARG_VERIFY | |
ARG_LOCK | |
ARG_UNLOCK | |
ARG_INTERACTIVE |
Definition at line 103 of file ControlMsrE2.h.
VOID HandleIfrOption | ( | IN EFI_IFR_OP_HEADER * | IfrHeader, |
IN OUT BOOLEAN *Stop | OPTIONAL, | ||
IN OUT VOID * | Context ) |
Callback to Handle EFI_IFR_ONE_OF_OP
[in] | IfrHeader | Current IfrHeader under scrutiny |
[in,out] | Stop | Pointer to Stop flag. If TRUE no further search for opcodes. Can be NULL. |
[in] | Context | Pointer to Handler specific data |
< Skip identical Options
Definition at line 136 of file ControlMsrE2Hii.c.
VOID HandleIfrVariable | ( | IN OUT ONE_OF_CONTEXT * | Context | ) |
Displaying and Changing value of BIOS Option. Including UI
[in] | Context | Pointer to Handler specific data |
Definition at line 264 of file ControlMsrE2Hii.c.
EFI_HII_PACKAGE_LIST_HEADER * HiiExportPackageLists | ( | IN EFI_HII_HANDLE | Handle | ) |
Copies Package Lists to Memory
[in] | Handle | An EFI_HII_HANDLE that corresponds to the desired package list in the HIIdatabase. |
Definition at line 23 of file ControlMsrE2Hii.c.
EFI_STATUS InterpretArguments | ( | VOID | ) |
Parse commandline arguments
EFI_SUCCESS | Success |
EFI_OUT_OF_RESOURCES | Could not allocate memory |
EFI_INVALID_PARAMETER | More than 1 parameter provided |
Definition at line 145 of file ControlMsrE2UI.c.
EFI_IFR_OP_HEADER * IterateOpCode | ( | IN EFI_IFR_OP_HEADER * | Header, |
IN UINT8 | OpCode, | ||
IN OUT BOOLEAN *Stop | OPTIONAL, | ||
IN VOID * | Context, | ||
IN OP_CODE_HANDLER | Handler ) |
Call Handler for each occurence of opCode, starting to search at header. Called recursively
[in] | Header | Current Header under scrutiny |
[in] | OpCode | Type for OpCode |
[in,out] | Stop | Pointer to Stop flag. If TRUE no further search for opcodes. Can be NULL. |
[in] | Context | Pointer to Handler specific data |
[in] | Handler | Handler for data |
Definition at line 60 of file ControlMsrE2Hii.c.
VOID ModifySearchString | ( | IN OUT EFI_STRING * | SearchString | ) |
Displays SearchString and allows to change it
[in,out] | SearchString | Current configuration string |
Definition at line 223 of file ControlMsrE2UI.c.
CHAR16 ReadAnyKey | ( | VOID | ) |
Wait for any key press
Other | Unicode for pressed key |
Definition at line 118 of file ControlMsrE2UI.c.
BOOLEAN ReadYN | ( | VOID | ) |
Wait for Keypress of Y or N. Ignores case.
TRUE | Keypress is Y |
FALSE | Keypress is N |
Definition at line 129 of file ControlMsrE2UI.c.
EFI_STATUS EFIAPI VerifyMSRE2 | ( | VOID | ) |
Check MsrE2 Status - original VerifyMSRE2
EFI_SUCCESS | Success |
Other | Fail to verify MSR 0xE2 status |
Definition at line 61 of file VerifyMsrE2.c.
|
extern |
Definition at line 17 of file ControlMsrE2UI.c.