From c7cbcc52d69e0d8f015ff5b95ebf39b7355e0719 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Thu, 13 Jul 2006 04:49:20 +0000 Subject: [PATCH] Move DriverSample module to Universal\UserInterface\ direcotry. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@947 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Dxe/DriverSample/DriverSample.c | 631 ------------------ .../Dxe/DriverSample/DriverSample.h | 60 -- .../Dxe/DriverSample/DriverSample.msa | 121 ---- .../Dxe/DriverSample/Inventory.vfr | 123 ---- .../Dxe/DriverSample/InventoryStrings.uni | Bin 8302 -> 0 bytes .../Dxe/DriverSample/NVDataStruc.h | 62 -- .../SetupBrowser/Dxe/DriverSample/Vfr.vfr | 622 ----------------- .../Dxe/DriverSample/VfrStrings.uni | Bin 35590 -> 0 bytes 8 files changed, 1619 deletions(-) delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.c delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.h delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.msa delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Inventory.vfr delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/InventoryStrings.uni delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/NVDataStruc.h delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Vfr.vfr delete mode 100644 EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/VfrStrings.uni diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.c deleted file mode 100644 index 5f3823c612..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.c +++ /dev/null @@ -1,631 +0,0 @@ -/*++ -Copyright (c) 2006, 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.c - -Abstract: - - This is an example of how a driver might export data to the HII protocol to be - later utilized by the Setup Protocol - ---*/ - -#include "DriverSample.h" - -#define DISPLAY_ONLY_MY_ITEM 0x0001 - -#define STRING_PACK_GUID \ - { \ - 0x8160a85f, 0x934d, 0x468b, { 0xa2, 0x35, 0x72, 0x89, 0x59, 0x14, 0xf6, 0xfc } \ - } - -EFI_GUID mFormSetGuid = FORMSET_GUID; -EFI_GUID mStringPackGuid = STRING_PACK_GUID; - -EFI_STATUS -EFIAPI -DriverCallback ( - IN EFI_FORM_CALLBACK_PROTOCOL *This, - IN UINT16 KeyValue, - IN EFI_IFR_DATA_ARRAY *Data, - OUT EFI_HII_CALLBACK_PACKET **Packet - ) -/*++ - -Routine Description: - - This is the function that is called to provide results data to the driver. This data - consists of a unique key which is used to identify what data is either being passed back - or being asked for. - -Arguments: - - KeyValue - A unique value which is sent to the original exporting driver so that it - can identify the type of data to expect. The format of the data tends to - vary based on the op-code that geerated the callback. - - Data - A pointer to the data being sent to the original exporting driver. - -Returns: - ---*/ -{ - EFI_CALLBACK_INFO *Private; - EFI_HII_UPDATE_DATA *UpdateData; - EFI_STATUS Status; - UINT8 *Location; - EFI_HII_CALLBACK_PACKET *DataPacket; - UINT16 Value; - CHAR16 VariableName[40]; - STATIC UINT16 QuestionId = 0; - IFR_OPTION *OptionList; - UINTN Index; - MyIfrNVData NVStruc; - - Private = EFI_CALLBACK_INFO_FROM_THIS (This); - - // - // This should tell me the first offset AFTER the end of the compiled NV map - // If op-code results are not going to be saved to NV locations ensure the QuestionId - // is beyond the end of the NVRAM mapping. - // - if (QuestionId == 0) { - QuestionId = sizeof (MyIfrNVData); - } - - ZeroMem (VariableName, (sizeof (CHAR16) * 40)); - - switch (KeyValue) { - case 0x0001: - // - // Create a small boot order list - // - QuestionId = (UINT16) ((UINTN) (&NVStruc.BootOrder) - (UINTN) (&NVStruc)); - - // - // Need some memory for OptionList. Allow for up to 8 options. - // - OptionList = AllocateZeroPool (sizeof (IFR_OPTION) * 8); - - // - // Allocate space for creation of Buffer - // - UpdateData = AllocateZeroPool (0x1000); - - // - // Remove all the op-codes starting with Label 0x2222 to next Label (second label is for convenience - // so we don't have to keep track of how many op-codes we added or subtracted. The rules for removal - // of op-codes are simply that the removal will always stop as soon as a label or the end of a form is - // encountered. Therefore, giving a large obnoxious count such as below takes care of other complexities. - // - UpdateData->DataCount = 0xFF; - - // - // Delete set of op-codes - // - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x2222, - FALSE, // If we aren't adding, we are deleting - UpdateData - ); - - // - // Create 3 options - // - for (Index = 0; Index < 3; Index++) { - OptionList[Index].StringToken = (UINT16) (STR_BOOT_OPTION1 + Index); - OptionList[Index].Value = (UINT16) (Index + 1); - OptionList[Index].Flags = RESET_REQUIRED; - } - - CreateOrderedListOpCode ( - QuestionId, // Question ID - 8, // Max Entries - (UINT16) STRING_TOKEN (STR_BOOT_OPTIONS), // Token value for the Prompt - (UINT16) STRING_TOKEN (STR_NULL_STRING), // Token value for the Help - OptionList, - 3, - &UpdateData->Data // Buffer location to place op-codes - ); - - // - // For one-of/ordered lists commands, they really consist of 2 op-codes (a header and a footer) - // Each option within a one-of/ordered list is also an op-code - // So this example has 5 op-codes it is adding since we have a one-of header + 3 options + one-of footer - // - UpdateData->DataCount = 0x5; - - // - // Add one op-code - // - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x2222, - TRUE, - UpdateData - ); - - gBS->FreePool (UpdateData); - gBS->FreePool (OptionList); - break; - - case 0x0002: - // - // Create a large boot order list - // - QuestionId = (UINT16) ((UINTN) (&NVStruc.BootOrder) - (UINTN) (&NVStruc)); - - // - // Need some memory for OptionList. Allow for up to 8 options. - // - OptionList = AllocateZeroPool (sizeof (IFR_OPTION) * 8); - - // - // Allocate space for creation of Buffer - // - UpdateData = AllocateZeroPool (0x1000); - - // - // Remove all the op-codes starting with Label 0x2222 to next Label (second label is for convenience - // so we don't have to keep track of how many op-codes we added or subtracted - // - UpdateData->DataCount = 0xFF; - - // - // Delete one op-code - // - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x2222, - FALSE, - UpdateData - ); - - // - // Create 4 options - // - for (Index = 0; Index < 4; Index++) { - OptionList[Index].StringToken = (UINT16) (STR_BOOT_OPTION1 + Index); - OptionList[Index].Value = (UINT16) (Index + 1); - OptionList[Index].Flags = RESET_REQUIRED; - } - - CreateOrderedListOpCode ( - QuestionId, // Question ID - 8, // Max Entries - (UINT16) STRING_TOKEN (STR_BOOT_OPTIONS), // Token value for the Prompt - (UINT16) STRING_TOKEN (STR_NULL_STRING), // Token value for the Help - OptionList, - 4, - &UpdateData->Data // Buffer location to place op-codes - ); - - // - // For one-of commands, they really consist of 2 op-codes (a header and a footer) - // Each option within a one-of is also an op-code - // So this example has 6 op-codes it is adding since we have a one-of header + 4 options + one-of footer - // - UpdateData->DataCount = 0x6; - - // - // Add one op-code - // - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x2222, - TRUE, - UpdateData - ); - - gBS->FreePool (UpdateData); - gBS->FreePool (OptionList); - break; - - case 0x1234: - // - // Allocate space for creation of Buffer - // - QuestionId = (UINT16) ((UINTN) (&NVStruc.DynamicCheck)); - Status = gBS->AllocatePool ( - EfiBootServicesData, - 0x1000, - (VOID **) &UpdateData - ); - - ZeroMem (UpdateData, 0x1000); - - Location = (UINT8 *) &UpdateData->Data; - - UpdateData->FormSetUpdate = TRUE; - UpdateData->FormCallbackHandle = (EFI_PHYSICAL_ADDRESS) (UINTN) Private->CallbackHandle; - UpdateData->FormUpdate = FALSE; - UpdateData->FormTitle = 0; - UpdateData->DataCount = 2; - - CreateGotoOpCode ( - 1, - STR_GOTO_FORM1, // Token value for the Prompt - 0, // Goto Help - 0, // Flags - 0, // Key - &UpdateData->Data // Buffer location to place op-codes - ); - - Location = Location + ((EFI_IFR_OP_HEADER *) &UpdateData->Data)->Length; - - CreateCheckBoxOpCode ( - QuestionId, // Question ID - 1, // Data width (BOOLEAN = 1) - (UINT16) STRING_TOKEN (STR_CHECK_DYNAMIC_PROMPT), // Token value for the Prompt - (UINT16) STRING_TOKEN (STR_CHECK_DYNAMIC_HELP), // Token value for the Help - EFI_IFR_FLAG_INTERACTIVE, // Flags - 0x1236, // Key - Location // Buffer location to place op-codes - ); - - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x1234, - TRUE, - UpdateData - ); - - gBS->FreePool (UpdateData); - QuestionId++; - break; - - case 0x1235: - // - // Allocate space for creation of Buffer - // - Status = gBS->AllocatePool ( - EfiBootServicesData, - 0x1000, - (VOID **)&UpdateData - ); - - ZeroMem (UpdateData, 0x1000); - - // - // Initialize DataPacket with information intended to remove all - // previously created op-codes in the dynamic page - // - UpdateData->FormSetUpdate = FALSE; - UpdateData->FormCallbackHandle = 0; - UpdateData->FormUpdate = FALSE; - UpdateData->FormTitle = 0; - // - // Unlikely to be more than 0xff op-codes in the dynamic page to remove - // - UpdateData->DataCount = 0xff; - UpdateData->Data = NULL; - - // - // Remove all op-codes from dynamic page - // - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x1234, // Label 0x1234 - FALSE, // Remove Op-codes (will never remove form/endform) - UpdateData // Significant value is UpdateData->DataCount - ); - - UpdateData->FormSetUpdate = FALSE; - UpdateData->FormCallbackHandle = 0; - UpdateData->FormUpdate = FALSE; - UpdateData->FormTitle = 0; - UpdateData->DataCount = 1; - - CreateGotoOpCode ( - 1, - STR_GOTO_FORM1, // Token value for the Prompt - 0, // Goto Help - 0, // Flags - 0, // Key - &UpdateData->Data // Buffer location to place op-codes - ); - - Private->Hii->UpdateForm ( - Private->Hii, - Private->RegisteredHandle, - (EFI_FORM_LABEL) 0x1234, - TRUE, - UpdateData - ); - - gBS->FreePool (UpdateData); - break; - - case 0x1236: - // - // If I hit the checkbox, I enter this case statement... - // - // - // Since I am returning an error (for test purposes) I need to pass in the string for the error - // I will allocate space for the return value. If an error occurs (which is the case) I can simply return - // an error and fill in the string parameter, otherwise, I will return information in the DataArray structure. - // The browser will free this packet structure - // - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_HII_CALLBACK_PACKET) + sizeof (SAMPLE_STRING) + 2, - (VOID **) Packet - ); - - ZeroMem (*Packet, sizeof (EFI_HII_CALLBACK_PACKET) + sizeof (SAMPLE_STRING) + 2); - - // - // Assign the buffer address to DataPacket - // - DataPacket = *Packet; - - StrCpy (DataPacket->String, (CHAR16 *) SAMPLE_STRING); - return EFI_DEVICE_ERROR; - - case 0x1237: - - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_HII_CALLBACK_PACKET) + 2, - (VOID **) Packet - ); - - ZeroMem (*Packet, sizeof (EFI_HII_CALLBACK_PACKET) + 2); - - // - // Assign the buffer address to DataPacket - // - DataPacket = *Packet; - - DataPacket->DataArray.EntryCount = 1; - DataPacket->DataArray.NvRamMap = NULL; - ((EFI_IFR_DATA_ENTRY *) (&DataPacket->DataArray + 1))->Flags = EXIT_REQUIRED; - break; - - case 0x1555: - Value = 0x0001; - UnicodeSPrint (VariableName, 0x80, (CHAR16 *) L"%d", VAR_EQ_TEST_NAME); - - Status = gRT->SetVariable ( - VariableName, - &mFormSetGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - 2, - (VOID *) &Value - ); - break; - - case 0x1556: - Value = 0x1000; - UnicodeSPrint (VariableName, 0x80, (CHAR16 *) L"%d", VAR_EQ_TEST_NAME); - - Status = gRT->SetVariable ( - VariableName, - &mFormSetGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - 2, - (VOID *) &Value - ); - break; - - case 0x1557: - Value = 0x0000; - UnicodeSPrint (VariableName, 0x80, (CHAR16 *) L"%d", VAR_EQ_TEST_NAME); - - Status = gRT->SetVariable ( - VariableName, - &mFormSetGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - 2, - (VOID *) &Value - ); - break; - - default: - break; - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EFIAPI -DriverSampleInit ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - EFI_HII_PROTOCOL *Hii; - // - // EFI_FORM_BROWSER_PROTOCOL *FormConfig; - // - EFI_HII_PACKAGES *PackageList; - EFI_HII_HANDLE HiiHandle; - STRING_REF TokenToUpdate; - STRING_REF TokenToUpdate2; - STRING_REF TokenToUpdate3; - CHAR16 *NewString; - EFI_HII_UPDATE_DATA *UpdateData; - EFI_CALLBACK_INFO *CallbackInfo; - EFI_HANDLE Handle; - EFI_SCREEN_DESCRIPTOR Screen; - - ZeroMem (&Screen, sizeof (EFI_SCREEN_DESCRIPTOR)); - - gST->ConOut->QueryMode (gST->ConOut, gST->ConOut->Mode->Mode, &Screen.RightColumn, &Screen.BottomRow); - - // - // Remove 3 characters from top and bottom - // - Screen.TopRow = 3; - Screen.BottomRow = Screen.BottomRow - 3; - - // - // There should only be one HII protocol - // - Status = gBS->LocateProtocol ( - &gEfiHiiProtocolGuid, - NULL, - (VOID **) &Hii - ); - if (EFI_ERROR (Status)) { - return Status;; - } - - /* - // - // There should only be one Form Configuration protocol - // - Status = gBS->LocateProtocol ( - &gEfiFormBrowserProtocolGuid, - NULL, - &FormConfig - ); - if (EFI_ERROR (Status)) { - return Status;; - } -*/ - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_CALLBACK_INFO), - (VOID **) &CallbackInfo - ); - if (EFI_ERROR (Status)) { - return Status; - } - - CallbackInfo->Signature = EFI_CALLBACK_INFO_SIGNATURE; - CallbackInfo->Hii = Hii; - - // - // This example does not implement worker functions for the NV accessor functions. Only a callback evaluator - // - CallbackInfo->DriverCallback.NvRead = NULL; - CallbackInfo->DriverCallback.NvWrite = NULL; - CallbackInfo->DriverCallback.Callback = DriverCallback; - - // - // Install protocol interface - // - Handle = NULL; - Status = gBS->InstallProtocolInterface ( - &Handle, - &gEfiFormCallbackProtocolGuid, - EFI_NATIVE_INTERFACE, - &CallbackInfo->DriverCallback - ); - - ASSERT_EFI_ERROR (Status); - - CallbackInfo->CallbackHandle = Handle; - - PackageList = PreparePackages (1, &mStringPackGuid, DriverSampleStrings); - Status = Hii->NewPack (Hii, PackageList, &HiiHandle); - gBS->FreePool (PackageList); - - PackageList = PreparePackages (1, &mStringPackGuid, InventoryBin); - Status = Hii->NewPack (Hii, PackageList, &HiiHandle); - gBS->FreePool (PackageList); - - PackageList = PreparePackages (1, &mStringPackGuid, VfrBin); - Status = Hii->NewPack (Hii, PackageList, &HiiHandle); - gBS->FreePool (PackageList); - - CallbackInfo->RegisteredHandle = HiiHandle; - - // - // Very simple example of how one would update a string that is already - // in the HII database - // - TokenToUpdate = (STRING_REF) STR_CPU_STRING2; - NewString = (CHAR16 *) L"700 Mhz"; - - Hii->NewString (Hii, NULL, HiiHandle, &TokenToUpdate, NewString); - - // - // Add a string - if 0 will be updated with new Token number - // - TokenToUpdate = (STRING_REF) 0; - - // - // Add a string - if 0 will be updated with new Token number - // - TokenToUpdate2 = (STRING_REF) 0; - - // - // Add a string - if 0 will be updated with new Token number - // - TokenToUpdate3 = (STRING_REF) 0; - - Hii->NewString (Hii, NULL, HiiHandle, &TokenToUpdate, (CHAR16 *) L"Desired Speed"); - Hii->NewString (Hii, NULL, HiiHandle, &TokenToUpdate2, (CHAR16 *) L"5 Thz"); - Hii->NewString (Hii, NULL, HiiHandle, &TokenToUpdate3, (CHAR16 *) L"This is next year's desired speed - right?"); - - // - // Allocate space for creation of Buffer - // - Status = gBS->AllocatePool ( - EfiBootServicesData, - 0x1000, - (VOID **) &UpdateData - ); - - ZeroMem (UpdateData, 0x1000); - - // - // Flag update pending in FormSet - // - UpdateData->FormSetUpdate = TRUE; - // - // Register CallbackHandle data for FormSet - // - UpdateData->FormCallbackHandle = (EFI_PHYSICAL_ADDRESS) (UINTN) CallbackInfo->CallbackHandle; - UpdateData->FormUpdate = FALSE; - UpdateData->FormTitle = 0; - UpdateData->DataCount = 1; - - CreateTextOpCode (TokenToUpdate, TokenToUpdate2, TokenToUpdate3, 0, 0, &UpdateData->Data); - - Hii->UpdateForm (Hii, HiiHandle, (EFI_FORM_LABEL) 100, TRUE, UpdateData); - - gBS->FreePool (UpdateData); - - // - // Example of how to display only the item we sent to HII - // - if (DISPLAY_ONLY_MY_ITEM == 0x0001) { - // - // Have the browser pull out our copy of the data, and only display our data - // - // Status = FormConfig->SendForm (FormConfig, TRUE, HiiHandle, NULL, NULL, NULL, &Screen, NULL); - // - } else { - // - // Have the browser pull out all the data in the HII Database and display it. - // - // Status = FormConfig->SendForm (FormConfig, TRUE, 0, NULL, NULL, NULL, NULL, NULL); - // - } - - if (EFI_ERROR (Status)) { - return Status; - } - - return EFI_SUCCESS; -} diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.h b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.h deleted file mode 100644 index b1534e8dc6..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.h +++ /dev/null @@ -1,60 +0,0 @@ -/*++ - -Copyright (c) 2006, 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 "NVDataStruc.h" - -// -// This is the generated header file which includes whatever needs to be exported (strings + IFR) -// -#include "DriverSampleStrDefs.h" - -extern UINT8 VfrBin[]; -// -// extern UINT8 VfrStringsStr[]; -// -extern UINT8 InventoryBin[]; -// -// extern UINT8 InventoryStringsStr[]; -// -extern UINT8 DriverSampleStrings[]; - -#define SAMPLE_STRING L"This is an error!" - -#define EFI_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('C', 'l', 'b', 'k') - -typedef struct { - UINTN Signature; - EFI_HANDLE CallbackHandle; - EFI_FORM_CALLBACK_PROTOCOL DriverCallback; - UINT16 *KeyList; - VOID *FormBuffer; - EFI_HII_HANDLE RegisteredHandle; - EFI_HII_PROTOCOL *Hii; -} EFI_CALLBACK_INFO; - -#define EFI_CALLBACK_INFO_FROM_THIS(a) CR (a, EFI_CALLBACK_INFO, DriverCallback, EFI_CALLBACK_INFO_SIGNATURE) - -#endif diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.msa b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.msa deleted file mode 100644 index 49a6282981..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/DriverSample.msa +++ /dev/null @@ -1,121 +0,0 @@ - - - - - DriverSample - DXE_DRIVER - FE3542FE-C1D3-4EF8-657C-8048606FF670 - 1.0 - Component description file for DriverSample module. - This is an example driver to introduce how to export data to the HII protocol to be later utilized by the Setup Protocol. - Copyright (c) 2006, 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. - FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 - - - IA32 X64 IPF EBC - false - DriverSample - - - - UefiBootServicesTableLib - - - UefiRuntimeServicesTableLib - - - DebugLib - - - UefiDriverEntryPoint - - - UefiLib - - - BaseLib - - - PrintLib - - - EdkGraphicsLib - - - EdkIfrSupportLib - - - BaseMemoryLib - - - MemoryAllocationLib - - - HiiLib - - - - InventoryStrings.uni - Inventory.vfr - VfrStrings.uni - Vfr.vfr - DriverSample.c - NVDataStruc.h - DriverSample.h - - - - - - - - gEfiHiiProtocolGuid - - - gEfiUgaDrawProtocolGuid - - - gEfiOEMBadgingProtocolGuid - - - gEfiFirmwareVolumeProtocolGuid - - - gEfiConsoleControlProtocolGuid - - - gEfiFormCallbackProtocolGuid - - - - - 0x0032 0x0035 - g25Guid - - - - - gEfiGlobalVariableGuid - - - - EFI_SPECIFICATION_VERSION 0x00020000 - EDK_RELEASE_VERSION 0x00020000 - - DriverSampleInit - - - \ No newline at end of file diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Inventory.vfr b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Inventory.vfr deleted file mode 100644 index ff8a6aacb1..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Inventory.vfr +++ /dev/null @@ -1,123 +0,0 @@ -// *++ -// -// Copyright (c) 2006, 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: -// -// Inventory.vfr -// -// Abstract: -// -// Sample Inventory Data. -// -// Revision History: -// -// --*/ - -#include "DriverSampleStrDefs.h" - -#define INVENTORY_GUID { 0xb3f56470, 0x6141, 0x4621, { 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 } } - -formset - guid = INVENTORY_GUID, - title = STRING_TOKEN(STR_INV_FORM_SET_TITLE), - help = STRING_TOKEN(STR_INV_FORM_SET_HELP), - class = 0x04, - subclass = 0x03, - - form formid = 1, - title = STRING_TOKEN(STR_INV_FORM1_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - text - help = STRING_TOKEN(STR_INV_VERSION_HELP), - text = STRING_TOKEN(STR_INV_VERSION_TEXT), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT2), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT3), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT4), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - subtitle text = STRING_TOKEN(STR_INV_EMPTY_STRING); - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT5), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT6), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT7), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT8), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT9), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT10), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_INV_EMPTY_STRING), - text = STRING_TOKEN(STR_INV_VERSION_TEXT11), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), - flags = 0, - key = 0; - - subtitle text = STRING_TOKEN(STR_INV_EMPTY_STRING); - - subtitle text = STRING_TOKEN(STR_INV_VERSION_TEXT12); - - endform; - -endformset; diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/InventoryStrings.uni b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/InventoryStrings.uni deleted file mode 100644 index 4946b4ae6130097afb7319b344cf0220912db644..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8302 zcmd^^-%cAx6voeWrM|-oZrZd!fIw-aUhu~xR$^ljLz=4!FeYvQN4A0RQhldBLSL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=!YI z^|8jusO(*5Y{?l~UQ8|CmbVv6pCpVU`F5;DdDY4xJ8~Y@^u9d%MYcsN;yG3#A#&HS z`tp;t<=e3q=XLRccrCNr(|Opb{lN%pu)Ja~n8gz7zNeZOM`JF|bKZ__l>O>lM*kn` z+)@9WZ1U7OuFj^vxW&#-h0F1Ajp9qzP-6x4!O!W#e_d7n3CsGaT1N3T4Z8|s#{WwE E3ppGb!vFvP diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/NVDataStruc.h b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/NVDataStruc.h deleted file mode 100644 index 01369ebbf0..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/NVDataStruc.h +++ /dev/null @@ -1,62 +0,0 @@ -/*++ - -Copyright (c) 2006, 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: - - NVDataStruc.h - -Abstract: - - NVData structure used by the sample driver - -Revision History: - ---*/ - -#ifndef _NVDATASTRUC_H -#define _NVDATASTRUC_H - -#define FORMSET_GUID \ - { \ - 0xA04A27f4, 0xDF00, 0x4D42, { 0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D } \ - } - -#define INVENTORY_GUID \ - { \ - 0xb3f56470, 0x6141, 0x4621, { 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 } \ - } - -#define VAR_EQ_TEST_NAME 0x100 - -#pragma pack(1) -typedef struct { - UINT16 WhatIsThePassword[20]; - UINT16 WhatIsThePassword2[20]; - UINT16 MyStringData[20]; - UINT16 SomethingHiddenForHtml; - UINT8 HowOldAreYouInYearsManual; - UINT16 HowTallAreYouManual; - UINT8 HowOldAreYouInYears; - UINT16 HowTallAreYou; - UINT8 MyFavoriteNumber; - UINT8 TestLateCheck; - UINT8 TestLateCheck2; - UINT8 QuestionAboutTreeHugging; - UINT8 ChooseToActivateNuclearWeaponry; - UINT8 SuppressGrayOutSomething; - UINT8 OrderedList[8]; - UINT8 BootOrder[8]; - UINT8 BootOrderLarge; - UINT8 DynamicCheck; -} MyIfrNVData; -#pragma pack() - -#endif diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Vfr.vfr b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Vfr.vfr deleted file mode 100644 index 6509a66b76..0000000000 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/Vfr.vfr +++ /dev/null @@ -1,622 +0,0 @@ -// *++ -// -// Copyright (c) 2006, 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: -// -// Vfr.vfr -// -// Abstract: -// -// Sample Setup formset -// -// Revision History: -// -// --*/ - - -#include "DriverSampleStrDefs.h" - -#include "NVDataStruc.h" - - -typedef struct { - UINT8 Field8; - UINT16 Field16; - UINT8 OrderedList[3]; -} MyIfrNVData2; - -typedef struct { - UINT8 Field8; - UINT16 Field16; - UINT8 OrderedList[3]; -} MyIfrNVData3; - -#define MY_TEXT_KEY 0x100 - -#define LABEL_1_VALUE 0x01 -#define LABEL_2_VALUE 0x1000 -#define LABEL_UPDATE_BBS 0x2222 -#define LABEL_END_UPDATE_BBS 0x2223 - -formset - guid = FORMSET_GUID, - title = STRING_TOKEN(STR_FORM_SET_TITLE), - help = STRING_TOKEN(STR_FORM_SET_TITLE_HELP), - class = 0x10, - subclass = 0, - - varstore MyIfrNVData2, key = 0x1234, name = MY_DATA2, guid = FORMSET_GUID; - - - varstore MyIfrNVData3, key = 0x4321, name = MY_DATA3, guid = FORMSET_GUID; - - form formid = 1, - title = STRING_TOKEN(STR_FORM1_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT); - - subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2); - - banner - title = STRING_TOKEN(STR_BANNER_TITLE), - line 1, - align center; - - banner - title = STRING_TOKEN(STR_BANNER_TITLE), - line 2, - align left; - - banner - title = STRING_TOKEN(STR_BANNER_TITLE), - line 2, - align right; - - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_CPU_STRING), - text = STRING_TOKEN(STR_CPU_STRING2), - flags = 0, - key = 0; - - text - help = STRING_TOKEN(STR_EXIT_TEXT), - text = STRING_TOKEN(STR_EXIT_TEXT), - text = STRING_TOKEN(STR_EXIT_TEXT), - flags = INTERACTIVE, - key = 0x1237; - - oneof varid = MyIfrNVData.SuppressGrayOutSomething, - prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), - help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT4), value = 0x0, flags = 0; - option text = STRING_TOKEN(STR_ONE_OF_TEXT5), value = 0x1, flags = 0; - option text = STRING_TOKEN(STR_ONE_OF_TEXT6), value = 0x2, flags = DEFAULT; - endoneof; - - oneof varid = MyIfrNVData.BootOrderLarge, - prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), - help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = INTERACTIVE, key = 1; - option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = INTERACTIVE | DEFAULT, key = 2; - endoneof; - - grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1; - suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0; - label 0; - checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, - prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), - help = STRING_TOKEN(STR_CHECK_BOX_HELP), - flags = 1, // Flags behavior for checkbox is overloaded so that it equals a DEFAULT value. 1 = ON, 0 = off - key = 0, - endcheckbox; - endif; - - - // - // Ordered list: - // sizeof(MyIfrNVData) storage must be UINT8 array, and - // size written for the variable must be size of the entire - // variable. - // - // - suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0; - label LABEL_UPDATE_BBS; - orderedlist - varid = MyIfrNVData.BootOrder, - prompt = STRING_TOKEN(STR_BOOT_OPTIONS), - help = STRING_TOKEN(STR_NULL_STRING), - option text = STRING_TOKEN(STR_BOOT_OPTION2), value = 2, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_BOOT_OPTION1), value = 1, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_BOOT_OPTION3), value = 3, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_BOOT_OPTION4), value = 4, flags = RESET_REQUIRED; - endlist; - label LABEL_END_UPDATE_BBS; - endif; - - suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x2; - orderedlist - varid = MyIfrNVData.OrderedList, - prompt = STRING_TOKEN(STR_TEST_OPCODE), - help = STRING_TOKEN(STR_TEXT_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 4, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 3, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 2, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_TEXT_HELP), value = 1, flags = RESET_REQUIRED; - endlist; - endif; - - label 100; - - goto 0x1234, - prompt = STRING_TOKEN(STR_GOTO_DYNAMIC), - help = STRING_TOKEN(STR_GOTO_HELP), - flags = INTERACTIVE, - key = 0x1234; - - goto 0x1234, - prompt = STRING_TOKEN(STR_GOTO_DYNAMIC2), - help = STRING_TOKEN(STR_GOTO_HELP), - flags = INTERACTIVE, - key = 0x1235; - - // - // VARSTORE tests - // - // Till now, been using variable NvData (must be reserved) - // now we do a varselect for variable NvData3 - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqid MyIfrNVData3.Field16 == MyIfrNVData3.Field16 - endif; - // now we do a varselect_pair for variable NvData2 and NvData3 - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqid MyIfrNVData2.Field16 == MyIfrNVData3.Field16 - endif; - - - // now we do a varselect_pair for variable NvData and NvData2 -// inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), -// ideqid MyIfrNVData2.Field16 == MyIfrNVData.TestLateCheck -// endif; - - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqid MyIfrNVData.TestLateCheck == MyIfrNVData.TestLateCheck2 - endif; - - oneof varid = MyIfrNVData.TestLateCheck, - prompt = STRING_TOKEN(STR_TEST_OPCODE), - help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED; - endoneof; - - oneof varid = MyIfrNVData.TestLateCheck2, - prompt = STRING_TOKEN(STR_TEST_OPCODE2), - help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | RESET_REQUIRED; - - endoneof; - - oneof varid = MyIfrNVData.QuestionAboutTreeHugging, - prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), - help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 0x03, flags = RESET_REQUIRED; - - endoneof; - - string varid = MyIfrNVData.MyStringData, - prompt = STRING_TOKEN(STR_MY_STRING_PROMPT2), - help = STRING_TOKEN(STR_MY_STRING_HELP2), - flags = INTERACTIVE, - key = 0x1234, - minsize = 6, - maxsize = 0x14, - endstring; - - text - help = STRING_TOKEN(STR_GRAYOUT_TEST), - text = STRING_TOKEN(STR_GRAYOUT_TEST), - text = STRING_TOKEN(STR_GRAYOUT_TEST), - flags = INTERACTIVE, - key = 0x1555; - - text - help = STRING_TOKEN(STR_SUPPRESS_TEST), - text = STRING_TOKEN(STR_SUPPRESS_TEST), - text = STRING_TOKEN(STR_SUPPRESS_TEST), - flags = INTERACTIVE, - key = 0x1556; - - text - help = STRING_TOKEN(STR_CLEAR_TEST), - text = STRING_TOKEN(STR_CLEAR_TEST), - text = STRING_TOKEN(STR_CLEAR_TEST), - flags = INTERACTIVE, - key = 0x1557; - - grayoutif vareqval var(VAR_EQ_TEST_NAME) == 0x1; - suppressif vareqval var(VAR_EQ_TEST_NAME) == 0x1000; - label 30; - checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, - prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), - help = STRING_TOKEN(STR_CHECK_BOX_HELP), - flags = 1, - key = 0, - endcheckbox; - endif; - - - numeric varid = MyIfrNVData.HowOldAreYouInYearsManual, - prompt = STRING_TOKEN(STR_NUMERIC_MANUAL_PROMPT), - help = STRING_TOKEN(STR_NUMERIC_HELP0), - minimum = 0, - maximum = 0xf0, // 0xf0 = 240 in decimal - step = 0, // Stepping of 0 equates to a manual entering - // of a value, otherwise it will auto-increment - // with a left/right arrow - default = 21, - - endnumeric; - - numeric varid = MyIfrNVData.HowTallAreYouManual, - prompt = STRING_TOKEN(STR_TALL_MANUAL_PROMPT), - help = STRING_TOKEN(STR_NUMERIC_HELP1), - minimum = 0, - maximum = 300, - step = 0, // Stepping of 0 equates to a manual entering - // of a value, otherwise it will auto-increment - // with a left/right arrow - default = 175, - - endnumeric; - - inventory - help = STRING_TOKEN(STR_INVENTORY_HELP), - text = STRING_TOKEN(STR_INVENTORY_TEXT1), - text = STRING_TOKEN(STR_INVENTORY_TEXT2); - - - restore defaults, - formid = 4, - prompt = STRING_TOKEN(STR_RESTORE_DEFAULTS_PROMPT), - help = STRING_TOKEN(STR_RESTORE_DEFAULTS_HELP), - flags = 0, - key = 0; - - save defaults, - formid = 4, - prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT), - help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP), - flags = 0, - key = 0; - - // - // Case with no flags or key - // - save defaults, - formid = 4, - prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT), - help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP); - // - // Case with no key - // - save defaults, - formid = 4, - prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT), - help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP), - flags = 0; - // - // Case with no flags - // - save defaults, - formid = 4, - prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT), - help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP), - key = 0; - - label LABEL_2_VALUE; - - grayoutif ideqval MyIfrNVData.HowOldAreYouInYearsManual == 23 AND ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1; - numeric varid = MyIfrNVData.HowOldAreYouInYears, - prompt = STRING_TOKEN(STR_NUMERIC_PROMPT), - help = STRING_TOKEN(STR_NUMERIC_HELP2), - minimum = 0, - maximum = 243, - step = 3, - default = 18, - - endnumeric; - - label LABEL_1_VALUE; - - // - // Numeric with no step or default specified - // - numeric varid = MyIfrNVData.HowTallAreYou, - prompt = STRING_TOKEN(STR_NUMERIC_PROMPT1), - help = STRING_TOKEN(STR_NUMERIC_HELP3), - minimum = 0, - maximum = 190, - // step = 1, // Stepping of 1 if not specified - // default = minimum; // if not specified - endnumeric; - endif; - - string varid = MyIfrNVData.MyStringData, - prompt = STRING_TOKEN(STR_MY_STRING_PROMPT), - help = STRING_TOKEN(STR_MY_STRING_HELP), - minsize = 6, - maxsize = 0x14, - endstring; - - password varid = MyIfrNVData.WhatIsThePassword, - prompt = STRING_TOKEN(STR_PASSWORD_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - minsize = 6, - maxsize = 20, // new opcode - encoding = 1, - endpassword; - password varid = MyIfrNVData.WhatIsThePassword2, - prompt = STRING_TOKEN(STR_PASSWORD_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - minsize = 6, - maxsize = 20, // new opcode - encoding = 1, - endpassword; - // - // Test with flags and key fields - // - password varid = MyIfrNVData.WhatIsThePassword, - prompt = STRING_TOKEN(STR_PASSWORD_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - flags = INTERACTIVE, - key = 0x2000, - minsize = 6, - maxsize = 20, // new opcode - encoding = 1, - endpassword; - - goto 2, - prompt = STRING_TOKEN(STR_GOTO_FORM2), //SecondSetupPage // this too has no end-op and basically it's a jump to a form ONLY - help = STRING_TOKEN(STR_GOTO_HELP); - - goto 3, - prompt = STRING_TOKEN(STR_GOTO_FORM3), //ThirdSetupPage // this too has no end-op and basically it's a jump to a form ONLY - help = STRING_TOKEN(STR_GOTO_HELP); - - endform; - - form formid = 2, // SecondSetupPage, - title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - - date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_YEAR_HELP), - minimum = 1998, - maximum = 2099, - step = 1, - default = 2004, - - month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_MONTH_HELP), - minimum = 1, - maximum = 12, - step = 1, - default = 1, - - day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_DAY_HELP), - minimum = 1, - maximum = 31, - step = 0x1, - default = 1, - - enddate; - - time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HOUR_HELP), - minimum = 0, - maximum = 23, - step = 1, - default = 0, - - minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_MINUTE_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_SECOND_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - endtime; - - date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_YEAR_HELP), - minimum = 1939, - maximum = 2101, - step = 1, - default = 1964, - - month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_MONTH_HELP), - minimum = 1, - maximum = 12, - step = 1, - default = 1, - - day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_DAY_HELP), - minimum = 1, - maximum = 31, - step = 0x1, - default = 1, - - enddate; - - time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HOUR_HELP), - minimum = 0, - maximum = 23, - step = 1, - default = 0, - - minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_MINUTE_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_SECOND_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - endtime; - - grayoutif - ideqval Date.Day == 21 - AND - ideqval Date.Month == 8; - - hidden value = 32, key = 0x7777; - - endif; // grayoutif - - suppressif - ideqval Date.Day == 8 - AND - ideqval Date.Month == 21; - - hidden value = 32, key = 0x7777; - - endif; // suppressif - - - hidden value = 32, key = 0x1234; - - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval MyIfrNVData.HowOldAreYouInYearsManual == 4 - endif; - - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 2 3 4 - endif; - - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyIfrNVData.MyFavoriteNumber - endif; - -// grayoutif -// -// If the day is 31 AND months is any of the following 2, 4, 6, 9, 11 -// - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 31 - AND - ideqvallist Date.Month == 2 4 6 9 11 - endif; - -// -// If the day is 30 AND month is 2 -// - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 30 - AND - ideqval Date.Month == 2 - endif; - -// -// If the day is 29 AND month is 2 AND it year is NOT a leapyear -// - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 0x1D - AND - ideqval Date.Month == 2 - AND - NOT - ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036 - endif; - - checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, - prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), - help = STRING_TOKEN(STR_CHECK_BOX_HELP), - flags = 1, - key = 0, - endcheckbox; - - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1); - - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1), - text = STRING_TOKEN(STR_TEXT_TEXT_2), - flags = 0, - key = MY_TEXT_KEY; - - goto 1, - prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY - help = STRING_TOKEN(STR_GOTO_HELP); - - endform; - - form formid = 3, title = STRING_TOKEN(STR_FORM3_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1; - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1); - - endif; //end grayoutif - - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1); - - endform; - - form formid = 4, title = STRING_TOKEN(STR_FORM3_TITLE); - - endform; - - form formid = 0x1234, // Dynamically created page, - title = STRING_TOKEN(STR_DYNAMIC_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - label 0x1234; - - endform; - -endformset; diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/VfrStrings.uni b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/DriverSample/VfrStrings.uni deleted file mode 100644 index 9e9dbf5454e0dd43e33f1d7272352bc06d9f0eba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35590 zcmeI5+fp3Y6^8pZsmeP{q>CIaEXj5bRjHH&$fhC?C6FCgrAmbWDL4om21{1nFprT3 z@I@;3N&avDEOvKK_jJz;qQR!7VEVk*{`WfXwR`^e-=$)y7!|)Pex=V(iXRt0(*9D~ z@|or0xcItwSDX|F#jE14#i_3Td9hpkLf`j_5B2$^__emziX)xdFAlZMJtw-0|2sN* zpsgbvzw8hFaW5W-E-1^r7^l7cVl0|ZiZ}YdSKQIDZT0a$M@ORnM0CGOeR!??9ra;P z->14_Kke@dhvVY4uH@W1-FKwxM>;~UdG3L>4%5?S?|Y_xM^B=~Lp^U-TStj%XbGBV zaqo<(H`+eXwL8TN{pY@K66Mg7sW*ME6K(MndP5%%&c_TKj*FM2`yLis#ftVHS7@2+ zU8eqRLUdREp|^_Jf#{8xVqF?pw} zUL-_bs#it@nz+0A$<)K~ryAkkCr&~Zj6e6Eq|vyeXPs!=mullP){z(L%Uq&R;&u8&EjeCr1(_-9~A4_UlR|G#D#os>*!kXuz04e z)x??4iVc0Q>Nx!3CuFW&lXhCw61#r5QxZ#?D@n_>^(IrFx7Nkqdr97qyba0AYstXx&uv7$lBa$y**p== zmSFVZSS`LuNAs0=>p_wcu0}VUmYzF0Z^6`-pE*j}?xl3Zk^VwQjMYApjh@>|bbfuN z0k=f)srrD-`3f{2$L^F`$y7bnxi?7@h3)z*?VYBlziXlL14;TXCG|Wf{+5bA6t~a! zZi^nY?W;5TM{375NID~BJ6HDJkYajLr!M4;`|zR;)4ga2 z{6V}Z>?FP*Jb;9Tw{fInrU@EtmnW@1e%UDTjPJyThXg~Xy)kfLi)V9Pxz9Ul9pvzx zvN!79d?uRgTa~d!FN8nwR`(f`zX)k>KaeJ_e*U6%@zN{-ubWFneLU`e-G$d^PMC+a<#CI)nP%fbkKUL$i7j?2gD6VW<+!!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