2008-10-31 05:36:53 +01:00
|
|
|
/** @file
|
|
|
|
|
2012-02-29 05:56:26 +01:00
|
|
|
Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
|
2010-04-24 11:33:45 +02:00
|
|
|
This program and the accompanying materials
|
2008-10-31 05:36:53 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2008-11-19 14:36:34 +01:00
|
|
|
#ifndef _DRIVER_SAMPLE_H_
|
|
|
|
#define _DRIVER_SAMPLE_H_
|
2008-10-31 05:36:53 +01:00
|
|
|
|
|
|
|
#include <Uefi.h>
|
|
|
|
|
|
|
|
#include <Protocol/HiiConfigRouting.h>
|
|
|
|
#include <Protocol/FormBrowser2.h>
|
|
|
|
#include <Protocol/HiiConfigAccess.h>
|
|
|
|
#include <Protocol/HiiDatabase.h>
|
|
|
|
#include <Protocol/HiiString.h>
|
2012-02-29 05:56:26 +01:00
|
|
|
#include <Protocol/FormBrowserEx.h>
|
2008-10-31 05:36:53 +01:00
|
|
|
|
2009-02-23 16:18:48 +01:00
|
|
|
#include <Guid/MdeModuleHii.h>
|
2008-10-31 05:36:53 +01:00
|
|
|
#include <Library/DebugLib.h>
|
2009-04-14 12:47:19 +02:00
|
|
|
#include <Library/BaseLib.h>
|
2008-10-31 05:36:53 +01:00
|
|
|
#include <Library/BaseMemoryLib.h>
|
|
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
|
|
#include <Library/UefiDriverEntryPoint.h>
|
|
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Library/HiiLib.h>
|
2009-04-02 10:48:03 +02:00
|
|
|
#include <Library/DevicePathLib.h>
|
2009-05-14 09:06:06 +02:00
|
|
|
#include <Library/PrintLib.h>
|
2009-10-26 06:27:28 +01:00
|
|
|
#include <Library/UefiLib.h>
|
2008-10-31 05:36:53 +01:00
|
|
|
|
|
|
|
#include "NVDataStruc.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// This is the generated IFR binary data for each formset defined in VFR.
|
2009-04-14 12:47:19 +02:00
|
|
|
// This data array is ready to be used as input of HiiAddPackages() to
|
2008-10-31 05:36:53 +01:00
|
|
|
// 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.
|
2009-04-14 12:47:19 +02:00
|
|
|
// This data array is ready to be used as input of HiiAddPackages() to
|
2008-10-31 05:36:53 +01:00
|
|
|
// create a packagelist (which contains Form packages, String packages, etc).
|
|
|
|
//
|
|
|
|
extern UINT8 DriverSampleStrings[];
|
|
|
|
|
2008-12-11 07:09:37 +01:00
|
|
|
#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)
|
|
|
|
#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)
|
2008-10-31 05:36:53 +01:00
|
|
|
|
2011-05-20 04:58:35 +02:00
|
|
|
#define DEFAULT_CLASS_MANUFACTURING_VALUE 0xFF
|
|
|
|
#define DEFAULT_CLASS_STANDARD_VALUE 0x0
|
|
|
|
|
2010-02-11 02:59:35 +01:00
|
|
|
//
|
|
|
|
// Number of name in Name/Value storage
|
|
|
|
//
|
|
|
|
#define NAME_VALUE_NAME_NUMBER 3
|
|
|
|
|
2008-12-16 16:34:21 +01:00
|
|
|
#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')
|
2008-10-31 05:36:53 +01:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINTN Signature;
|
|
|
|
|
|
|
|
EFI_HANDLE DriverHandle[2];
|
|
|
|
EFI_HII_HANDLE HiiHandle[2];
|
|
|
|
DRIVER_SAMPLE_CONFIGURATION Configuration;
|
2011-08-30 14:39:53 +02:00
|
|
|
MY_EFI_VARSTORE_DATA VarStoreConfig;
|
2008-10-31 05:36:53 +01:00
|
|
|
UINT8 PasswordState;
|
|
|
|
|
2010-02-11 02:59:35 +01:00
|
|
|
//
|
|
|
|
// Name/Value storage Name list
|
|
|
|
//
|
|
|
|
EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER];
|
|
|
|
EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER];
|
|
|
|
|
2008-10-31 05:36:53 +01:00
|
|
|
//
|
|
|
|
// 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)
|
|
|
|
|
2009-04-02 10:48:03 +02:00
|
|
|
#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()
|
|
|
|
|
2008-10-31 05:36:53 +01:00
|
|
|
#endif
|