https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
/** @file
|
|
Provides a way for 3rd party applications to register themselves for launch by the
|
|
Boot Manager based on hot key
|
|
|
|
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef _HOTKEY_H_
|
|
#define _HOTKEY_H_
|
|
|
|
#include "Bds.h"
|
|
#include "String.h"
|
|
|
|
#define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \
|
|
(a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \
|
|
}
|
|
|
|
#define BDS_HOTKEY_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'K', 'O')
|
|
|
|
|
|
typedef struct {
|
|
UINTN Signature;
|
|
LIST_ENTRY Link;
|
|
|
|
VOID *NotifyHandle;
|
|
UINT16 BootOptionNumber;
|
|
UINT8 CodeCount;
|
|
UINT8 WaitingKey;
|
|
EFI_KEY_DATA KeyData[3];
|
|
} BDS_HOTKEY_OPTION;
|
|
|
|
#define BDS_HOTKEY_OPTION_FROM_LINK(a) CR (a, BDS_HOTKEY_OPTION, Link, BDS_HOTKEY_OPTION_SIGNATURE)
|
|
|
|
/**
|
|
|
|
Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
|
|
|
|
|
|
@param VOID
|
|
|
|
@retval EFI_SUCCESS Hotkey services successfully initialized.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
InitializeHotkeyService (
|
|
VOID
|
|
);
|
|
|
|
/**
|
|
Try to boot the boot option triggered by hotkey.
|
|
@retval EFI_SUCCESS There is HotkeyBootOption & it is processed
|
|
@retval EFI_NOT_FOUND There is no HotkeyBootOption
|
|
**/
|
|
EFI_STATUS
|
|
HotkeyBoot (
|
|
VOID
|
|
);
|
|
|
|
#endif
|