From 3cbfba02fef9dae07a041fdbf2e89611d72d6f90 Mon Sep 17 00:00:00 2001 From: David Wei Date: Mon, 12 Jan 2015 09:37:20 +0000 Subject: Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to https://svn.code.sf.net/p/edk2/code/trunk/edk2/, which are for MinnowBoard MAX open source project. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Wei Reviewed-by: Mike Wu Reviewed-by: Hot Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16599 6f19259b-4bc3-4df7-8a09-765794883524 --- Vlv2TbltDevicePkg/PlatformSetupDxe/Boot.vfi | 77 + Vlv2TbltDevicePkg/PlatformSetupDxe/Configuration.h | 61 + Vlv2TbltDevicePkg/PlatformSetupDxe/DebugConfig.vfi | 123 ++ .../PlatformSetupDxe/FwVersionStrings.uni | Bin 0 -> 4108 bytes Vlv2TbltDevicePkg/PlatformSetupDxe/Main.vfi | 336 ++++ .../PlatformSetupDxe/PlatformSetupDxe.c | 933 ++++++++++ .../PlatformSetupDxe/PlatformSetupDxe.h | 102 ++ .../PlatformSetupDxe/PlatformSetupDxe.inf | 145 ++ Vlv2TbltDevicePkg/PlatformSetupDxe/Security.vfi | 96 + .../PlatformSetupDxe/SetupFunctions.c | 90 + .../PlatformSetupDxe/SetupInfoRecords.c | 1865 ++++++++++++++++++++ .../PlatformSetupDxe/SouthClusterConfig.vfi | 918 ++++++++++ .../PlatformSetupDxe/SystemComponent.vfi | 86 + Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi | 83 + Vlv2TbltDevicePkg/PlatformSetupDxe/UnCore.vfi | 240 +++ Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni | Bin 0 -> 65892 bytes Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr | 128 ++ Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni | Bin 0 -> 214022 bytes 18 files changed, 5283 insertions(+) create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Boot.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Configuration.h create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/DebugConfig.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Main.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Security.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/SystemComponent.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/UnCore.vfi create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr create mode 100644 Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni (limited to 'Vlv2TbltDevicePkg/PlatformSetupDxe') diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Boot.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Boot.vfi new file mode 100644 index 0000000000..c6c15239d4 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Boot.vfi @@ -0,0 +1,77 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// Boot.vfi +// +// Abstract: +// +// Driver Setup formset. +// +// Revision History: +// +// --*/ + + +form formid = BOOT_CONFIGURATION_FORM_ID, + + title = STRING_TOKEN(STR_BOOT_CONFIGURATION_TITLE); + + + oneof varid = Setup.FastBoot, + prompt = STRING_TOKEN(STR_FAST_BOOT_PROMPT), + help = STRING_TOKEN(STR_FAST_BOOT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.SecureBoot, + prompt = STRING_TOKEN(STR_SECURITY_BOOT_PROMPT), + help = STRING_TOKEN(STR_SECURITY_BOOT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= RESET_REQUIRED; + endoneof; + + + oneof varid = Setup.QuietBoot, + prompt = STRING_TOKEN(STR_QUIETBOOT_PROMPT), + help = STRING_TOKEN(STR_QUIETBOOT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=0 | RESET_REQUIRED; + endoneof; + + + + oneof varid = Setup.LogBootTime, + prompt = STRING_TOKEN(STR_LOG_BOOT_TIME_PROMPT), + help = STRING_TOKEN(STR_LOG_BOOT_TIME_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.LogBootTime == 0x00; + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_LOG_BOOT_TIME_RECORD), + text = STRING_TOKEN(STR_LOG_BOOT_TIME_VALUE), + flags = 0, + key = 0; + endif; + +endform; + + + + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Configuration.h b/Vlv2TbltDevicePkg/PlatformSetupDxe/Configuration.h new file mode 100644 index 0000000000..b4e0e51f15 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Configuration.h @@ -0,0 +1,61 @@ +/*++ + + Copyright (c) 2004 - 2014, 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 that 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: + + Configuration.h + +Abstract: + + Driver configuration include file + +Revision History: + ------------------------------------------------------------------------------ + Rev Date Name Description + ------------------------------------------------------------------------------ + + ------------------------------------------------------------------------------ +--*/ + +#ifndef _CONFIGURATION_H +#define _CONFIGURATION_H + +// +// System Setup Page. Do not have to be sequential but have to be unique +// +#define ROOT_FORM_ID 1 +#define ROOT_MAIN_FORM_ID 2 +#define CPU_CONFIGURATION_FORM_ID 3 +#define CPU_PWR_CONFIGURATION_FORM_ID 4 +#define BOOT_CONFIGURATION_FORM_ID 5 +#define IGD_FORM_ID 6 +#define SECURITY_CONFIGURATION_FORM_ID 7 +#define SOUTH_CLUSTER_FORM_ID 8 +#define DPTF_FORM_ID 9 +#define PLATFORM_INFORMATION_FORM_ID 10 +#define DRIVE_CONFIGURATION_ID 11 +#define SENSOR_CONFIGURATION_ID 12 +#define LPSS_CONFIGURATION_ID 13 +#define UNCORE_FORM_ID 14 +#define TPM_FORM_ID 15 +#define THERMAL_FORM_ID 16 +#define PASSWORD_SETTING_ID 17 +#define LAN_OPTIONS_FORM_ID 18 +#define AZALIA_OPTIONS_FORM_ID 19 +#define MISC_OPTIONS_FORM_ID 20 +#define USB_OPTIONS_FORM_ID 21 +#define PCIE_DEVICE_OPTIONS_FORM_ID 22 +#define SYSTEM_COMPONENT_FORM_ID 23 +#define DEBUG_CONFIGURATION_FORM_ID 24 +#endif // #ifndef _CONFIGURATION_H diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/DebugConfig.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/DebugConfig.vfi new file mode 100644 index 0000000000..7065ffdf60 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/DebugConfig.vfi @@ -0,0 +1,123 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// DebugConfiguration.vfi +// +// Abstract: +// +// Debug Configuration formset. +// + + +// --*/ + +form formid = DEBUG_CONFIGURATION_FORM_ID, + title = STRING_TOKEN(STR_DEBUG_CONFIGURATION_TITLE); + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + subtitle text = STRING_TOKEN(STR_ACPIMEMDBG_STRING); + + //ACPI Memory Debug Switch + oneof varid = Setup.ACPIMemDbg, + prompt = STRING_TOKEN (STR_ACPIMEMDBG_SWTICH), + help = STRING_TOKEN (STR_ACPIMEMDBG_SWTICH_HELP), + option text = STRING_TOKEN (STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.ExISupport, + prompt = STRING_TOKEN(STR_EXISUPPORT_PROMPT), + help = STRING_TOKEN(STR_EXISUPPORT_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | RESET_REQUIRED; + endoneof; + subtitle text = STRING_TOKEN(STR_WITT_CONFIGURATION_TITLE); + + oneof varid = Setup.WittEnable, + prompt = STRING_TOKEN(STR_WITT_PROMPT), + help = STRING_TOKEN(STR_WITT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.UtsEnable, + prompt = STRING_TOKEN(STR_UTS_PROMPT), + help = STRING_TOKEN(STR_UTS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + // + //Lakemore Settings + // + subtitle text = STRING_TOKEN(STR_NULL_STRING); + subtitle text = STRING_TOKEN(STR_LM_INFORMATION_TITLE); + + grayoutif ideqval Setup.PunitBIOSConfig == 0x1; + oneof varid = Setup.LmMemSize, + prompt = STRING_TOKEN (STR_LM_MEMORY_PROMPT), + help = STRING_TOKEN (STR_LM_MEMORY_HELP), + option text = STRING_TOKEN (STR_LM_MEMORY_16MB), value = 16384, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_LM_MEMORY_8MB), value = 8192, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_LM_MEMORY_1MB), value = 1024, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_LM_MEMORY_128KB), value = 128, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_LM_MEMORY_0MB), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + oneof varid = Setup.PunitBIOSConfig, + prompt = STRING_TOKEN (STR_PUINT_BIOS_CONFIG_DISPLAY), + help = STRING_TOKEN (STR_PUINT_BIOS_CONFIG_DISPLAY_HELP), + option text = STRING_TOKEN (STR_PUINT_BIOS_PDM), value = 3, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_PUINT_BIOS_PERFORMANCE), value = 2, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_PUINT_BIOS_POWERSAVE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_PUINT_BIOS_RESERVED), value = 0, flags = RESET_REQUIRED; + endoneof; + + suppressif NOT ideqval Setup.PunitBIOSConfig == 0x3; + oneof varid = Setup.PDMConfig, + prompt = STRING_TOKEN (STR_PDM_OUTPUT_CONFIG_SWTICH), + help = STRING_TOKEN (STR_PDM_OUTPUT_CONFIG_SWTICH_HELP), + option text = STRING_TOKEN (STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_PDM_OUTPUT_MEM), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_PDM_OUTPUT_IO), value = 2, flags = RESET_REQUIRED; + endoneof; + endif; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + oneof varid = Setup.ENDBG2, + prompt = STRING_TOKEN (STR_ENABLE_DBG2), + help = STRING_TOKEN (STR_ENABLE_DBG2_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + oneof varid = Setup.DisableCodec262, + prompt = STRING_TOKEN(STR_CODEC262_DISABLED_PROMPT), + help = STRING_TOKEN(STR_CODEC262_DISABLED_HELP), + option text = STRING_TOKEN(STR_YES), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_NO), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + +endform; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni new file mode 100644 index 0000000000..767388ce91 Binary files /dev/null and b/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni differ diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Main.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Main.vfi new file mode 100644 index 0000000000..24bc29791c --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Main.vfi @@ -0,0 +1,336 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// Main.vfi +// +// Abstract: +// +// Driver Setup formset. +// +// Revision History: +// +// --*/ + +form formid = ROOT_MAIN_FORM_ID, + + title = STRING_TOKEN(STR_MAIN_TITLE); + + subtitle text = STRING_TOKEN(STR_BIOS_INFORMATION_TITLE); + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_IFWI_VERSION_STRING), + text = STRING_TOKEN(STR_IFWI_VERSION_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_BIOS_VERSION_STRING), + text = STRING_TOKEN(STR_BIOS_VERSION_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_BIOS_VENDOR_STRING), + text = STRING_TOKEN(STR_BIOS_VENDOR_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_CORE_VERSION_STRING), + text = STRING_TOKEN(STR_CORE_VERSION_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_BIOS_BUILD_TIME_STRING), + text = STRING_TOKEN(STR_BIOS_BUILD_TIME_VALUE), + flags = 0, + key = 0; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_PROCESSOR_INFO_STRING); + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_VERSION_STRING), + text = STRING_TOKEN(STR_PROCESSOR_VERSION_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_SKU_STRING), + text = STRING_TOKEN(STR_PROCESSOR_SKU_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_SPEED_STRING), + text = STRING_TOKEN(STR_PROCESSOR_SPEED_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_ID_STRING), + text = STRING_TOKEN(STR_PROCESSOR_ID_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_MICROCODE_STRING), + text = STRING_TOKEN(STR_PROCESSOR_MICROCODE_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_CORE_STRING), + text = STRING_TOKEN(STR_PROCESSOR_CORE_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_EM64T_CAPABILITY_STRING), + text = STRING_TOKEN(STR_EM64T_CAPABILITY_VALUE), + flags = 0, + key = 0; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + goto PLATFORM_INFORMATION_FORM_ID, + prompt = STRING_TOKEN(STR_PLATFORM_INFORMATION_TITLE), + help = STRING_TOKEN(STR_PLATFORM_INFORMATION_HELP); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + // + // Date and Time section + // + 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 = 2003, + maximum = 2100, + step = 1, + default = 2003, + + 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, + + // 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 == 0x29 + AND + ideqval Date.Month == 2 + AND + NOT + ideqvallist Date.Year == 2004 2008 2012 2016 2020 2024 2028 2032 2036 2040 2044 2048 2052 2056 2060 2064 2068 2072 2076 2080 2084 2088 2092 2096 + endif + + 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; + +endform; + +form formid = PLATFORM_INFORMATION_FORM_ID, + + title = STRING_TOKEN(STR_PLATFORM_INFORMATION_TITLE); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_PLATFORM_FIRMWARE_STRING); + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_SOC_STRING), + text = STRING_TOKEN(STR_SOC_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_MRC_VERSION_STRING), + text = STRING_TOKEN(STR_MRC_VERSION_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PUNIT_FW_STRING), + text = STRING_TOKEN(STR_PUNIT_FW_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PMC_FW_STRING), + text = STRING_TOKEN(STR_PMC_FW_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_KSC_FW_STRING), + text = STRING_TOKEN(STR_KSC_FW_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_SEC_VERSION_STRING), + text = STRING_TOKEN(STR_SEC_VERSION_VALUE), + flags = 0, + key = 0; + + suppressif ideqval Setup.GOPEnable == 0; + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_GOP_STRING), + text = STRING_TOKEN(STR_GOP_VALUE), + flags = 0, + key = 0; + endif; + + suppressif ideqval Setup.GOPEnable == 1; + text + help = STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_HELP), + text = STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_NAME), + text = STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), + flags = 0, + key = 0; + endif; + + text + help = STRING_TOKEN(STR_CPU_FLAVOR_HELP), + text = STRING_TOKEN(STR_CPU_FLAVOR_NAME), + text = STRING_TOKEN(STR_CPU_FLAVOR_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_BOARD_ID_HELP), + text = STRING_TOKEN(STR_BOARD_ID_NAME), + text = STRING_TOKEN(STR_BOARD_ID_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_FAB_ID_HELP), + text = STRING_TOKEN(STR_FAB_ID_STRING), + text = STRING_TOKEN(STR_FAB_ID_VALUE), + flags = 0, + key = 0; + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_MEMORY_INFORMATION_STRING); + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_TOTAL_MEMORY_SIZE_PROMPT), + text = STRING_TOKEN(STR_TOTAL_MEMORY_SIZE_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_SYSTEM_MEMORY_SPEED_STRING), + text = STRING_TOKEN(STR_SYSTEM_MEMORY_SPEED_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L1_DATA_CACHE_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L1_DATA_CACHE_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L1_INSTR_CACHE_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L1_INSTR_CACHE_VALUE), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L2_CACHE_STRING), + text = STRING_TOKEN(STR_PROCESSOR_L2_CACHE_VALUE), + flags = 0, + key = 0; + +endform; + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c new file mode 100644 index 0000000000..1490e2c030 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c @@ -0,0 +1,933 @@ +/** @file + + Copyright (c) 2004 - 2014, 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 that 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: + +**/ + +#include "PlatformSetupDxe.h" +#include "Guid/SetupVariable.h" + +#define EFI_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('C', 'l', 'b', 'k') +#define EFI_CALLBACK_INFO_FROM_THIS(a) CR (a, EFI_CALLBACK_INFO, ConfigAccess, EFI_CALLBACK_INFO_SIGNATURE) + +typedef struct { + UINTN Signature; + EFI_HANDLE DriverHandle; + EFI_HII_HANDLE RegisteredHandle; + SYSTEM_CONFIGURATION FakeNvData; + SYSTEM_CONFIGURATION BackupNvData; + EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting; + EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess; +} EFI_CALLBACK_INFO; + +#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() + +// +// uni string and Vfr Binary data. +// +extern UINT8 VfrBin[]; +extern UINT8 PlatformSetupDxeStrings[]; + +EFI_HANDLE mImageHandle; + +// +// module global data +// +#define EFI_NORMAL_SETUP_GUID \ + { 0xec87d643, 0xeba4, 0x4bb5, 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0xd, 0xa9 } + +EFI_GUID mNormalSetupGuid = EFI_NORMAL_SETUP_GUID; + +EFI_GUID mSystemConfigGuid = SYSTEM_CONFIGURATION_GUID; +CHAR16 mVariableName[] = L"Setup"; +CHAR16 mSetupName[] = L"Setup"; +EFI_CALLBACK_INFO *mCallbackInfo; +BOOLEAN GlobalReset=FALSE; + +HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { + { + { + HARDWARE_DEVICE_PATH, + HW_VENDOR_DP, + { + (UINT8) (sizeof (VENDOR_DEVICE_PATH)), + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) + } + }, + EFI_CALLER_ID_GUID + }, + { + END_DEVICE_PATH_TYPE, + END_ENTIRE_DEVICE_PATH_SUBTYPE, + { + (UINT8) (END_DEVICE_PATH_LENGTH), + (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) + } + } +}; + +/** + This function allows a caller to extract the current configuration for one + or more named elements from the target driver. + + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param Request A null-terminated Unicode string in format. + @param Progress On return, points to a character in the Request string. + Points to the string's null terminator if request was successful. + Points to the most recent '&' before the first failing name/value + pair (or the beginning of the string if the failure is in the + first name/value pair) if the request was not successful. + @param Results A null-terminated Unicode string in format which + has all values filled in for the names in the Request string. + String to be allocated by the called function. + + @retval EFI_SUCCESS The Results is filled with the requested values. + @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results. + @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name. + @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver. + +**/ + +VOID +CheckSystemConfigLoad(SYSTEM_CONFIGURATION *SystemConfigPtr); + +VOID +CheckSystemConfigSave(SYSTEM_CONFIGURATION *SystemConfigPtr); + +VOID +ConfirmSecureBootTest(); + +VOID +LoadLpssDefaultValues ( + IN EFI_CALLBACK_INFO *Private + ) +{ + // + // Load LPSS and SCC defalut configurations for Android + // + Private->FakeNvData.LpsseMMCEnabled = FALSE; + Private->FakeNvData.LpssSdioEnabled = TRUE; + Private->FakeNvData.LpssSdcardEnabled = TRUE; + Private->FakeNvData.LpssSdCardSDR25Enabled = FALSE; + Private->FakeNvData.LpssSdCardDDR50Enabled = TRUE; + Private->FakeNvData.LpssMipiHsi = FALSE; + Private->FakeNvData.LpsseMMC45Enabled = TRUE; + Private->FakeNvData.LpsseMMC45DDR50Enabled = TRUE; + Private->FakeNvData.LpsseMMC45HS200Enabled = FALSE; + Private->FakeNvData.LpsseMMC45RetuneTimerValue = 8; + Private->FakeNvData.eMMCBootMode = 1; // Auto Detect + + Private->FakeNvData.GOPEnable = TRUE; + Private->FakeNvData.SecureBoot = TRUE; + Private->FakeNvData.UsbAutoMode = TRUE; + Private->FakeNvData.UsbXhciSupport = TRUE; + Private->FakeNvData.PchUsb30Mode = TRUE; + Private->FakeNvData.LegacyUSBBooting = FALSE; + Private->FakeNvData.PchUsb20 = FALSE; +} + + +EFI_STATUS +EFIAPI +SystemConfigExtractConfig ( + IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, + IN CONST EFI_STRING Request, + OUT EFI_STRING *Progress, + OUT EFI_STRING *Results + ) +{ + EFI_STATUS Status; + EFI_CALLBACK_INFO *Private; + EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting; + EFI_STRING ConfigRequestHdr; + EFI_STRING ConfigRequest; + BOOLEAN AllocatedRequest; + UINTN Size; + UINTN BufferSize; + VOID *SystemConfigPtr; + + + if (Progress == NULL || Results == NULL) { + return EFI_INVALID_PARAMETER; + } + + *Progress = Request; + if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &mSystemConfigGuid, mVariableName)) { + return EFI_NOT_FOUND; + } + + ConfigRequestHdr = NULL; + ConfigRequest = NULL; + Size = 0; + AllocatedRequest = FALSE; + + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + + SetupInfo(); + + HiiConfigRouting = Private->HiiConfigRouting; + ConfigRequest = Request; + if ((Request == NULL) || (StrStr (Request, L"OFFSET") == NULL)) { + // + // Request has no request element, construct full request string. + // Allocate and fill a buffer large enough to hold the template + // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator + // + ConfigRequestHdr = HiiConstructConfigHdr (&mSystemConfigGuid, mVariableName, Private->DriverHandle); + Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16); + ConfigRequest = AllocateZeroPool (Size); + ASSERT (ConfigRequest != NULL); + AllocatedRequest = TRUE; + BufferSize = sizeof (SYSTEM_CONFIGURATION); + UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize); + FreePool (ConfigRequestHdr); + } + SystemConfigPtr = GetVariable(mSetupName, &mNormalSetupGuid); + + + if (SystemConfigPtr == NULL) { + ZeroMem(&Private->FakeNvData, sizeof(SYSTEM_CONFIGURATION)); + ZeroMem(&Private->BackupNvData, sizeof(SYSTEM_CONFIGURATION)); + } else { + CheckSystemConfigLoad(SystemConfigPtr); + CopyMem(&Private->FakeNvData, SystemConfigPtr, sizeof(SYSTEM_CONFIGURATION)); + CopyMem(&Private->BackupNvData, SystemConfigPtr, sizeof(SYSTEM_CONFIGURATION)); + FreePool(SystemConfigPtr); + } + + // + // Convert buffer data to by helper function BlockToConfig() + // + Status = HiiConfigRouting->BlockToConfig ( + HiiConfigRouting, + ConfigRequest, + (UINT8 *) &Private->FakeNvData, + sizeof (SYSTEM_CONFIGURATION), + Results, + Progress + ); + + // + // Free the allocated config request string. + // + if (AllocatedRequest) { + FreePool (ConfigRequest); + ConfigRequest = NULL; + } + + // + // Set Progress string to the original request string. + // + if (Request == NULL) { + *Progress = NULL; + } else if (StrStr (Request, L"OFFSET") == NULL) { + *Progress = Request + StrLen (Request); + } + + return Status; +} + +/** + This function processes the results of changes in configuration. + + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param Configuration A null-terminated Unicode string in format. + @param Progress A pointer to a string filled in with the offset of the most + recent '&' before the first failing name/value pair (or the + beginning of the string if the failure is in the first + name/value pair) or the terminating NULL if all was successful. + + @retval EFI_SUCCESS The Results is processed successfully. + @retval EFI_INVALID_PARAMETER Configuration is NULL. + @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver. + +**/ +EFI_STATUS +EFIAPI +SystemConfigRouteConfig ( + IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, + IN CONST EFI_STRING Configuration, + OUT EFI_STRING *Progress + ) +{ + EFI_CALLBACK_INFO *Private; + SYSTEM_CONFIGURATION *FakeNvData; + + if (Configuration == NULL || Progress == NULL) { + return EFI_INVALID_PARAMETER; + } + *Progress = Configuration; + + if (!HiiIsConfigHdrMatch (Configuration, &mSystemConfigGuid, mVariableName)) { + return EFI_NOT_FOUND; + } + + *Progress = Configuration + StrLen (Configuration); + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + FakeNvData = &Private->FakeNvData; + if (!HiiGetBrowserData (&mSystemConfigGuid, mVariableName, sizeof (SYSTEM_CONFIGURATION), (UINT8 *) FakeNvData)) { + // + // FakeNvData can't be got from SetupBrowser, which doesn't need to be set. + // + return EFI_SUCCESS; + } + + if (Private->FakeNvData.ReservedO != Private->BackupNvData.ReservedO) { + Private->BackupNvData.ReservedO = Private->FakeNvData.ReservedO; + LoadLpssDefaultValues (Private); + + // + // Pass changed uncommitted data back to Form Browser + // + HiiSetBrowserData (&mSystemConfigGuid, mVariableName, sizeof (SYSTEM_CONFIGURATION), (UINT8 *) FakeNvData, NULL); + } + + gRT->SetVariable( + mSetupName, + &mNormalSetupGuid, + EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof(SYSTEM_CONFIGURATION), + &Private->FakeNvData + ); + + CheckSystemConfigSave(&Private->FakeNvData); + return EFI_SUCCESS; +} + +/** + 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. + + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param Action A null-terminated Unicode string in format. + @param KeyValue A unique Goto OpCode callback value which record user's selection. + 0x100 <= KeyValue <0x500 : user select a controller item in the first page; + KeyValue == 0x1234 : user select 'Refresh' in first page, or user select 'Go to Previous Menu' in second page + KeyValue == 0x1235 : user select 'Pci device filter' in first page + KeyValue == 0x1500 : user select 'order ... priority' item in second page + KeyValue == 0x1800 : user select 'commint changes' in third page + KeyValue == 0x2000 : user select 'Go to Previous Menu' in third page + @param Type The type of value for the question. + @param Value A pointer to the data being sent to the original exporting driver. + @param ActionRequest On return, points to the action requested by the callback function. + + @retval EFI_SUCCESS Always returned. + +**/ +EFI_STATUS +EFIAPI +SystemConfigCallback ( + IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, + IN EFI_BROWSER_ACTION Action, + IN EFI_QUESTION_ID KeyValue, + IN UINT8 Type, + IN EFI_IFR_TYPE_VALUE *Value, + OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest + ) +{ + EFI_CALLBACK_INFO *Private; + SYSTEM_CONFIGURATION *FakeNvData; + SYSTEM_CONFIGURATION *SetupData; + UINTN SizeOfNvStore; + EFI_INPUT_KEY Key; + CHAR16 *StringBuffer1; + CHAR16 *StringBuffer2; + CHAR16 *StringBuffer3; + EFI_STATUS Status; + UINTN DataSize; + UINT8 OsSelection; + + StringBuffer1 = AllocateZeroPool (200 * sizeof (CHAR16)); + ASSERT (StringBuffer1 != NULL); + StringBuffer2 = AllocateZeroPool (200 * sizeof (CHAR16)); + ASSERT (StringBuffer2 != NULL); + StringBuffer3 = AllocateZeroPool (200 * sizeof (CHAR16)); + ASSERT (StringBuffer3 != NULL); + + switch (Action) { + case EFI_BROWSER_ACTION_CHANGING: + { + if (KeyValue == 0x1235) { + StrCpy (StringBuffer1, L"Will you disable PTT ? "); + StrCpy (StringBuffer2, L"Enter (YES) / Esc (NO)"); + + // + // Popup a menu to notice user + // + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the YES Response key, + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + + } + } else if (KeyValue == 0x1236) { + StrCpy (StringBuffer1, L"Will you revoke trust ? "); + StrCpy (StringBuffer2, L"Enter (YES) / Esc (NO)"); + + // + // Popup a menu to notice user + // + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the YES Response key, + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + + } + } else if (KeyValue == 0x1239) { + if (Value->u8 == 0x00) { + StrCpy (StringBuffer1, L"WARNING: SOC may be damaged due to high temperature"); + StrCpy (StringBuffer2, L"when DPTF is disabled and IGD turbo is enabled."); + StrCpy (StringBuffer3, L"Press Enter/ESC to continue..."); + + // + // Popup a menu to notice user + // + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, StringBuffer3, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + } + } else if (KeyValue == 0x1240) { // secure erase feature of eMMC + // + // Popup a menu to notice user + // + StrCpy (StringBuffer1, L"WARNING: All your data on the eMMC will be lost"); + StrCpy (StringBuffer2, L"Do you really want to enable secure erase on eMMC?"); + StrCpy (StringBuffer3, L" Enter (YES) / Esc (NO) "); + + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, StringBuffer3,NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the ESC Response key, + // + if (Key.ScanCode == SCAN_ESC) { + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + FakeNvData = &Private->FakeNvData; + + Status = HiiGetBrowserData ( + &mSystemConfigGuid, + mVariableName, + sizeof (SYSTEM_CONFIGURATION), + (UINT8 *) FakeNvData + ); + if (!EFI_ERROR (Status)) { + FakeNvData->SecureErase = 0; + HiiSetBrowserData ( + &mSystemConfigGuid, + mVariableName, + sizeof (SYSTEM_CONFIGURATION), + (UINT8 *) FakeNvData, + NULL + ); + } + break; + } + + // + // If the user hits the YES Response key + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + // + // Save change + // + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + FakeNvData = &Private->FakeNvData; + + Status = HiiGetBrowserData ( + &mSystemConfigGuid, + mVariableName, + sizeof (SYSTEM_CONFIGURATION), + (UINT8 *) FakeNvData + ); + if (!EFI_ERROR (Status)) { + Status = gRT->SetVariable ( + L"Setup", + &mNormalSetupGuid, + EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof(SYSTEM_CONFIGURATION), + &Private->FakeNvData + ); + } + + // + // Reset system + // + gRT->ResetSystem( + EfiResetCold, + EFI_SUCCESS, + 0, + NULL + ); + + } + + + } + else if (KeyValue == 0xF001) { + // + // Popup a menu to notice user + // + StrCpy (StringBuffer1, L"Do you want to Commit Changes and Exit?"); + StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) "); + + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the YES Response key + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + // + // Save change + // + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + FakeNvData = &Private->FakeNvData; + + Status = HiiGetBrowserData ( + &mSystemConfigGuid, + mVariableName, + sizeof (SYSTEM_CONFIGURATION), + (UINT8 *) FakeNvData + ); + if (!EFI_ERROR (Status)) { + Status = gRT->SetVariable ( + L"Setup", + &mNormalSetupGuid, + EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof(SYSTEM_CONFIGURATION), + &Private->FakeNvData + ); + } + + // + // Update Secure Boot configuration changes + // + CheckSystemConfigSave(FakeNvData); + + // + // Reset system + // + if (GlobalReset == TRUE) { + // + // Issue full reset + // + IoWrite8 ( + (UINTN) 0XCF9, + (UINT8) 0x02 + ); + + IoWrite8 ( + (UINTN) 0xCF9, + (UINT8) 0x0E + ); + } else { + gRT->ResetSystem( + EfiResetCold, + EFI_SUCCESS, + 0, + NULL + ); + } + } + } else if (KeyValue == 0xF002) { + // + // Popup a menu to notice user + // + StrCpy (StringBuffer1, L"Do you want to Discard Changes and Exit?"); + StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) "); + + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the YES Response key + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + // + // Reset system + // + gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); + } + } else if (KeyValue == 0xF003) { + // + // Popup a menu to notice user + // + StrCpy (StringBuffer1, L"Do you want to load setup defaults and Exit?"); + StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) "); + + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + // + // If the user hits the YES Response key + // + if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) { + // + // Load default + // + FakeNvData = AllocateZeroPool (sizeof(SYSTEM_CONFIGURATION)); + + if (FakeNvData == NULL) { + return EFI_OUT_OF_RESOURCES; + } + + SizeOfNvStore = sizeof(SYSTEM_CONFIGURATION); + Status = gRT->GetVariable( + L"SetupDefault", + &mNormalSetupGuid, + NULL, + &SizeOfNvStore, + FakeNvData + ); + if (!EFI_ERROR (Status)) { + if(SizeOfNvStore >= sizeof(SYSTEM_CONFIGURATION)) { + Status = gRT->SetVariable ( + L"Setup", + &mNormalSetupGuid, + EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof(SYSTEM_CONFIGURATION), + FakeNvData + ); + } + } + + FreePool (FakeNvData); + + DataSize = sizeof(OsSelection); + Status = gRT->GetVariable( + L"OsSelection", + &gOsSelectionVariableGuid, + NULL, + &DataSize, + &OsSelection + ); + + if (EFI_ERROR(Status) || (OsSelection != FakeNvData->ReservedO)) { + OsSelection = FakeNvData->ReservedO; + Status = gRT->SetVariable ( + L"OsSelection", + &gOsSelectionVariableGuid, + EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, + sizeof(OsSelection), + &OsSelection + ); + } + + // + // Reset system + // + gRT->ResetSystem( + EfiResetCold, + EFI_SUCCESS, + 0, + NULL + ); + } + } else if ((KeyValue == 0x123A) || (KeyValue == 0x123B) || (KeyValue == 0x123C)) { + StrCpy (StringBuffer1, L"WARNING: Enable or disable USB Controllers will "); + StrCpy (StringBuffer2, L"make global reset to restart system."); + StrCpy (StringBuffer3, L"Press Enter/ESC to continue..."); + // + // Popup a menu to notice user + // + do { + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, StringBuffer3, NULL); + } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); + + FakeNvData = AllocateZeroPool (sizeof(SYSTEM_CONFIGURATION)); + Status = HiiGetBrowserData ( + &mSystemConfigGuid, + mVariableName, + sizeof (SYSTEM_CONFIGURATION), + (UINT8 *) FakeNvData + ); + // + // Get variable data + // + SizeOfNvStore = sizeof(SYSTEM_CONFIGURATION); + SetupData = AllocateZeroPool (sizeof(SYSTEM_CONFIGURATION)); + Status = gRT->GetVariable( + L"Setup", + &mNormalSetupGuid, + NULL, + &SizeOfNvStore, + SetupData + ); + if ((SetupData->UsbAutoMode != FakeNvData->UsbAutoMode) || + (SetupData->UsbXhciSupport != FakeNvData->UsbXhciSupport) || + (SetupData->PchUsb20 != FakeNvData->PchUsb20)) { + GlobalReset = TRUE; + } else { + GlobalReset = FALSE; + } + + } + } + break; + + default: + break; + } + + FreePool (StringBuffer1); + FreePool (StringBuffer2); + FreePool (StringBuffer3); + + // + // Workaround for Load Default for "DPTF Enable" + // + if (Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD) { + if (KeyValue == 0x1239) { + return EFI_NOT_FOUND; + } + } + + if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + + Private = EFI_CALLBACK_INFO_FROM_THIS (This); + FakeNvData = &Private->FakeNvData; + if (!HiiGetBrowserData (&mSystemConfigGuid, mVariableName, sizeof (SYSTEM_CONFIGURATION), (UINT8 *) FakeNvData)) { + return EFI_NOT_FOUND; + } + + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) && (Private->FakeNvData.ReservedO != Private->BackupNvData.ReservedO)) { + Private->BackupNvData.ReservedO = Private->FakeNvData.ReservedO; + LoadLpssDefaultValues (Private); + } + + // + // When user selected the secure erase, set it to disable + // + if((KeyValue == 0x1240) && (Action == EFI_BROWSER_ACTION_CHANGED)) { + FakeNvData->SecureErase = 0; + } + + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_CHANGED)) { + // + // If function 0 is disabled, function 1 ~ 7 also required to be disabled. + // + if (Private->FakeNvData.LpssDma0Enabled == 0) { + Private->FakeNvData.LpssHsuart0Enabled = 0; + Private->FakeNvData.LpssHsuart1Enabled = 0; + Private->FakeNvData.LpssPwm0Enabled = 0; + Private->FakeNvData.LpssPwm1Enabled = 0; + Private->FakeNvData.LpssSpiEnabled = 0; + } + + + // + // If function 0 is disabled, function 1 ~ 7 also required to be disabled. + // + if (Private->FakeNvData.LpssDma1Enabled == 0) { + Private->FakeNvData.LpssI2C0Enabled = 0; + Private->FakeNvData.LpssI2C1Enabled = 0; + Private->FakeNvData.LpssI2C2Enabled = 0; + Private->FakeNvData.LpssI2C3Enabled = 0; + Private->FakeNvData.LpssI2C4Enabled = 0; + Private->FakeNvData.LpssI2C5Enabled = 0; + Private->FakeNvData.LpssI2C6Enabled = 0; + } + } + + + // + // Pass changed uncommitted data back to Form Browser + // + HiiSetBrowserData (&mSystemConfigGuid, mVariableName, sizeof (SYSTEM_CONFIGURATION), (UINT8 *) FakeNvData, NULL); + + return EFI_SUCCESS; +} + + +/** + The driver Entry Point. The funciton will export a disk device class formset and + its callback function to hii database. + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + @retval other Some error occurs when executing this entry point. + +**/ +EFI_STATUS +EFIAPI +PlatformSetupDxeInit ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2; + + mImageHandle = ImageHandle; + + // + // There should only be one Form Configuration protocol + // + Status = gBS->LocateProtocol ( + &gEfiFormBrowser2ProtocolGuid, + NULL, + (VOID **) &FormBrowser2 + ); + if (EFI_ERROR (Status)) { + return Status; + } + + mCallbackInfo = AllocateZeroPool (sizeof (EFI_CALLBACK_INFO)); + if (mCallbackInfo == NULL) { + return EFI_BAD_BUFFER_SIZE; + } + + mCallbackInfo->Signature = EFI_CALLBACK_INFO_SIGNATURE; + mCallbackInfo->ConfigAccess.ExtractConfig = SystemConfigExtractConfig; + mCallbackInfo->ConfigAccess.RouteConfig = SystemConfigRouteConfig; + mCallbackInfo->ConfigAccess.Callback = SystemConfigCallback; + + // + // Install Device Path Protocol and Config Access protocol to driver handle + // Install Platform Driver Override Protocol to driver handle + // + Status = gBS->InstallMultipleProtocolInterfaces ( + &mCallbackInfo->DriverHandle, + &gEfiDevicePathProtocolGuid, + &mHiiVendorDevicePath, + &gEfiHiiConfigAccessProtocolGuid, + &mCallbackInfo->ConfigAccess, + NULL + ); + if (EFI_ERROR (Status)) { + goto Finish; + } + + // + // Publish our HII data + // + mCallbackInfo->RegisteredHandle = HiiAddPackages ( + &mSystemConfigGuid, + mCallbackInfo->DriverHandle, + VfrBin, + PlatformSetupDxeStrings, + NULL + ); + if (mCallbackInfo->RegisteredHandle == NULL) { + Status = EFI_OUT_OF_RESOURCES; + goto Finish; + } + + mHiiHandle = mCallbackInfo->RegisteredHandle; + + // + // Locate ConfigRouting protocol + // + Status = gBS->LocateProtocol ( + &gEfiHiiConfigRoutingProtocolGuid, + NULL, + (VOID **) &mCallbackInfo->HiiConfigRouting + ); + if (EFI_ERROR (Status)) { + goto Finish; + } + + // + // Clear all the globle variable + // + return EFI_SUCCESS; + +Finish: + if (mCallbackInfo->DriverHandle != NULL) { + gBS->UninstallMultipleProtocolInterfaces ( + mCallbackInfo->DriverHandle, + &gEfiDevicePathProtocolGuid, + &mHiiVendorDevicePath, + &gEfiHiiConfigAccessProtocolGuid, + &mCallbackInfo->ConfigAccess, + NULL + ); + } + + if (mCallbackInfo->RegisteredHandle != NULL) { + HiiRemovePackages (mCallbackInfo->RegisteredHandle); + } + + if (mCallbackInfo != NULL) { + FreePool (mCallbackInfo); + } + + return Status; +} + +/** + Unload its installed protocol. + + @param[in] ImageHandle Handle that identifies the image to be unloaded. + + @retval EFI_SUCCESS The image has been unloaded. +**/ +EFI_STATUS +EFIAPI +PlatformSetupDxeUnload ( + IN EFI_HANDLE ImageHandle + ) +{ + if (mCallbackInfo != NULL) { + if (mCallbackInfo->DriverHandle != NULL) { + gBS->UninstallMultipleProtocolInterfaces ( + mCallbackInfo->DriverHandle, + &gEfiDevicePathProtocolGuid, + &mHiiVendorDevicePath, + &gEfiHiiConfigAccessProtocolGuid, + &mCallbackInfo->ConfigAccess, + NULL + ); + } + + if (mCallbackInfo->RegisteredHandle != NULL) { + HiiRemovePackages (mCallbackInfo->RegisteredHandle); + } + + FreePool (mCallbackInfo); + } + + return EFI_SUCCESS; +} + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h new file mode 100644 index 0000000000..ebe5547902 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h @@ -0,0 +1,102 @@ +/*++ + + Copyright (c) 2004 - 2014, 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 that 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. + + + +**/ + +#ifndef _PLAT_OVER_MNGR_H_ +#define _PLAT_OVER_MNGR_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Guid/SetupVariable.h" +#include "Guid/OsSelection.h" + +#include +#include +#include +#include +extern EFI_HII_HANDLE mHiiHandle; + +UINT32 +ConvertBase10ToRaw ( + IN EFI_EXP_BASE10_DATA *Data); + +UINT32 +ConvertBase2ToRaw ( + IN EFI_EXP_BASE2_DATA *Data); + +EFI_STATUS +GetStringFromToken ( + IN EFI_GUID *ProducerGuid, + IN STRING_REF Token, + OUT CHAR16 **String + ); + +VOID +SwapEntries ( + IN CHAR8 *Data + ); + +VOID +AsciiToUnicode ( + IN CHAR8 *AsciiString, + IN CHAR16 *UnicodeString + ); + +VOID +EFIAPI +SetupInfo ( + ); + + +extern EFI_HANDLE mImageHandle; + +#endif diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf new file mode 100644 index 0000000000..9cd774b427 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf @@ -0,0 +1,145 @@ +# +# +# Copyright (c) 1999 - 2014, 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 that 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. +# +# +# +# This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist. +# It doesn't install again if this protocol exists. +# It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol +# and doesn't support other two interfaces GetDriverPath, DriverLoaded. +# +# This driver also offers an UI interface in device manager to let user configure +# platform override protocol to override the default algorithm for matching +# drivers to controllers. +# +# The main flow: +# 1. It dynamicly locate all controller device path. +# 2. It dynamicly locate all drivers which support binding protocol. +# 3. It export and dynamicly update two menu to let user select the +# mapping between drivers to controllers. +# 4. It save all the mapping info in NV variables for the following boot, +# which will be consumed by GetDriver API of the produced the platform override protocol. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = PlatformSetupDxe + FILE_GUID = C1A69A12-8653-4fde-A215-48FCD95288C3 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = PlatformSetupDxeInit + UNLOAD_IMAGE = PlatformSetupDxeUnload + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +[Sources] + VfrStrings.uni + FwVersionStrings.uni + Vfr.vfr + Main.vfi + Boot.vfi + PlatformSetupDxe.c + SetupInfoRecords.c + PlatformSetupDxe.h + Security.vfi + SouthClusterConfig.vfi + Thermal.vfi + SetupFunctions.c + UnCore.vfi + SystemComponent.vfi + DebugConfig.vfi + UqiList.uni + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelFrameworkPkg/IntelFrameworkPkg.dec + Vlv2TbltDevicePkg/PlatformPkg.dec + Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec #for PchAccess.h + SecurityPkg/SecurityPkg.dec + +[LibraryClasses] + BaseLib + DebugLib + UefiLib + UefiDriverEntryPoint + UefiBootServicesTableLib + HiiLib + BaseMemoryLib + MemoryAllocationLib + DevicePathLib + DxeServicesTableLib + UefiRuntimeServicesTableLib + PrintLib + BiosIdLib + CpuIA32Lib + IoLib + +[Guids] + ## This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source. + ## gEfiGlobalVariableGuid ## SOMETIMES_CONSUMED ## Variable:L"PlatformLang" this variable specifies the platform supported language string (RFC 4646 format) + ## gEfiGlobalVariableGuid ## SOMETIMES_CONSUMED ## Variable:L"Lang" this variable specifies the platform supported language string (ISO 639-2 format) + ## + # There could be more than one variables, from PlatDriOver, PlatDriOver1, PlatDriOver2,... + # + # gEfiCallerIdGuid ## Private ## Variable:L"PlatDriOver" + gEfiIfrTianoGuid ## CONSUMES ## Guid + gEfiProcessorSubClassGuid + gEfiMiscSubClassGuid + gEfiCacheSubClassGuid + gEfiMemorySubClassGuid + gEfiPlatformInfoGuid + gEfiNormalSetupGuid + gEfiSecureBootEnableDisableGuid + gOsSelectionVariableGuid + gEfiGlobalVariableGuid + +[Protocols] + gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name if ComponentName2Protocol exists) + gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name if ComponentNameProtocol exists and ComponentName2Protocol doesn't exist) + gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name from EFI UI section if ComponentName2Protocol and ComponentNameProtocol don't exist) + gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMED (Find the PCI device if PciIo protocol is installed) + gEfiPciRootBridgeIoProtocolGuid + gEfiBusSpecificDriverOverrideProtocolGuid ## SOMETIMES_CONSUMED (Check whether the PCI device contains one or more efi drivers in its option rom by this protocol) + + gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMED + gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMED + gEfiLoadedImageDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the drivers in the second page that support DriverBindingProtocol, LoadedImageProtocol and LoadedImageDevicePathProtocol) + gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the controller device in the first page that support DevicePathProtocol) + + gEfiFormBrowser2ProtocolGuid ## CONSUMED + gEfiHiiConfigRoutingProtocolGuid ## CONSUMED + gEfiHiiConfigAccessProtocolGuid ## PRODUCED + gEfiDevicePathToTextProtocolGuid ## CONSUMED + + gEfiDataHubProtocolGuid + gEfiLegacyBiosProtocolGuid + gEfiSimpleNetworkProtocolGuid + + gEfiDiskInfoProtocolGuid ## CONSUMED + gEfiMpServiceProtocolGuid + gDxePchPlatformPolicyProtocolGuid + gEfiCpuIo2ProtocolGuid + gEfiTdtOperationProtocolGuid + gEfiSmbiosProtocolGuid ## PROTOCOL CONSUMES + +[Pcd.common] + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress + +[Depex] + gEfiFormBrowser2ProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Security.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Security.vfi new file mode 100644 index 0000000000..f4922ff0b6 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Security.vfi @@ -0,0 +1,96 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// Security.vfi +// +// Abstract: +// +// Driver Setup formset. +// +// --*/ + +// +// Security Configuration Form +// + + +form formid = SECURITY_CONFIGURATION_FORM_ID, + title = STRING_TOKEN(STR_SECURITY_CONFIGURATION_TITLE); + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + // + //TPM related + // + subtitle text = STRING_TOKEN(STR_TPM_CONFIGURATION_PROMPT); + oneof varid = Setup.ETpm, + prompt = STRING_TOKEN(STR_TPM_PROMPT), + help = STRING_TOKEN(STR_TPM_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value= 0, flags= RESET_REQUIRED; + endoneof; + + oneof varid = Setup.MeasuredBootEnable, + prompt = STRING_TOKEN(STR_MEASURED_BOOT_ENABLE_PROMPT), + help = STRING_TOKEN(STR_MEASURED_BOOT_ENABLE_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_PASSWORD_CONFIGURATION_SUBTITLE); + + password varid = Setup.AdminPassword, + prompt = STRING_TOKEN(STR_ADMIN_PASSWORD), + help = STRING_TOKEN(STR_ADMIN_PASSWORD_HELP), + flags = 0, + minsize = 0, + maxsize = PASSWORD_MAX_SIZE, + encoding = 1, + endpassword; + + password varid = Setup.UserPassword, + prompt = STRING_TOKEN(STR_USER_PASSWORD), + help = STRING_TOKEN(STR_USER_PASSWORD_HELP), + flags = 0, + minsize = 0, + maxsize = PASSWORD_MAX_SIZE, + encoding = 1, + endpassword; +suppressif TRUE; + password varid = Setup.AdminPassword, + prompt = STRING_TOKEN(STR_CHANGE_ADMIN_PASSWORD), + help = STRING_TOKEN(STR_CHANGE_ADMIN_PASSWORD_HELP), + flags = 0, + minsize = 0, + maxsize = PASSWORD_MAX_SIZE, + encoding = 1, + endpassword; + + password varid = Setup.UserPassword, + prompt = STRING_TOKEN(STR_CHANGE_USER_PASSWORD), + help = STRING_TOKEN(STR_CHANGE_USER_PASSWORD_HELP), + flags = 0, + minsize = 0, + maxsize = PASSWORD_MAX_SIZE, + encoding = 1, + endpassword; +endif; + +endform; + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c new file mode 100644 index 0000000000..9d8d0a0e16 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c @@ -0,0 +1,90 @@ +/** @file + + Copyright (c) 2004 - 2014, 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 that 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: + + SetupFunctions.c + +Abstract: + +Revision History + +--*/ + +#include "PlatformSetupDxe.h" + +VOID +AsciiToUnicode ( + IN CHAR8 *AsciiString, + IN CHAR16 *UnicodeString + ) +{ + UINT8 Index; + + Index = 0; + while (AsciiString[Index] != 0) { + UnicodeString[Index] = (CHAR16)AsciiString[Index]; + Index++; + } +} + +VOID +SwapEntries ( + IN CHAR8 *Data + ) +{ + UINT16 Index; + CHAR8 Temp8; + + Index = 0; + while (Data[Index] != 0 && Data[Index+1] != 0) { + Temp8 = Data[Index]; + Data[Index] = Data[Index+1]; + Data[Index+1] = Temp8; + Index +=2; + } + + return; +} + +UINT32 +ConvertBase10ToRaw ( + IN EFI_EXP_BASE10_DATA *Data) +{ + UINTN Index; + UINT32 RawData; + + RawData = Data->Value; + for (Index = 0; Index < (UINTN) Data->Exponent; Index++) { + RawData *= 10; + } + + return RawData; +} + +UINT32 +ConvertBase2ToRaw ( + IN EFI_EXP_BASE2_DATA *Data) +{ + UINTN Index; + UINT32 RawData; + + RawData = Data->Value; + for (Index = 0; Index < (UINTN) Data->Exponent; Index++) { + RawData <<= 1; + } + + return RawData; +} + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c new file mode 100644 index 0000000000..99684e72d7 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -0,0 +1,1865 @@ +/** @file + + Copyright (c) 2004 - 2014, 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 that 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: + + SetupInfoRecords.c + +Abstract: + + This is the filter driver to retrieve data hub entries. + +Revision History: +--*/ + +#include "PlatformSetupDxe.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Valleyview.h" +#include "VlvAccess.h" +#include "PchAccess.h" +#include "SetupMode.h" +#include "PchCommonDefinitions.h" +#include + + +typedef struct { + UINT8 ID; + CHAR8 String[16]; +} VLV_REV; + +typedef struct { + UINT8 RevId; + CHAR8 String[16]; +} SB_REV; + +// +// Silicon Steppings +// +SB_REV SBRevisionTable[] = { + {V_PCH_LPC_RID_0, "(A0 Stepping)"}, + {V_PCH_LPC_RID_1, "(A0 Stepping)"}, + {V_PCH_LPC_RID_2, "(A1 Stepping)"}, + {V_PCH_LPC_RID_3, "(A1 Stepping)"}, + {V_PCH_LPC_RID_4, "(B0 Stepping)"}, + {V_PCH_LPC_RID_5, "(B0 Stepping)"}, + {V_PCH_LPC_RID_6, "(B1 Stepping)"}, + {V_PCH_LPC_RID_7, "(B1 Stepping)"}, + {V_PCH_LPC_RID_8, "(B2 Stepping)"}, + {V_PCH_LPC_RID_9, "(B2 Stepping)"}, + {V_PCH_LPC_RID_A, "(B3 Stepping)"}, + {V_PCH_LPC_RID_B, "(B3 Stepping)"}, + {V_PCH_LPC_RID_C, "(C0 Stepping)"}, + {V_PCH_LPC_RID_D, "(C0 Stepping)"} +}; + +#define LEFT_JUSTIFY 0x01 +#define PREFIX_SIGN 0x02 +#define PREFIX_BLANK 0x04 +#define COMMA_TYPE 0x08 +#define LONG_TYPE 0x10 +#define PREFIX_ZERO 0x20 + +#define ICH_REG_REV 0x08 +#define MSR_IA32_PLATFORM_ID 0x17 + + +BOOLEAN mSetupInfoDone = FALSE; +UINT8 mUseProductKey = 0; +EFI_EXP_BASE10_DATA mProcessorFrequency; +EFI_EXP_BASE10_DATA mProcessorFsbFrequency; + +EFI_GUID mProcessorProducerGuid; +EFI_HII_HANDLE mHiiHandle; +EFI_PLATFORM_CPU_INFO mPlatformCpuInfo; +SYSTEM_CONFIGURATION mSystemConfiguration; +EFI_PLATFORM_INFO_HOB *mPlatformInfo; + + +#define memset SetMem + +UINT16 mMemorySpeed = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelASlot0 = 0; +UINT16 mMemorySpeedChannelASlot0 = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelASlot1 = 0; +UINT16 mMemorySpeedChannelASlot1 = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelBSlot0 = 0; +UINT16 mMemorySpeedChannelBSlot0 = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelBSlot1 = 0; +UINT16 mMemorySpeedChannelBSlot1 = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelCSlot0 = 0; +UINT16 mMemorySpeedChannelCSlot0 = 0xffff; +EFI_PHYSICAL_ADDRESS mMemorySizeChannelCSlot1 = 0; +UINT16 mMemorySpeedChannelCSlot1 = 0xffff; +UINTN mMemoryMode = 0xff; + +#define CHARACTER_NUMBER_FOR_VALUE 30 + typedef struct { + EFI_STRING_TOKEN MemoryDeviceLocator; + EFI_STRING_TOKEN MemoryBankLocator; + EFI_STRING_TOKEN MemoryManufacturer; + EFI_STRING_TOKEN MemorySerialNumber; + EFI_STRING_TOKEN MemoryAssetTag; + EFI_STRING_TOKEN MemoryPartNumber; + EFI_INTER_LINK_DATA MemoryArrayLink; + EFI_INTER_LINK_DATA MemorySubArrayLink; + UINT16 MemoryTotalWidth; + UINT16 MemoryDataWidth; + UINT64 MemoryDeviceSize; + EFI_MEMORY_FORM_FACTOR MemoryFormFactor; + UINT8 MemoryDeviceSet; + EFI_MEMORY_ARRAY_TYPE MemoryType; + EFI_MEMORY_TYPE_DETAIL MemoryTypeDetail; + UINT16 MemorySpeed; + EFI_MEMORY_STATE MemoryState; +} EFI_MEMORY_ARRAY_LINK; + + +typedef struct { + EFI_PHYSICAL_ADDRESS MemoryArrayStartAddress; + EFI_PHYSICAL_ADDRESS MemoryArrayEndAddress; + EFI_INTER_LINK_DATA PhysicalMemoryArrayLink; + UINT16 MemoryArrayPartitionWidth; +} EFI_MEMORY_ARRAY_START_ADDRESS; + + +typedef enum { + PCH_SATA_MODE_IDE = 0, + PCH_SATA_MODE_AHCI, + PCH_SATA_MODE_RAID, + PCH_SATA_MODE_MAX +} PCH_SATA_MODE; + +/** + Acquire the string associated with the Index from smbios structure and return it. + The caller is responsible for free the string buffer. + + @param OptionalStrStart The start position to search the string + @param Index The index of the string to extract + @param String The string that is extracted + + @retval EFI_SUCCESS The function returns EFI_SUCCESS always. + +**/ +EFI_STATUS +GetOptionalStringByIndex ( + IN CHAR8 *OptionalStrStart, + IN UINT8 Index, + OUT CHAR16 **String + ) +{ + UINTN StrSize; + + if (Index == 0) { + *String = AllocateZeroPool (sizeof (CHAR16)); + return EFI_SUCCESS; + } + + StrSize = 0; + do { + Index--; + OptionalStrStart += StrSize; + StrSize = AsciiStrSize (OptionalStrStart); + } while (OptionalStrStart[StrSize] != 0 && Index != 0); + + if ((Index != 0) || (StrSize == 1)) { + // + // Meet the end of strings set but Index is non-zero, or + // Find an empty string + // + return EFI_NOT_FOUND; + } else { + *String = AllocatePool (StrSize * sizeof (CHAR16)); + AsciiStrToUnicodeStr (OptionalStrStart, *String); + } + + return EFI_SUCCESS; +} + +/** + VSPrint worker function that prints a Value as a decimal number in Buffer + + @param Buffer Location to place ascii decimal number string of Value. + @param Value Decimal value to convert to a string in Buffer. + @param Flags Flags to use in printing decimal string, see file header for details. + @param Width Width of hex value. + + Number of characters printed. + +**/ +UINTN +EfiValueToString ( + IN OUT CHAR16 *Buffer, + IN INT64 Value, + IN UINTN Flags, + IN UINTN Width + ) +{ + CHAR16 TempBuffer[CHARACTER_NUMBER_FOR_VALUE]; + CHAR16 *TempStr; + CHAR16 *BufferPtr; + UINTN Count; + UINTN ValueCharNum; + UINTN Remainder; + CHAR16 Prefix; + UINTN Index; + BOOLEAN ValueIsNegative; + UINT64 TempValue; + + TempStr = TempBuffer; + BufferPtr = Buffer; + Count = 0; + ValueCharNum = 0; + ValueIsNegative = FALSE; + + if (Width > CHARACTER_NUMBER_FOR_VALUE - 1) { + Width = CHARACTER_NUMBER_FOR_VALUE - 1; + } + + if (Value < 0) { + Value = -Value; + ValueIsNegative = TRUE; + } + + do { + TempValue = Value; + Value = (INT64)DivU64x32 ((UINT64)Value, 10); + Remainder = (UINTN)((UINT64)TempValue - 10 * Value); + *(TempStr++) = (CHAR16)(Remainder + '0'); + ValueCharNum++; + Count++; + if ((Flags & COMMA_TYPE) == COMMA_TYPE) { + if (ValueCharNum % 3 == 0 && Value != 0) { + *(TempStr++) = ','; + Count++; + } + } + } while (Value != 0); + + if (ValueIsNegative) { + *(TempStr++) = '-'; + Count++; + } + + if ((Flags & PREFIX_ZERO) && !ValueIsNegative) { + Prefix = '0'; + } else { + Prefix = ' '; + } + + Index = Count; + if (!(Flags & LEFT_JUSTIFY)) { + for (; Index < Width; Index++) { + *(TempStr++) = Prefix; + } + } + + // + // Reverse temp string into Buffer. + // + if (Width > 0 && (UINTN) (TempStr - TempBuffer) > Width) { + TempStr = TempBuffer + Width; + } + Index = 0; + while (TempStr != TempBuffer) { + *(BufferPtr++) = *(--TempStr); + Index++; + } + + *BufferPtr = 0; + return Index; +} + +static CHAR16 mHexStr[] = { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', + L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F' }; + +/** + VSPrint worker function that prints a Value as a hex number in Buffer + + @param Buffer Location to place ascii hex string of Value. + @param Value Hex value to convert to a string in Buffer. + @param Flags Flags to use in printing Hex string, see file header for details. + @param Width Width of hex value. + + @retval Number of characters printed. + +**/ +UINTN +EfiValueToHexStr ( + IN OUT CHAR16 *Buffer, + IN UINT64 Value, + IN UINTN Flags, + IN UINTN Width + ) +{ + CHAR16 TempBuffer[CHARACTER_NUMBER_FOR_VALUE]; + CHAR16 *TempStr; + CHAR16 Prefix; + CHAR16 *BufferPtr; + UINTN Count; + UINTN Index; + + TempStr = TempBuffer; + BufferPtr = Buffer; + + // + // Count starts at one since we will null terminate. Each iteration of the + // loop picks off one nibble. Oh yea TempStr ends up backwards + // + Count = 0; + + if (Width > CHARACTER_NUMBER_FOR_VALUE - 1) { + Width = CHARACTER_NUMBER_FOR_VALUE - 1; + } + + do { + Index = ((UINTN)Value & 0xf); + *(TempStr++) = mHexStr[Index]; + Value = RShiftU64 (Value, 4); + Count++; + } while (Value != 0); + + if (Flags & PREFIX_ZERO) { + Prefix = '0'; + } else { + Prefix = ' '; + } + + Index = Count; + if (!(Flags & LEFT_JUSTIFY)) { + for (; Index < Width; Index++) { + *(TempStr++) = Prefix; + } + } + + // + // Reverse temp string into Buffer. + // + if (Width > 0 && (UINTN) (TempStr - TempBuffer) > Width) { + TempStr = TempBuffer + Width; + } + Index = 0; + while (TempStr != TempBuffer) { + *(BufferPtr++) = *(--TempStr); + Index++; + } + + *BufferPtr = 0; + return Index; +} + +/*++ + Converts MAC address to Unicode string. + The value is 64-bit and the resulting string will be 12 + digit hex number in pairs of digits separated by dashes. + + @param String string that will contain the value + @param MacAddr add argument and description to function comment + @param AddrSize add argument and description to function comment + +**/ +CHAR16 * +StrMacToString ( + OUT CHAR16 *String, + IN EFI_MAC_ADDRESS *MacAddr, + IN UINT32 AddrSize + ) +{ + UINT32 i; + + for (i = 0; i < AddrSize; i++) { + + EfiValueToHexStr ( + &String[2 * i], + MacAddr->Addr[i] & 0xFF, + PREFIX_ZERO, + 2 + ); + } + + // + // Terminate the string. + // + String[2 * AddrSize] = L'\0'; + + return String; +} + +VOID UpdateLatestBootTime() { + UINTN VarSize; + EFI_STATUS Status; + UINT64 TimeValue; + CHAR16 Buffer[40]; + if (mSystemConfiguration.LogBootTime != 1) { + return; + } + VarSize = sizeof(TimeValue); + Status = gRT->GetVariable( + BOOT_TIME_NAME, + &gEfiNormalSetupGuid, + NULL, + &VarSize, + &TimeValue + ); + if (EFI_ERROR(Status)) { + return; + } + UnicodeSPrint (Buffer, sizeof (Buffer), L"%d ms", (UINT32)TimeValue); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_LOG_BOOT_TIME_VALUE), Buffer, NULL); +} + +/** + Get Cache Type for the specified Cache. This function is invoked when there is data records + available in the Data Hub. + + Get Cache Type function arguments: + + @param Instance The instance number of the subclass with the same ProducerName.. + @param SubInstance The instance number of the RecordType for the same Instance. + @param CacheType Cache type, see definition of EFI_CACHE_TYPE_DATA. + + @retval EFI_STATUS + +**/ +EFI_STATUS +GetCacheType( + IN UINT16 Instance, + IN UINT16 SubInstance, + IN EFI_CACHE_TYPE_DATA* CacheType) +{ + EFI_STATUS Status; + EFI_DATA_HUB_PROTOCOL *DataHub; + EFI_DATA_RECORD_HEADER *Record; + UINT64 MonotonicCount; + EFI_CACHE_VARIABLE_RECORD* CacheVariableRecord; + EFI_SUBCLASS_TYPE1_HEADER *DataHeader; + + Status = gBS->LocateProtocol ( + &gEfiDataHubProtocolGuid, + NULL, + (void **)&DataHub + ); + ASSERT_EFI_ERROR(Status); + + // + // Get all available data records from data hub + // + MonotonicCount = 0; + Record = NULL; + + do { + Status = DataHub->GetNextRecord ( + DataHub, + &MonotonicCount, + NULL, + &Record + ); + if (!EFI_ERROR(Status)) { + if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { + DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); + + if(CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClassGuid) && + (DataHeader->RecordType == CacheTypeRecordType) && + (DataHeader->Instance == Instance) && + (DataHeader->SubInstance == SubInstance)) { + CacheVariableRecord = (EFI_CACHE_VARIABLE_RECORD *)(DataHeader + 1); + if(CacheType){ + *CacheType = CacheVariableRecord->CacheType; + return EFI_SUCCESS; + } + } + } + } + } while(!EFI_ERROR(Status) && (MonotonicCount != 0)); + + return EFI_NOT_FOUND; +} + +/** + Setup data filter function. This function is invoked when there is data records + available in the Data Hub. + + + Standard event notification function arguments: + @param Event The event that is signaled. + @param Context Not used here. + + @retval EFI_STATUS + +**/ +VOID +PrepareSetupInformation ( + ) +{ + + EFI_STATUS Status; + EFI_DATA_HUB_PROTOCOL *DataHub; + EFI_DATA_RECORD_HEADER *Record; + UINT8 *SrcData; + UINT32 SrcDataSize; + EFI_SUBCLASS_TYPE1_HEADER *DataHeader; + CHAR16 *NewString; + CHAR16 *NewString2; + CHAR16 *NewStringToken; + STRING_REF TokenToUpdate; + EFI_PROCESSOR_VERSION_DATA *ProcessorVersion; + UINTN Index; + UINT16 EeState; + UINTN DataOutput; + + EFI_PROCESSOR_MICROCODE_REVISION_DATA *CpuUcodeRevisionData; + EFI_MEMORY_ARRAY_START_ADDRESS *MemoryArray; + EFI_MEMORY_ARRAY_LINK *MemoryArrayLink; + UINT64 MonotonicCount; + + CHAR16 Version[100]; //Assuming that strings are < 100 UCHAR + CHAR16 ReleaseDate[100]; //Assuming that strings are < 100 UCHAR + CHAR16 ReleaseTime[100]; //Assuming that strings are < 100 UCHAR + + NewString = AllocateZeroPool (0x100); + NewString2 = AllocateZeroPool (0x100); + SetMem(Version, sizeof(Version), 0); + SetMem(ReleaseDate, sizeof(ReleaseDate), 0); + SetMem(ReleaseTime, sizeof(ReleaseTime), 0); + + // + // Initialize EE state for not to show EE related setup options + // + EeState = 0; + + // + // Get the Data Hub Protocol. Assume only one instance + // + Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (void **)&DataHub); + ASSERT_EFI_ERROR(Status); + + // + // Get all available data records from data hub + // + MonotonicCount = 0; + Record = NULL; + + do { + Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record); + if (!EFI_ERROR(Status)) { + if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { + DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); + SrcData = (UINT8 *)(DataHeader + 1); + SrcDataSize = Record->RecordSize - Record->HeaderSize - sizeof (EFI_SUBCLASS_TYPE1_HEADER); + + // + // Processor + // + if (CompareGuid(&Record->DataRecordGuid, &gEfiProcessorSubClassGuid)) { + CopyMem (&mProcessorProducerGuid, &Record->ProducerName, sizeof(EFI_GUID)); + switch (DataHeader->RecordType) { + case ProcessorCoreFrequencyRecordType: + CopyMem(&mProcessorFrequency, SrcData, sizeof(EFI_EXP_BASE10_DATA)); + Index = EfiValueToString ( + NewString, + ConvertBase10ToRaw ((EFI_EXP_BASE10_DATA *)SrcData)/1000000000, + PREFIX_ZERO, + 0 + ); + StrCat (NewString, L"."); + EfiValueToString ( + NewString + Index + 1, + ((ConvertBase10ToRaw ((EFI_EXP_BASE10_DATA *)SrcData)%1000000000)/10000000), + PREFIX_ZERO, + 0 + ); + StrCat (NewString, L" GHz"); + TokenToUpdate = (STRING_REF)STR_PROCESSOR_SPEED_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + break; + + case ProcessorVersionRecordType: + ProcessorVersion = (EFI_PROCESSOR_VERSION_DATA *)SrcData; + NewStringToken = HiiGetPackageString(&mProcessorProducerGuid, *ProcessorVersion, NULL); + TokenToUpdate = (STRING_REF)STR_PROCESSOR_VERSION_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, NewStringToken, NULL); + break; + case CpuUcodeRevisionDataRecordType: + CpuUcodeRevisionData = (EFI_PROCESSOR_MICROCODE_REVISION_DATA *) SrcData; + if (CpuUcodeRevisionData->ProcessorMicrocodeRevisionNumber != 0) { + EfiValueToHexStr ( + NewString, + CpuUcodeRevisionData->ProcessorMicrocodeRevisionNumber, + PREFIX_ZERO, + 8 + ); + TokenToUpdate = (STRING_REF)STR_PROCESSOR_MICROCODE_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + } + break; + default: + break; + } + + // + // Cache + // + } else if (CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClassGuid) && + (DataHeader->RecordType == CacheSizeRecordType)) { + if (DataHeader->SubInstance == EFI_CACHE_L1) { + EFI_CACHE_TYPE_DATA CacheType; + if (EFI_SUCCESS == GetCacheType(DataHeader->Instance, DataHeader->SubInstance,&CacheType)){ + if (CacheType == EfiCacheTypeData) { + TokenToUpdate = (STRING_REF)STR_PROCESSOR_L1_DATA_CACHE_VALUE; + } else if (CacheType == EfiCacheTypeInstruction) { + TokenToUpdate = (STRING_REF)STR_PROCESSOR_L1_INSTR_CACHE_VALUE; + } else { + continue; + } + } else { + continue; + } + } + else if (DataHeader->SubInstance == EFI_CACHE_L2) { + TokenToUpdate = (STRING_REF)STR_PROCESSOR_L2_CACHE_VALUE; + } else { + continue; + } + if (ConvertBase2ToRaw((EFI_EXP_BASE2_DATA *)SrcData)) { + DataOutput = ConvertBase2ToRaw((EFI_EXP_BASE2_DATA *)SrcData) >> 10; + EfiValueToString (NewString, DataOutput, PREFIX_ZERO, 0); + + StrCat (NewString, L" KB"); + if (DataHeader->SubInstance == EFI_CACHE_L3) { + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + } else if(DataHeader->SubInstance == EFI_CACHE_L2 && mPlatformCpuInfo.CpuPackage.CoresPerPhysicalPackage > 1){ + // + // Show XxL2 string + // + EfiValueToString ( + NewString2, + mPlatformCpuInfo.CpuPackage.CoresPerPhysicalPackage, + PREFIX_ZERO, + 0 + ); + StrCat(NewString2, L"x "); + StrCat(NewString2, NewString); + HiiSetString(mHiiHandle, TokenToUpdate, NewString2, NULL); + } else { + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + } + } + + // + // Memory + // + } else if (CompareGuid(&Record->DataRecordGuid, &gEfiMemorySubClassGuid)) { + switch (DataHeader->RecordType) { + case EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER: + MemoryArrayLink = (EFI_MEMORY_ARRAY_LINK *)SrcData; + + if (MemoryArrayLink->MemorySpeed > 0) { + // + // Save the lowest speed memory module + // + if (MemoryArrayLink->MemorySpeed < mMemorySpeed) { + mMemorySpeed = MemoryArrayLink->MemorySpeed; + } + switch (DataHeader->SubInstance) { + case 1: + mMemorySpeedChannelASlot0 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelASlot0 = MemoryArrayLink->MemoryDeviceSize; + break; + case 2: + mMemorySpeedChannelASlot1 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelASlot1 = MemoryArrayLink->MemoryDeviceSize; + break; + case 3: + mMemorySpeedChannelBSlot0 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelBSlot0 = MemoryArrayLink->MemoryDeviceSize; + break; + case 4: + mMemorySpeedChannelBSlot1 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelBSlot1 = MemoryArrayLink->MemoryDeviceSize; + break; + case 5: + mMemorySpeedChannelCSlot0 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelCSlot0 = MemoryArrayLink->MemoryDeviceSize; + break; + case 6: + mMemorySpeedChannelCSlot1 = MemoryArrayLink->MemorySpeed; + mMemorySizeChannelCSlot1 = MemoryArrayLink->MemoryDeviceSize; + break; + default: + break; + } + } + break; + + case EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER: + MemoryArray = (EFI_MEMORY_ARRAY_START_ADDRESS *)SrcData; + if (MemoryArray->MemoryArrayEndAddress - MemoryArray->MemoryArrayStartAddress) { + DataOutput = (UINTN)RShiftU64((MemoryArray->MemoryArrayEndAddress - MemoryArray->MemoryArrayStartAddress + 1), 20); + EfiValueToString (NewString, DataOutput / 1024, PREFIX_ZERO, 0); + if(DataOutput % 1024) { + StrCat (NewString, L"."); + DataOutput = ((DataOutput % 1024) * 1000) / 1024; + while(!(DataOutput % 10)) + DataOutput = DataOutput / 10; + EfiValueToString (NewString2, DataOutput, PREFIX_ZERO, 0); + StrCat (NewString, NewString2); + } + StrCat (NewString, L" GB"); + TokenToUpdate = (STRING_REF)STR_TOTAL_MEMORY_SIZE_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + } + break; + + default: + break; + } + } + } + } + } while (!EFI_ERROR(Status) && (MonotonicCount != 0)); + + Status = GetBiosVersionDateTime ( + Version, + ReleaseDate, + ReleaseTime + ); + + DEBUG ((EFI_D_ERROR, "GetBiosVersionDateTime :%s %s %s \n", Version, ReleaseDate, ReleaseTime)); + if (!EFI_ERROR (Status)) { + UINTN Length = 0; + CHAR16 *BuildDateTime; + + Length = StrLen(ReleaseDate) + StrLen(ReleaseTime); + + BuildDateTime = AllocateZeroPool ((Length+2) * sizeof(CHAR16)); + StrCpy (BuildDateTime, ReleaseDate); + StrCat (BuildDateTime, L" "); + StrCat (BuildDateTime, ReleaseTime); + + TokenToUpdate = (STRING_REF)STR_BIOS_VERSION_VALUE; + DEBUG ((EFI_D_ERROR, "update STR_BIOS_VERSION_VALUE\n")); + HiiSetString(mHiiHandle, TokenToUpdate, Version, NULL); + + TokenToUpdate = (STRING_REF)STR_BIOS_BUILD_TIME_VALUE; + DEBUG ((EFI_D_ERROR, "update STR_BIOS_BUILD_TIME_VALUE\n")); + HiiSetString(mHiiHandle, TokenToUpdate, BuildDateTime, NULL); + } + + // + // Calculate and update memory speed display in Main Page + // + // + // Update the overall memory speed + // + if (mMemorySpeed != 0xffff) { + EfiValueToString (NewString, mMemorySpeed, PREFIX_ZERO, 0); + StrCat (NewString, L" MHz"); + + TokenToUpdate = (STRING_REF)STR_SYSTEM_MEMORY_SPEED_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); + } + + gBS->FreePool(NewString); + gBS->FreePool(NewString2); + + return; +} + +/** + + Routine Description: update the SETUP info for "Additional Information" which is SMBIOS info. + + @retval EFI_STATUS + +**/ +EFI_STATUS +UpdateAdditionalInformation ( + ) +{ + EFI_STATUS Status; + UINT64 MonotonicCount; + EFI_DATA_HUB_PROTOCOL *DataHub; + EFI_DATA_RECORD_HEADER *Record; + EFI_SUBCLASS_TYPE1_HEADER *DataHeader; + EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer; + UINTN Size; + EFI_SMBIOS_PROTOCOL *Smbios; + EFI_SMBIOS_HANDLE SmbiosHandle; + EFI_SMBIOS_TABLE_HEADER *SmbiosRecord; + SMBIOS_TABLE_TYPE0 *Type0Record; + UINT8 StrIndex; + CHAR16 *BiosVersion = NULL; + CHAR16 *IfwiVersion = NULL; + UINT16 SearchIndex; + EFI_STRING_ID TokenToUpdate; + + Status = gBS->LocateProtocol ( + &gEfiDataHubProtocolGuid, + NULL, + (void **)&DataHub + ); + + ASSERT_EFI_ERROR(Status); + + Size = 3; + + MonotonicCount = 0; + Record = NULL; + do { + Status = DataHub->GetNextRecord ( + DataHub, + &MonotonicCount, + NULL, + &Record + ); + if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { + DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); + + if (CompareGuid(&Record->DataRecordGuid, &gEfiMiscSubClassGuid) && + (DataHeader->RecordType == EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER)) { + // + // System Information + // + SystemManufacturer = (EFI_MISC_SYSTEM_MANUFACTURER *)(DataHeader + 1); + +#if defined( RVP_SUPPORT ) && RVP_SUPPORT + // + // UUID (System Information) + // + SMBIOSString = EfiLibAllocateZeroPool (0x100); + GuidToString ( &SystemManufacturer->SystemUuid, SMBIOSString, 0x00 ); + + TokenToUpdate = (STRING_REF)STR_SYSTEM_UUID_VALUE; + HiiSetString(mHiiHandle, TokenToUpdate, SMBIOSString, NULL); + + gBS->FreePool(SMBIOSString); +#endif + } + } + } while (!EFI_ERROR(Status) && (MonotonicCount != 0)); + + Status = gBS->LocateProtocol ( + &gEfiSmbiosProtocolGuid, + NULL, + (VOID **) &Smbios + ); + ASSERT_EFI_ERROR (Status); + + SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; + do { + Status = Smbios->GetNext ( + Smbios, + &SmbiosHandle, + NULL, + &SmbiosRecord, + NULL + ); + if (SmbiosRecord->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) { + Type0Record = (SMBIOS_TABLE_TYPE0 *) SmbiosRecord; + StrIndex = Type0Record->BiosVersion; + GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length), StrIndex, &BiosVersion); + TokenToUpdate = STRING_TOKEN (STR_BIOS_VERSION_VALUE); + for (SearchIndex = 0x0; SearchIndex < SMBIOS_STRING_MAX_LENGTH; SearchIndex++) { + if (BiosVersion[SearchIndex] == 0x0020) { + BiosVersion[SearchIndex] = 0x0000; + IfwiVersion = (CHAR16 *)(&BiosVersion[SearchIndex+1]); + break; + } else if (BiosVersion[SearchIndex] == 0x0000) { + break; + } + } + HiiSetString (mHiiHandle, TokenToUpdate, BiosVersion, NULL); + + // + // Check IfwiVersion, to avoid no IFWI version in SMBIOS Type 0 strucntion + // + if(IfwiVersion) { + TokenToUpdate = STRING_TOKEN (STR_IFWI_VERSION_VALUE); + HiiSetString (mHiiHandle, TokenToUpdate, IfwiVersion, NULL); + } + } + } while (!EFI_ERROR(Status)); + + UpdateLatestBootTime(); + + return EFI_SUCCESS; +} + +VOID +UpdateCPUInformation () +{ + CHAR16 Buffer[40]; + UINT16 FamilyId; + UINT8 Model; + UINT8 SteppingId; + UINT8 ProcessorType; + EFI_STATUS Status; + EFI_MP_SERVICES_PROTOCOL *MpService; + UINTN MaximumNumberOfCPUs; + UINTN NumberOfEnabledCPUs; + UINT32 Buffer32 = 0xFFFFFFFF; // Keep buffer with unknown device + + EfiCpuVersion (&FamilyId, &Model, &SteppingId, &ProcessorType); + + // + //we need raw Model data + // + Model = Model & 0xf; + + // + //Family/Model/Step + // + UnicodeSPrint (Buffer, sizeof (Buffer), L"%d/%d/%d", FamilyId, Model, SteppingId); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PROCESSOR_ID_VALUE), Buffer, NULL); + + Status = gBS->LocateProtocol ( + &gEfiMpServiceProtocolGuid, + NULL, + (void **)&MpService + ); + if (!EFI_ERROR (Status)) { + // + // Determine the number of processors + // + MpService->GetNumberOfProcessors ( + MpService, + &MaximumNumberOfCPUs, + &NumberOfEnabledCPUs + ); + UnicodeSPrint (Buffer, sizeof (Buffer), L"%d", MaximumNumberOfCPUs); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PROCESSOR_CORE_VALUE), Buffer, NULL); + } + // + // Update Mobile / Desktop / Tablet SKU + // + Buffer32 =(UINT32) RShiftU64 (EfiReadMsr (MSR_IA32_PLATFORM_ID), 50) & 0x07; + + switch(Buffer32){ + case 0x0: + UnicodeSPrint (Buffer, sizeof (Buffer), L"(%d) - ISG SKU SOC", Buffer32); + break; + case 0x01: + UnicodeSPrint (Buffer, sizeof (Buffer), L"(%d) - Mobile SKU SOC", Buffer32); + break; + case 0x02: + UnicodeSPrint (Buffer, sizeof (Buffer), L"(%d) - Desktop SKU SOC", Buffer32); + break; + case 0x03: + UnicodeSPrint (Buffer, sizeof (Buffer), L"(%d) - Mobile SKU SOC", Buffer32); + break; + default: + UnicodeSPrint (Buffer, sizeof (Buffer), L"(%d) - Unknown SKU SOC", Buffer32); + break; + } + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PROCESSOR_SKU_VALUE), Buffer, NULL); + +} + + +EFI_STATUS +SearchChildHandle( + EFI_HANDLE Father, + EFI_HANDLE *Child + ) +{ + EFI_STATUS Status; + UINTN HandleIndex; + EFI_GUID **ProtocolGuidArray = NULL; + UINTN ArrayCount; + UINTN ProtocolIndex; + UINTN OpenInfoCount; + UINTN OpenInfoIndex; + EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfo = NULL; + UINTN mHandleCount; + EFI_HANDLE *mHandleBuffer= NULL; + + // + // Retrieve the list of all handles from the handle database + // + Status = gBS->LocateHandleBuffer ( + AllHandles, + NULL, + NULL, + &mHandleCount, + &mHandleBuffer + ); + + for (HandleIndex = 0; HandleIndex < mHandleCount; HandleIndex++) + { + // + // Retrieve the list of all the protocols on each handle + // + Status = gBS->ProtocolsPerHandle ( + mHandleBuffer[HandleIndex], + &ProtocolGuidArray, + &ArrayCount + ); + if (!EFI_ERROR (Status)) + { + for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) + { + Status = gBS->OpenProtocolInformation ( + mHandleBuffer[HandleIndex], + ProtocolGuidArray[ProtocolIndex], + &OpenInfo, + &OpenInfoCount + ); + if (!EFI_ERROR (Status)) + { + for (OpenInfoIndex = 0; OpenInfoIndex < OpenInfoCount; OpenInfoIndex++) + { + if(OpenInfo[OpenInfoIndex].AgentHandle == Father) + { + if ((OpenInfo[OpenInfoIndex].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) == EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) + { + *Child = mHandleBuffer[HandleIndex]; + Status = EFI_SUCCESS; + goto TryReturn; + } + } + } + Status = EFI_NOT_FOUND; + } + } + if(OpenInfo != NULL) + { + FreePool(OpenInfo); + OpenInfo = NULL; + } + } + FreePool (ProtocolGuidArray); + ProtocolGuidArray = NULL; + } +TryReturn: + if(OpenInfo != NULL) + { + FreePool (OpenInfo); + OpenInfo = NULL; + } + if(ProtocolGuidArray != NULL) + { + FreePool(ProtocolGuidArray); + ProtocolGuidArray = NULL; + } + if(mHandleBuffer != NULL) + { + FreePool (mHandleBuffer); + mHandleBuffer = NULL; + } + return Status; +} + +EFI_STATUS +JudgeHandleIsPCIDevice( + EFI_HANDLE Handle, + UINT8 Device, + UINT8 Funs + ) +{ + EFI_STATUS Status; + EFI_DEVICE_PATH *DPath; + EFI_DEVICE_PATH *DevicePath; + + Status = gBS->HandleProtocol ( + Handle, + &gEfiDevicePathProtocolGuid, + (VOID **) &DPath + ); + if(!EFI_ERROR(Status)) + { + DevicePath = DPath; + while(!IsDevicePathEnd(DPath)) + { + if((DPath->Type == HARDWARE_DEVICE_PATH) && (DPath->SubType == HW_PCI_DP)) + { + PCI_DEVICE_PATH *PCIPath; + + PCIPath = (PCI_DEVICE_PATH*) DPath; + DPath = NextDevicePathNode(DPath); + if(IsDevicePathEnd(DPath) && (PCIPath->Device == Device) && (PCIPath->Function == Funs)) + { + return EFI_SUCCESS; + } + } + else + { + DPath = NextDevicePathNode(DPath); + } + } + } + return EFI_UNSUPPORTED; +} + +EFI_STATUS +GetDriverName( + EFI_HANDLE Handle, + CHAR16 *Name + ) +{ + EFI_DRIVER_BINDING_PROTOCOL *BindHandle = NULL; + EFI_STATUS Status; + UINT32 Version; + UINT16 *Ptr; + Status = gBS->OpenProtocol( + Handle, + &gEfiDriverBindingProtocolGuid, + (VOID**)&BindHandle, + NULL, + NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL + ); + + if (EFI_ERROR(Status)) + { + return EFI_NOT_FOUND; + } + + Version = BindHandle->Version; + Ptr = (UINT16*)&Version; + UnicodeSPrint(Name, 40, L"%d.%d.%d", Version >> 24 , (Version >>16)& 0x0f ,*(Ptr)); + + return EFI_SUCCESS; +} + +EFI_STATUS +GetGOPDriverName( + CHAR16 *Name + ) +{ + UINTN HandleCount; + EFI_HANDLE *Handles= NULL; + UINTN Index; + EFI_STATUS Status; + EFI_HANDLE Child = 0; + + Status = gBS->LocateHandleBuffer( + ByProtocol, + &gEfiDriverBindingProtocolGuid, + NULL, + &HandleCount, + &Handles + ); + for (Index = 0; Index < HandleCount ; Index++) + { + Status = SearchChildHandle(Handles[Index], &Child); + if(!EFI_ERROR(Status)) + { + Status = JudgeHandleIsPCIDevice( + Child, + 0x02, + 0x00 + ); + if(!EFI_ERROR(Status)) + { + return GetDriverName(Handles[Index], Name); + } + } + } + return EFI_UNSUPPORTED; +} + +EFI_STATUS +UpdatePlatformInformation ( + ) +{ + UINT32 MicroCodeVersion; + CHAR16 Buffer[40]; + UINT8 IgdVBIOSRevH; + UINT8 IgdVBIOSRevL; + UINT16 EDX; + EFI_IA32_REGISTER_SET RegSet; + EFI_LEGACY_BIOS_PROTOCOL *LegacyBios = NULL; + EFI_STATUS Status; + UINT8 CpuFlavor=0; + EFI_PEI_HOB_POINTERS GuidHob; + EFI_PLATFORM_INFO_HOB *mPlatformInfo=NULL; + UINTN NumHandles; + EFI_HANDLE *HandleBuffer; + UINTN Index; + DXE_PCH_PLATFORM_POLICY_PROTOCOL *PchPlatformPolicy; + UINTN PciD31F0RegBase; + UINT8 count; + UINT8 Data8; + UINT8 PIDData8; + + CHAR16 Name[40]; + UINT32 MrcVersion; + + // + // Get the HOB list. If it is not present, then ASSERT. + // + GuidHob.Raw = GetHobList (); + if (GuidHob.Raw != NULL) { + if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) { + mPlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid); + } + } + + // + //VBIOS version + // + Status = gBS->LocateProtocol( + &gEfiLegacyBiosProtocolGuid, + NULL, + (void **)&LegacyBios + ); + if (!EFI_ERROR (Status)) { + RegSet.X.AX = 0x5f01; + Status = LegacyBios->Int86 (LegacyBios, 0x10, &RegSet); + ASSERT_EFI_ERROR(Status); + + // + // simulate AMI int15 (ax=5f01) handler + // check NbInt15.asm in AMI code for asm edition + // + EDX = (UINT16)((RegSet.E.EBX >> 16) & 0xffff); + IgdVBIOSRevH = (UINT8)(((EDX & 0x0F00) >> 4) | (EDX & 0x000F)); + IgdVBIOSRevL = (UINT8)(((RegSet.X.BX & 0x0F00) >> 4) | (RegSet.X.BX & 0x000F)); + + if (IgdVBIOSRevH==0 && IgdVBIOSRevL==0){ + HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), L"N/A", NULL); + } else { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%02X%02X", IgdVBIOSRevH,IgdVBIOSRevL); + HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), Buffer, NULL); + } + } + + Status = GetGOPDriverName(Name); + + if (!EFI_ERROR(Status)) + { + HiiSetString(mHiiHandle, STRING_TOKEN(STR_GOP_VALUE), Name, NULL); + } + + + // + // CpuFlavor + // ISG-DC Tablet 000 + // VLV-QC Tablet 001 + // VLV-QC Desktop 010 + // VLV-QC Notebook 011 + // + CpuFlavor = RShiftU64 (EfiReadMsr (MSR_IA32_PLATFORM_ID), 50) & 0x07; + + switch(CpuFlavor){ + case 0x0: + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s (%01x)", L"VLV-DC Tablet", CpuFlavor); + break; + case 0x01: + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s (%01x)", L"VLV-QC Notebook", CpuFlavor); + break; + case 0x02: + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s (%01x)", L"VLV-QC Desktop", CpuFlavor); + break; + case 0x03: + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s (%01x)", L"VLV-QC Notebook", CpuFlavor); + break; + default: + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s (%01x)", L"Unknown CPU", CpuFlavor); + break; + } + HiiSetString(mHiiHandle,STRING_TOKEN(STR_CPU_FLAVOR_VALUE), Buffer, NULL); + + if ( NULL != mPlatformInfo) { + // + //BoardId + // + switch(mPlatformInfo->BoardId){ + case 0x2: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE RVP(%02x)", mPlatformInfo->BoardId); + break; + + case 0x4: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFRD(%02x)", mPlatformInfo->BoardId); + break; + + case 0x5: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY ROCK RVP DDR3L (%02x)", mPlatformInfo->BoardId); + break; + + case 0x20: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAYLEY BAY (%02x)", mPlatformInfo->BoardId); + break; + + case 0x30: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAKER SPORT (%02x)", mPlatformInfo->BoardId); + break; + + case 0x0: + UnicodeSPrint (Buffer, sizeof (Buffer), L"ALPINE VALLEY (%x)", mPlatformInfo->BoardId); + break; + + case 0x3: + UnicodeSPrint (Buffer, sizeof (Buffer), L"BAY LAKE FFD8 (%x)", mPlatformInfo->BoardId); + break; + + default: + UnicodeSPrint (Buffer, sizeof (Buffer), L"Unknown BOARD (%02x)", mPlatformInfo->BoardId); + break; + } + HiiSetString(mHiiHandle,STRING_TOKEN(STR_BOARD_ID_VALUE), Buffer, NULL); + + + // + // Get Board FAB ID Info from protocol, update into the NVS area. + // bit0~bit3 are for Fab ID, 0x0F means unknow FAB. + // + if(mPlatformInfo->BoardRev == 0x0F) { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", L"Unknown FAB"); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_FAB_ID_VALUE), Buffer, NULL); + } else { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%2x", mPlatformInfo->BoardRev); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_FAB_ID_VALUE), Buffer, NULL); + } + } + + // + //Update MRC Version + // + MrcVersion = 0x00000000; + MrcVersion &= 0xffff; + Index = EfiValueToString (Buffer, MrcVersion/100, PREFIX_ZERO, 0); + StrCat (Buffer, L"."); + EfiValueToString (Buffer + Index + 1, (MrcVersion%100)/10, PREFIX_ZERO, 0); + EfiValueToString (Buffer + Index + 2, (MrcVersion%100)%10, PREFIX_ZERO, 0); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_MRC_VERSION_VALUE), Buffer, NULL); + + // + //Update Soc Version + // + + // + // Retrieve all instances of PCH Platform Policy protocol + // + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gDxePchPlatformPolicyProtocolGuid, + NULL, + &NumHandles, + &HandleBuffer + ); + if (!EFI_ERROR (Status)) { + // + // Find the matching PCH Policy protocol + // + for (Index = 0; Index < NumHandles; Index++) { + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gDxePchPlatformPolicyProtocolGuid, + (void **)&PchPlatformPolicy + ); + if (!EFI_ERROR (Status)) { + PciD31F0RegBase = MmPciAddress ( + 0, + PchPlatformPolicy->BusNumber, + PCI_DEVICE_NUMBER_PCH_LPC, + PCI_FUNCTION_NUMBER_PCH_LPC, + 0 + ); + + Data8 = MmioRead8 (PciD31F0RegBase + R_PCH_LPC_RID_CC); + count = sizeof (SBRevisionTable) / sizeof (SBRevisionTable[0]); + for (Index = 0; Index < count; Index++) { + if(Data8 == SBRevisionTable[Index].RevId) { + UnicodeSPrint (Buffer, sizeof (Buffer), L"%02x %a", Data8, SBRevisionTable[Index].String); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_SOC_VALUE), Buffer, NULL); + break; + } + } + break; + } + } + } + + // + // Microcode Revision + // + EfiWriteMsr (EFI_MSR_IA32_BIOS_SIGN_ID, 0); + EfiCpuid (EFI_CPUID_VERSION_INFO, NULL); + MicroCodeVersion = (UINT32) RShiftU64 (EfiReadMsr (EFI_MSR_IA32_BIOS_SIGN_ID), 32); + UnicodeSPrint (Buffer, sizeof (Buffer), L"%x", MicroCodeVersion); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PROCESSOR_MICROCODE_VALUE), Buffer, NULL); + + // + // Punit Version + // + Data8 = 0; + UnicodeSPrint (Buffer, sizeof (Buffer), L"0x%x", Data8); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PUNIT_FW_VALUE), Buffer, NULL); + + // + // PMC Version + // + Data8 = (UINT8)((MmioRead32 (PMC_BASE_ADDRESS + R_PCH_PMC_PRSTS)>>16)&0x00FF); + PIDData8 = (UINT8)((MmioRead32 (PMC_BASE_ADDRESS + R_PCH_PMC_PRSTS)>>24)&0x00FF); + UnicodeSPrint (Buffer, sizeof (Buffer), L"0x%X_%X",PIDData8, Data8); + HiiSetString(mHiiHandle,STRING_TOKEN(STR_PMC_FW_VALUE), Buffer, NULL); + + return EFI_SUCCESS; +} + +/** + + Update SATA Drivesize Strings for Setup and Boot order + + @param NewString - pointer to string. + @param DeviceSpeed - speed of drive. + +**/ +VOID +GetDeviceSpeedString ( + CHAR16 *NewString, + IN UINTN DeviceSpeed + ) +{ + if (DeviceSpeed == 0x01) { + StrCat (NewString, L"1.5Gb/s"); + } else if (DeviceSpeed == 0x02) { + StrCat (NewString, L"3.0Gb/s"); + } else if (DeviceSpeed == 0x03) { + StrCat (NewString, L"6.0Gb/s"); + } else if (DeviceSpeed == 0x0) { + + } +} + +UINT8 +GetChipsetSataPortSpeed ( + UINTN PortNum + ) +{ + UINT32 DeviceSpeed; + UINT8 DeviceConfigStatus; + UINT32 IdeAhciBar; + EFI_PHYSICAL_ADDRESS MemBaseAddress = 0; + UINT8 FunNum; + EFI_STATUS Status; + UINT32 DwordReg; + + + DeviceSpeed = 0x01; // generation 1 + + + // + // Allocate the AHCI BAR + // + FunNum = PCI_FUNCTION_NUMBER_PCH_SATA; + MemBaseAddress = 0x0ffffffff; + Status = gDS->AllocateMemorySpace ( + EfiGcdAllocateMaxAddressSearchBottomUp, + EfiGcdMemoryTypeMemoryMappedIo, + N_PCH_SATA_ABAR_ALIGNMENT, // 2^11: 2K Alignment + V_PCH_SATA_ABAR_LENGTH, // 2K Length + &MemBaseAddress, + mImageHandle, + NULL + ); + IdeAhciBar = MmioRead32 ( + MmPciAddress ( + 0, + 0, + PCI_DEVICE_NUMBER_PCH_SATA, + FunNum, + R_PCH_SATA_ABAR + ) + ); + IdeAhciBar &= 0xFFFFF800; + DeviceConfigStatus = 0; + if (IdeAhciBar == 0) { + DeviceConfigStatus = 1; + IdeAhciBar = (UINT32)MemBaseAddress; + MmioWrite32 ( + MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, FunNum, R_PCH_SATA_ABAR), + IdeAhciBar + ); + MmioOr16 ( + MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, FunNum, R_PCH_SATA_COMMAND), + B_PCH_SATA_COMMAND_MSE + ); + } + + if (mSystemConfiguration.SataType == PCH_SATA_MODE_IDE){ + // + // Program the "Ports Implemented Register" + // + MmioAndThenOr32 (IdeAhciBar + R_PCH_SATA_AHCI_PI, (UINT32)~(B_PCH_SATA_PORT0_IMPLEMENTED + B_PCH_SATA_PORT1_IMPLEMENTED), (UINT32)(B_PCH_SATA_PORT0_IMPLEMENTED + B_PCH_SATA_PORT1_IMPLEMENTED)); + DwordReg = MmioRead32 (IdeAhciBar + R_PCH_SATA_AHCI_PI); + } + + switch (PortNum) + { + case 0: + DeviceSpeed = *(volatile UINT32 *)(UINTN)(IdeAhciBar + R_PCH_SATA_AHCI_P0SSTS); + break; + case 1: + DeviceSpeed = *(volatile UINT32 *)(UINTN)(IdeAhciBar + R_PCH_SATA_AHCI_P1SSTS); + break; + } + + if (MemBaseAddress) { + gDS->FreeMemorySpace ( + MemBaseAddress, + V_PCH_SATA_ABAR_LENGTH + ); + } + + if (DeviceConfigStatus) { + IdeAhciBar = 0; + MmioWrite32 ( + MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, FunNum, R_PCH_SATA_ABAR), + IdeAhciBar + ); + } + + DeviceSpeed = (UINT8)((DeviceSpeed >> 4) & 0x0F); + + return (UINT8)DeviceSpeed; +} + +/** + + IDE data filter function. + +**/ +void +IdeDataFilter (void) +{ + EFI_STATUS Status; + UINTN HandleCount; + EFI_HANDLE *HandleBuffer; + EFI_DISK_INFO_PROTOCOL *DiskInfo; + EFI_DEVICE_PATH_PROTOCOL *DevicePath, *DevicePathNode; + PCI_DEVICE_PATH *PciDevicePath; + UINTN Index; + UINT8 Index1; + UINT32 BufferSize; + UINT32 DriveSize; + UINT32 IdeChannel; + UINT32 IdeDevice; + EFI_ATA_IDENTIFY_DATA *IdentifyDriveInfo; + CHAR16 *NewString; + CHAR16 SizeString[20]; + STRING_REF NameToUpdate; + CHAR8 StringBuffer[0x100]; + UINT32 DeviceSpeed; + UINTN PortNumber; + + // + // Assume no line strings is longer than 256 bytes. + // + NewString = AllocateZeroPool (0x100); + PciDevicePath = NULL; + + // + // Fill IDE Infomation + // + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiDiskInfoProtocolGuid, + NULL, + &HandleCount, + &HandleBuffer + ); + + if (EFI_ERROR (Status)) { + return; + } + + for (Index = 0; Index < HandleCount; Index++) { + + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gEfiDevicePathProtocolGuid, + (VOID*)&DevicePath + ); + ASSERT_EFI_ERROR (Status); + + DevicePathNode = DevicePath; + while (!IsDevicePathEnd (DevicePathNode) ) { + if ((DevicePathType (DevicePathNode) == HARDWARE_DEVICE_PATH) && + ( DevicePathSubType (DevicePathNode) == HW_PCI_DP)) { + PciDevicePath = (PCI_DEVICE_PATH *) DevicePathNode; + break; + } + DevicePathNode = NextDevicePathNode (DevicePathNode); + } + + if (PciDevicePath == NULL) { + continue; + } + + // + // Check for onboard IDE + // + if (PciDevicePath->Device== PCI_DEVICE_NUMBER_PCH_SATA) { + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gEfiDiskInfoProtocolGuid, + (void **)&DiskInfo + ); + ASSERT_EFI_ERROR (Status); + + Status = DiskInfo->WhichIde ( + DiskInfo, + &IdeChannel, + &IdeDevice + ); + ASSERT_EFI_ERROR (Status); + + IdentifyDriveInfo = AllocatePool (sizeof(EFI_ATA_IDENTIFY_DATA)); + + BufferSize = sizeof(EFI_ATA_IDENTIFY_DATA); + Status = DiskInfo->Identify ( + DiskInfo, + IdentifyDriveInfo, + &BufferSize + ); + ASSERT_EFI_ERROR(Status); + + // + // Onboard SATA Devices + // + if (PciDevicePath->Function == PCI_FUNCTION_NUMBER_PCH_SATA) { + if (IdeChannel == 0 && IdeDevice == 0) { + NameToUpdate = (STRING_REF)STR_SATA0_NAME; + } else if (IdeChannel == 1 && IdeDevice == 0) { + NameToUpdate = (STRING_REF)STR_SATA1_NAME; + } else { + continue; + } + } else { + continue; + } + + ZeroMem(StringBuffer, sizeof(StringBuffer)); + CopyMem( + StringBuffer, + (CHAR8 *)&IdentifyDriveInfo->ModelName, + sizeof(IdentifyDriveInfo->ModelName) + ); + SwapEntries(StringBuffer); + AsciiToUnicode(StringBuffer, NewString); + + // + // Chap it off after 16 characters + // + NewString[16] = 0; + + // + // For HardDisk append the size. Otherwise display atapi + // + if ((IdentifyDriveInfo->config & 0x8000) == 00) { + // + // 48 bit address feature set is supported, get maximum capacity + // + if ((IdentifyDriveInfo->command_set_supported_83 & 0x0400) == 0) { + DriveSize = (((((IdentifyDriveInfo->user_addressable_sectors_hi << 16) + + IdentifyDriveInfo->user_addressable_sectors_lo) / 1000) * 512) / 1000); + } else { + DriveSize = IdentifyDriveInfo->maximum_lba_for_48bit_addressing[0]; + for (Index1 = 1; Index1 < 4; Index1++) { + // + // Lower byte goes first: word[100] is the lowest word, word[103] is highest + // + DriveSize |= LShiftU64(IdentifyDriveInfo->maximum_lba_for_48bit_addressing[Index1], 16 * Index1); + } + DriveSize = (UINT32) DivU64x32(MultU64x32(DivU64x32(DriveSize, 1000), 512), 1000); + } + + StrCat (NewString, L"("); + EfiValueToString (SizeString, DriveSize/1000, PREFIX_BLANK, 0); + StrCat (NewString, SizeString); + StrCat (NewString, L"."); + EfiValueToString (SizeString, (DriveSize%1000)/100, PREFIX_BLANK, 0); + StrCat (NewString, SizeString); + StrCat (NewString, L"GB"); + } else { + StrCat (NewString, L"(ATAPI"); + } + + // + // Update SPEED. + // + PortNumber = (IdeDevice << 1) + IdeChannel; + DeviceSpeed = GetChipsetSataPortSpeed(PortNumber); + + if (DeviceSpeed) { + StrCat (NewString, L"-"); + GetDeviceSpeedString( NewString, DeviceSpeed); + } + + StrCat (NewString, L")"); + + HiiSetString(mHiiHandle, NameToUpdate, NewString, NULL); + + } + } + + if (HandleBuffer != NULL) { + gBS->FreePool (HandleBuffer); + } + + gBS->FreePool(NewString); + + return; +} + + +VOID +EFIAPI +SetupInfo (void) +{ + EFI_STATUS Status; + UINTN VarSize; + EFI_PEI_HOB_POINTERS GuidHob; + + if (mSetupInfoDone) { + return; + } + + VarSize = sizeof(SYSTEM_CONFIGURATION); + Status = gRT->GetVariable( + NORMAL_SETUP_NAME, + &gEfiNormalSetupGuid, + NULL, + &VarSize, + &mSystemConfiguration + ); + + ASSERT_EFI_ERROR (Status); + + // + // Update HOB variable for PCI resource information + // Get the HOB list. If it is not present, then ASSERT. + // + GuidHob.Raw = GetHobList (); + if (GuidHob.Raw != NULL) { + if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) { + mPlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid); + } + } + + + PrepareSetupInformation(); + UpdateAdditionalInformation (); + UpdatePlatformInformation(); + UpdateCPUInformation(); + IdeDataFilter(); + mSetupInfoDone = TRUE; + + return; +} + + +#define EFI_SECURE_BOOT_MODE_NAME L"SecureBoot" + +VOID +CheckSystemConfigLoad(SYSTEM_CONFIGURATION *SystemConfigPtr) +{ + EFI_STATUS Status; + UINT8 SecureBoot; + UINTN DataSize; + + + DataSize = sizeof(SecureBoot); + Status = gRT->GetVariable ( + EFI_SECURE_BOOT_MODE_NAME, + &gEfiGlobalVariableGuid, + NULL, + &DataSize, + &SecureBoot + ); + + if (EFI_ERROR(Status)) { + SystemConfigPtr->SecureBoot = 0; + } else { + SystemConfigPtr->SecureBoot = SecureBoot; + } +} + + +// +// "SecureBootEnable" variable for the Secure boot feature enable/disable. +// +#define EFI_SECURE_BOOT_ENABLE_NAME L"SecureBootEnable" +extern EFI_GUID gEfiSecureBootEnableDisableGuid; + + +VOID +CheckSystemConfigSave(SYSTEM_CONFIGURATION *SystemConfigPtr) +{ + EFI_STATUS Status; + UINT8 SecureBootCfg; + BOOLEAN SecureBootNotFound; + UINTN DataSize; + + + // + // Secure Boot configuration changes + // + DataSize = sizeof(SecureBootCfg); + SecureBootNotFound = FALSE; + Status = gRT->GetVariable ( + EFI_SECURE_BOOT_ENABLE_NAME, + &gEfiSecureBootEnableDisableGuid, + NULL, + &DataSize, + &SecureBootCfg + ); + + if (EFI_ERROR(Status)) { + SecureBootNotFound = TRUE; + } + if (SecureBootNotFound) { + Status = gRT->GetVariable ( + EFI_SECURE_BOOT_ENABLE_NAME, + &gEfiSecureBootEnableDisableGuid, + NULL, + &DataSize, + &SecureBootCfg + ); + ASSERT_EFI_ERROR(Status); + } + if ((SecureBootCfg) != SystemConfigPtr->SecureBoot) { + SecureBootCfg = !SecureBootCfg; + Status = gRT->SetVariable ( + EFI_SECURE_BOOT_ENABLE_NAME, + &gEfiSecureBootEnableDisableGuid, + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof (UINT8), + &SecureBootCfg + ); + } + +} + +VOID +ConfirmSecureBootTest() +{ + +} + diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi new file mode 100644 index 0000000000..e7e952fe96 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi @@ -0,0 +1,918 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// SourthClusterConfig.vfi +// +// Abstract: +// +// Driver Setup formset. +// +//Revision History: +// ------------------------------------------------------------------------------ +// Rev Date Name Description +// ------------------------------------------------------------------------------ + +// --*/ + +// +// South Cluster Configuration Form +// + +form formid = SOUTH_CLUSTER_FORM_ID, + title = STRING_TOKEN(STR_SOUTH_CLUSTER_TITLE); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + // + // Jump to PCIe Configuration Form + // + goto PCIE_DEVICE_OPTIONS_FORM_ID, + prompt = STRING_TOKEN(STR_PCIE_OPTIONS_FORM_TITLE), + help = STRING_TOKEN(STR_PCIE_OPTIONS_FORM_HELP); + + // + // Jump to USB Configuration Form + // + goto USB_OPTIONS_FORM_ID, + prompt = STRING_TOKEN(STR_USB_OPTIONS_FORM_TITLE), + help = STRING_TOKEN(STR_USB_OPTIONS_FORM_HELP); + // + // Jump to Azalia Configuration Form + // + goto AZALIA_OPTIONS_FORM_ID, + prompt = STRING_TOKEN(STR_AZALIA_OPTIONS_FORM_TITLE), + help = STRING_TOKEN(STR_AZALIA_OPTIONS_FORM_HELP); + + // + // Jump to Drive Configuration Form + // + goto DRIVE_CONFIGURATION_ID, + prompt = STRING_TOKEN(STR_IDE_FORM_TITLE), + help = STRING_TOKEN(STR_IDE_FORM_HELP); + // + // Jump to LAN Configuration Form + // + + // + // Jump to LPSS Configuration Form + // + goto LPSS_CONFIGURATION_ID, + prompt = STRING_TOKEN(STR_LPSS_SCC_FORM_TITLE), + help = STRING_TOKEN(STR_LPSS_SCC_FORM_HELP); + + // + // Jump to Misc Configuration Form + // + goto MISC_OPTIONS_FORM_ID, + prompt = STRING_TOKEN(STR_MISC_OPTION_FORM_TITLE), + help = STRING_TOKEN(STR_MISC_OPTION_FORM_HELP); +endform; + +form formid = PCIE_DEVICE_OPTIONS_FORM_ID, + + title = STRING_TOKEN(STR_PCIE_OPTIONS_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.PcieRootPortSpeed[0], + prompt = STRING_TOKEN (STR_PCIE_SPEED_PROMPT0), + help = STRING_TOKEN (STR_PCIE_SPEED_HELP), + option text = STRING_TOKEN (STR_AUTO), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN1), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN2), value = 2, flags = RESET_REQUIRED; + endoneof; + oneof varid = Setup.PcieRootPortSpeed[1], + prompt = STRING_TOKEN (STR_PCIE_SPEED_PROMPT1), + help = STRING_TOKEN (STR_PCIE_SPEED_HELP), + option text = STRING_TOKEN (STR_AUTO), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN1), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN2), value = 2, flags = RESET_REQUIRED; + endoneof; + oneof varid = Setup.PcieRootPortSpeed[2], + prompt = STRING_TOKEN (STR_PCIE_SPEED_PROMPT2), + help = STRING_TOKEN (STR_PCIE_SPEED_HELP), + option text = STRING_TOKEN (STR_AUTO), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN1), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN2), value = 2, flags = RESET_REQUIRED; + endoneof; + oneof varid = Setup.PcieRootPortSpeed[3], + prompt = STRING_TOKEN (STR_PCIE_SPEED_PROMPT3), + help = STRING_TOKEN (STR_PCIE_SPEED_HELP), + option text = STRING_TOKEN (STR_AUTO), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN1), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN (STR_GEN2), value = 2, flags = RESET_REQUIRED; + endoneof; + // + //PCIe Port + // + oneof varid = Setup.IchPciExp[0], + prompt = STRING_TOKEN(STR_ICH_PCIERP1_PROMPT), + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.IchPciExp[0] == 0x0; + oneof varid = Setup.IchPciExp[1], + prompt = STRING_TOKEN(STR_ICH_PCIERP2_PROMPT), + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + suppressif NOT ideqval Setup.IchPciExp[0] == 0x0; + text + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + text = STRING_TOKEN(STR_ICH_PCIERP2_PROMPT), + text = STRING_TOKEN(STR_ICH_PCIERP_DISABLE_HELP), + flags = 0, + key = 0; + endif; + + suppressif ideqval Setup.IchPciExp[0] == 0x0; + oneof varid = Setup.IchPciExp[2], + prompt = STRING_TOKEN(STR_ICH_PCIERP3_PROMPT), + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + endoneof; + endif; + + suppressif NOT ideqval Setup.IchPciExp[0] == 0x0; + text + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + text = STRING_TOKEN(STR_ICH_PCIERP3_PROMPT), + text = STRING_TOKEN(STR_ICH_PCIERP_DISABLE_HELP), + flags = 0, + key = 0; + endif; + + suppressif ideqval Setup.IchPciExp[0] == 0x0; + oneof varid = Setup.IchPciExp[3], + prompt = STRING_TOKEN(STR_ICH_PCIERP4_PROMPT), + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= 0 | RESET_REQUIRED; + endoneof; + endif; + + suppressif NOT ideqval Setup.IchPciExp[0] == 0x0; + text + help = STRING_TOKEN(STR_ICH_PCIERP_HELP), + text = STRING_TOKEN(STR_ICH_PCIERP4_PROMPT), + text = STRING_TOKEN(STR_ICH_PCIERP_DISABLE_HELP), + flags = 0, + key = 0; + endif; + + +endform; + +form formid = USB_OPTIONS_FORM_ID, + + title = STRING_TOKEN(STR_USB_OPTIONS_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.UsbAutoMode, + questionid = 0x123A, + prompt = STRING_TOKEN(STR_USB_AUTO_MODE_PROMPT), + help = STRING_TOKEN(STR_USB_AUTO_MODE_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + // + //XHCI support + // + grayoutif ideqval Setup.UsbAutoMode == 0x1; + grayoutif ideqval Setup.PchUsb20 == 0x1; + oneof varid = Setup.UsbXhciSupport, + questionid = 0x123B, + prompt = STRING_TOKEN(STR_USB_XHCI_SUPPORT_PROMPT), + help = STRING_TOKEN(STR_USB_XHCI_SUPPORT_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.UsbXhciSupport == 0x0; + oneof varid = Setup.Hsic0, + prompt = STRING_TOKEN(STR_USB_HSIC_0_PROMPT), + help = STRING_TOKEN(STR_USB_HSIC_0_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + oneof varid = Setup.PchUsb30Mode, + prompt = STRING_TOKEN(STR_PCH_USB30_MODE_PROMPT), + help = STRING_TOKEN(STR_PCH_USB30_MODE_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.UsbXhciLpmSupport, + prompt = STRING_TOKEN(STR_USB_XHCI_LPM_SUPPORT_PROMPT), + help = STRING_TOKEN(STR_USB_XHCI_LPM_SUPPORT_HELP), + + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + + endoneof; + endif; + endif; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.PchUsbOtg, + prompt = STRING_TOKEN(STR_PCH_USB_OTG_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_OTG_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_PCI_MODE_STRING), value = 1, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchUsbVbusOn, + prompt = STRING_TOKEN(STR_PCH_USB_VBUS_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_VBUS_HELP), + option text = STRING_TOKEN(STR_OFF), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ON), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_AUTO), value = 2, flags = RESET_REQUIRED; + endoneof; + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + // + //EHCI support + // + grayoutif ideqval Setup.UsbAutoMode == 0x1; + grayoutif ideqval Setup.UsbXhciSupport == 0x1; + oneof varid = Setup.PchUsb20, + questionid = 0x123C, + prompt = STRING_TOKEN(STR_PCH_USB21_PROMPT), + help = STRING_TOKEN(STR_PCH_USB2_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value= 0, flags= DEFAULT | MANUFACTURING |RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchUsbRmh, + prompt = STRING_TOKEN(STR_PCH_USBRMH_PROMPT), + help = STRING_TOKEN(STR_PCH_USBRMH_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchEhciDebug, + prompt = STRING_TOKEN(STR_PCH_USB_EHCIDEBUG_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_EHCIDEBUG_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + suppressif TRUE; + oneof varid = Setup.EhciPllCfgEnable, + prompt = STRING_TOKEN(STR_EHCI_PLL_CFG_PROMPT), + help = STRING_TOKEN(STR_EHCI_PLL_CFG_RTD3_DIS_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + endif; + endif; + + // + // Usb ports per-port disable control enable + // + oneof varid = Setup.PchUsbPerPortCtl, + prompt = STRING_TOKEN(STR_PCH_USB_PER_PORT_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_PER_PORT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.PchUsbPerPortCtl == 0x0; + oneof varid = Setup.PchUsbPort[0], + prompt = STRING_TOKEN(STR_PCH_USB_PORT0_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_PORT_DIS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchUsbPort[1], + prompt = STRING_TOKEN(STR_PCH_USB_PORT1_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_PORT_DIS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchUsbPort[2], + prompt = STRING_TOKEN(STR_PCH_USB_PORT2_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_PORT_DIS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PchUsbPort[3], + prompt = STRING_TOKEN(STR_PCH_USB_PORT3_PROMPT), + help = STRING_TOKEN(STR_PCH_USB_PORT_DIS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + + endif; + +endform; + +// +// SATA Controller +// +form formid = DRIVE_CONFIGURATION_ID, + + title = STRING_TOKEN(STR_IDE_FORM_TITLE); + + // + // Title on Drive Configuration Page + // + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_IDE_FORM_TITLE), + text = STRING_TOKEN(STR_NULL_STRING), + flags = 0, + key = 0; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_CHIPSET_SATA_STRING); + + oneof varid = Setup.Sata, + prompt = STRING_TOKEN(STR_SATA_PROMPT), + help = STRING_TOKEN(STR_SATA_HELP), + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.SataTestMode, + prompt = STRING_TOKEN(STR_SATA_TEST_MODE_PROMPT), + help = STRING_TOKEN(STR_SATA_TEST_MODE_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.Sata == 0x00; + oneof varid = Setup.SataType, + prompt = STRING_TOKEN(STR_SATA_TYPE_PROMPT), + help = STRING_TOKEN(STR_SATA_TYPE_HELP1), + option text = STRING_TOKEN(STR_SATA_IDE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_SATA_AHCI), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_SATA0_STRING), + text = STRING_TOKEN(STR_SATA0_NAME), + flags = 0, + key = 0; + + text + help = STRING_TOKEN(STR_NULL_STRING), + text = STRING_TOKEN(STR_SATA1_STRING), + text = STRING_TOKEN(STR_SATA1_NAME), + flags = 0, + key = 0; + + suppressif ideqval Setup.SataType == 0x0; + oneof varid = Setup.Sata0HotPlugCap, + prompt = STRING_TOKEN(STR_SATA0_HOTPLUG_CAP_PROMPT), + help = STRING_TOKEN(STR_SATA_HOTPLUG_CAP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value= 1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.Sata1HotPlugCap, + prompt = STRING_TOKEN(STR_SATA1_HOTPLUG_CAP_PROMPT), + help = STRING_TOKEN(STR_SATA_HOTPLUG_CAP_HELP), + option text = STRING_TOKEN(STR_ENABLE), value= 1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + endoneof; + endif; + + endif; //SATA enable + +endform; + +form formid = LPSS_CONFIGURATION_ID, + + title = STRING_TOKEN(STR_LPSS_SCC_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + oneof varid = Setup.LpssPciModeEnabled, + prompt = STRING_TOKEN(STR_LPSS_PCI_PROMPT), + help = STRING_TOKEN(STR_LPSS_PCI_HELP), + option text = STRING_TOKEN(STR_ACPI_MODE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_PCI_MODE), value=1, flags=0| RESET_REQUIRED; + endoneof; + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_SCC_SETTING_SUBTITLE); + oneof varid = Setup.eMMCBootMode, + prompt = STRING_TOKEN(STR_EMMC_BOOT_PROMPT), + help = STRING_TOKEN(STR_EMMC_BOOT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_AUTO_DETECT), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC_BOOT_41), value=2, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC_BOOT_45), value=3, flags=0 | RESET_REQUIRED; + endoneof; + + + + oneof varid = Setup.SecureErase, + questionid = 0x1240, + prompt = STRING_TOKEN(STR_SECURE_ERASE_PROMPT), + help = STRING_TOKEN(STR_SECURE_ERASE_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= DEFAULT |MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= RESET_REQUIRED; + endoneof; + + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); +grayoutif NOT ideqval Setup.eMMCBootMode == 0x3; + oneof varid = Setup.LpsseMMC45Enabled, + prompt = STRING_TOKEN(STR_SCC_EMMC45_PROMPT), + help = STRING_TOKEN(STR_SCC_EMMC45_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | RESET_REQUIRED; + endoneof; + oneof varid = Setup.LpsseMMC45DDR50Enabled, + prompt = STRING_TOKEN(STR_SCC_EMMC45_DDR50_PROMPT), + help = STRING_TOKEN(STR_SCC_EMMC45_DDR50_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | RESET_REQUIRED; + endoneof; + oneof varid = Setup.LpsseMMC45HS200Enabled, + prompt = STRING_TOKEN(STR_SCC_EMMC45_HS200_PROMPT), + help = STRING_TOKEN(STR_SCC_EMMC45_HS200_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT| RESET_REQUIRED; + endoneof; + + grayoutif ideqval Setup.LpsseMMC45DDR50Enabled == 0x1; + oneof varid = Setup.LpsseMMC45RetuneTimerValue, + prompt = STRING_TOKEN(STR_SCC_EMMC45_RE_TUNE_TIMER_VALUE), + help = STRING_TOKEN(STR_SCC_EMMC45_RE_TUNE_TIMER_VALUE_HELP), + option text = STRING_TOKEN(STR_EMMC45_TIMER_0), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_1), value =1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_2), value =2, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_3), value =3, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_4), value =4, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_5), value =5, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_6), value =6, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_7), value =7, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_8), value =8, flags = MANUFACTURING| DEFAULT|RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_9), value =9, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_10), value =10, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_11), value =11, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_12), value =12, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_13), value =13, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_14), value =14, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_EMMC45_TIMER_15), value =15, flags = RESET_REQUIRED; + endoneof; + endif; // grayoutif ideqval Setup.LpsseMMC45DDR50Enabled == 0x1; + endif; // grayoutif NOT ideqval Setup.eMMCBootMode == 0x1; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + subtitle text = STRING_TOKEN(STR_NULL_STRING); + oneof varid = Setup.LpssSdioEnabled, + prompt = STRING_TOKEN(STR_SCC_SDIO_PROMPT), + help = STRING_TOKEN(STR_SCC_SDIO_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.LpssSdcardEnabled, + prompt = STRING_TOKEN(STR_SCC_SDCARD_PROMPT), + help = STRING_TOKEN(STR_SCC_SDCARD_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT|MANUFACTURING | RESET_REQUIRED; + endoneof; + + +grayoutif NOT ideqval Setup.LpssSdcardEnabled == 0x1; + grayoutif ideqval Setup.LpssSdCardDDR50Enabled == 0x1; + oneof varid = Setup.LpssSdCardSDR25Enabled, + prompt = STRING_TOKEN(STR_SCC_SD_SDR25_PROMPT), + help = STRING_TOKEN(STR_SCC_SD_SDR25_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=0 | RESET_REQUIRED; + endoneof; + endif; // grayoutif ideqval Setup.LpsseMMC45DDR50Enabled == 0x1; + + grayoutif ideqval Setup.LpssSdCardSDR25Enabled == 0x1; + oneof varid = Setup.LpssSdCardDDR50Enabled, + prompt = STRING_TOKEN(STR_SCC_SD_DDR50_PROMPT), + help = STRING_TOKEN(STR_SCC_SD_DDR50_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=0 | RESET_REQUIRED; + endoneof; + endif; // grayoutif ideqval Setup.LpssSdCardSDR25Enabled == 0x1; + + oneof varid = Setup.SdCardRemovable, + prompt = STRING_TOKEN(STR_SCC_SDCARD_REMOVABILITY), + help = STRING_TOKEN(STR_SCC_SDCARD_REMOVABILITY_HELP), + option text = STRING_TOKEN(STR_SCC_SDCARD_NON_REMOVABLE), value=0, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_SCC_SDCARD_REMOVABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + +endif; // grayoutif NOT ideqval Setup.LpssSdcardEnabled == 0x1; + + + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_LPSS1_SETTING_SUBTITLE); + + oneof varid = Setup.LpssDma0Enabled, + prompt = STRING_TOKEN(STR_LPSS_DMA1_PROMPT), + help = STRING_TOKEN(STR_LPSS_DMA1_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + grayoutif ideqval Setup.LpssDma0Enabled == 0x00; + oneof varid = Setup.LpssHsuart0Enabled, + prompt = STRING_TOKEN(STR_LPSS_HSUART1_PROMPT), + help = STRING_TOKEN(STR_LPSS_HSUART1_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags= MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= 0 | DEFAULT | RESET_REQUIRED; + endoneof; + endif; + + //Add control flow + grayoutif ideqval Setup.LpssHsuart0Enabled == 0x00; + oneof varid = Setup.LpssHsuart0FlowControlEnabled, + prompt = STRING_TOKEN(STR_LPSS_HSUART1_FLOWCONTROL_PROMPT), + help = STRING_TOKEN(STR_LPSS_HSUART1_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma0Enabled == 0x00; + oneof varid = Setup.LpssHsuart1Enabled, + prompt = STRING_TOKEN(STR_LPSS_HSUART2_PROMPT), + help = STRING_TOKEN(STR_LPSS_HSUART2_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= 0 | DEFAULT | RESET_REQUIRED; + endoneof; + endif; + + //Add control flow + grayoutif ideqval Setup.LpssHsuart1Enabled == 0x00; + oneof varid = Setup.LpssHsuart1FlowControlEnabled, + prompt = STRING_TOKEN(STR_LPSS_HSUART2_FLOWCONTROL_PROMPT), + help = STRING_TOKEN(STR_LPSS_HSUART1_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + + grayoutif ideqval Setup.LpssDma0Enabled == 0x00; + oneof varid = Setup.LpssPwm0Enabled, + prompt = STRING_TOKEN(STR_PWM1_PROMPT), + help = STRING_TOKEN(STR_PWM1_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= 0 | DEFAULT | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma0Enabled == 0x00; + oneof varid = Setup.LpssPwm1Enabled, + prompt = STRING_TOKEN(STR_PWM2_PROMPT), + help = STRING_TOKEN(STR_PWM2_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= 0 | DEFAULT | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma0Enabled == 0x00; + oneof varid = Setup.LpssSpiEnabled, + prompt = STRING_TOKEN(STR_LPSS_SPI_PROMPT), + help = STRING_TOKEN(STR_LPSS_SPI_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= 0 |DEFAULT | RESET_REQUIRED; + endoneof; + endif; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_LPSS2_SETTING_SUBTITLE); + + oneof varid = Setup.LpssDma1Enabled, + prompt = STRING_TOKEN(STR_LPSS_DMA2_PROMPT), + help = STRING_TOKEN(STR_LPSS_DMA2_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + +/* + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C0Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C1_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C1_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C1Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C2_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C2_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C2Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C3_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C3_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C3Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C4_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C4_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C4Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C5_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C5_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; +*/ + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C5Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C6_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C6_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT |MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + grayoutif ideqval Setup.LpssDma1Enabled == 0x00; + oneof varid = Setup.LpssI2C6Enabled, + prompt = STRING_TOKEN(STR_LPSS_I2C7_PROMPT), + help = STRING_TOKEN(STR_LPSS_I2C7_HELP_ENBDT_DEV_LIST), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=0 |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags= DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_I2C_DEVICE_SETTING_SUBTITLE); + + oneof varid = Setup.I2CTouchAd, + prompt = STRING_TOKEN(STR_I2C_TOUCH_PROMPT), + help = STRING_TOKEN(STR_I2C_TOUCH_HELP), + option text = STRING_TOKEN(STR_AUTO), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_I2C_FVP), value=0x4B, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_I2C_FFRD), value=0x4A, flags=0 | RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.SAR1, + prompt = STRING_TOKEN(STR_SAR_SENSOR_PROMPT), + help = STRING_TOKEN(STR_SAR_SENSOR_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; +endform; + + +// +//LAN Controller +// +form formid = LAN_OPTIONS_FORM_ID, + + title = STRING_TOKEN(STR_LAN_OPTIONS_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_LAN_OPTIONS_FORM_TITLE); + + oneof varid = Setup.Lan, + prompt = STRING_TOKEN(STR_PCH_LAN_CONTROLLER), + help = STRING_TOKEN(STR_PCH_LAN_CONTROLLER_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.Lan == 0; + oneof varid = Setup.WakeOnLanS5, + prompt = STRING_TOKEN(STR_PCH_LAN_WOL_PROMPT), + help = STRING_TOKEN(STR_PCH_LAN_WOL_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.SlpLanLowDc, + prompt = STRING_TOKEN(STR_PCH_SLP_LAN_LOW_DC_PROMPT), + help = STRING_TOKEN(STR_PCH_SLP_LAN_LOW_DC_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.BootNetwork, + prompt = STRING_TOKEN(STR_PCH_PXEROM_CONTROL), + help = STRING_TOKEN(STR_PCH_PXEROM_CONTROL_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + endoneof; + endif; + +endform; + +// +// Azalia Configuration +// +form formid = AZALIA_OPTIONS_FORM_ID, + + title = STRING_TOKEN(STR_AZALIA_OPTIONS_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_AZALIA_OPTIONS_FORM_TITLE); + oneof varid = Setup.Lpe, + prompt = STRING_TOKEN(STR_LPE_PROMPT), + help = STRING_TOKEN(STR_LPE_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_LPE_PCI_MODE), value=1, flags=0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_LPE_ACPI_MODE), value=2, flags=0 | RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + suppressif ideqval Setup.AzaliaDs == 0x1; + oneof varid = Setup.PchAzalia, + prompt = STRING_TOKEN(STR_PCH_AZALIA_PROMPT), + help = STRING_TOKEN(STR_PCH_AZALIA_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + suppressif ideqval Setup.AzaliaDs == 0x0; + text + help = STRING_TOKEN(STR_PCH_AZALIA_DS_SUPPORT), + text = STRING_TOKEN(STR_PCH_AZALIA_PROMPT), + text = STRING_TOKEN(STR_ENABLE), + flags = 0, + key = 0; + endif; + + suppressif ideqval Setup.PchAzalia == 0x0; + oneof varid = Setup.AzaliaVCiEnable, + prompt = STRING_TOKEN(STR_AZALIA_VC_PROMPT), + help = STRING_TOKEN(STR_AZALIA_VC_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + suppressif ideqval Setup.PchAzalia == 0x0; + oneof varid = Setup.AzaliaDs, + prompt = STRING_TOKEN(STR_AZALIA_DS_PROMPT), + help = STRING_TOKEN(STR_AZALIA_DS_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + endif; + + suppressif ideqval Setup.PchAzalia == 0x0; + oneof varid = Setup.AzaliaPme, + prompt = STRING_TOKEN(STR_AZALIA_PME_PROMPT), + help = STRING_TOKEN(STR_AZALIA_PME_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.HdmiCodec, + prompt = STRING_TOKEN(STR_HDMI_CODEC_PROMPT), + help = STRING_TOKEN(STR_HDMI_CODEC_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + +endform; + +// +// Misc Configuration +// +form formid = MISC_OPTIONS_FORM_ID, + + title = STRING_TOKEN(STR_MISC_OPTION_FORM_TITLE); + + subtitle text = STRING_TOKEN(STR_MISC_OPTION_FORM_TITLE); + // + // HPET Disable/Enable + // + oneof varid = Setup.Hpet, + prompt = STRING_TOKEN(STR_HPET_PROMPT), + help = STRING_TOKEN(STR_HPET_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0x00, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=0x01, flags=DEFAULT | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.StateAfterG3, + prompt = STRING_TOKEN(STR_STATE_AFTER_G3), + help = STRING_TOKEN(STR_STATE_AFTER_G3_HELP), + option text = STRING_TOKEN(STR_S0_AFTER_G3_STRING), value = 0, flags = DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_S5_AFTER_G3_STRING), value = 1, flags = MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.EnableClockSpreadSpec, + prompt = STRING_TOKEN(STR_CLOCK_SPREAD_SPEC_ENABLE), + help = STRING_TOKEN(STR_CLOCK_SPREAD_SPEC_ENABLE_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + + oneof varid = Setup.UartInterface, + prompt = STRING_TOKEN(STR_PCH_UART_SELECT), + help = STRING_TOKEN(STR_PCH_UART_SELECT_HELP), + option text = STRING_TOKEN(STR_UART_SELECT_PCU), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_UART_SELECT_SIO), value = 1, flags = RESET_REQUIRED; + endoneof; + + suppressif ideqval Setup.LpssHsuart0Enabled == 1 OR ideqval Setup.UartInterface == 1; + oneof varid = Setup.PcuUart1, + prompt = STRING_TOKEN(STR_PCU_UART_A), + help = STRING_TOKEN(STR_PCU_UART_A_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + oneof varid = Setup.SpiRwProtect, + prompt = STRING_TOKEN(STR_PCH_SPI_WP_PROMPT), + help = STRING_TOKEN(STR_PCH_SPI_WP_HELP), + option text = STRING_TOKEN(STR_PCH_SPI_WP_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_PCH_SPI_WP_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.MmioSize, + prompt = STRING_TOKEN(STR_MMIO_PROMPT), + help = STRING_TOKEN(STR_MMIO_HELP), + option text = STRING_TOKEN(STR_MMIO_0_75G_STRING), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_MMIO_1G_STRING), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_MMIO_1_25G_STRING), value = 2, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_MMIO_1_5G_STRING), value = 3, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_MMIO_2G_STRING), value = 4, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.PcieDynamicGating, + prompt = STRING_TOKEN(STR_PCIEDYNCLK_PROMPT), + help = STRING_TOKEN(STR_PCIEDYNCLK_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.GpioWakeCapability, + prompt = STRING_TOKEN(STR_GPIO_WAKE_CAPABILITY_ENABLE), + help = STRING_TOKEN(STR_GPIO_WAKE_CAPABILITY_ENABLE_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED; + endoneof; +endform; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SystemComponent.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/SystemComponent.vfi new file mode 100644 index 0000000000..e21f8803e3 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SystemComponent.vfi @@ -0,0 +1,86 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// SystemComponent.vfr +// +// Abstract: +// +// Driver Setup formset. +// +// Revision History: +// ------------------------------------------------------------------------------ +// Rev Date Name Description +// ------------------------------------------------------------------------------ + +// --*/ + +form formid = SYSTEM_COMPONENT_FORM_ID, + + title = STRING_TOKEN(STR_SYSTEM_COMPONENT_TITLE); +/* + oneof varid = Setup.CRIDSettings, + prompt = STRING_TOKEN(STR_CRID_PROMPT), + help = STRING_TOKEN(STR_CRID_SETTING_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_CRID_0_STRING), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_CRID_1_STRING), value = 2, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_CRID_2_STRING), value = 3, flags = RESET_REQUIRED; + endoneof; +*/ + + subtitle text = STRING_TOKEN(STR_PNP_CONFIGURATION_TITLE); + oneof varid = Setup.PnpSettings, + prompt = STRING_TOKEN(STR_PNP_SETTING_PROMPT), + help = STRING_TOKEN(STR_PNP_SETTING_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; +#if (PNP_DEBUG == 1) + option text = STRING_TOKEN(STR_PNP_POWER_STRING), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_PNP_PERFORMANCE_STRING), value = 2, flags = RESET_REQUIRED; +#endif + option text = STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING), value = 3, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING_A0), value = 4, flags = 0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_PNP_POWER_PERFORMANCE_STRING_B0), value = 5, flags = 0 | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.CfioPnpSettings, + prompt = STRING_TOKEN(STR_CFIO_PNP_SETTING_PROMPT), + help = STRING_TOKEN(STR_CFIO_PNP_SETTING_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0 | RESET_REQUIRED; + endoneof; + oneof varid = Setup.TristateLpc, + prompt = STRING_TOKEN(STR_TRISTATE_LPC_PROMPT), + help = STRING_TOKEN(STR_TRISTATE_LPC_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0 | RESET_REQUIRED; + endoneof; + + + + + + + oneof varid = Setup.PchFSAOn, + prompt = STRING_TOKEN(STR_PCH_FSA_PROMPT), + help = STRING_TOKEN(STR_PCH_FSA_HELP), + option text = STRING_TOKEN(STR_OFF), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ON), value = 1, flags = RESET_REQUIRED; + endoneof; + + + +endform; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi new file mode 100644 index 0000000000..a6531f9834 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi @@ -0,0 +1,83 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// DPTF.vfr +// +// Abstract: +// +// Driver Setup formset. +// +// Revision History: +// ------------------------------------------------------------------------------ +// Rev Date Name Description +// ------------------------------------------------------------------------------ + +// --*/ + +form formid = THERMAL_FORM_ID, + + title = STRING_TOKEN(STR_THERMAL_TITLE); + + subtitle text = STRING_TOKEN(STR_THERMAL_CONFIGURATION); + + + suppressif TRUE; + numeric varid = Setup.PassiveTc1Value, + prompt = STRING_TOKEN (STR_ACPI_PASSIVE_TC1_VALUE), + help = STRING_TOKEN (STR_ACPI_PASSIVE_TC1_VALUE_HELP), + flags = 0 | RESET_REQUIRED, + minimum = 1, + maximum = 16, + step = 1, + default = 1, + endnumeric; + + numeric varid = Setup.PassiveTc2Value, + prompt = STRING_TOKEN (STR_ACPI_PASSIVE_TC2_VALUE), + help = STRING_TOKEN (STR_ACPI_PASSIVE_TC2_VALUE_HELP), + flags = 0 | RESET_REQUIRED, + minimum = 1, + maximum = 16, + step = 1, + default = 5, + endnumeric; + + numeric varid = Setup.PassiveTspValue, + prompt = STRING_TOKEN (STR_ACPI_PASSIVE_TSP_VALUE), + help = STRING_TOKEN (STR_ACPI_PASSIVE_TSP_VALUE_HELP), + flags = 0 | RESET_REQUIRED, + minimum = 2, + maximum = 50, + step = 2, + default = 50, + endnumeric; + endif; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + oneof varid = Setup.DisableActiveTripPoints, + prompt = STRING_TOKEN(STR_DATP_PROMPT), + help = STRING_TOKEN(STR_DATP_HELP), + option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + + +endform; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/UnCore.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/UnCore.vfi new file mode 100644 index 0000000000..2184a42ea8 --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/UnCore.vfi @@ -0,0 +1,240 @@ +// +// +// Copyright (c) 2004 - 2014, 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 that 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: +// +// UncoreConfiguration.vfi +// +// Abstract: +// +// Driver Setup formset. +// + + +// --*/ + +form formid = UNCORE_FORM_ID, + title = STRING_TOKEN(STR_UNCORE_CONFIGURATION_TITLE); + + subtitle text = STRING_TOKEN(STR_GOP_TITLE); + + oneof varid = Setup.GOPEnable, + prompt = STRING_TOKEN(STR_GOP_VBIOS_SWITCH), + help = STRING_TOKEN(STR_GOP_VBIOS_SWITCH_HELP), + option text = STRING_TOKEN(STR_ENABLE), value =1, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.GOPBrightnessLevel, + prompt = STRING_TOKEN(STR_GOP_BRIGHTNESS_LEVEL), + help = STRING_TOKEN(STR_GOP_BRIGHTNESS_LEVEL_HELP), + option text = STRING_TOKEN(STR_GOP_BRIGHT_20), value =2, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_40), value =3, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_60), value =4, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_80), value =5, flags = MANUFACTURING| DEFAULT| RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_100), value =6, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_120), value =7, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_140), value =8, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_160), value =9, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_180), value =10, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_200), value =11, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_220), value =12, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_240), value =13, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_GOP_BRIGHT_255), value =14, flags = RESET_REQUIRED; + endoneof; + subtitle text = STRING_TOKEN(STR_NULL_STRING); + subtitle text = STRING_TOKEN(STR_IGD_TITLE); + + suppressif ideqval Setup.PrimaryVideoAdaptor == 0x2; + oneof varid = Setup.Igd, + prompt = STRING_TOKEN (STR_IGD_PROMPT), + help = STRING_TOKEN (STR_IGD_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + endif; + + oneof varid = Setup.PrimaryVideoAdaptor, + prompt = STRING_TOKEN(STR_PRIMARY_DISPLAY), + help = STRING_TOKEN(STR_PRIMARY_DISPLAY_HELP), + option text = STRING_TOKEN(STR_AUTOMATIC), value = 3, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_IGD_STRING), value = 0, flags = DEFAULT |MANUFACTURING |RESET_REQUIRED; + option text = STRING_TOKEN(STR_PCI_STRING), value = 2, flags = RESET_REQUIRED; + endoneof; + + + oneof varid = Setup.PavpMode, + prompt = STRING_TOKEN(STR_PAVC_PROMPT), + help = STRING_TOKEN(STR_PAVC_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_PAVP_LITE_MODE), value = 1, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_PAVP_SERPENT_MODE), value = 2, flags = RESET_REQUIRED; + endoneof; + + + oneof varid = Setup.GTTSize, + prompt = STRING_TOKEN(STR_GTT_SIZE), + help = STRING_TOKEN(STR_GTT_SIZE_HELP), + option text = STRING_TOKEN(GTT_SIZE_1MB), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(GTT_SIZE_2MB), value = 2, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + endoneof; + + oneof varid = Setup.IgdApertureSize, + prompt = STRING_TOKEN(STR_APERTURE_SIZE), + help = STRING_TOKEN(STR_APERTURE_SIZE_HELP), + option text = STRING_TOKEN(APERTURE_SIZE_128MB), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(APERTURE_SIZE_256MB), value = 2, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(APERTURE_SIZE_512MB), value = 3, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.IgdDvmt50PreAlloc, + prompt = STRING_TOKEN(STR_DVMT50_PRE_ALLOC), + help = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_HELP), +// option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_32M), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_64M), value = 2, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_96M), value = 3, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_128M), value = 4, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_160M), value = 5, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_192M), value = 6, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_224M), value = 7, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_256M), value = 8, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_288M), value = 9, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_320M), value = 10, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_352M), value = 11, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_384M), value = 12, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_416M), value = 13, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_448M), value = 14, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_480M), value = 15, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_PRE_ALLOC_512M), value = 16, flags = RESET_REQUIRED; + endoneof; + + oneof varid = Setup.IgdDvmt50TotalAlloc, + prompt = STRING_TOKEN(STR_DVMT50_DVMT ), + help = STRING_TOKEN(STR_DVMT50_DVMT_HELP), + option text = STRING_TOKEN(STR_DVMT50_ALLOC_128), value = 1, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_ALLOC_256), value = 2, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DVMT50_ALLOC_MAX), value = 3, flags = RESET_REQUIRED; + endoneof; + + // + //Igd Thermal + // + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + + subtitle text = STRING_TOKEN(STR_IGD_LCD_CONTROL); + + oneof varid = Setup.LidStatus, + prompt = STRING_TOKEN(STR_FORCE_LID_STATUS_PROMPT), + help = STRING_TOKEN(STR_FORCE_LID_STATUS_ENBDT_HELP), + option text = STRING_TOKEN(STR_LID_STATUS__OFF_PROMPT), value = 0, flags = 0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_LID_STATUS__ON_PROMPT), value = 1, flags = 0 | RESET_REQUIRED; + option text = STRING_TOKEN(STR_LID_STATUS__AUTO_PROMPT), value = 2, flags = MANUFACTURING| DEFAULT| RESET_REQUIRED; + endoneof; + + oneof varid = Setup.IgdLcdIBia, + prompt = STRING_TOKEN(STR_VIDEO_LCD_IBIA), + help = STRING_TOKEN(STR_VIDEO_LCD_IBIAHLP), + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAA), value = 0, flags =MANUFACTURING| DEFAULT| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAD), value = 1, flags = 0| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAL1), value = 2, flags = 0| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAL2), value = 3, flags = 0| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAL3), value = 4, flags = 0| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAL4), value = 5, flags = 0| RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IBIAL5), value = 6, flags = 0| RESET_REQUIRED; + endoneof; + + oneof varid = Setup.AlsEnable, + prompt = STRING_TOKEN (STR_ACPI_ALS_ENABLE), + help = STRING_TOKEN (STR_ACPI_ALS_ENABLE_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=0 | RESET_REQUIRED; + endoneof; + + + oneof varid = Setup.IgdFlatPanel, + prompt = STRING_TOKEN(STR_IGD_FLAT_PANEL_PROMPT), + help = STRING_TOKEN(STR_IGD_FLAT_PANEL_HELP), + option text = STRING_TOKEN(STR_AUTOMATIC), value=0x00, flags=DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_640X480), value=0x01, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_800X600), value=0x02, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1024X768), value=0x03, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1280X1024), value=0x04, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1366X768), value=0x05, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1680X1050), value=0x06, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1920X1200), value=0x07, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_1280X800), value=0x08, flags=RESET_REQUIRED; + endoneof; + + oneof varid = Setup.BootDisplayDevice, + prompt = STRING_TOKEN(STR_BOOT_DISPLAY_DEVICE_PROMPT), + help = STRING_TOKEN(STR_BOOT_DISPLAY_DEVICE_HELP), + option text = STRING_TOKEN(STR_AUTOMATIC), value=0x00, flags=DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_VGAPORT), value=0x01, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_HDMIPORTB), value=0x02, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_DPPORTB), value=0x03, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_DPPORTC), value=0x04, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_EDPPORTC), value=0x05, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_DSIPORTA), value=0x06, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_DSIPORTC), value=0x07, flags=RESET_REQUIRED; + + endoneof; + // + //Pannel Scaling + // + oneof varid = Setup.PanelScaling, + prompt = STRING_TOKEN(STR_PANNEL_SCALING_PROMPT), + help = STRING_TOKEN(STR_PANNEL_SCALING_HELP), + option text = STRING_TOKEN(STR_AUTOMATIC), value=0x00, flags=DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_PANNEL_SCALING_STRETCH), value=0x01, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_PANNEL_SCALING_CENTER), value=0x02, flags=RESET_REQUIRED; + endoneof; + + // + //GMCH BLC Control + // + oneof varid = Setup.IgdLcdIGmchBlc, + prompt = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC_PROMPT), + help = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC_HELP), + option text = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC1), value=0x00, flags=DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC2), value=0x01, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC3), value=0x02, flags=RESET_REQUIRED; + option text = STRING_TOKEN(STR_VIDEO_LCD_IGMCHBLC4), value=0x03, flags=RESET_REQUIRED; + endoneof; + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + // + //ISP Configuration + // + subtitle text = STRING_TOKEN(STR_ISP_CONFIGURATION_TITLE); + + oneof varid = Setup.ISPEn, + prompt = STRING_TOKEN(STR_ISP_ENABLED), + help = STRING_TOKEN(STR_ISP_ENABLED_HELP), + option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + endoneof; + + grayoutif ideqval Setup.ISPEn == 0; + oneof varid = Setup.ISPDevSel, + prompt = STRING_TOKEN (STR_ISP_PCICONFIGURATION_TITLE), + help = STRING_TOKEN (STR_ISP_PCICONFIGURATION_HELP), + option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED; + option text = STRING_TOKEN(STR_ISP_PCICONFIG_B0D2F0_TITLE), value = 1, flags = MANUFACTURING | DEFAULT | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ISP_PCICONFIG_B0D3F0_TITLE), value = 2, flags = RESET_REQUIRED; + endoneof; + endif; + +endform; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni new file mode 100644 index 0000000000..7ecc5491b0 Binary files /dev/null and b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni differ diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr b/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr new file mode 100644 index 0000000000..6922ce2c3f --- /dev/null +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr @@ -0,0 +1,128 @@ +// +// +// +// Copyright (c) 2004 - 2014, 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 that 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. +// +// +// +#include "Configuration.h" +#include "PlatformSetupDxeStrDefs.h" +#include "Guid/SetupVariable.h" + +formset + guid = SYSTEM_CONFIGURATION_GUID, + title = STRING_TOKEN(STR_SYSTEM_SETUP_TITLE), + help = STRING_TOKEN(STR_SYSTEM_SETUP_HELP), + class = 1, + subclass = 0, + + + varstore SYSTEM_CONFIGURATION, name = Setup, guid = SYSTEM_CONFIGURATION_GUID; + form formid = ROOT_FORM_ID, + title = STRING_TOKEN(STR_SYSTEM_SETUP_TITLE); + + // + // Jump to 2)Main Form + // + goto ROOT_MAIN_FORM_ID, + prompt = STRING_TOKEN(STR_MAIN_TITLE), + help = STRING_TOKEN(STR_MAIN_HELP); + + // + // Jump to 3)Uncore Configuration Form + // + goto UNCORE_FORM_ID, + prompt = STRING_TOKEN(STR_UNCORE_CONFIGURATION_TITLE), + help = STRING_TOKEN(STR_UNCORE_CONFIGURATION_HELP); + + // + // Jump to 4)South Cluster Configuration Form + // + goto SOUTH_CLUSTER_FORM_ID, + prompt = STRING_TOKEN(STR_SOUTH_CLUSTER_TITLE), + help = STRING_TOKEN(STR_SOUTH_CLUSTER_HELP); + + // Jump to 5)Boot Form + // + goto BOOT_CONFIGURATION_FORM_ID, + prompt = STRING_TOKEN(STR_BOOT_CONFIGURATION_TITLE), + help = STRING_TOKEN(STR_BOOT_CONFIGURATION_HELP); + + // + // Jump to 6)Security Configuration Form + // + goto SECURITY_CONFIGURATION_FORM_ID, + prompt = STRING_TOKEN(STR_SECURITY_CONFIGURATION_TITLE), + help = STRING_TOKEN(STR_SECURITY_CONFIGURATION_HELP); + + // + // Jump to 7)Thermal Form + // + goto THERMAL_FORM_ID, + prompt = STRING_TOKEN(STR_THERMAL_TITLE), + help = STRING_TOKEN(STR_THERMAL_HELP); + + // + // Jump to 8) System Component Form + goto SYSTEM_COMPONENT_FORM_ID, + prompt = STRING_TOKEN(STR_SYSTEM_COMPONENT_TITLE), + help = STRING_TOKEN(STR_SYSTEM_COMPONENT_HELP); + + // + // Jump to 10)Debug Configuration Form + // +#if (BYTI_PF_ENABLE == 0) + goto DEBUG_CONFIGURATION_FORM_ID, + prompt = STRING_TOKEN(STR_DEBUG_CONFIGURATION_TITLE), + help = STRING_TOKEN(STR_DEBUG_CONFIGURATION_HELP); +#endif + + subtitle text = STRING_TOKEN(STR_NULL_STRING); + // + // Commit change and exit + // + text + help = STRING_TOKEN(STR_COMMIT_CHANGE_AND_EXIT_HELP), + text = STRING_TOKEN(STR_COMMIT_CHANGE_AND_EXIT_PROMPT), + text = STRING_TOKEN(STR_COMMIT_CHANGE_AND_EXIT_PROMPT), + flags = INTERACTIVE, + key = 0xF001; + + // + // Discard change and exit + // + text + help = STRING_TOKEN(STR_DISCARD_CHANGE_AND_EXIT_HELP), + text = STRING_TOKEN(STR_DISCARD_CHANGE_AND_EXIT_PROMPT), + text = STRING_TOKEN(STR_DISCARD_CHANGE_AND_EXIT_PROMPT), + flags = INTERACTIVE, + key = 0xF002; + + // + // Load default and exit + // + text + help = STRING_TOKEN(STR_LOAD_DEFAULT_AND_EXIT_HELP), + text = STRING_TOKEN(STR_LOAD_DEFAULT_AND_EXIT_PROMPT), + text = STRING_TOKEN(STR_LOAD_DEFAULT_AND_EXIT_PROMPT), + flags = INTERACTIVE, + key = 0xF003; + endform; + + #include "Main.vfi" + #include "UnCore.vfi" + #include "SouthClusterConfig.vfi" + #include "Boot.vfi" + #include "Security.vfi" + #include "Thermal.vfi" + #include "SystemComponent.vfi" + #include "DebugConfig.vfi" +endformset; diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni new file mode 100644 index 0000000000..16d78f6aa9 Binary files /dev/null and b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni differ -- cgit v1.2.3