TianoCore EDK2 master
|
#include "InternalBm.h"
Go to the source code of this file.
Data Structures | |
struct | BM_COLLECT_KEY_OPTIONS_PARAM |
Variables | |
EFI_LOCK | mBmHotkeyLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY) |
LIST_ENTRY | mBmHotkeyList = INITIALIZE_LIST_HEAD_VARIABLE (mBmHotkeyList) |
EFI_EVENT | mBmHotkeyTriggered = NULL |
BOOLEAN | mBmHotkeyServiceStarted = FALSE |
UINTN | mBmHotkeySupportCount = 0 |
EFI_BOOT_MANAGER_LOAD_OPTION | mBmHotkeyBootOption = { LoadOptionNumberUnassigned } |
EFI_BOOT_MANAGER_KEY_OPTION * | mBmContinueKeyOption = NULL |
VOID * | mBmTxtInExRegistration = NULL |
Hotkey library functions.
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BmHotkey.c.
Check whether the bit is set in the value.
Value | The value need to be check. |
Bit | The bit filed need to be check. |
TRUE | The bit is set. |
FALSE | The bit is not set. |
Definition at line 232 of file BmHotkey.c.
VOID BmCollectKeyOptions | ( | CHAR16 * | Name, |
EFI_GUID * | Guid, | ||
VOID * | Context | ||
) |
Visitor function to collect the key options from NV storage.
Name | Variable name. |
Guid | Variable GUID. |
Context | The same context passed to BmForEachVariable. |
Definition at line 150 of file BmHotkey.c.
EFI_STATUS BmFreeKeyOptions | ( | IN EFI_BOOT_MANAGER_KEY_OPTION * | KeyOptions, |
IN UINTN | KeyOptionCount | ||
) |
Free the key options returned from BmGetKeyOptions.
KeyOptions | Pointer to the key options. |
KeyOptionCount | Number of the key options. |
EFI_SUCCESS | The key options are freed. |
EFI_NOT_FOUND | KeyOptions is NULL. |
Definition at line 787 of file BmHotkey.c.
VOID BmGenerateKeyShiftState | ( | IN UINTN | Depth, |
IN EFI_BOOT_MANAGER_KEY_OPTION * | KeyOption, | ||
IN UINT32 | KeyShiftState, | ||
IN UINT32 * | KeyShiftStates, | ||
IN UINTN * | KeyShiftStateCount | ||
) |
Generate key shift state base on the input key option info.
Depth | Which key is checked. |
KeyOption | Input key option info. |
KeyShiftState | Input key shift state. |
KeyShiftStates | Return possible key shift state array. |
KeyShiftStateCount | Possible key shift state count. |
Definition at line 591 of file BmHotkey.c.
EFI_HANDLE * BmGetActiveConsoleIn | ( | OUT UINTN * | Count | ) |
Return the active Simple Text Input Ex handle array. If the SystemTable.ConsoleInHandle is NULL, the function returns all founded Simple Text Input Ex handles. Otherwise, it just returns the ConsoleInHandle.
Count | Return the handle count. |
The | active console handles. |
Definition at line 450 of file BmHotkey.c.
EFI_BOOT_MANAGER_KEY_OPTION * BmGetKeyOptions | ( | OUT UINTN * | Count | ) |
Return the array of key options.
Count | Return the number of key options. |
NULL | No key option. |
Other | Pointer to the key options. |
Definition at line 202 of file BmHotkey.c.
EFI_STATUS EFIAPI BmHotkeyCallback | ( | IN EFI_KEY_DATA * | KeyData | ) |
This is the common notification function for HotKeys, it will be registered with SimpleTextInEx protocol interface - RegisterKeyNotify() of ConIn handle.
KeyData | A pointer to a buffer that is filled in with the keystroke information for the key that was pressed. |
EFI_SUCCESS | KeyData is successfully processed. |
Definition at line 351 of file BmHotkey.c.
EFI_STATUS BmInitializeKeyFields | ( | IN UINT32 | Modifier, |
IN VA_LIST | Args, | ||
OUT EFI_BOOT_MANAGER_KEY_OPTION * | KeyOption | ||
) |
Initialize the KeyData and Key[] in the EFI_BOOT_MANAGER_KEY_OPTION.
Modifier | Input key info. |
Args | Va_list info. |
KeyOption | Key info which need to update. |
EFI_SUCCESS | Succeed to initialize the KeyData and Key[]. |
Definition at line 251 of file BmHotkey.c.
BOOLEAN BmIsKeyOptionValid | ( | IN CONST EFI_BOOT_MANAGER_KEY_OPTION * | KeyOption, |
IN UINTN | KeyOptionSize | ||
) |
Check whether the input key option is valid.
KeyOption | Key option. |
KeyOptionSize | Size of the key option. |
TRUE | Input key option is valid. |
FALSE | Input key option is not valid. |
Definition at line 56 of file BmHotkey.c.
BOOLEAN BmIsKeyOptionVariable | ( | CHAR16 * | Name, |
EFI_GUID * | Guid, | ||
UINT16 * | OptionNumber | ||
) |
Check whether the input variable is an key option variable.
Name | Input variable name. |
Guid | Input variable guid. |
OptionNumber | The option number of this key option variable. |
TRUE | Input variable is a key option variable. |
FALSE | Input variable is not a key option variable. |
Definition at line 107 of file BmHotkey.c.
EFI_STATUS BmProcessKeyOption | ( | IN EFI_BOOT_MANAGER_KEY_OPTION * | KeyOption | ) |
Add it to hot key database, register it to existing TxtInEx. New TxtInEx will be automatically registered with all the hot key in dababase
KeyOption | Input key option info. |
Definition at line 660 of file BmHotkey.c.
EFI_STATUS BmRegisterHotkeyNotify | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | TxtInEx, |
IN BM_HOTKEY * | Hotkey | ||
) |
Register hotkey notify list.
TxtInEx | Pointer to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL protocol. |
Hotkey | Hotkey list. |
EFI_SUCCESS | Register hotkey notify success. |
Others | Register hotkey notify failed. |
Definition at line 544 of file BmHotkey.c.
UINTN BmSizeOfKeyOption | ( | IN CONST EFI_BOOT_MANAGER_KEY_OPTION * | KeyOption | ) |
Return the buffer size of the EFI_BOOT_MANAGER_KEY_OPTION data.
KeyOption | The input key option info. |
The | buffer size of the key option data. |
Definition at line 37 of file BmHotkey.c.
Stop the hotkey processing.
Event | Event pointer related to hotkey service. |
Context | Context pass to this function. |
Definition at line 850 of file BmHotkey.c.
Callback function for SimpleTextInEx protocol install events
Event | the event that is signaled. |
Context | not used here. |
Definition at line 731 of file BmHotkey.c.
EFI_STATUS BmUnregisterHotkeyNotify | ( | IN BM_HOTKEY * | Hotkey | ) |
Unregister hotkey notify list.
Hotkey | Hotkey list. |
EFI_SUCCESS | Unregister hotkey notify success. |
Others | Unregister hotkey notify failed. |
Definition at line 497 of file BmHotkey.c.
EFI_STATUS EFIAPI EfiBootManagerAddKeyOptionVariable | ( | OUT EFI_BOOT_MANAGER_KEY_OPTION *AddedOption | OPTIONAL, |
IN UINT16 | BootOptionNumber, | ||
IN UINT32 | Modifier, | ||
... | |||
) |
Add the key option. It adds the key option variable and the key option takes affect immediately.
AddedOption | Return the added key option. |
BootOptionNumber | The boot option number for the key option. |
Modifier | Key shift state. |
... | Parameter list of pointer of EFI_INPUT_KEY. |
EFI_SUCCESS | The key option is added. |
EFI_ALREADY_STARTED | The hot key is already used by certain key option. |
Definition at line 972 of file BmHotkey.c.
EFI_STATUS EFIAPI EfiBootManagerDeleteKeyOptionVariable | ( | IN EFI_BOOT_MANAGER_KEY_OPTION *DeletedOption | OPTIONAL, |
IN UINT32 | Modifier, | ||
... | |||
) |
Delete the Key Option variable and unregister the hot key
DeletedOption | Return the deleted key options. |
Modifier | Key shift state. |
... | Parameter list of pointer of EFI_INPUT_KEY. |
EFI_SUCCESS | The key option is deleted. |
EFI_NOT_FOUND | The key option cannot be found. |
Definition at line 1089 of file BmHotkey.c.
VOID EFIAPI EfiBootManagerHotkeyBoot | ( | VOID | ) |
Try to boot the boot option triggered by hot key.
Definition at line 328 of file BmHotkey.c.
EFI_STATUS EFIAPI EfiBootManagerRegisterContinueKeyOption | ( | IN UINT32 | Modifier, |
... | |||
) |
Register the key option to exit the waiting of the Boot Manager timeout. Platform should ensure that the continue key option isn't conflict with other boot key options.
Modifier | Key shift state. |
... | Parameter list of pointer of EFI_INPUT_KEY. |
EFI_SUCCESS | Successfully register the continue key option. |
EFI_ALREADY_STARTED | The continue key option is already registered. |
Definition at line 813 of file BmHotkey.c.
EFI_STATUS EFIAPI EfiBootManagerStartHotkeyService | ( | IN EFI_EVENT * | HotkeyTriggered | ) |
Start the hot key service so that the key press can trigger the boot option.
HotkeyTriggered | Return the waitable event and it will be signaled when a valid hot key is pressed. |
EFI_SUCCESS | The hot key service is started. |
Definition at line 882 of file BmHotkey.c.
EFI_BOOT_MANAGER_KEY_OPTION* mBmContinueKeyOption = NULL |
Definition at line 26 of file BmHotkey.c.
EFI_BOOT_MANAGER_LOAD_OPTION mBmHotkeyBootOption = { LoadOptionNumberUnassigned } |
Definition at line 24 of file BmHotkey.c.
LIST_ENTRY mBmHotkeyList = INITIALIZE_LIST_HEAD_VARIABLE (mBmHotkeyList) |
Definition at line 16 of file BmHotkey.c.
EFI_LOCK mBmHotkeyLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY) |
Definition at line 15 of file BmHotkey.c.
BOOLEAN mBmHotkeyServiceStarted = FALSE |
Definition at line 18 of file BmHotkey.c.
UINTN mBmHotkeySupportCount = 0 |
Definition at line 19 of file BmHotkey.c.
Definition at line 17 of file BmHotkey.c.
VOID* mBmTxtInExRegistration = NULL |
Definition at line 27 of file BmHotkey.c.