summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:56:57 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:56:57 +0000
commit96a65fc85a3b7ebe6bd981db3c92f425cb6b9c46 (patch)
tree956c7b08e4a4d6e41410515eb441e40c4c83b3b8 /MdeModulePkg
parent2bf0d83532cd830560fd6a7e9ac0409b08f1e7e7 (diff)
downloadedk2-platforms-96a65fc85a3b7ebe6bd981db3c92f425cb6b9c46.tar.xz
Add FormMap form example.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10125 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h7
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr65
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.unibin40902 -> 46166 bytes
3 files changed, 68 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
index 648b6dba91..40231bef47 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
+++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007 - 2009, Intel Corporation
+Copyright (c) 2007 - 2010, 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
@@ -26,6 +26,7 @@ Revision History:
#define _NVDATASTRUC_H_
#include <Guid/HiiPlatformSetupFormset.h>
+#include <Guid/HiiFormMapMethodGuid.h>
#define FORMSET_GUID \
{ \
@@ -66,6 +67,10 @@ typedef struct {
UINT8 NameValueVar0;
UINT16 NameValueVar1;
UINT16 NameValueVar2[20];
+ UINT8 SerialPortNo;
+ UINT8 SerialPortStatus;
+ UINT16 SerialPortIo;
+ UINT8 SerialPortIrq;
} DRIVER_SAMPLE_CONFIGURATION;
//
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index bc821a61b5..7b18c3c645 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -2,7 +2,7 @@
//
// Sample Setup formset.
//
-// Copyright (c) 2004 - 2008, Intel Corporation. <BR>
+// Copyright (c) 2004 - 2010, Intel Corporation. <BR>
// 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
@@ -84,7 +84,7 @@ formset
// Define a EFI variable Storage (EFI_IFR_VARSTORE_EFI)
//
efivarstore MyEfiVar, // Define referenced name in vfr
- attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS, // EFI variable attribures
+ attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures
name = STRING_TOKEN(STR_VAR_NAME), // EFI variable name
varsize = 1, // Size of the EFI variable
guid = FORMSET_GUID; // EFI variable GUID
@@ -432,6 +432,10 @@ formset
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);
+ goto 4,
+ prompt = STRING_TOKEN(STR_GOTO_FORM4), //FourthSetupPage // this too has no end-op and basically it's a jump to a form ONLY
+ help = STRING_TOKEN(STR_GOTO_HELP);
+
endform;
suppressif ideqval MyIfrNVData.BootOrderLarge == 0;
@@ -570,7 +574,62 @@ formset
endform;
- form formid = 4, title = STRING_TOKEN(STR_FORM3_TITLE);
+ formmap formid = 4,
+ maptitle = STRING_TOKEN(STR_SAMPL_MAP_METHOD);
+ mapguid = FORMSET_GUID;
+ maptitle = STRING_TOKEN(STR_STANDARD_MAP_METHOD);
+ mapguid = EFI_HII_STANDARD_FORM_GUID;
+
+ oneof varid = MyIfrNVData.SerialPortNo,
+ prompt = STRING_TOKEN(STR_SERIAL_PORT),
+ help = STRING_TOKEN(STR_ONE_OF_HELP),
+
+ read cond (get(MyIfrNVData.SerialPortStatus) != 0 ? 0 : cond ((get(MyIfrNVData.SerialPortIo) & 0xF00) >> 0x8 == get(MyIfrNVData.SerialPortIrq) - 1 ? UNDEFINED : map (get(MyIfrNVData.SerialPortIo) : 0x3f8,1; 0x2F8,2; 0x3E8,3; 0x2E8,4;)));
+ write set(MyIfrNVData.SerialPortStatus, pushthis != 0) AND set(MyIfrNVData.SerialPortIo, map (pushthis : 1,0x3F8; 2,0x2F8; 3,0x3E8; 4,0x2E8;)) AND set (MyIfrNVData.SerialPortIrq, map (pushthis: 1,4; 2,3; 3,4; 4,3;));
+
+ option text = STRING_TOKEN(STR_SERIAL_PORT_DISABLE), value = 0x0, flags = DEFAULT;
+ option text = STRING_TOKEN(STR_SERIAL_PORT1), value = 0x1, flags = 0;
+ option text = STRING_TOKEN(STR_SERIAL_PORT2), value = 0x2, flags = 0;
+ option text = STRING_TOKEN(STR_SERIAL_PORT3), value = 0x3, flags = 0;
+ option text = STRING_TOKEN(STR_SERIAL_PORT4), value = 0x4, flags = 0;
+ endoneof;
+
+ grayoutif TRUE;
+ checkbox varid = MyIfrNVData.SerialPortStatus,
+ prompt = STRING_TOKEN(STR_SERIAL_PORT_STATUS),
+ help = STRING_TOKEN(STR_CHECK_BOX_HELP),
+ endcheckbox;
+ endif;
+
+ grayoutif TRUE;
+ suppressif ideqval MyIfrNVData.SerialPortStatus == 0;
+ oneof varid = MyIfrNVData.SerialPortIo,
+ prompt = STRING_TOKEN(STR_SERIAL_PORT_IO_ADDRESS),
+ help = STRING_TOKEN(STR_ONE_OF_HELP),
+
+ option text = STRING_TOKEN(STR_SERIAL_PORT1_IOADDR), value = 0x3F8, flags = DEFAULT;
+ option text = STRING_TOKEN(STR_SERIAL_PORT2_IOADDR), value = 0x2F8, flags = 0;
+ option text = STRING_TOKEN(STR_SERIAL_PORT3_IOADDR), value = 0x3E8, flags = 0;
+ option text = STRING_TOKEN(STR_SERIAL_PORT4_IOADDR), value = 0x2E8, flags = 0;
+ endoneof;
+ endif;
+ endif;
+
+ grayoutif TRUE;
+ suppressif ideqval MyIfrNVData.SerialPortStatus == 0;
+ oneof varid = MyIfrNVData.SerialPortIrq,
+ prompt = STRING_TOKEN(STR_SERIAL_PORT_IRQ),
+ help = STRING_TOKEN(STR_ONE_OF_HELP),
+
+ option text = STRING_TOKEN(STR_SERIAL_PORT13_IRQ), value = 0x4, flags = DEFAULT;
+ option text = STRING_TOKEN(STR_SERIAL_PORT24_IRQ), value = 0x3, flags = 0;
+ endoneof;
+ endif;
+ endif;
+
+ goto 1,
+ prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage
+ help = STRING_TOKEN(STR_GOTO_HELP);
endform;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
index 355538a9a5..2cb502dc13 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
+++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
Binary files differ