1143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/** @file
2143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  FrontPage routines to handle the callbacks and browser calls
3143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
4afc244a59d76be23471719d1cffd27785c59a3e8Eric DongCopyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
5143f0b1de83257f1bd238f016bba955879d448c2Eric DongThis program and the accompanying materials
6143f0b1de83257f1bd238f016bba955879d448c2Eric Dongare licensed and made available under the terms and conditions of the BSD License
7143f0b1de83257f1bd238f016bba955879d448c2Eric Dongwhich accompanies this distribution.  The full text of the license may be found at
8143f0b1de83257f1bd238f016bba955879d448c2Eric Donghttp://opensource.org/licenses/bsd-license.php
9143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
10143f0b1de83257f1bd238f016bba955879d448c2Eric DongTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11143f0b1de83257f1bd238f016bba955879d448c2Eric DongWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
13143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
14143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
15143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
16143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#ifndef _BDS_MODULE_H_
17143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#define _BDS_MODULE_H_
18143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
19143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <IndustryStandard/SmBios.h>
20143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
21143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Guid/MdeModuleHii.h>
22143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Guid/StatusCodeDataTypeId.h>
23143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
24143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Protocol/Smbios.h>
25143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Protocol/HiiConfigAccess.h>
26ce7690e267dc3205357e0d0e3a57e2b6fd1de895Dandan Bi
27143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/PrintLib.h>
28143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/DebugLib.h>
29143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/BaseMemoryLib.h>
30143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/UefiBootServicesTableLib.h>
31143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/UefiLib.h>
32143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/MemoryAllocationLib.h>
33143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/ReportStatusCodeLib.h>
34143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/UefiRuntimeServicesTableLib.h>
35143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/HiiLib.h>
36143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/DevicePathLib.h>
37143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/UefiHiiServicesLib.h>
38143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#include <Library/UefiBootManagerLib.h>
39143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
40143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#pragma pack(1)
41143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
42143f0b1de83257f1bd238f016bba955879d448c2Eric Dong///
43143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/// HII specific Vendor Device Path definition.
44143f0b1de83257f1bd238f016bba955879d448c2Eric Dong///
45143f0b1de83257f1bd238f016bba955879d448c2Eric Dongtypedef struct {
46143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VENDOR_DEVICE_PATH             VendorDevicePath;
47143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  EFI_DEVICE_PATH_PROTOCOL       End;
48143f0b1de83257f1bd238f016bba955879d448c2Eric Dong} HII_VENDOR_DEVICE_PATH;
49143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
50143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#pragma pack()
51143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
52143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
53143f0b1de83257f1bd238f016bba955879d448c2Eric Dong//
54143f0b1de83257f1bd238f016bba955879d448c2Eric Dong//The interface functions related to the Setup Browser Reset Reminder feature
55143f0b1de83257f1bd238f016bba955879d448c2Eric Dong//
56143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
57143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Enable the setup browser reset reminder feature.
58143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  This routine is used in a platform tip. If the platform policy needs the feature, use the routine to enable it.
59143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
60143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
61143f0b1de83257f1bd238f016bba955879d448c2Eric DongVOID
62143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
63143f0b1de83257f1bd238f016bba955879d448c2Eric DongEnableResetReminderFeature (
64143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
65143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
66143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
67143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
68143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Disable the setup browser reset reminder feature.
69143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  This routine is used in a platform tip. If the platform policy does not want the feature, use the routine to disable it.
70143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
71143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
72143f0b1de83257f1bd238f016bba955879d448c2Eric DongVOID
73143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
74143f0b1de83257f1bd238f016bba955879d448c2Eric DongDisableResetReminderFeature (
75143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
76143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
77143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
78143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
79143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Record the info that a reset is required.
80143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  A module boolean variable is used to record whether a reset is required.
81143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
82143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
83143f0b1de83257f1bd238f016bba955879d448c2Eric DongVOID
84143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
85143f0b1de83257f1bd238f016bba955879d448c2Eric DongEnableResetRequired (
86143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
87143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
88143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
89143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
90143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
91143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Record the info that no reset is required.
92143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  A module boolean variable is used to record whether a reset is required.
93143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
94143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
95143f0b1de83257f1bd238f016bba955879d448c2Eric DongVOID
96143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
97143f0b1de83257f1bd238f016bba955879d448c2Eric DongDisableResetRequired (
98143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
99143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
100143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
101143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
102143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Check whether platform policy enables the reset reminder feature. The default is enabled.
103143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
104143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
105143f0b1de83257f1bd238f016bba955879d448c2Eric DongBOOLEAN
106143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
107143f0b1de83257f1bd238f016bba955879d448c2Eric DongIsResetReminderFeatureEnable (
108143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
109143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
110143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
111143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
112143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Check if the user changed any option setting that needs a system reset to be effective.
113143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
114143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
115143f0b1de83257f1bd238f016bba955879d448c2Eric DongBOOLEAN
116143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
117143f0b1de83257f1bd238f016bba955879d448c2Eric DongIsResetRequired (
118143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
119143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
120143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
121143f0b1de83257f1bd238f016bba955879d448c2Eric Dong/**
122143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  Check whether a reset is needed, and finish the reset reminder feature.
123143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  If a reset is needed, pop up a menu to notice user, and finish the feature
124143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  according to the user selection.
125143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
126143f0b1de83257f1bd238f016bba955879d448c2Eric Dong**/
127143f0b1de83257f1bd238f016bba955879d448c2Eric DongVOID
128143f0b1de83257f1bd238f016bba955879d448c2Eric DongEFIAPI
129143f0b1de83257f1bd238f016bba955879d448c2Eric DongSetupResetReminder (
130143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  VOID
131143f0b1de83257f1bd238f016bba955879d448c2Eric Dong  );
132143f0b1de83257f1bd238f016bba955879d448c2Eric Dong
133143f0b1de83257f1bd238f016bba955879d448c2Eric Dong#endif
134