EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h

Go to the documentation of this file.
00001 
00024 #ifndef _DRIVER_SAMPLE_H_
00025 #define _DRIVER_SAMPLE_H_
00026 
00027 #include <Uefi.h>
00028 
00029 #include <Protocol/HiiConfigRouting.h>
00030 #include <Protocol/FormBrowser2.h>
00031 #include <Protocol/HiiConfigAccess.h>
00032 #include <Protocol/HiiDatabase.h>
00033 #include <Protocol/HiiString.h>
00034 
00035 #include <Guid/MdeModuleHii.h>
00036 #include <Library/DebugLib.h>
00037 #include <Library/BaseLib.h>
00038 #include <Library/BaseMemoryLib.h>
00039 #include <Library/UefiRuntimeServicesTableLib.h>
00040 #include <Library/UefiDriverEntryPoint.h>
00041 #include <Library/UefiBootServicesTableLib.h>
00042 #include <Library/MemoryAllocationLib.h>
00043 #include <Library/HiiLib.h>
00044 #include <Library/DevicePathLib.h>
00045 #include <Library/PrintLib.h>
00046 #include <Library/UefiLib.h>
00047 
00048 #include "NVDataStruc.h"
00049 
00050 //
00051 // This is the generated IFR binary data for each formset defined in VFR.
00052 // This data array is ready to be used as input of HiiAddPackages() to
00053 // create a packagelist (which contains Form packages, String packages, etc).
00054 //
00055 extern UINT8  VfrBin[];
00056 extern UINT8  InventoryBin[];
00057 
00058 //
00059 // This is the generated String package data for all .UNI files.
00060 // This data array is ready to be used as input of HiiAddPackages() to
00061 // create a packagelist (which contains Form packages, String packages, etc).
00062 //
00063 extern UINT8  DriverSampleStrings[];
00064 
00065 #define DYNAMIC_ONE_OF_VAR_OFFSET        OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)
00066 #define DYNAMIC_ORDERED_LIST_VAR_OFFSET  OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)
00067 
00068 #define DEFAULT_CLASS_MANUFACTURING_VALUE     0xFF
00069 #define DEFAULT_CLASS_STANDARD_VALUE          0x0
00070 
00071 //
00072 // Number of name in Name/Value storage
00073 //
00074 #define NAME_VALUE_NAME_NUMBER       3
00075 
00076 #define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')
00077 
00078 typedef struct {
00079   UINTN                            Signature;
00080 
00081   EFI_HANDLE                       DriverHandle[2];
00082   EFI_HII_HANDLE                   HiiHandle[2];
00083   DRIVER_SAMPLE_CONFIGURATION      Configuration;
00084   MY_EFI_VARSTORE_DATA             VarStoreConfig;
00085   UINT8                            PasswordState;
00086 
00087   //
00088   // Name/Value storage Name list
00089   //
00090   EFI_STRING_ID                    NameStringId[NAME_VALUE_NAME_NUMBER];
00091   EFI_STRING                       NameValueName[NAME_VALUE_NAME_NUMBER];
00092 
00093   //
00094   // Consumed protocol
00095   //
00096   EFI_HII_DATABASE_PROTOCOL        *HiiDatabase;
00097   EFI_HII_STRING_PROTOCOL          *HiiString;
00098   EFI_HII_CONFIG_ROUTING_PROTOCOL  *HiiConfigRouting;
00099   EFI_FORM_BROWSER2_PROTOCOL       *FormBrowser2;
00100 
00101   //
00102   // Produced protocol
00103   //
00104   EFI_HII_CONFIG_ACCESS_PROTOCOL   ConfigAccess;
00105 } DRIVER_SAMPLE_PRIVATE_DATA;
00106 
00107 #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a)  CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)
00108 
00109 #pragma pack(1)
00110 
00114 typedef struct {
00115   VENDOR_DEVICE_PATH             VendorDevicePath;
00116   EFI_DEVICE_PATH_PROTOCOL       End;
00117 } HII_VENDOR_DEVICE_PATH;
00118 
00119 #pragma pack()
00120 
00121 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines