2009-01-23 08:24:55 +01:00
|
|
|
/** @file
|
|
|
|
Provides a way for 3rd party applications to register themselves for launch by the
|
|
|
|
Boot Manager based on hot key
|
|
|
|
|
2013-12-18 06:51:22 +01:00
|
|
|
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
|
2010-04-23 18:28:26 +02:00
|
|
|
This program and the accompanying materials
|
2009-01-23 08:24:55 +01:00
|
|
|
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.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _HOTKEY_H_
|
|
|
|
#define _HOTKEY_H_
|
|
|
|
|
|
|
|
#include "Bds.h"
|
|
|
|
#include "String.h"
|
|
|
|
|
2009-04-09 09:56:28 +02:00
|
|
|
#define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \
|
2012-08-22 04:24:40 +02:00
|
|
|
(a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \
|
2009-04-09 09:56:28 +02:00
|
|
|
}
|
2009-01-23 08:24:55 +01:00
|
|
|
|
|
|
|
#define BDS_HOTKEY_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'K', 'O')
|
2009-04-09 09:56:28 +02:00
|
|
|
|
|
|
|
|
2009-01-23 08:24:55 +01:00
|
|
|
typedef struct {
|
|
|
|
UINTN Signature;
|
|
|
|
LIST_ENTRY Link;
|
|
|
|
|
2012-07-30 05:50:42 +02:00
|
|
|
VOID *NotifyHandle;
|
2009-01-23 08:24:55 +01:00
|
|
|
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
|
|
|
|
);
|
|
|
|
|
2011-04-20 10:51:18 +02:00
|
|
|
/**
|
|
|
|
Try to boot the boot option triggered by hotkey.
|
2012-03-23 05:27:19 +01:00
|
|
|
@retval EFI_SUCCESS There is HotkeyBootOption & it is processed
|
|
|
|
@retval EFI_NOT_FOUND There is no HotkeyBootOption
|
2011-04-20 10:51:18 +02:00
|
|
|
**/
|
2012-03-23 05:27:19 +01:00
|
|
|
EFI_STATUS
|
2011-04-20 10:51:18 +02:00
|
|
|
HotkeyBoot (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2009-01-23 08:24:55 +01:00
|
|
|
#endif
|