X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FDriverSample.h;h=728c44abcee7c294f9b191f1657e89936e4ea1f5;hb=5adb8db71e333069509269f832b356adab0678c0;hp=9f19258a221fa207cf9bed7b595163dd34332e19;hpb=93e3992d1ea50fb30c48f498d257d4e66252dd9b;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h index 9f19258a22..728c44abce 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h @@ -1,97 +1,117 @@ -/** @file - -Copyright (c) 2007, Intel Corporation -All rights reserved. This program and the accompanying materials -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. - -Module Name: - - DriverSample.h - -Abstract: - - -Revision History - - -**/ - -#ifndef _DRIVER_SAMPLE_H -#define _DRIVER_SAMPLE_H - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#include "NVDataStruc.h" - -// -// This is the generated for defaults defined in VFR -// -extern UINT8 VfrMyIfrNVDataDefault0000[]; - -// -// This is the generated IFR binary data for each formset defined in VFR. -// This data array is ready to be used as input of PreparePackageList() to -// create a packagelist (which contains Form packages, String packages, etc). -// -extern UINT8 VfrBin[]; -extern UINT8 InventoryBin[]; - -// -// This is the generated String package data for all .UNI files. -// This data array is ready to be used as input of PreparePackageList() to -// create a packagelist (which contains Form packages, String packages, etc). -// -extern UINT8 DriverSampleStrings[]; - -#define SAMPLE_STRING L"This is an error!" - -#define DRIVER_SAMPLE_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('D', 'S', 'p', 's') - -typedef struct { - UINTN Signature; - - EFI_HANDLE DriverHandle[2]; - EFI_HII_HANDLE HiiHandle[2]; - DRIVER_SAMPLE_CONFIGURATION Configuration; - UINT8 PasswordState; - - // - // Consumed protocol - // - EFI_HII_DATABASE_PROTOCOL *HiiDatabase; - EFI_HII_STRING_PROTOCOL *HiiString; - EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting; - EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2; - - // - // Produced protocol - // - EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess; -} DRIVER_SAMPLE_PRIVATE_DATA; - -#define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE) - -#endif +/** @file + +Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.
+This program and the accompanying materials +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. + +Module Name: + + DriverSample.h + +Abstract: + + +Revision History + + +**/ + +#ifndef _DRIVER_SAMPLE_H_ +#define _DRIVER_SAMPLE_H_ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "NVDataStruc.h" + +// +// This is the generated IFR binary data for each formset defined in VFR. +// This data array is ready to be used as input of HiiAddPackages() to +// create a packagelist (which contains Form packages, String packages, etc). +// +extern UINT8 VfrBin[]; +extern UINT8 InventoryBin[]; + +// +// This is the generated String package data for all .UNI files. +// This data array is ready to be used as input of HiiAddPackages() to +// create a packagelist (which contains Form packages, String packages, etc). +// +extern UINT8 DriverSampleStrings[]; + +#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof) +#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList) + +// +// Number of name in Name/Value storage +// +#define NAME_VALUE_NAME_NUMBER 3 + +#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's') + +typedef struct { + UINTN Signature; + + EFI_HANDLE DriverHandle[2]; + EFI_HII_HANDLE HiiHandle[2]; + DRIVER_SAMPLE_CONFIGURATION Configuration; + UINT8 PasswordState; + + // + // Name/Value storage Name list + // + EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER]; + EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER]; + + // + // Consumed protocol + // + EFI_HII_DATABASE_PROTOCOL *HiiDatabase; + EFI_HII_STRING_PROTOCOL *HiiString; + EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting; + EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2; + + // + // Produced protocol + // + EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess; +} DRIVER_SAMPLE_PRIVATE_DATA; + +#define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE) + +#pragma pack(1) + +/// +/// HII specific Vendor Device Path definition. +/// +typedef struct { + VENDOR_DEVICE_PATH VendorDevicePath; + EFI_DEVICE_PATH_PROTOCOL End; +} HII_VENDOR_DEVICE_PATH; + +#pragma pack() + +#endif