]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / PlatformDriOverrideDxe / PlatOverMngr.h
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 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef _PLAT_OVER_MNGR_H_
12 #define _PLAT_OVER_MNGR_H_
13
14 #include <Guid/PlatDriOverrideHii.h>
15
16 //
17 // The max number of the supported driver list.
18 //
19 #define MAX_CHOICE_NUM 0x00FF
20 #define UPDATE_DATA_SIZE 0x1000
21
22 #define FORM_ID_DEVICE 0x1100
23 #define FORM_ID_DRIVER 0x1200
24 #define FORM_ID_ORDER 0x1500
25
26 #define KEY_VALUE_DEVICE_OFFSET 0x0100
27 #define KEY_VALUE_DRIVER_OFFSET 0x0300
28
29 #define KEY_VALUE_DEVICE_REFRESH 0x1234
30 #define KEY_VALUE_DEVICE_FILTER 0x1235
31 #define KEY_VALUE_DEVICE_CLEAR 0x1236
32
33 #define KEY_VALUE_DRIVER_GOTO_PREVIOUS 0x1300
34 #define KEY_VALUE_DRIVER_GOTO_ORDER 0x1301
35
36 #define KEY_VALUE_ORDER_GOTO_PREVIOUS 0x2000
37 #define KEY_VALUE_ORDER_SAVE_AND_EXIT 0x1800
38
39 #define VARSTORE_ID_PLAT_OVER_MNGR 0x1000
40
41 #define LABEL_END 0xffff
42
43 typedef struct {
44 UINT8 DriOrder[MAX_CHOICE_NUM];
45 UINT8 PciDeviceFilter;
46 } PLAT_OVER_MNGR_DATA;
47
48 //
49 // Field offset of structure PLAT_OVER_MNGR_DATA
50 //
51 #define VAR_OFFSET(Field) ((UINTN) &(((PLAT_OVER_MNGR_DATA *) 0)->Field))
52 #define DRIVER_ORDER_VAR_OFFSET (VAR_OFFSET (DriOrder))
53
54 //
55 // Tool automatic generated Question Id start from 1
56 // In order to avoid to conflict them, the Driver Selection and Order QuestionID offset is defined from 0x0500.
57 //
58 #define QUESTION_ID_OFFSET 0x0500
59 #define DRIVER_ORDER_QUESTION_ID (VAR_OFFSET (DriOrder) + QUESTION_ID_OFFSET)
60
61 #endif