1 /** @file
2 
3   The defintions are required both by Source code and Vfr file.
4   The PLAT_OVER_MNGR_DATA structure, form guid and Ifr question ID are defined.
5 
6 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution.  The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11 
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15 **/
16 
17 #ifndef _PLAT_OVER_MNGR_H_
18 #define _PLAT_OVER_MNGR_H_
19 
20 #include <Guid/PlatDriOverrideHii.h>
21 
22 //
23 // The max number of the supported driver list.
24 //
25 #define MAX_CHOICE_NUM    0x00FF
26 #define UPDATE_DATA_SIZE  0x1000
27 
28 #define FORM_ID_DEVICE                 0x1100
29 #define FORM_ID_DRIVER                 0x1200
30 #define FORM_ID_ORDER                  0x1500
31 
32 #define KEY_VALUE_DEVICE_OFFSET        0x0100
33 #define KEY_VALUE_DRIVER_OFFSET        0x0300
34 
35 #define KEY_VALUE_DEVICE_REFRESH       0x1234
36 #define KEY_VALUE_DEVICE_FILTER        0x1235
37 #define KEY_VALUE_DEVICE_CLEAR         0x1236
38 
39 #define KEY_VALUE_DRIVER_GOTO_PREVIOUS 0x1300
40 #define KEY_VALUE_DRIVER_GOTO_ORDER    0x1301
41 
42 #define KEY_VALUE_ORDER_GOTO_PREVIOUS  0x2000
43 #define KEY_VALUE_ORDER_SAVE_AND_EXIT  0x1800
44 
45 #define VARSTORE_ID_PLAT_OVER_MNGR     0x1000
46 
47 #define LABEL_END                      0xffff
48 
49 typedef struct {
50   UINT8   DriOrder[MAX_CHOICE_NUM];
51   UINT8   PciDeviceFilter;
52 } PLAT_OVER_MNGR_DATA;
53 
54 //
55 // Field offset of structure PLAT_OVER_MNGR_DATA
56 //
57 #define VAR_OFFSET(Field)              ((UINTN) &(((PLAT_OVER_MNGR_DATA *) 0)->Field))
58 #define DRIVER_ORDER_VAR_OFFSET         (VAR_OFFSET (DriOrder))
59 
60 //
61 // Tool automatic generated Question Id start from 1
62 // In order to avoid to conflict them, the Driver Selection and Order QuestionID offset is defined from 0x0500.
63 //
64 #define QUESTION_ID_OFFSET              0x0500
65 #define DRIVER_ORDER_QUESTION_ID        (VAR_OFFSET (DriOrder) + QUESTION_ID_OFFSET)
66 
67 #endif
68