]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr
EmbeddedPkg: add DT platform driver to select between DT and ACPI
[mirror_edk2.git] / EmbeddedPkg / Drivers / DtPlatformDxe / DtPlatformHii.vfr
diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr
new file mode 100644 (file)
index 0000000..3516746
--- /dev/null
@@ -0,0 +1,51 @@
+/** @file\r
+*\r
+*  Copyright (c) 2017, Linaro, Ltd. All rights reserved.\r
+*\r
+*  This program and the accompanying materials\r
+*  are licensed and made available under the terms and conditions of the BSD License\r
+*  which accompanies this distribution.  The full text of the license may be found at\r
+*  http://opensource.org/licenses/bsd-license.php\r
+*\r
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*\r
+**/\r
+\r
+#include "DtPlatformDxe.h"\r
+\r
+//\r
+// EFI Variable attributes\r
+//\r
+#define EFI_VARIABLE_NON_VOLATILE       0x00000001\r
+#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002\r
+#define EFI_VARIABLE_RUNTIME_ACCESS     0x00000004\r
+#define EFI_VARIABLE_READ_ONLY          0x00000008\r
+\r
+formset\r
+  guid      = DT_PLATFORM_FORMSET_GUID,\r
+  title     = STRING_TOKEN(STR_FORM_SET_TITLE),\r
+  help      = STRING_TOKEN(STR_FORM_SET_TITLE_HELP),\r
+  classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID,\r
+\r
+  efivarstore DT_ACPI_VARSTORE_DATA,\r
+    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,  // EFI variable attributes\r
+    name  = DtAcpiPref,\r
+    guid  = DT_PLATFORM_FORMSET_GUID;\r
+\r
+  form formid = 0x1000,\r
+    title  = STRING_TOKEN(STR_MAIN_FORM_TITLE);\r
+\r
+    oneof varid = DtAcpiPref.Pref,\r
+        prompt      = STRING_TOKEN(STR_DT_ACPI_SELECT_PROMPT),\r
+        help        = STRING_TOKEN(STR_DT_ACPI_SELECT_HELP),\r
+        flags       = NUMERIC_SIZE_1 | INTERACTIVE | RESET_REQUIRED,\r
+        option text = STRING_TOKEN(STR_DT_ACPI_SELECT_DT), value = DT_ACPI_SELECT_DT, flags = DEFAULT;\r
+        option text = STRING_TOKEN(STR_DT_ACPI_SELECT_ACPI), value = DT_ACPI_SELECT_ACPI, flags = 0;\r
+    endoneof;\r
+\r
+    subtitle text = STRING_TOKEN(STR_NULL_STRING);\r
+\r
+  endform;\r
+\r
+endformset;\r