X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FDriverSample.h;h=728c44abcee7c294f9b191f1657e89936e4ea1f5;hb=5adb8db71e333069509269f832b356adab0678c0;hp=8c20cf26ba6a71eb15b1d5ba237266e98218faaa;hpb=7064c0a5aa3eabe99be9c143e4abaa73d7139609;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h index 8c20cf26ba..728c44abce 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2007, Intel Corporation -All rights reserved. This program and the accompanying materials +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 @@ -32,32 +32,24 @@ Revision History #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 for defaults defined in VFR -// -extern UINT8 VfrMyIfrNVDataDefault0000[]; -extern UINT8 VfrMyIfrNVDataDefault0001[]; -extern UINT8 VfrMyIfrNVDataBlockName[]; - // // This is the generated IFR binary data for each formset defined in VFR. -// This data array is ready to be used as input of HiiLibPreparePackageList() to +// 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[]; @@ -65,18 +57,20 @@ 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 HiiLibPreparePackageList() to +// 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 VAR_OFFSET(Field) \ - ((UINT16) ((UINTN) &(((DRIVER_SAMPLE_CONFIGURATION *) 0)->Field))) +#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof) +#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList) -#define DYNAMIC_ONE_OF_VAR_OFFSET VAR_OFFSET (DynamicOneof) -#define DYNAMIC_ORDERED_LIST_VAR_OFFSET VAR_OFFSET (DynamicOrderedList) +// +// Number of name in Name/Value storage +// +#define NAME_VALUE_NAME_NUMBER 3 -#define DRIVER_SAMPLE_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('D', 'S', 'p', 's') +#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's') typedef struct { UINTN Signature; @@ -86,6 +80,12 @@ typedef struct { 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 // @@ -102,4 +102,16 @@ typedef struct { #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