From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43061+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43061+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949758; cv=none; d=zoho.com; s=zohoarc; b=AgM5DwOkBgHPJukzhovNuuFYp48d4G0O3IbGWQlN+uKySo5pP7SftiF1446YSqRSy/sBzknrq2e5jsaYcZ7QUCdKg67XkaMOSklkqKpADXUoAl7e2vL7zH5G85EYHCf55X0oC0lbHxmCH6qIwcXYEsA2dSU6YRDX1yzaSpWcwDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949758; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=wahOZcwKUG/E3MEVwOb2dGKCntLqoYLJsUIrPucxlhk=; b=gvtQUAWW7q1Lp8W9SALk/tMccQTuQhQn1n3TonUpGQt0DtY13O4MLTWEz0051VGxynsWofEUBqpoYgWVOzpTOuhrx+462ya64fjHJvBet9MEb4ibabW3m4wGdbJtBmEa5cmSw8Q6LNooJHwMXUJpIvselq4yg9oUENIDjMr5Ud8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43061+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949758730659.8174033582987; Sun, 30 Jun 2019 19:55:58 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:55:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:55:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480162" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:55:56 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 01/14] Vlv2DeviceRefCodePkg: Add gEfiSmmIchnDispatchProtocolGuid Date: Sun, 30 Jun 2019 19:55:40 -0700 Message-Id: <20190701025553.18596-2-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949758; bh=Q3SLAk+sFCiR4XgHUF9m470F8xZ5Sk/963C5tTxOJGc=; h=Cc:Date:From:Reply-To:Subject:To; b=iYia0MyeYhna/VcotbTVO73aSkuHeIhLXJrcKfieVHL9+c+shj4E/4uy2T+nRpr6pOq 1TLj9Ivw43+hkXMncIgqtKb1k5BLs+mTtOwn6oBW2stE9ZBiA/BZ+8FdOwn/67vxN4hRh gegXmMJXmDRkBkrVQc5Ms5USBbZ1VjuEm/Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Add the gEfiSmmIchnDispatchProtocolGuid from the IntelFrameworkPkg to the Si specific Vlv2TbltDevicePkg. This removes a dependency on the IntelFrameworkPkg and adds a Si specific protocol to a Si package. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney Reviewed-By: Zailiang Sun --- .../Include/Protocol/SmmIchnDispatch.h | 183 ++++++++++++++++++ .../Vlv2DeviceRefCodePkg.dec | 5 +- 2 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/Smm= IchnDispatch.h diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDis= patch.h b/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDispat= ch.h new file mode 100644 index 0000000000..3cf86c0ff9 --- /dev/null +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDispatch.h @@ -0,0 +1,183 @@ +/** @file + Provides the parent dispatch service for a given SMI source generator. + The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child= handlers for + the given event types. + +Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + This Protocol is defined in Framework of EFI SMM Core Interface Spec + Version 0.9. + +**/ + +#ifndef _EFI_SMM_ICHN_DISPATCH_H_ +#define _EFI_SMM_ICHN_DISPATCH_H_ + + +// +// Global ID for the ICH SMI Protocol +// +#define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \ + { \ + 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85,= 0xcc } \ + } + +typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROT= OCOL; + +// +// Related Definitions +// +// +// ICHN Specific SMIs. These are miscellaneous SMI sources that are suppo= rted by the +// ICHN specific SMI implementation. These may change over time. TrapNum= ber is only +// valid if the Type is Trap. +// +typedef enum { + // + // NOTE: NEVER delete items from this list/enumeration! Doing so will p= revent other versions + // of the code from compiling. If the ICH version your driver is writte= n for doesn't support + // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/c= lient tries to register + // for them. + // + IchnMch, + IchnPme, + IchnRtcAlarm, + IchnRingIndicate, + IchnAc97Wake, + IchnSerialIrq, + IchnY2KRollover, + IchnTcoTimeout, + IchnOsTco, + IchnNmi, + IchnIntruderDetect, + IchnBiosWp, + IchnMcSmi, + IchnPmeB0, + IchnThrmSts, + IchnSmBus, + IchnIntelUsb2, + IchnMonSmi7, + IchnMonSmi6, + IchnMonSmi5, + IchnMonSmi4, + IchnDevTrap13, + IchnDevTrap12, + IchnDevTrap11, + IchnDevTrap10, + IchnDevTrap9, + IchnDevTrap8, + IchnDevTrap7, + IchnDevTrap6, + IchnDevTrap5, + IchnDevTrap3, + IchnDevTrap2, + IchnDevTrap1, + IchnDevTrap0, + IchnIoTrap3, + IchnIoTrap2, + IchnIoTrap1, + IchnIoTrap0, + IchnPciExpress, + IchnMonitor, + IchnSpi, + IchnQRT, + IchnGpioUnlock, + // + // INSERT NEW ITEMS JUST BEFORE THIS LINE + // + NUM_ICHN_TYPES // the number of items in this enumeration +} EFI_SMM_ICHN_SMI_TYPE; + +typedef struct { + EFI_SMM_ICHN_SMI_TYPE Type; +} EFI_SMM_ICHN_DISPATCH_CONTEXT; + +// +// Member functions +// +/** + Dispatch function for a ICHN specific SMI handler. + + @param DispatchHandle The handle of this dispatch function. + @param DispatchContext The pointer to the dispatch function's con= text. + The DispatchContext fields are filled in + by the dispatching driver prior to + invoking this dispatch function. + + @return None + +**/ +typedef +VOID +(EFIAPI *EFI_SMM_ICHN_DISPATCH)( + IN EFI_HANDLE DispatchHandle, + IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext + ); + +/** + Register a child SMI source dispatch function with a parent SMM driver. + + @param This The pointer to the EFI_SMM_ICHN_DISPATCH_P= ROTOCOL instance. + @param DispatchFunction The function to install. + @param DispatchContext The pointer to the dispatch function's con= text. + The caller fills in this context before ca= lling + the register function to indicate to the r= egister + function the ICHN SMI source for which the= dispatch + function should be invoked. + @param DispatchHandle The handle generated by the dispatcher to = track the function + instance. + + @retval EFI_SUCCESS The dispatch function has been successfully + registered and the SMI source has been ena= bled. + @retval EFI_DEVICE_ERROR The driver could not enable the SMI source. + @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manag= e this + child. + @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input= value + is not within valid range. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_SMM_ICHN_REGISTER)( + IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This, + IN EFI_SMM_ICHN_DISPATCH DispatchFunction, + IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext, + OUT EFI_HANDLE *DispatchHandle + ); + +/** + Unregister a child SMI source dispatch function with a parent SMM driver + + @param This The pointer to the EFI_SMM_ICHN_DISPATCH_P= ROTOCOL instance. + @param DispatchHandle The handle of the service to remove. + + @retval EFI_SUCCESS The dispatch function has been successfully + unregistered, and the SMI source has been = disabled, + if there are no other registered child dis= patch + functions for this SMI source. + @retval EFI_INVALID_PARAMETER The handle is invalid. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_SMM_ICHN_UNREGISTER)( + IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This, + IN EFI_HANDLE DispatchHandle + ); + +// +// Interface structure for the SMM ICHN specific SMI Dispatch Protocol +// +/** + Provides the parent dispatch service for a given SMI source generator. +**/ +struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL { + EFI_SMM_ICHN_REGISTER Register; ///< Installs a child service to b= e dispatched by this protocol. + EFI_SMM_ICHN_UNREGISTER UnRegister; ///< Removes a child service dispa= tched by this protocol. +}; + +extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid; + +#endif diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec b/= Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec index 6117f179ba..1af1ed757c 100644 --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec @@ -1,6 +1,6 @@ ## @file Vlv2DeviceRefCodePkg.dec # -# Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved +# Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -32,7 +32,7 @@ [Ppis] gEfiPeiReadOnlyVariable2PpiGuid =3D { 0x2ab86ef5, 0xecb5, 0x4134, = {0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4}} gPchPeiInitPpiGuid =3D { 0xACB93B08, 0x5CDC, 0x4A8F, = {0x93, 0xD4, 0x6, 0xE3, 0x42, 0xDF, 0x18, 0x2E}} gPttPassThruPpiGuid =3D { 0xc5068bac, 0xa7dc, 0x42f1, = {0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b}} - =20 + [Protocols] gEfiGlobalNvsAreaProtocolGuid =3D { 0x074e1e48, 0x8132, 0x47a1, = {0x8c, 0x2c, 0x3f, 0x14, 0xad, 0x9a, 0x66, 0xdc}} gPpmPlatformPolicyProtocolGuid =3D { 0xddabfeac, 0xef63, 0x452c, = {0x8f, 0x39, 0xed, 0x7f, 0xae, 0xd8, 0x26, 0x5e}} @@ -41,6 +41,7 @@ [Protocols] gEfiSdHostIoProtocolGuid =3D { 0xb63f8ec7, 0xa9c9, 0x4472, = {0xa4, 0xc0, 0x4d, 0x8b, 0xf3, 0x65, 0xcc, 0x51}} gEfiSpiProtocolGuid =3D { 0x1156efc6, 0xea32, 0x4396, = {0xb5, 0xd5, 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}} gEfiSmmSpiProtocolGuid =3D { 0xD9072C35, 0xEB8F, 0x43AD, = {0xA2, 0x20, 0x34, 0xD4, 0x0E, 0x2A, 0x82, 0x85}} + gEfiSmmIchnDispatchProtocolGuid =3D { 0xc50b323e, 0x9075, 0x4f2a, = { 0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc}} gEfiSmmIchnDispatchExProtocolGuid =3D { 0x3920405B, 0xC897, 0x44DA, = {0x88, 0xF3, 0x4C, 0x49, 0x8A, 0x6F, 0xF7, 0x36}} gEfiPchS3SupportProtocolGuid =3D { 0xE287D20B, 0xD897, 0x4E1E, = {0xA5, 0xD9, 0x97, 0x77, 0x63, 0x93, 0x6A, 0x04}} gPchResetProtocolGuid =3D { 0xDB63592C, 0xB8CC, 0x44C8, = {0x91, 0x8C, 0x51, 0xF5, 0x34, 0x59, 0x8A, 0x5A}} --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43061): https://edk2.groups.io/g/devel/message/43061 Mute This Topic: https://groups.io/mt/32267617/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43062+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43062+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949760; cv=none; d=zoho.com; s=zohoarc; b=Gwsn5BzbzxI9z6tV25HrEUzxrKhfbruufmJ3NI+ruF9QcyANojwhNslJHSLK8kjiwydVElx0BUB/qOEFdbqtD81qqConZDmCu4y4+D25xdTKdK9dbSyg3Z5PTlfpS6n50rUQWn3lsMv0xr1uaxELU5HPf0kAQ56HQqQF9yRoUvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949760; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=9z0DUpu3TphSoyC+RJahleWRKUIzHSec2eTSzHnR4/k=; b=oK2yXkjsLXs1fBG6vpRzsmc3jn99UQ75tg8m9RZWm7OqSbmgR4g6aWrhEV30Gi2wc+1G2Y9IM9nWPCVk9/nRUe7Om+N3crypZqhW5HsxDSKNxfJDJydFs7ZP9kiSDUv11CiF7UUd3Ib9JkwY0ICPSEN0X8ooJXDjh/SMrDrIjAM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43062+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949760943809.1868932449404; Sun, 30 Jun 2019 19:56:00 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:55:59 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:55:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480169" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:55:57 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 02/14] Vlv2TbltDevicePkg: Reduce Intel Framework dependencies Date: Sun, 30 Jun 2019 19:55:41 -0700 Message-Id: <20190701025553.18596-3-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949760; bh=OPJqNb46pSF48GdCIH9ZjboZ5SnSrHcXX5xy4xFTS44=; h=Cc:Date:From:Reply-To:Subject:To; b=LbHjoX7YcsstUYBBSX5itJ8JiGGGJq7rupD+RiPzbz1ecpCIoJ5ouI8AT2Dc8AKpFwS xmPKvgxQCHW8yompJ87lGZuO/OpkIU9qdhvsgvY8za1pVsc6Z9BggIQAVaPyJlgfRW9Ar IBXh/2vfoF05lEAB1NkFYQ/wxVrm8+6vmKc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Use BaseSerialPortLib16550 from MdeModulePkg. * Remove unused DxeSmmDriverEntryPoint library instance mapping from the IntelFrameworkPkg. * Remove all references to PS/2 Keyboard/Mouse that are not available on MinnowMax. * Remove VgaClassDxe module from IntelFrameworkModulePkg that is not used. * Remove DatahubStatusCodeHandlerDxe module from the IntelFrameworkModulePkg that is not used. * Remove LegacyRegionDxe module from the IntelFrameworkModulePkg The Legacy Region Protocol produced by this module is not used. * Remove VLV2 specific Metronome module that uses the CPU I/O Protocol defined in the IntelFrameworkPkg. Instead, use the Metronome module from the MdeModulePkg that produces the Metronome Arch Protocol from a TimerLib instance. * Remove use of MpCpu.inf from DSC/FDF file. * Update DSC/FDF/source files to assume MINNOW2_FSP_BUILD is FALSE. * Update DSC/FDF/source files to assume FTPM_ENABLE is FALSE. * Remove TXT binary * Use PcAtChisetPkg HpetDxe module instead of the VLV2 specific SmartTimer module that has an IntelFramework dependency. * Remove SEC_ENABLE define and dependent modules. * Remove IdeBusDxe module from DSC files. IdeBusDxe is listed in DSC file, but not the FDF file, so it is not used. This removes an IntelFrameworkModulkePkg dependency. * Remove commented out SDIO and PiSmmCommunicationPei modules * Remove unused Intel Framework S3Lib * Remove use of PCD from the IntelFrameworkModulePkg PcdEbdaReservedMemorySize. * Remove EdkCompatibilityPkg related [BuildOptions] sections * Remove unused DEFINES from DSC/FDF * Remove unused references to Ppi/Cache.h from Vlv2SocBinPkg.dec * Remove unused references to gPeiCachePpiGuid from Vlv2SocBinPkg.dec * Remove unused references to gEfiHtBistHobGuid from Vlv2SocBinPkg.dec * Remove unused references to gEfiCpuTokenSpaceGuid PCDs from Vlv2SocBinPkg.dec * Remove unused IntelPchLegacyInterrupt module * Remove CpuIoDxe module from IntelFrameworkModulePkg * Remove duplicate declaration of gEfiAcpiSupportProtocolGuid from Vlv2Tblt2DevicePkg * Remove duplicate declaration of PcdShellFile from Vlv2Tblt2DevicePkg * Remove unused gEfiAcpiTableProtocolGuid from AcpiPlatform.inf * Add E7006X3 UNDI module to FDF files * Remove gEfiSimpleNetworkProtocolGuid dependency. If gEfiSimpleNetworkProtocolGuid is not produced, still allow all SMBIOS records to be produced. The MAC address from Simple Network Protocol is being used as a system serial number. If Simple Network Protocol is not available, then default to a serial number of 0. * Remove unused dependency on IntelFspWrapperPkg * Remove Intel Framework S3 support. * Remove use of the gEfiSmmPeiSmramMemoryReserveGuid GUIDed HOB. * Remove production of unused gEfiFindFvPpiGuid. * Update IA32 only builds to use a unique BUILD_OUTPUT directory Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney Reviewed-By: Zailiang Sun --- .../AcpiPlatform/AcpiPlatform.c | 33 +- .../AcpiPlatform/AcpiPlatform.h | 8 +- .../AcpiPlatform/AcpiPlatform.inf | 5 - .../Intel/Vlv2TbltDevicePkg/Build_IFWI.bat | 33 -- .../Include/Library/EfiRegTableLib.h | 11 +- .../Library/EfiRegTableLib/EfiRegTableLib.inf | 12 +- .../MultiPlatformLib/MultiPlatformLib.h | 7 +- .../MultiPlatformLib/MultiPlatformLib.inf | 9 +- .../Library/PlatformBdsLib/BdsPlatform.c | 6 - .../MonoStatusCode/MonoStatusCode.h | 47 +- .../MonoStatusCode/MonoStatusCode.inf | 9 +- .../PciPlatform/PciPlatform.inf | 8 +- .../PlatformCpuInfoDxe/PlatformCpuInfoDxe.h | 17 +- .../PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf | 8 +- .../PlatformDxe/Configuration.h | 8 +- .../Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 524 +---------------- .../PlatformDxe/PlatformDxe.h | 515 +---------------- .../PlatformDxe/PlatformDxe.inf | 20 +- .../PlatformGopPolicy/PlatformGopPolicy.inf | 12 +- .../PlatformInitPei/MemoryCallback.c | 8 +- .../PlatformInitPei/PlatformEarlyInit.c | 209 +------ .../PlatformInitPei/PlatformEarlyInit.h | 21 +- .../PlatformInitPei/PlatformInitPei.inf | 29 +- .../PlatformPei/CommonHeader.h | 11 +- .../PlatformPei/MemoryCallback.c | 8 +- .../Vlv2TbltDevicePkg/PlatformPei/Platform.c | 16 +- .../PlatformPei/PlatformPei.inf | 11 +- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 16 +- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 254 +++------ .../Vlv2TbltDevicePkg/PlatformPkgConfig.dsc | 21 +- .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 234 +++----- .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 532 ++++------------- .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 533 ++++------------- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 534 ++++-------------- .../PlatformSetupDxe/PlatformSetupDxe.h | 28 +- .../PlatformSetupDxe/PlatformSetupDxe.inf | 14 +- .../PlatformSetupDxe/SetupInfoRecords.c | 43 +- .../Vlv2TbltDevicePkg/PlatformSmm/Platform.c | 83 +-- .../PlatformSmm/PlatformSmm.inf | 17 +- .../Vlv2TbltDevicePkg/PlatformSmm/S3Save.c | 53 +- .../PlatformSmm/SmmPlatform.h | 7 +- .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf | 6 +- .../MiscBaseBoardManufacturerFunction.c | 8 +- .../SmBiosMiscDxe/MiscOemType0x94Function.c | 42 +- .../MiscSystemManufacturerFunction.c | 10 +- .../SmBiosMiscDxe/SmBiosMiscDxe.inf | 15 +- .../VlvPlatformInitDxe/IgdOpRegion.c | 11 +- .../VlvPlatformInitDxe/IgdOpRegion.h | 27 +- .../VlvPlatformInitDxe/VlvPlatformInitDxe.inf | 8 +- Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 39 +- 50 files changed, 599 insertions(+), 3541 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 5c03f66edb..1f4d575b73 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -638,7 +638,6 @@ OnReadyToBoot ( EFI_STATUS Status; EFI_ACPI_TABLE_VERSION TableVersion; EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; - EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save; SYSTEM_CONFIGURATION SetupVarBuffer; UINTN VariableSize; EFI_PLATFORM_CPU_INFO *PlatformCpuInfoPtr =3D NULL; @@ -722,15 +721,6 @@ OnReadyToBoot ( TableVersion ); ASSERT_EFI_ERROR (Status); - - // - // S3 script save. - // - Status =3D gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID= **) &AcpiS3Save); - if (!EFI_ERROR (Status)) { - AcpiS3Save->S3Save (AcpiS3Save, NULL); - } - } =20 VOID @@ -1261,12 +1251,23 @@ AcpiPlatformEntryPoint ( } } =20 - Status =3D EfiCreateEventReadyToBootEx ( - TPL_NOTIFY, - OnReadyToBoot, - NULL, - &Event - ); + // + // Publish ACPI 1.0 or 2.0 Tables. + // +// Status =3D AcpiSupport->PublishTables ( +// AcpiSupport, +// TableVersion +// ); +// ASSERT_EFI_ERROR (Status); + +// Status =3D EfiCreateEventReadyToBootEx ( +// TPL_NOTIFY, +// OnReadyToBoot, +// NULL, +// &Event +// ); + Event =3D NULL; + OnReadyToBoot (Event, NULL); =20 // // Finished. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h index 598756846a..f45590ea24 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h @@ -1,12 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 AcpiPlatform.h @@ -26,7 +23,6 @@ Abstract: // // Statements that include other header files. // -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf= b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf index c59920db03..817ad58a81 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf @@ -37,7 +37,6 @@ [Packages] IntelFrameworkPkg/IntelFrameworkPkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec =20 [LibraryClasses] @@ -63,13 +62,9 @@ [Guids] gEfiVlv2VariableGuid =20 [Protocols] - gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEnhancedSpeedstepProtocolGuid gEfiPlatformCpuProtocolGuid gEfiAcpiSupportProtocolGuid - gEfiAcpiS3SaveProtocolGuid - gEfiCpuIoProtocolGuid - gEfiPs2PolicyProtocolGuid gEfiFirmwareVolume2ProtocolGuid gEfiMpServiceProtocolGuid gEfiGlobalNvsAreaProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat b/Platform/Int= el/Vlv2TbltDevicePkg/Build_IFWI.bat index 887206703a..44759c617f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat @@ -114,7 +114,6 @@ if /i "%~1"=3D=3D"/yL" ( goto OptLoop ) =20 - :: Require 2 input parameters if "%~2"=3D=3D"" goto Usage =20 @@ -122,10 +121,6 @@ if "%~2"=3D=3D"" goto Usage set Platform_Type=3D%~1 set Build_Target=3D%~2 =20 -if "%~3"=3D=3D"" ( - set "IFWI_Suffix=3D " -) else set "IFWI_Suffix=3D/S %~3" - :: Build BIOS echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D echo Build_IFWI: Calling BIOS build Script... @@ -139,34 +134,6 @@ if %ERRORLEVEL% NEQ 0 ( ) echo. echo Finished Building BIOS. -@REM Set BIOS_ID environment variable here. -call %WORKSPACE%\Conf\BiosId.bat -echo BIOS_ID=3D%BIOS_ID% - -:: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environm= ent variables -find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings -for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j -del /f/q ver_strings >nul -set BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MI= NOR%.ROM - -:: Start Integration process -echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -echo Build_IFWI: Calling IFWI Stitching Script... -pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch - - :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/S = IFWISuffix] - call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix% - =20 - @echo off -popd -if %ERRORLEVEL% NEQ 0 ( - echo echo -- Error Stitching %BIOS_Nam% & echo. - set exitCode=3D1 -) -echo. -echo Build_IFWI is finished. -echo The final IFWI file is located in %ROOT_DIR%\Vlv2TbltDevicePkg\Stitch\ -echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D goto Exit =20 :Usage diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLi= b.h b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h index 915f8b39d9..12e44efed0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h @@ -1,12 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 EfiRegTableLib.h @@ -31,10 +28,6 @@ Abstract: #include #include #include -#include -#include -#include -#include #include =20 =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiReg= TableLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiR= egTableLib.inf index 9cb8841d65..472fc4e0f6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLi= b.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLi= b.inf @@ -2,12 +2,9 @@ # #/*++ # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
-# = =20 +# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 - # # Module Name: # @@ -40,8 +37,3 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -[LibraryClasses] - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Mult= iPlatformLib.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/= MultiPlatformLib.h index 807ca20acb..3fa9f7b129 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.h @@ -3,11 +3,11 @@ =20 This file includes package header files, library classes. =20 - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2013 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + **/ =20 #ifndef _MULTIPLATFORM_LIB_H_ @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Mult= iPlatformLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLi= b/MultiPlatformLib.inf index 758e47ca70..a4942a097c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.inf @@ -1,11 +1,8 @@ # # -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 -# -# # # Module Name: # @@ -59,13 +56,11 @@ [Packages] Vlv2TbltDevicePkg/PlatformPkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - Vlv2SocBinPkg/Vlv2SocBinPkg.dec =20 [LibraryClasses] DebugLib HobLib IoLib -# PeiKscLib =20 [Ppis] gEfiPeiReadOnlyVariable2PpiGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPla= tform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatfo= rm.c index 4d5997d6e9..4adca1b465 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c @@ -1789,9 +1789,6 @@ PlatformBdsPolicyBehavior ( #ifdef TPM_ENABLED TcgPhysicalPresenceLibProcessRequest(); #endif - #ifdef FTPM_ENABLE - Tcg2PhysicalPresenceLibProcessRequest(NULL); - #endif =20 if (EsrtManagement !=3D NULL) { EsrtManagement->LockEsrtRepository(); @@ -1997,9 +1994,6 @@ FULL_CONFIGURATION: } #ifdef TPM_ENABLED TcgPhysicalPresenceLibProcessRequest(); - #endif - #ifdef FTPM_ENABLE - Tcg2PhysicalPresenceLibProcessRequest(NULL); #endif =20 if (EsrtManagement !=3D NULL) { diff --git a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode= .h b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.h index 0b256093a6..80a84d0d21 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 MonoStatusCode.h @@ -24,41 +22,18 @@ Abstract: // // Statements that include other files. // -#include "PiPei.h" +#include =20 -#include "Pi/PiBootMode.h" - -#include "Ppi/StatusCode.h" -#include "Ppi/MemoryDiscovered.h" -#include "Ppi/FvLoadFile.h" - -#include "Library/HobLib.h" -#include "Library/DebugLib.h" -#include "Library/IoLib.h" -#include "Library/SerialPortLib.h" -#include "Protocol/StatusCode.h" - - -#ifndef _STATUS_CODE_ENABLER_H_ -#define _STATUS_CODE_ENABLER_H_ - -#ifdef EFI_DEBUG - -#define EFI_STATUS_CODE_ENABLER_HOB_GUID \ - { \ - 0x5ffc6cf3, 0x71ad, 0x46f5, 0xbd, 0x8b, 0x7e, 0x8f, 0xfe, 0x19, 0x7, 0= xd7 \ - } - -extern EFI_GUID gEfiSerialStatusCodeEnablerHobGuid; - -typedef struct _EFI_STATUS_CODE_INFO { - BOOLEAN StatusCodeDisable; -} EFI_STATUS_CODE_INFO; - -#endif -#endif +#include =20 +#include +#include =20 +#include +#include +#include +#include +#include =20 // // Platform specific function Declarations. These must be implemented in a diff --git a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode= .inf b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf index f1be5b8d6c..d429310ac4 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf @@ -1,9 +1,8 @@ # # -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 # # Module Name: # @@ -34,10 +33,8 @@ [sources.common] [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - Vlv2SocBinPkg/Vlv2SocBinPkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec =20 [LibraryClasses] PeimEntryPoint @@ -52,7 +49,6 @@ [LibraryClasses] [Ppis] gEfiPeiMemoryDiscoveredPpiGuid gEfiPeiStatusCodePpiGuid - gEfiPeiFvFileLoaderPpiGuid =20 [Protocols] gEfiStatusCodeRuntimeProtocolGuid @@ -62,7 +58,6 @@ [Pcd] =20 [Guids] gEfiPlatformCpuInfoGuid - gEfiHtBistHobGuid gEfiStatusCodeDataTypeStringGuid ## CONSUMES =20 [Depex] diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf index a0837917d8..18012a1d53 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf @@ -1,11 +1,8 @@ #/*++ # -# Copyright (c) 2003 - 2018, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 2003 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 - # # Module Name: # @@ -46,7 +43,6 @@ [Packages] MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec =20 [LibraryClasses] HobLib diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCp= uInfoDxe.h b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCp= uInfoDxe.h index b13611f4f8..dfe3d1a0c7 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.h @@ -1,12 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: PlatformCpuInfoDxe.h =20 @@ -18,12 +15,10 @@ Abstract: #ifndef _PLATFORM_CPU_INFO_DRIVER_H_ #define _PLATFORM_CPU_INFO_DRIVER_H_ =20 -#include "PiDxe.h" -#include "Library/HobLib.h" -#include "Guid/GlobalVariable.h" -#include "Guid/AcpiVariableCompatibility.h" -#include "Guid/PlatformCpuInfo.h" -#include "Library/UefiRuntimeServicesTableLib.h" +#include +#include +#include +#include #include =20 #endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCp= uInfoDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/Platform= CpuInfoDxe.inf index f2ade1b105..ac9c7f1ba1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.inf @@ -1,10 +1,8 @@ #/*++ # -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 - # # Module Name: # @@ -36,9 +34,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2SocBinPkg/Vlv2SocBinPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec =20 [LibraryClasses] HobLib diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h index 23e03111c9..676f500530 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 Configuration.h @@ -89,8 +87,6 @@ Abstract: #define VAR_EQ_CONFIG_MODE_DECIMAL_NAME L"67" #define VAR_EQ_CPU_EE_NAME 0x0045 // E #define VAR_EQ_CPU_EE_DECIMAL_NAME L"69" -#define VAR_EQ_FLOPPY_MODE_NAME 0x0046 // F -#define VAR_EQ_FLOPPY_MODE_DECIMAL_NAME L"70" #define VAR_EQ_HT_MODE_NAME 0x0048 // H #define VAR_EQ_HT_MODE_DECIMAL_NAME L"72" #define VAR_EQ_AHCI_MODE_NAME 0x0049 // I diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index 2a4a0b92e1..1d90117af6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -1,13 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 =20 @@ -23,9 +19,7 @@ Abstract: #include "PlatformDxe.h" #include "Platform.h" #include "PchCommonDefinitions.h" -#include #include -#include #include #include #include @@ -63,10 +57,8 @@ GPIO_CONF_PAD_INIT mTB_BL_GpioInitData_SC_TRI_Exit_boot_= Service[] =3D EFI_GUID mSystemHiiExportDatabase =3D EFI_HII_EXPORT_DATABASE_GUID; EFI_GUID mPlatformDriverGuid =3D EFI_PLATFORM_DRIVER_GUID; SYSTEM_CONFIGURATION mSystemConfiguration; -SYSTEM_PASSWORDS mSystemPassword; EFI_HANDLE mImageHandle; BOOLEAN mMfgMode =3D FALSE; -VOID *mDxePlatformStringPack; UINT32 mPlatformBootMode =3D PLATFORM_NORMAL_MODE; extern CHAR16 gItkDataVarName[]; =20 @@ -77,8 +69,6 @@ EFI_EVENT mReadyToBootEvent; =20 UINT8 mSmbusRsvdAddresses[] =3D PLATFORM_SMBUS_RSVD_ADDRESSES; UINT8 mNumberSmbusAddress =3D sizeof( mSmbusRsvdAddresses ) / sizeof( mSmb= usRsvdAddresses[0] ); -UINT32 mSubsystemVidDid; -UINT32 mSubsystemAudioVidDid; =20 UINTN mPciLanCount =3D 0; VOID *mPciLanInfo =3D NULL; @@ -89,9 +79,6 @@ static EFI_SPEAKER_IF_PROTOCOL mSpeakerInterface =3D { GenerateBeepTone }; =20 -EFI_USB_POLICY_PROTOCOL mUsbPolicyData =3D {0}; - - CFIO_PNP_INIT mTB_BL_GpioInitData_SC_TRI_S0ix_Exit_boot_Service[] =3D { {0x410 ,0x20038e10}, //vlv.gpio.gpscore.cfio_regs_pad_lpc_clkout1_pconf0 @@ -179,11 +166,6 @@ VOID UpdateDVMTSetup( ); =20 -VOID -InitPlatformUsbPolicy ( - VOID - ); - VOID InitRC6Policy( VOID @@ -427,14 +409,8 @@ SpiBiosProtectionFunction( =20 BiosFlaLower0 =3D PcdGet32(PcdFlashMicroCodeAddress)-PcdGet32(PcdFlashAr= eaBaseAddress); BiosFlaLimit0 =3D PcdGet32(PcdFlashMicroCodeSize)-1; =20 - #ifdef MINNOW2_FSP_BUILD - BiosFlaLower1 =3D PcdGet32(PcdFlashFvFspBase)-PcdGet32(PcdFlashAreaBaseA= ddress); - BiosFlaLimit1 =3D (PcdGet32(PcdFlashFvRecoveryBase)-PcdGet32(PcdFlashFvF= spBase)+PcdGet32(PcdFlashFvRecoverySize))-1; - #else BiosFlaLower1 =3D PcdGet32(PcdFlashFvMainBase)-PcdGet32(PcdFlashAreaBase= Address); BiosFlaLimit1 =3D (PcdGet32(PcdFlashFvRecoveryBase)-PcdGet32(PcdFlashFvM= ainBase)+PcdGet32(PcdFlashFvRecoverySize))-1; - #endif - =20 mPciD31F0RegBase =3D MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_PCH, @@ -611,8 +587,6 @@ TristateLpcGpioS0i3Config ( } =20 =20 -EFI_BOOT_SCRIPT_SAVE_PROTOCOL *mBootScriptSave; - /** Event Notification during exit boot service to enabel ACPI mode =20 @@ -862,8 +836,6 @@ InitializePlatform ( // // Add usb policy // - InitPlatformUsbPolicy(); - InitSioPlatformPolicy(); InitializeClockRouting(); InitializeSlotInfo(); InitTcoReset(); @@ -949,7 +921,7 @@ InitializePlatform ( ); if (!EFI_ERROR (Status)) { Status =3D gBS->RegisterProtocolNotify ( - &gExitPmAuthProtocolGuid, + &gEfiEndOfDxeEventGroupGuid, RtcEvent, &RtcCallbackReg ); @@ -1042,58 +1014,6 @@ ReadyToBootFunction ( VOID *Context ) { - EFI_STATUS Status; - EFI_ISA_ACPI_PROTOCOL *IsaAcpi; - EFI_ISA_ACPI_DEVICE_ID IsaDevice; - UINTN Size; - UINT16 State; - EFI_TPM_MP_DRIVER_PROTOCOL *TpmMpDriver; - EFI_CPU_IO_PROTOCOL *CpuIo; - UINT8 Data; - UINT8 ReceiveBuffer [64]; - UINT32 ReceiveBufferSize; - - UINT8 TpmForceClearCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0A, - 0x00, 0x00, 0x00, 0x5D}; - UINT8 TpmPhysicalPresenceCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0C, - 0x40, 0x00, 0x00, 0x0A, - 0x00, 0x00}; - UINT8 TpmPhysicalDisableCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0A, - 0x00, 0x00, 0x00, 0x70}; - UINT8 TpmPhysicalEnableCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0A, - 0x00, 0x00, 0x00, 0x6F}; - UINT8 TpmPhysicalSetDeactivatedCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0B, - 0x00, 0x00, 0x00, 0x72, - 0x00}; - UINT8 TpmSetOwnerInstallCommand [] =3D {0x00, 0xC1, - 0x00, 0x00, 0x00, 0x0B, - 0x00, 0x00, 0x00, 0x71, - 0x00}; - - Size =3D sizeof(UINT16); - Status =3D gRT->GetVariable ( - VAR_EQ_FLOPPY_MODE_DECIMAL_NAME, - &gEfiNormalSetupGuid, - NULL, - &Size, - &State - ); - - // - // Disable Floppy Controller if needed - // - Status =3D gBS->LocateProtocol (&gEfiIsaAcpiProtocolGuid, NULL, (VOID **= ) &IsaAcpi); - if (!EFI_ERROR(Status) && (State =3D=3D 0x00)) { - IsaDevice.HID =3D EISA_PNP_ID(0x604); - IsaDevice.UID =3D 0; - Status =3D IsaAcpi->EnableDevice(IsaAcpi, &IsaDevice, FALSE); - } - // // save LAN info to a variable // @@ -1111,386 +1031,6 @@ ReadyToBootFunction ( gBS->FreePool (mPciLanInfo); mPciLanInfo =3D NULL; } - =20 - - // - // Handle ACPI OS TPM requests here - // - Status =3D gBS->LocateProtocol ( - &gEfiCpuIoProtocolGuid, - NULL, - (VOID **)&CpuIo - ); - Status =3D gBS->LocateProtocol ( - &gEfiTpmMpDriverProtocolGuid, - NULL, - (VOID **)&TpmMpDriver - ); - if (!EFI_ERROR (Status)) - { - Data =3D ReadCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST); - - // - // Clear pending ACPI TPM request indicator - // - WriteCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST, 0x00); - if (Data !=3D 0) - { - WriteCmosBank1Byte (CpuIo, ACPI_TPM_LAST_REQUEST, Data); - - // - // Assert Physical Presence for these commands - // - TpmPhysicalPresenceCommand [11] =3D 0x20; - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, TpmPhysicalPresenceCommand, - sizeof (TpmPhysicalPresenceCommand), - ReceiveBuffer, &ReceiveBufferSize - ); - // - // PF PhysicalPresence =3D TRUE - // - TpmPhysicalPresenceCommand [11] =3D 0x08; - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, TpmPhysicalPresenceCommand, - sizeof (TpmPhysicalPresenceCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - if (Data =3D=3D 0x01) - { - // - // TPM_PhysicalEnable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, TpmPhysicalEnableCommand, - sizeof (TpmPhysicalEnableCommand), - ReceiveBuffer, &ReceiveBufferSize - ); - } - if (Data =3D=3D 0x02) - { - // - // TPM_PhysicalDisable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, TpmPhysicalDisableCommand, - sizeof (TpmPhysicalDisableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - } - if (Data =3D=3D 0x03) - { - // - // TPM_PhysicalSetDeactivated=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, &ReceiveBufferSize - ); - gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); - } - if (Data =3D=3D 0x04) - { - // - // TPM_PhysicalSetDeactivated=3DTRUE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x01; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x05) - { - // - // TPM_ForceClear - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmForceClearCommand, - sizeof (TpmForceClearCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x06) - { - // - // TPM_PhysicalEnable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalEnableCommand, - sizeof (TpmPhysicalEnableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalSetDeactivated=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x07) - { - // - // TPM_PhysicalSetDeactivated=3DTRUE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x01; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalDisable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalDisableCommand, - sizeof (TpmPhysicalDisableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x08) - { - // - // TPM_SetOwnerInstall=3DTRUE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmSetOwnerInstallCommand [10] =3D 0x01; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmSetOwnerInstallCommand, - sizeof (TpmSetOwnerInstallCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - } - if (Data =3D=3D 0x09) - { - // - // TPM_SetOwnerInstall=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmSetOwnerInstallCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmSetOwnerInstallCommand, - sizeof (TpmSetOwnerInstallCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - } - if (Data =3D=3D 0x0A) - { - // - // TPM_PhysicalEnable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalEnableCommand, - sizeof (TpmPhysicalEnableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalSetDeactivated=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // Do TPM_SetOwnerInstall=3DTRUE on next reboot - // - - WriteCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST, 0xF0); - - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x0B) - { - // - // TPM_SetOwnerInstall=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmSetOwnerInstallCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmSetOwnerInstallCommand, - sizeof (TpmSetOwnerInstallCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalSetDeactivated=3DTRUE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x01; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalDisable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalDisableCommand, - sizeof (TpmPhysicalDisableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0x0E) - { - // - // TPM_ForceClear - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmForceClearCommand, - sizeof (TpmForceClearCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalEnable - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalEnableCommand, - sizeof (TpmPhysicalEnableCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - // - // TPM_PhysicalSetDeactivated=3DFALSE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmPhysicalSetDeactivatedCommand [10] =3D 0x00; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalSetDeactivatedCommand, - sizeof (TpmPhysicalSetDeactivatedCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - gRT->ResetSystem ( - EfiResetWarm, - EFI_SUCCESS, - 0, - NULL - ); - } - if (Data =3D=3D 0xF0) - { - // - // Second part of ACPI TPM request 0x0A: OEM custom TPM_SetOwnerIn= stall=3DTRUE - // - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - TpmSetOwnerInstallCommand [10] =3D 0x01; - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmSetOwnerInstallCommand, - sizeof (TpmSetOwnerInstallCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - WriteCmosBank1Byte (CpuIo, ACPI_TPM_LAST_REQUEST, 0x0A); - } - // - // Deassert Physical Presence - // - TpmPhysicalPresenceCommand [11] =3D 0x10; - ReceiveBufferSize =3D sizeof(ReceiveBuffer); - Status =3D TpmMpDriver->Transmit ( - TpmMpDriver, - TpmPhysicalPresenceCommand, - sizeof (TpmPhysicalPresenceCommand), - ReceiveBuffer, - &ReceiveBufferSize - ); - } - } - - return; } =20 /** @@ -1722,66 +1262,6 @@ UpdateDVMTSetup( } } =20 -VOID -InitPlatformUsbPolicy ( - VOID - ) - -{ - EFI_HANDLE Handle; - EFI_STATUS Status; - - Handle =3D NULL; - - mUsbPolicyData.Version =3D (UINT8)USB_POLICY_PROTO= COL_REVISION_2; - mUsbPolicyData.UsbMassStorageEmulationType =3D mSystemConfiguration.Us= bBIOSINT13DeviceEmulation; - if(mUsbPolicyData.UsbMassStorageEmulationType =3D=3D 3) { - mUsbPolicyData.UsbEmulationSize =3D mSystemConfiguration.UsbBIOSINT13D= eviceEmulationSize; - } else { - mUsbPolicyData.UsbEmulationSize =3D 0; - } - mUsbPolicyData.UsbZipEmulationType =3D mSystemConfiguration.UsbZ= ipEmulation; - mUsbPolicyData.UsbOperationMode =3D HIGH_SPEED; - - // - // Some chipset need Period smi, 0 =3D LEGACY_PERIOD_UN_SUPP - // - mUsbPolicyData.USBPeriodSupport =3D LEGACY_PERIOD_UN_SUPP; - - // - // Some platform need legacyfree, 0 =3D LEGACY_FREE_UN_SUPP - // - mUsbPolicyData.LegacyFreeSupport =3D LEGACY_FREE_UN_SUPP; - - // - // Set Code base , TIANO_CODE_BASE =3D0x01, ICBD =3D0x00 - // - mUsbPolicyData.CodeBase =3D (UINT8)ICBD_CODE_BASE; - - // - // Some chispet 's LpcAcpibase are diffrent,set by platform or chipset, - // default is Ich acpibase =3D0x040. acpitimerreg=3D0x08. - mUsbPolicyData.LpcAcpiBase =3D 0x40; - mUsbPolicyData.AcpiTimerReg =3D 0x08; - - // - // Set for reduce usb post time - // - mUsbPolicyData.UsbTimeTue =3D 0x00; - mUsbPolicyData.InternelHubExist =3D 0x00; //TigerPoint doesn't have= RMH - mUsbPolicyData.EnumWaitPortStableStall =3D 100; - - - Status =3D gBS->InstallProtocolInterface ( - &Handle, - &gUsbPolicyGuid, - EFI_NATIVE_INTERFACE, - &mUsbPolicyData - ); - ASSERT_EFI_ERROR(Status); - -} - UINT8 ReadCmosBank1Byte ( IN EFI_CPU_IO_PROTOCOL *CpuIo, diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h index 8f5df3257e..621fb08274 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h @@ -1,10 +1,8 @@ /*++ =20 - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 - =20 Module Name: =20 @@ -42,25 +40,17 @@ Abstract: #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include #include #include #include #include #include #include -#include #include #include #include #include "Configuration.h" -#define _EFI_H_ //skip efi.h #include "PchAccess.h" #include "VlvAccess.h" #include "BoardIdDecode.h" @@ -86,25 +76,9 @@ Abstract: =20 #define B_RTC_DATE_ALARM_MASK 0x3F =20 -// -// Default CPU Alternate Duty Cycle (255=3D100%, 0=3D0%) -// -#define DEF_CPU_ALT_DUTY_CYCLE 0xFF - -#define MAX_ONBOARD_SATA_DEVICE 2 - -#define DXE_DEVICE_ENABLED 1 -#define DXE_DEVICE_DISABLED 0 - -#define AZALIA_MAX_LOOP_TIME 0x10000 - // // Platform driver GUID // -#define EFI_PLATFORM_DRIVER_GUID \ - { 0x056E7324, 0xA718, 0x465b, 0x9A, 0x84, 0x22, 0x8F, 0x06, 0x64, 0x2B, = 0x4F } - -#define PASSWORD_MAX_SIZE 20 #define PLATFORM_NORMAL_MODE 0x01 #define PLATFORM_SAFE_MODE 0x02 #define PLATFORM_RECOVERY_MODE 0x04 @@ -119,33 +93,10 @@ Abstract: #define EFI_CU_PLATFORM_DXE_STEP4 (EFI_OEM_SPECIFIC | 0= x00000015) #define EFI_CU_PLATFORM_DXE_INIT_DONE (EFI_OEM_SPECIFIC | 0= x00000016) =20 - -#define EFI_SECTION_STRING 0x1C -#define EFI_FORWARD_DECLARATION(x) typedef struct _##x x -#define PREFIX_BLANK 0x04 - #pragma pack(1) =20 typedef UINT64 EFI_BOARD_FEATURES; =20 -// -//BUGBUG: should remove these EDK hii definition once Hii transtion is done -// -typedef UINT16 STRING_REF; -typedef UINT16 EFI_FORM_LABEL; - -typedef enum { - EfiUserPassword, - EfiAdminPassword -} EFI_PASSWORD_TYPE; - -typedef struct { - CHAR16 TempPassword[PASSWORD_MAX_SIZE]; - CHAR16 EncodedPassword[PASSWORD_MAX_SIZE]; - VOID *PasswordLocation; - EFI_PASSWORD_TYPE PasswordType; -} EFI_PASSWORD_DATA; - typedef struct { CHAR8 AaNumber[7]; UINT8 BoardId; @@ -155,111 +106,11 @@ typedef struct { UINT64 AcpiOemTableId; } BOARD_ID_DECODE; =20 -typedef -EFI_STATUS -(EFIAPI *EFI_FORM_ROUTINE) ( - SYSTEM_CONFIGURATION *SetupBuffer - ); - -typedef struct{ - UINT16 DeviceNumber; - UINT16 FunctionNumber; -}PCI_DEVICE_FUNC_INFO; - -typedef struct{ - CHAR16 PortNumber[4]; - STRING_REF SataDeviceInfoStringId; -}SATA_DEVICE_STRING_INFO; - -typedef struct { - UINT16 Signature; - UINT8 Size; - UINT32 EntryPoint; - UINT8 Reserve[17]; - UINT16 PciDataOff; - UINT16 ExpansionOff; -} PNP_OPTION_ROM_HEADER; - -typedef struct { - UINT32 Signature; - UINT8 Revision; - UINT8 Length; - UINT16 NextHeader; - UINT8 Reserve; - UINT8 CheckSum; - UINT32 DeviceId; - UINT16 ManufactureStrOff; - UINT16 ProductStrOff; -} PNP_EXPANSION_HEADER; - -typedef struct { - BOOLEAN Enable; - UINT8 VerbTableNum; - UINT16 CodecSSID; - EFI_PHYSICAL_ADDRESS HDABar; - EFI_PHYSICAL_ADDRESS UpperHDABar; - UINT8 SDIPresent; - BOOLEAN Pme; - BOOLEAN LegacyFrontPanelAudio; - BOOLEAN HighDefinitionFrontPanelAudio; -} EFI_AZALIA_S3; - -// -//following structs are from R8. Remove them once R8->R9 transition is done -// -typedef struct { - CHAR16 *OptionString; // Passed in string to generate a token for = in a truly dynamic form creation - STRING_REF StringToken; // This is used when creating a single op-co= de without generating a StringToken (have one already) - UINT16 Value; - UINT8 Flags; - UINT16 Key; -} IFR_OPTION; - - - -typedef struct { - UINT8 Number; - UINT32 HorizontalResolution; - UINT32 VerticalResolution; -} PANEL_RESOLUTION; - #pragma pack() =20 // // Prototypes // -EFI_STATUS -EFIAPI -EfiMain ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ); - -EFI_STATUS -ProcessEventLog ( - ); - -EFI_STATUS -FindDataRecords ( - ); - -EFI_STATUS -ProcessPasswords( - ); - -VOID -MemorySetup( - ); - - -UINTN -EfiValueToString ( - IN OUT CHAR16 *Buffer, - IN INT64 Value, - IN UINTN Flags, - IN UINTN Width - ); - VOID EFIAPI ReadyToBootFunction ( @@ -267,60 +118,6 @@ ReadyToBootFunction ( VOID *Context ); =20 -VOID -InstallHiiDataAndGetSettings( - IN EFI_HII_STRING_PACK *StringPack, - // - ... // 0 or more of =3D> IN EFI_HII_IFR_PACK *IfrPack, - // Terminate list with NULL - // - ); - -EFI_STATUS -ReadOrInitSetupVariable( - IN UINTN RequiredVariableSize, - IN UINTN RequiredPasswordSize, - IN VOID *DefaultData, - IN VOID *MfgDefaultData, - OUT VOID *SetupVariableData, - OUT VOID *SystemPassword - ); - -VOID -EfiLogicalOrMem( - IN VOID *Destination, - IN VOID *Source, - IN UINTN Length - ); - -EFI_STATUS -GetStringFromToken ( - IN EFI_GUID *ProducerGuid, - IN STRING_REF Token, - OUT CHAR16 **String - ); - -UINT32 -ConvertBase2ToRaw ( - IN EFI_EXP_BASE2_DATA *Data); - -UINT32 -ConvertBase10ToRaw ( - IN EFI_EXP_BASE10_DATA *Data); - -CHAR16 * -GetStringById ( - IN STRING_REF Id, - EFI_HII_HANDLE StringPackHandle - ); - -VOID -EFIAPI -SetupDataFilter ( - IN EFI_EVENT Event, - IN VOID* Context - ); - VOID EFIAPI IdeDataFilter ( @@ -328,20 +125,6 @@ IdeDataFilter ( IN VOID* Context ); =20 -VOID -EFIAPI -UpdateAhciRaidDiskInfo ( - IN EFI_EVENT Event, - IN VOID* Context - ); - -VOID -EFIAPI -EventLogFilter ( - IN EFI_EVENT Event, - IN VOID* Context - ); - VOID SwapEntries ( IN CHAR8 *Data @@ -353,45 +136,12 @@ AsciiToUnicode ( IN CHAR16 *UnicodeString ); =20 -UINT16 -ConfigModeStateGet(); - -VOID -SetSkus(); - -VOID -CPUSetupItems(); - -EFI_STATUS -SecurityDriverCallback ( - IN EFI_FORM_CALLBACK_PROTOCOL *This, - IN UINT16 KeyValue, - IN EFI_IFR_DATA_ARRAY *Data, - OUT EFI_HII_CALLBACK_PACKET **Packet - ); - -VOID -SetPasswordState ( - ); - -VOID -EncodePassword ( - IN CHAR16 *Password - ); - VOID EFIAPI PciBusEvent ( IN EFI_EVENT Event, IN VOID* Context ); -VOID -AsfInitialize( - ); - -VOID -InitializeAsf ( - ); =20 UINT8 ReadCmosBank1Byte ( @@ -410,204 +160,6 @@ VOID InitializeBoardId ( ); =20 -EFI_STATUS -InstallBootCallbackRoutine( - ); - -EFI_STATUS -InstallConfigurationCallbackRoutine( - ); - -EFI_STATUS -InstallPerformanceCallbackRoutine( - ); - -EFI_STATUS -InstallSecurityCallbackRoutine ( - ); - -EFI_STATUS -InstallMainCallbackRoutine ( - ); - -EFI_STATUS -MemoryConfigurationUpdate ( - UINT16 *Key, - EFI_FORM_LABEL *Label, - UINT16 *OpcodeCount, - UINT8 **OpcodeData, - EFI_FORM_ROUTINE *Routine - ); - -EFI_STATUS -MemoryConfigurationCallbackRoutine ( - SYSTEM_CONFIGURATION *SetupBuffer - ); - -EFI_STATUS -MemoryConfigurationCalculateSpeed( - SYSTEM_CONFIGURATION *SetupBuffer - ); - -VOID -UpdateMemoryString( - IN STRING_REF TokenToUpdate, - IN CHAR16 *NewString - ); - -VOID -InitFeaturePolicy ( - IN EFI_PLATFORM_INFO_HOB *PlatformInfo - ); - -VOID -InitializeSetupVarHide ( - ); - -VOID -PreparePCIePCISlotInformation( - VOID - ); - - -EFI_STATUS -BootConfigurationUpdate ( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -EFI_STATUS -InitializeBootConfiguration( - VOID - ); - -UINT16 -GetStringSize( - IN CHAR16 *ThisString - ); - -UINT16 -GetDriveCount ( - IN STRING_REF *BootMap - ); - -CHAR16 * -GetBootString ( - IN STRING_REF Id, - OUT UINTN *Length - ); - -EFI_STATUS -BootCfgCreateTwoOptionOneOf( - IN UINT16 QuestionId, - IN EFI_FORM_LABEL Label, - IN STRING_REF OptionPrompt, - IN STRING_REF OptionHelp, - IN STRING_REF OptionOneString, - IN STRING_REF OptionTwoString, - IN UINT8 OptionOneFlags, - IN UINT8 OptionTwoFlags, - IN UINT16 KeyValueOne, - IN UINT16 KeyValueTwo - ); - -EFI_STATUS -ReplaceOpcodeWithText( - IN STRING_REF OptionPrompt, - IN STRING_REF OptionHelp, - IN STRING_REF OptionOneString, - IN EFI_FORM_LABEL Label - ); - -EFI_STATUS -CreateDriveBootOrderOpcode( - IN VOID *Data, - IN STRING_REF *BootMap, - IN EFI_FORM_LABEL Label, - IN UINT16 QuestionId, - IN STRING_REF OptionOneString, - IN STRING_REF OptionTwoString - ); - -VOID -SetHyperBootCfgFlags( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -VOID -GetHyperBootCfgFlags( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -VOID -PrepareBootCfgForHyperBoot( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -BOOLEAN -BootCfgChanged( - IN SYSTEM_CONFIGURATION *SystemConfiguration - ); - -EFI_STATUS -InsertOpcodeAtIndex( - IN SYSTEM_CONFIGURATION *SystemConfiguration, - IN OUT IFR_OPTION *OptionList, - IN IFR_OPTION IfrOption, - IN UINT16 OptionCount - ); - -VOID -ConfigureBootOrderStrings( - IN SYSTEM_CONFIGURATION *SystemConfiguration - ); - -VOID -InitializeAllBootStrings( - VOID - ); - -VOID -SaveUsbCfgSettings( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -VOID -RestoreUsbCfgSettings( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -EFI_STATUS -UpdateBootDevicePriority( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -EFI_STATUS -DisableHyperBoot( - IN OUT SYSTEM_CONFIGURATION *SystemConfiguration - ); - -BOOLEAN -CheckForUserPassword( - VOID - ); - -EFI_STATUS -EFIAPI -HyperBootPasswordCallback( - IN OUT VOID* Data - ); - -EFI_STATUS -EFIAPI -HyperBootF9Callback ( - IN VOID* Data - ); - -EFI_STATUS -InstallHiiEvents( - VOID - ); - EFI_STATUS EFIAPI ProgramToneFrequency ( @@ -637,73 +189,13 @@ AdjustDefaultRtcTimeCallback ( IN VOID *Context ); =20 -typedef struct _GOP_DISPLAY_BRIGHTNESS_PROTOCOL GOP_DISPLAY_BRIGHTNESS_PRO= TOCOL; - -typedef -EFI_STATUS -(EFIAPI *GET_MAXIMUM_BRIGHTNESS_LEVEL) ( - IN GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This, - OUT UINT32 *MaxBrightnessLevel - ); - - -typedef -EFI_STATUS -(EFIAPI *GET_CURRENT_BRIGHTNESS_LEVEL) ( - IN GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This, - OUT UINT32 *MaxBrightnessLevel - ); - -typedef -EFI_STATUS -(EFIAPI *SET_BRIGHTNESS_LEVEL) ( - IN GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This, - IN UINT32 BrightnessLevel - ); - -struct _GOP_DISPLAY_BRIGHTNESS_PROTOCOL { - UINT32 Revision; - GET_MAXIMUM_BRIGHTNESS_LEVEL GetMaxBrightnessLevel; - GET_CURRENT_BRIGHTNESS_LEVEL GetCurrentBrightnessLevel; - SET_BRIGHTNESS_LEVEL SetBrightnessLevel; -}; - // // Global externs // -extern UINT8 MaintenanceBin[]; -extern UINT8 MainBin[]; -extern UINT8 ConfigurationBin[]; -extern UINT8 MemoryConfigurationBin[]; -extern UINT8 PerformanceBin[]; -extern UINT8 SecurityBin[]; -extern UINT8 BootBin[]; -extern UINT8 PowerBin[]; -extern UINT8 SystemSetupBin[]; - -extern VOID *mDxePlatformStringPack; -extern EFI_HII_PROTOCOL *mHii; extern SYSTEM_CONFIGURATION mSystemConfiguration; -extern FRAMEWORK_EFI_HII_HANDLE mMaintenanceHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mMainHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mConfigurationHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mPerformanceHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mPowerHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mBootHiiHandle; -extern FRAMEWORK_EFI_HII_HANDLE mSecurityHiiHandle; - -extern SYSTEM_PASSWORDS mSystemPassword; -extern EFI_PASSWORD_DATA mAdminPassword; -extern EFI_PASSWORD_DATA mUserPassword; =20 extern EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo; =20 -// -//extern EFI_REG_TABLE mSubsystemIdRegs[]; -// -extern UINT32 mSubsystemVidDid; -extern UINT32 mSubsystemAudioVidDid; - extern UINT8 mBoardIdIndex; extern BOOLEAN mFoundAANum; extern EFI_BOARD_FEATURES mBoardFeatures; @@ -718,5 +210,4 @@ extern BOOLEAN mMfgMode; extern UINT32 mPlatformBootMode; extern CHAR8 BoardAaNumber[]; =20 -extern EFI_GUID gEfiGlobalNvsAreaProtocolGuid; #endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index 4d1949d05d..e8652f2a84 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -1,6 +1,6 @@ ## @file # -# Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -50,13 +50,10 @@ [sources.common] [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec SecurityPkg/SecurityPkg.dec CryptoPkg/CryptoPkg.dec - IntelFspWrapperPkg/IntelFspWrapperPkg.dec =20 [LibraryClasses] BaseLib @@ -91,24 +88,18 @@ [Guids] gEfiEventExitBootServicesGuid gEfiVlv2VariableGuid gEfiSecureBootEnableDisableGuid + gEfiEndOfDxeEventGroupGuid =20 [Protocols] gEfiPciRootBridgeIoProtocolGuid # CONSUMES ## GUID gEfiVariableArchProtocolGuid gEfiVariableWriteArchProtocolGuid gEfiHiiConfigAccessProtocolGuid - gEfiBootScriptSaveProtocolGuid - gEfiCpuIoProtocolGuid + gEfiCpuIo2ProtocolGuid gEfiDevicePathProtocolGuid gEfiDiskInfoProtocolGuid - gEfiPs2PolicyProtocolGuid - gEfiIsaAcpiProtocolGuid - gEfiDataHubProtocolGuid gEfiPciIoProtocolGuid gDxePchPlatformPolicyProtocolGuid - gEfiTpmMpDriverProtocolGuid - gEfiLpcWpce791PolicyProtocolGuid - gUsbPolicyGuid gEfiSpeakerInterfaceProtocolGuid gDxeVlvPlatformPolicyGuid gEfiSmbiosSlotPopulationGuid @@ -121,7 +112,6 @@ [Protocols] gEfiGlobalNvsAreaProtocolGuid gEfiCpuIo2ProtocolGuid gIgdOpRegionProtocolGuid - gExitPmAuthProtocolGuid gEdkiiVariableLockProtocolGuid =20 [Pcd.common] @@ -134,15 +124,13 @@ [Pcd.common] gPlatformModuleTokenSpaceGuid.PcdFlashFvMainBase gPlatformModuleTokenSpaceGuid.PcdFlashFvRecoveryBase gPlatformModuleTokenSpaceGuid.PcdFlashFvRecoverySize - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase =20 =20 [Depex] gEfiPciRootBridgeIoProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND - gEfiBootScriptSaveProtocolGuid AND - gEfiCpuIoProtocolGuid AND + gEfiCpuIo2ProtocolGuid AND gDxePchPlatformPolicyProtocolGuid AND gEfiGlobalNvsAreaProtocolGuid =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGop= Policy.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGop= Policy.inf index 948793f719..c00553e224 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.= inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.= inf @@ -1,15 +1,10 @@ # # -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# = =20 # SPDX-License-Identifier: BSD-2-Clause-Patent # ## =20 - [Defines] INF_VERSION =3D 0x00010005 BASE_NAME =3D PlatformGOPPolicy @@ -29,14 +24,13 @@ [Sources.common] =20 [Packages] MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec + [LibraryClasses] BaseLib DebugLib UefiDriverEntryPoint UefiRuntimeServicesTableLib -# DxeKscLib =20 [Guids] gBmpImageGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallbac= k.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallback.c index 070848ed1e..074bf7debb 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallback.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallback.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 MemoryCallback.c @@ -158,12 +156,10 @@ MemoryDiscoveredPpiNotifyCallback ( IoWrite16 (ACPI_BASE_ADDRESS + R_PCH_ACPI_PM1_CNT, Pm1Cnt); } =20 - #ifndef MINNOW2_FSP_BUILD // // Set PEI cache mode here // SetPeiCacheMode (PeiServices); - #endif =20 // // Pulish memory tyoe info diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarly= Init.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit= .c index a359c95920..ec636a4cd9 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 PlatformEarlyInit.c @@ -70,10 +67,6 @@ static EFI_PEI_PPI_DESCRIPTOR mInstallSpeakerInter= facePpi =3D { static EFI_PEI_RESET_PPI mResetPpi =3D { IchReset }; =20 =20 -static EFI_PEI_FIND_FV_PPI mEfiFindFvPpi =3D { - (EFI_PEI_FIND_FV_FINDFV)FindFv -}; - static EFI_PEI_PPI_DESCRIPTOR mPpiList[] =3D { { EFI_PEI_PPI_DESCRIPTOR_PPI, @@ -81,14 +74,9 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiList[] =3D { NULL }, { - EFI_PEI_PPI_DESCRIPTOR_PPI, + (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), &gEfiPeiResetPpiGuid, &mResetPpi - }, - { - (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), - &gEfiFindFvPpiGuid, - &mEfiFindFvPpi } }; =20 @@ -815,158 +803,6 @@ PlatformEarlyInitEntry ( EFI_PLATFORM_INFO_HOB *PlatformInfo; EFI_PEI_HOB_POINTERS Hob; EFI_PLATFORM_CPU_INFO PlatformCpuInfo; - EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *DescriptorBlock; - EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *NewDescriptorBlock; - UINTN Index; - UINTN MaxIndex; - UINT64 Base; - UINT64 Size; - UINT64 NewSize; - - // - // Make sure base and size of the SMRAM region is aligned - // - Hob.Raw =3D GetFirstGuidHob (&gEfiSmmPeiSmramMemoryReserveGuid); - if (Hob.Raw !=3D NULL) { - DescriptorBlock =3D GET_GUID_HOB_DATA (Hob.Raw); - DEBUG ((DEBUG_INFO, "SMM PEI SMRAM Memory Reserved HOB\n")); - for (Index =3D 0; Index < DescriptorBlock->NumberOfSmmReservedRegions;= Index++) { - DEBUG((DEBUG_INFO, " SMRAM Descriptor[%02x]: Start=3D%016lx Size= =3D%016lx State=3D%02x\n", - Index, - DescriptorBlock->Descriptor[Index].PhysicalStart, - DescriptorBlock->Descriptor[Index].PhysicalSize, - DescriptorBlock->Descriptor[Index].RegionState - )); - } - - // - // Find the largest usable range of SMRAM between 1MB and 4GB - // - for (Index =3D 0, MaxIndex =3D 0, Size =3D 0; Index < DescriptorBlock-= >NumberOfSmmReservedRegions; Index++) { - // - // Skip any SMRAM region that is already allocated, needs testing, o= r needs ECC initialization - // - if ((DescriptorBlock->Descriptor[Index].RegionState & (EFI_ALLOCATED= | EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) !=3D 0) { - continue; - } - // - // Skip any SMRAM region below 1MB - // - if (DescriptorBlock->Descriptor[Index].CpuStart < BASE_1MB) { - continue; - } - // - // Skip any SMRAM region that is above 4GB or crosses the 4GB bounda= ry - // - if ((DescriptorBlock->Descriptor[Index].CpuStart + DescriptorBlock->= Descriptor[Index].PhysicalSize) >=3D BASE_4GB) { - continue; - } - // - // Cache the largest SMRAM region index - // - if (DescriptorBlock->Descriptor[Index].PhysicalSize >=3D DescriptorB= lock->Descriptor[MaxIndex].PhysicalSize) { - MaxIndex =3D Index; - } - } - - // - // Find the extent of the contiguous SMRAM region that surrounds the l= argest usable SMRAM range - // - Base =3D DescriptorBlock->Descriptor[MaxIndex].CpuStart; - Size =3D DescriptorBlock->Descriptor[MaxIndex].PhysicalSize; - for (Index =3D 0; Index < DescriptorBlock->NumberOfSmmReservedRegions;= Index++) { - if (DescriptorBlock->Descriptor[Index].CpuStart < Base && - Base =3D=3D (DescriptorBlock->Descriptor[Index].CpuStart + Descr= iptorBlock->Descriptor[Index].PhysicalSize)) { - Base =3D DescriptorBlock->Descriptor[Index].CpuStart; - Size +=3D DescriptorBlock->Descriptor[Index].PhysicalSize; - } else if ((Base + Size) =3D=3D DescriptorBlock->Descriptor[Index].C= puStart) { - Size +=3D DescriptorBlock->Descriptor[Index].PhysicalSize; - } - } - - // - // Round SMRAM region up to nearest power of 2 that is at least 4KB - // - NewSize =3D MAX (LShiftU64 (1, HighBitSet64 (Size - 1) + 1), SIZE_4KB); - if ((Base & ~(NewSize - 1)) !=3D Base) { - // - // SMRAM region Base Address has smaller alignment than SMRAM region= Size - // This is not compatible with SMRR settings - // - DEBUG((DEBUG_ERROR, "ERROR: SMRAM Region Size has larger alignment t= han SMRAM Region Base\n")); - DEBUG((DEBUG_ERROR, " SMRAM Region Base=3D%016lx Size=3D%016lx\n",= Base, NewSize)); - ASSERT (FALSE); - } else if (Size !=3D NewSize) { - // - // See if the size difference can be added to an adjacent descriptor= that is already allocated - // - for (Index =3D 0; Index < DescriptorBlock->NumberOfSmmReservedRegion= s; Index++) { - if ((DescriptorBlock->Descriptor[Index].CpuStart + DescriptorBlock= ->Descriptor[Index].PhysicalSize) =3D=3D (Base + Size)) { - if (((DescriptorBlock->Descriptor[Index].RegionState) & EFI_ALLO= CATED) !=3D 0) { - DescriptorBlock->Descriptor[Index].PhysicalSize +=3D (NewSize = - Size); - Size =3D NewSize; - break; - } - } - } - - if (Size !=3D NewSize) { - // - // Add an allocated descriptor to the SMM PEI SMRAM Memory Reserve= d HOB to accomodate the larger size. - // - Index =3D DescriptorBlock->NumberOfSmmReservedRegions; - NewDescriptorBlock =3D (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *)BuildGuid= Hob ( - &gEfiSmmPeiSmramMemoryReserveGuid, - sizeof (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK) + ((Index + 1) * sizeof = (EFI_SMRAM_DESCRIPTOR)) - ); - ASSERT (NewDescriptorBlock !=3D NULL); - - // - // Copy old EFI_SMRAM_HOB_DESCRIPTOR_BLOCK to new allocated region - // - CopyMem ( - NewDescriptorBlock, - DescriptorBlock, - sizeof (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK) + (Index * sizeof (EFI_S= MRAM_DESCRIPTOR)) - ); - - // - // Make sure last descriptor in NewDescriptorBlock contains last d= escriptor from DescriptorBlock - // - CopyMem ( - &NewDescriptorBlock->Descriptor[Index], - &NewDescriptorBlock->Descriptor[Index - 1], - sizeof (EFI_SMRAM_DESCRIPTOR) - ); - - // - // Fill next to last descriptor with an allocated descriptor that = aligns the total size of SMRAM - // - NewDescriptorBlock->Descriptor[Index - 1].CpuStart =3D Base += Size; - NewDescriptorBlock->Descriptor[Index - 1].PhysicalStart =3D Base += Size; - NewDescriptorBlock->Descriptor[Index - 1].PhysicalSize =3D NewSiz= e - Size; - NewDescriptorBlock->Descriptor[Index - 1].RegionState =3D Descri= ptorBlock->Descriptor[MaxIndex].RegionState | EFI_ALLOCATED; - NewDescriptorBlock->NumberOfSmmReservedRegions++; - - // - // Invalidate the original gEfiSmmPeiSmramMemoryReserveGuid HOB - // - ZeroMem (&Hob.Guid->Name, sizeof (&Hob.Guid->Name)); - } - - Hob.Raw =3D GetFirstGuidHob (&gEfiSmmPeiSmramMemoryReserveGuid); - DescriptorBlock =3D GET_GUID_HOB_DATA (Hob.Raw); - DEBUG ((DEBUG_INFO, "SMM PEI SMRAM Memory Reserved HOB - Updated\n")= ); - for (Index =3D 0; Index < DescriptorBlock->NumberOfSmmReservedRegion= s; Index++) { - DEBUG((DEBUG_INFO, " SMRAM Descriptor[%02x]: Start=3D%016lx Size= =3D%016lx State=3D%02x\n", - Index, - DescriptorBlock->Descriptor[Index].PhysicalStart, - DescriptorBlock->Descriptor[Index].PhysicalSize, - DescriptorBlock->Descriptor[Index].RegionState - )); - } - } - } =20 // // Initialize SmbusPolicy PPI @@ -1118,45 +954,6 @@ PlatformEarlyInitEntry ( return Status; } =20 -/** - - Return the mainblockcompact Fv. - - @param FvNumber Our enumeration of the firmware volumes we care about. - - @param FvAddress Base Address of the memory containing the firmware vol= ume - - @retval EFI_SUCCESS - @retval EFI_NOT_FOUND - -**/ -EFI_STATUS -EFIAPI -FindFv ( - IN EFI_PEI_FIND_FV_PPI *This, - IN CONST EFI_PEI_SERVICES **PeiServices, - IN OUT UINT8 *FvNumber, - OUT EFI_FIRMWARE_VOLUME_HEADER **FVAddress - ) -{ - // - // At present, we only have one Fv to search - // - if (*FvNumber =3D=3D 0) { - *FvNumber =3D 1; - *FVAddress =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FixedPcdGet32 (Pcd= FlashFvMainBase); - return EFI_SUCCESS; - } - else if (*FvNumber =3D=3D 1) { - *FvNumber =3D 2; - *FVAddress =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FixedPcdGet32 (Pcd= FlashFvRecovery2Base); - return EFI_SUCCESS; - } - else { // Not the one Fv we care about - return EFI_NOT_FOUND; - } -} - EFI_STATUS EFIAPI CpuOnlyReset ( diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarly= Init.h b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit= .h index 29749277d7..9631d49a84 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 PlatformEarlyInit.h @@ -30,7 +28,7 @@ Abstract: #define _EFI_PLATFORM_EARLY_INIT_H_ =20 #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x -#include +#include #include "PlatformBaseAddresses.h" #include "PchAccess.h" #include "VlvAccess.h" @@ -43,7 +41,6 @@ Abstract: #include #include #include -#include #include #include #include @@ -60,7 +57,6 @@ Abstract: =20 #include #include -#include #include #include #include @@ -73,12 +69,10 @@ Abstract: #include #include #include -#include #include #include #include #include -#include #include =20 #define SMC_LAN_ON 0x46 @@ -1379,15 +1373,6 @@ CheckIfJumperSetForRecovery( VOID ); =20 -EFI_STATUS -EFIAPI =20 -FindFv ( - IN EFI_PEI_FIND_FV_PPI *This, - IN CONST EFI_PEI_SERVICES **PeiServices, - IN OUT UINT8 *FvNumber, - OUT EFI_FIRMWARE_VOLUME_HEADER **FVAddress - ); - BOOLEAN IsA16Inverted ( ); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitP= ei.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.i= nf index 54277b1e8b..eeb9a4a023 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf @@ -1,10 +1,8 @@ # # -# Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 -# # # Module Name: # @@ -17,13 +15,13 @@ #--*/ =20 [defines] -INF_VERSION =3D 0x00010005 -BASE_NAME =3D PlatformEarlyInit -FILE_GUID =3D 0A5EA2E1-BE0B-44a0-A775-F429C9A018A0 -MODULE_TYPE =3D PEIM -VERSION_STRING =3D 1.0 -PI_SPECIFICATION_VERSION =3D 0x0001000A -ENTRY_POINT =3D PlatformEarlyInitEntry +INF_VERSION =3D 0x00010005 +BASE_NAME =3D PlatformEarlyInit +FILE_GUID =3D 0A5EA2E1-BE0B-44a0-A775-F429C9A018A0 +MODULE_TYPE =3D PEIM +VERSION_STRING =3D 1.0 +PI_SPECIFICATION_VERSION =3D 0x0001000A +ENTRY_POINT =3D PlatformEarlyInitEntry =20 [sources.common] BootMode.c @@ -44,19 +42,15 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2SocBinPkg/Vlv2SocBinPkg.dec UefiCpuPkg/UefiCpuPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec =20 [LibraryClasses] PeimEntryPoint DebugLib HobLib IoLib -# PeiKscLib MultiPlatformLib PcdLib PchPlatformLib @@ -71,14 +65,12 @@ [Ppis] gEfiPeiResetPpiGuid gEfiEndOfPeiSignalPpiGuid gPeiSmbusPolicyPpiGuid - gEfiFindFvPpiGuid gPeiCapsulePpiGuid gEfiPeiBootInRecoveryModePpiGuid gEfiPeiRecoveryModulePpiGuid gEfiPeiDeviceRecoveryModulePpiGuid gPeiCachePpiGuid gEfiPeiMasterBootModePpiGuid - gEfiPeiSmbusPpiGuid gPchInitPpiGuid gPchUsbPolicyPpiGuid =20 @@ -96,7 +88,6 @@ [Guids] gEfiNormalSetupGuid gEfiMemoryTypeInformationGuid gOsSelectionVariableGuid - gEfiSmmPeiSmramMemoryReserveGuid =20 [Pcd.common] gPlatformModuleTokenSpaceGuid.PcdFlashFvMainBase @@ -111,7 +102,7 @@ [Pcd.common] =20 [Pcd] gEfiVLVTokenSpaceGuid.PcdMeasuredBootEnable - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState + gPlatformModuleTokenSpaceGuid.PcdBootState =20 [Depex] gEfiPeiReadOnlyVariable2PpiGuid AND gPeiCachePpiGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h b/= Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h index 283993b44c..a533f3918c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - **/ =20 #ifndef __COMMON_HEADER_H_ @@ -13,18 +11,15 @@ =20 =20 =20 -#include +#include =20 #include #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c = b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c index 7dcc2c3ce9..1932aa7125 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - This file includes a memory call back function notified when MRC is done, following action is performed in this file, 1. ICH initialization after MRC. @@ -21,7 +18,6 @@ =20 #include "CommonHeader.h" #include "Platform.h" -#include #include #include #include "VlvAccess.h" diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c index eba1dfff30..aa03f6ea95 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 **/ @@ -816,15 +813,6 @@ PeiInitPlatform ( sizeof (EFI_PLATFORM_INFO_HOB) ); =20 - -#ifdef FTPM_ENABLE - Status =3D FtpmPolicyInit(PeiServices, &SystemConfiguration); - if (EFI_ERROR (Status)) { - DEBUG((EFI_D_ERROR, "fTPM init failed.\n")); - } -#endif - - // // Set the new boot mode for MRC // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf index c976273ce3..28a5274c40 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf @@ -1,9 +1,9 @@ # # -# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 +# # # This PEIM includes 3 parts, pre memory initialization, MRC # wrapper and post memory initialization. @@ -63,9 +63,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - Vlv2SocBinPkg/Vlv2SocBinPkg.dec UefiCpuPkg/UefiCpuPkg.dec CryptoPkg/CryptoPkg.dec =20 @@ -89,14 +87,11 @@ [Ppis] gEfiPeiReadOnlyVariable2PpiGuid gEfiPeiResetPpiGuid gEfiEndOfPeiSignalPpiGuid - gEfiFindFvPpiGuid gPeiCapsulePpiGuid gEfiPeiBootInRecoveryModePpiGuid gEfiPeiRecoveryModulePpiGuid gEfiPeiDeviceRecoveryModulePpiGuid - gPeiCachePpiGuid gEfiPeiMasterBootModePpiGuid - gEfiPeiSmbusPpiGuid gPeiMfgMemoryTestPpiGuid gPeiSha256HashPpiGuid gVlvMmioPolicyPpiGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index 4653f63a66..9951aa4a58 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -2,14 +2,9 @@ # Platform Package # # This package provides platform specific modules. -# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
# - # SPDX-License-Identifier: BSD-2-Clause-Patent - -# - -# # #**/ =20 @@ -66,9 +61,6 @@ [Protocols] gEfiActiveBiosProtocolGuid =3D { 0xebbe2d1b, 0x1647, 0x4bda= , { 0xab, 0x9a, 0x78, 0x63, 0xe3, 0x96, 0xd4, 0x1a } } gEfiPlatformCpuProtocolGuid =3D { 0xbd26cdc9, 0xa092, 0x462a= , { 0x87, 0x7a, 0x5a, 0xb6, 0xad, 0xce, 0x48, 0x12 } } gDxePchPlatformPolicyProtocolGuid =3D { 0x4b0165a9, 0x61d6, 0x4e23= , { 0xa0, 0xb5, 0x3e, 0xc7, 0x9c, 0x2e, 0x30, 0xd5 } } - gEfiTpmMpDriverProtocolGuid =3D { 0xde161cfe, 0x1e60, 0x42a1= , { 0x8c, 0xc3, 0xee, 0x7e, 0xf0, 0x73, 0x52, 0x12 } } - gEfiLpcWpce791PolicyProtocolGuid =3D { 0xab2bee2f, 0xc1a6, 0x4399= , { 0x85, 0x3d, 0xc0, 0x7c, 0x77, 0x4f, 0xfd, 0x0d } } - gUsbPolicyGuid =3D { 0xf617b358, 0x12cf, 0x414a= , { 0xa0, 0x69, 0x60, 0x67, 0x7b, 0xda, 0x13, 0xb4 } } gEfiSpeakerInterfaceProtocolGuid =3D { 0x400b4476, 0x3081, 0x11d6= , { 0x87, 0xed, 0x00, 0x06, 0x29, 0x45, 0xc3, 0xb9 } } gDxeVlvPlatformPolicyGuid =3D { 0x5bab88ba, 0xe0e2, 0x4674= , { 0xb6, 0xad, 0xb8, 0x12, 0xf6, 0x88, 0x1c, 0xd6 } } gEfiSmbiosSlotPopulationGuid =3D { 0xef7bf7d6, 0xf8ff, 0x4a76= , { 0x82, 0x47, 0xc0, 0xd0, 0xd1, 0xcc, 0x49, 0xc0 } } @@ -80,9 +72,6 @@ [Protocols] gEfiPlatformIdeInitProtocolGuid =3D { 0x377c66a3, 0x8fe7, 0x4ee8= , { 0x85, 0xb8, 0xf1, 0xa2, 0x82, 0x56, 0x9e, 0x3b } } gEfiPciPlatformProtocolGuid =3D { 0x07d75280, 0x27d4, 0x4d69= , { 0x90, 0xd0, 0x56, 0x43, 0xe2, 0x38, 0xb3, 0x41 } } gEnhancedSpeedstepProtocolGuid =3D { 0x91a1ddcf, 0x5374, 0x4939= , { 0x89, 0x51, 0xd7, 0x29, 0x3f, 0x1a, 0x78, 0x6f } } - gEfiAcpiSupportProtocolGuid =3D { 0xdbff9d55, 0x89b7, 0x46da= , { 0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } } - gEfiAcpiS3SaveProtocolGuid =3D { 0x125f2de1, 0xfb85, 0x440c= , { 0xa5, 0x4c, 0x4d, 0x99, 0x35, 0x8a, 0x8d, 0x38 } } - gEfiCpuIoProtocolGuid =3D { 0xB0732526, 0x38C8, 0x4b40= , { 0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } } gPlatformGOPPolicyGuid =3D { 0xec2e931b, 0x3281, 0x48a5= , { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } } gEfiGopDisplayBrightnessProtocolGuid =3D { 0x6ff23f1d, 0x877c, 0x4b1b= , { 0x93, 0xfc, 0xf1, 0x42, 0xb2, 0xee, 0xa6, 0xa7 } } gEfiUsbKeyboardConnectGuid =3D { 0xad9c4381, 0x1ede, 0x430c= , { 0x8d, 0x42, 0x23, 0x76, 0x7c, 0x46, 0x5d, 0x52 } } @@ -130,9 +119,6 @@ [PcdsFixedAtBuild] =20 gEfiPchTokenSpaceGuid.PcdPchAcpiIoPortBaseAddress|0x400|UINT16|0x0000000B =20 - ## FFS filename to find the shell application. - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7= A, 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, = 0x37 }|VOID*|0x40000004 - gEfiIchTokenSpaceGuid.PcdPeiIchUhciControllerIoPortBaseAddress|0x4000|UI= NT16|0x30000017 gEfiIchTokenSpaceGuid.PcdPeiIchEhciControllerMemoryBaseAddress|0xFC00000= 0|UINT32|0x30000019 =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index 5827386977..87b905c95b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -9,45 +9,34 @@ #**/ =20 [Defines] -DEFINE FLASH_BASE =3D 0xFFC00000 #The base address of the 4Mb FL= ASH Device. -DEFINE FLASH_SIZE =3D 0x00400000 #The flash size in bytes of the= 4Mb FLASH Device. +DEFINE FLASH_BASE =3D 0xFF800000 #The base address of the 4Mb FL= ASH Device. +DEFINE FLASH_SIZE =3D 0x00800000 #The flash size in bytes of the= 4Mb FLASH Device. DEFINE FLASH_BLOCK_SIZE =3D 0x1000 #The block size in bytes of the = 4Mb FLASH Device. -DEFINE FLASH_NUM_BLOCKS =3D 0x400 #The number of blocks in 4Mb F= LASH Device. +DEFINE FLASH_NUM_BLOCKS =3D 0x800 #The number of blocks in 4Mb F= LASH Device. DEFINE FLASH_AREA_BASE_ADDRESS =3D 0xFF8000= 00 DEFINE FLASH_AREA_SIZE =3D 0x008000= 00 =20 -DEFINE FLASH_REGION_VLVMICROCODE_OFFSET =3D 0x000000= 00 +DEFINE FLASH_REGION_VLVMICROCODE_OFFSET =3D 0x004000= 00 DEFINE FLASH_REGION_VLVMICROCODE_SIZE =3D 0x000400= 00 DEFINE FLASH_REGION_VLVMICROCODE_BASE =3D 0xFFC000= 00 =20 -DEFINE FLASH_REGION_VPD_OFFSET =3D 0x000400= 00 +DEFINE FLASH_REGION_VPD_OFFSET =3D 0x004400= 00 DEFINE FLASH_REGION_VPD_SIZE =3D 0x0003E0= 00 =20 -DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET =3D 0x0007E0= 00 +DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET =3D 0x0047E0= 00 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE =3D 0x000020= 00 =20 =20 -DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET =3D 0x000800= 00 +DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET =3D 0x004800= 00 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE =3D 0x000400= 00 =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -DEFINE FLASH_REGION_FSPBIN_OFFSET =3D 0x000C00= 00 -DEFINE FLASH_REGION_FSPBIN_SIZE =3D 0x000480= 00 -DEFINE FLASH_REGION_FSPBIN_BASE =3D 0xFFCC00= 00 - -DEFINE FLASH_REGION_AZALIABIN_OFFSET =3D 0x001080= 00 -DEFINE FLASH_REGION_AZALIABIN_SIZE =3D 0x000080= 00 -DEFINE FLASH_REGION_AZALIABIN_BASE =3D 0xFFD080= 00 - -!endif - -DEFINE FLASH_REGION_FVMAIN_OFFSET =3D 0x001100= 00 +DEFINE FLASH_REGION_FVMAIN_OFFSET =3D 0x005100= 00 DEFINE FLASH_REGION_FVMAIN_SIZE =3D 0x002100= 00 =20 -DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET =3D 0x003200= 00 +DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET =3D 0x007200= 00 DEFINE FLASH_REGION_FV_RECOVERY2_SIZE =3D 0x000700= 00 =20 -DEFINE FLASH_REGION_FV_RECOVERY_OFFSET =3D 0x003900= 00 +DEFINE FLASH_REGION_FV_RECOVERY_OFFSET =3D 0x007900= 00 DEFINE FLASH_REGION_FV_RECOVERY_SIZE =3D 0x000700= 00 =20 ##########################################################################= ###### @@ -79,17 +68,6 @@ [FD.Vlv] SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress =3D $(FLASH_REGI= ON_VLVMICROCODE_BASE) + 0x60 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize =3D $(FLASH_R= EGION_VLVMICROCODE_SIZE) - 0x60 =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -# put below PCD value setting into dsc file -#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress = =3D $(FLASH_REGION_VLVMICROCODE_BASE) -#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize = =3D $(FLASH_REGION_VLVMICROCODE_SIZE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset = =3D 0x60 -#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress = =3D $(FLASH_AREA_BASE_ADDRESS) -#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize = =3D $(FLASH_AREA_SIZE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase = =3D $(FLASH_REGION_FSPBIN_BASE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize = =3D $(FLASH_REGION_FSPBIN_SIZE) - -!endif ##########################################################################= ###### # # Following are lists of FD Region layout which correspond to the location= s of different @@ -106,6 +84,13 @@ [FD.Vlv] # Fv Size can be adjusted; FVMAIN_COMPACT can be reduced to 0x120000, and = FV_RECOVERY can be enlarged to 0x80000 # ##########################################################################= ###### + + # + # IFWI Header + # +0x0000|0x1000 +FILE=3DVlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER.bin + # # CPU Microcodes # @@ -173,18 +158,6 @@ [FD.Vlv] $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(FLASH_REGION_NVS= TORAGE_SUBREGION_NV_FTW_SPARE_SIZE) gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModule= PkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - - $(FLASH_REGION_FSPBIN_OFFSET)|$(FLASH_REGION_FSPBIN_SIZE) - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|gFspWrapperTokenSpaceGuid.Pc= dFlashFvFspSize - FILE =3D Vlv2SocBinPkg/FspBinary/FvFsp.bin - - - $(FLASH_REGION_AZALIABIN_OFFSET)|$(FLASH_REGION_AZALIABIN_SIZE) - FILE =3D Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaConfig.bin - -!endif - # # Main Block # @@ -258,7 +231,7 @@ [FV.FVRECOVERY_COMPONENTS] READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/IA32/PchUsb.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA= 32/PchUsb.inf INF MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf INF MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf INF MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf @@ -299,28 +272,22 @@ [FV.FVRECOVERY2] =20 =20 =20 -INF $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf +INF Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchSmbusArpDisabled.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/VlvInitPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchInitPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchSpiPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PeiSmmAccess.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PeiSmmControl.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchSmbusArpDisabled.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/VlvInitPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchInitPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchSpiPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PeiSmmAccess.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PeiSmmControl.inf INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/MpS3.inf -!endif +INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf =20 -# INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTUR= E)$(TARGET)/IA32/PiSmmCommunicationPei.inf !if $(TPM_ENABLED) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf INF SecurityPkg/Tcg/TcgPei/TcgPei.inf INF SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf !endif -!if $(FTPM_ENABLE) =3D=3D TRUE -INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf #use PCD config -!endif INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf =20 !if $(ACPI50_ENABLE) =3D=3D TRUE @@ -359,31 +326,15 @@ [FV.FVRECOVERY] READ_LOCK_STATUS =3D TRUE FvNameGuid =3D B73FE497-B92E-416e-8326-45AD0D270091 =20 - -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -INF IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf -!else -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/SecCore.inf -!endif - +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/SecCore.inf INF MdeModulePkg/Core/Pei/PeiMain.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -INF Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf -INF IntelFspWrapperPkg/FspInitPei/FspInitPei.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/CpuPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/CpuPeim.inf INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf =20 -INF $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf +INF Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/SeCUma.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/fTPMInitPeim.inf -!endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/SeCUma.inf =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE INF SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf @@ -397,12 +348,10 @@ [FV.FVRECOVERY] !endif !endif =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE !if $(PCIESC_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchEarlyInitPeim.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/MemoryInit.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchEarlyInitPeim.inf !endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/MemoryInit.inf =20 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf =20 @@ -440,10 +389,6 @@ [FV.FVMAIN] # EDK II Related Platform codes # =20 - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - INF IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf - !endif - INF MdeModulePkg/Core/Dxe/DxeMain.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf !if $(ACPI50_ENABLE) =3D=3D TRUE @@ -452,14 +397,14 @@ [FV.FVMAIN] !endif =20 =20 -INF IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusC= odeRouterRuntimeDxe.inf INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerR= untimeDxe.inf INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRout= erSmm.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf -INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf +INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf +INF MdeModulePkg/Universal/Metronome/Metronome.inf INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf !if $(ARCH) =3D=3D IA32 INF USE=3DIA32 MdeModulePkg/Logo/Logo.inf @@ -469,13 +414,12 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf =20 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf -INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf +INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSpiSmm.inf !if $(SECURE_BOOT_ENABLE) INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig= Dxe.inf !endif @@ -485,89 +429,62 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRunt= imeDxe.inf INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe= .inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf -INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf +INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf =20 =20 -INF $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf +INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 !if $(DATAHUB_ENABLE) =3D=3D TRUE INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf !endif -INF IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerD= xe/DatahubStatusCodeHandlerDxe.inf INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/Dptf.inf =20 # # EDK II Related Silicon codes # -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchS3SupportDxe.inf =20 -!if $(USE_HPET_TIMER) =3D=3D TRUE INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf -!else -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmartTimer.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmmControl.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSmbusDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/IntelPchLegacyInterrupt.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchReset.inf =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchInitDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchInitSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSmiDispatcher.inf !if $(PCIESC_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchPcieSmm.inf !endif =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf -!else -INF IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf -INF Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf -!endif -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE - !if $(SEC_ENABLE) =3D=3D TRUE - INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTU= RE)$(TARGET)/$(DXE_ARCHITECTURE)/HeciDrv.inf - INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTU= RE)$(TARGET)/$(DXE_ARCHITECTURE)/SeCPolicyInitDxe.inf - !endif -!endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSpiRuntime.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchPolicyInitDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchBiosWriteProtect.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmmAccess.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PciHostBridge.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/VlvInitDxe.inf !if $(TPM_ENABLED) =3D=3D TRUE INF SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf INF RuleOverride =3D DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif -!if $(FTPM_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/Tpm2DeviceSeCPei.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/Tpm2DeviceSeCDxe.inf -INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf -INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/FtpmSmm.inf -!endif =20 # # EDK II Related Platform codes # -INF $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf -INF $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf -INF $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf -INF $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf -INF $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf -INF $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf -INF $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf -INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf +INF Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf +INF Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf +INF Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf +INF Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +INF Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf +INF Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PlatformCpuPolicy.inf +INF Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf !if $(GOP_DRIVER_ENABLE) =3D=3D TRUE - INF $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf + INF Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf FILE DRIVER =3D FF0C8745-3270-4439-B74F-3E45F8C77064 { SECTION DXE_DEPEX_EXP =3D {gPlatformGOPPolicyGuid} SECTION PE32 =3D Vlv2SocBinPkg/GOP/7.2.1011/RELEASE_VS2008x86/$(DXE_ARCH= ITECTURE)/IntelGopDriver.efi @@ -575,7 +492,7 @@ [FV.FVMAIN] } !endif =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PnpDxe.inf # # SMM # @@ -586,25 +503,22 @@ [FV.FVMAIN] INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf -INF $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2O= nSmmSwDispatchThunk.inf =20 -# -# Remove the following two SMM binary modules that prevent platform from b= ooting to UEFI Shell -# -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PowerManagement2.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/DigitalThermalSensor.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/GraphicDxeInitSmm.inf =20 # # ACPI # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDx= e.inf -INF $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf +INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 -INF RuleOverride =3D ACPITABLE $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiT= ables.inf +INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.inf =20 -INF $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf +INF Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf =20 INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsR= esourceTableDxe.inf =20 @@ -613,26 +527,17 @@ [FV.FVMAIN] # INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/ISPDxe.inf =20 =20 # # ISA # -INF $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf -INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf -INF IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf +INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf !if $(SOURCE_DEBUG_ENABLE) !=3D TRUE INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf !endif -#INF IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf -#INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf =20 -# -# SDIO -# -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/MmcHost.inf -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/MmcMediaDevice.inf # # IDE/SCSI/AHCI # @@ -642,7 +547,7 @@ [FV.FVMAIN] =20 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf !if $(SATA_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SataController.inf # =20 # @@ -659,7 +564,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.i= nf -INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -682,9 +586,9 @@ [FV.FVMAIN] # SMBIOS # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf -INF $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf +INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmbiosMemory.inf =20 =20 # @@ -719,8 +623,14 @@ [FV.FVMAIN] !if $(NETWORK_ENABLE) =3D=3D TRUE FILE DRIVER =3D 22DE1691-D65D-456a-993E-A253DD1F308C { SECTION PE32 =3D Vlv2SocBinPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/Rtk= UndiDxe.efi - SECTION UI =3D "UNDI" + SECTION UI =3D "RtkUndiDxe" } + !if $(DXE_ARCHITECTURE) =3D=3D "X64" + FILE DRIVER =3D 7C7467E9-8BB3-4BF1-8694-6FED7D25D13E { + SECTION PE32 =3D Vlv2SocBinPkg/UNDI/I211PcieUndiDxe/$(DXE_ARCHITECTU= RE)/E7006X3.EFI + SECTION UI =3D "E7006X3" + } + !endif !endif =20 !if $(CAPSULE_ENABLE) @@ -908,7 +818,7 @@ [Rule.Common.UEFI_DRIVER.BINARY] =20 [Rule.Common.UEFI_DRIVER.NATIVE_BINARY] FILE DRIVER =3D $(NAMED_GUID) { - DXE_DEPEX DXE_DEPEX Optional $(WORKSPACE)/$(PLATFORM_PACKAGE)/Int= elGopDepex/IntelGopDriver.depex + DXE_DEPEX DXE_DEPEX Optional $(WORKSPACE)/Vlv2TbltDevicePkg/Intel= GopDepex/IntelGopDriver.depex PE32 PE32 |.efi UI STRING=3D"$(MODULE_NAME)" Optional VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc index 61eca30be1..d5068b514c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc @@ -1,11 +1,9 @@ #/** @file # platform configuration file. # -# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
-# = =20 +# Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved.
+# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 # #**/ =20 @@ -13,12 +11,6 @@ # TRUE is ENABLE. FASLE is DISABLE. # =20 -# -# FSP selection -# -DEFINE MINNOW2_FSP_BUILD =3D FALSE - - DEFINE SCSI_ENABLE =3D TRUE =20 =20 @@ -31,14 +23,6 @@ # Feature selection # =20 -# -# Select system timer which is used to produce Timer Arch Protocol: -# TRUE - HPET timer is used. -# FALSE - 8254 timer is used. -# -DEFINE USE_HPET_TIMER =3D TRUE - - # # Feature selection # @@ -65,7 +49,6 @@ =20 DEFINE GOP_DRIVER_ENABLE =3D TRUE DEFINE DATAHUB_ENABLE =3D TRUE -DEFINE DATAHUB_STATUS_CODE_ENABLE =3D TRUE DEFINE USB_ENABLE =3D TRUE =20 DEFINE ISA_SERIAL_STATUS_CODE_ENABLE =3D TRUE diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index a6859d3b6d..110efe28c3 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -30,17 +30,6 @@ [Defines] DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET =3D 0x000800= 00 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE =3D 0x000400= 00 =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -DEFINE FLASH_REGION_FSPBIN_OFFSET =3D 0x000C00= 00 -DEFINE FLASH_REGION_FSPBIN_SIZE =3D 0x000480= 00 -DEFINE FLASH_REGION_FSPBIN_BASE =3D 0xFFCC00= 00 - -DEFINE FLASH_REGION_AZALIABIN_OFFSET =3D 0x001080= 00 -DEFINE FLASH_REGION_AZALIABIN_SIZE =3D 0x000080= 00 -DEFINE FLASH_REGION_AZALIABIN_BASE =3D 0xFFD080= 00 - -!endif - DEFINE FLASH_REGION_FVMAIN_OFFSET =3D 0x001100= 00 DEFINE FLASH_REGION_FVMAIN_SIZE =3D 0x002150= 00 =20 @@ -79,17 +68,6 @@ [FD.Vlv] SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress =3D $(FLASH_REGI= ON_VLVMICROCODE_BASE) + 0x60 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize =3D $(FLASH_R= EGION_VLVMICROCODE_SIZE) - 0x60 =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -# put below PCD value setting into dsc file -#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress = =3D $(FLASH_REGION_VLVMICROCODE_BASE) -#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize = =3D $(FLASH_REGION_VLVMICROCODE_SIZE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset = =3D 0x60 -#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress = =3D $(FLASH_AREA_BASE_ADDRESS) -#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize = =3D $(FLASH_AREA_SIZE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase = =3D $(FLASH_REGION_FSPBIN_BASE) -#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize = =3D $(FLASH_REGION_FSPBIN_SIZE) - -!endif ##########################################################################= ###### # # Following are lists of FD Region layout which correspond to the location= s of different @@ -129,18 +107,6 @@ [FD.Vlv] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModule= PkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize FILE =3D Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - - $(FLASH_REGION_FSPBIN_OFFSET)|$(FLASH_REGION_FSPBIN_SIZE) - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|gFspWrapperTokenSpaceGuid.Pc= dFlashFvFspSize - FILE =3D Vlv2SocBinPkg/FspBinary/FvFsp.bin - - - $(FLASH_REGION_AZALIABIN_OFFSET)|$(FLASH_REGION_AZALIABIN_SIZE) - FILE =3D Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaConfig.bin - -!endif - # # Main Block # @@ -214,7 +180,7 @@ [FV.FVRECOVERY_COMPONENTS] READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/IA32/PchUsb.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA= 32/PchUsb.inf INF MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf INF MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf INF MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf @@ -253,30 +219,21 @@ [FV.FVRECOVERY2] READ_LOCK_STATUS =3D TRUE FvNameGuid =3D B73FE497-B92E-416e-8326-45AD0D270092 =20 - - -INF $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf - -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchSmbusArpDisabled.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/VlvInitPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchInitPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchSpiPeim.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PeiSmmAccess.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PeiSmmControl.inf +INF Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchSmbusArpDisabled.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/VlvInitPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchInitPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchSpiPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PeiSmmAccess.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PeiSmmControl.inf INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/MpS3.inf -!endif +INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf =20 -# INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTUR= E)$(TARGET)/IA32/PiSmmCommunicationPei.inf !if $(TPM_ENABLED) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf INF SecurityPkg/Tcg/TcgPei/TcgPei.inf INF SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf !endif -!if $(FTPM_ENABLE) =3D=3D TRUE -INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf #use PCD config -!endif INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf =20 !if $(ACPI50_ENABLE) =3D=3D TRUE @@ -315,31 +272,15 @@ [FV.FVRECOVERY] READ_LOCK_STATUS =3D TRUE FvNameGuid =3D B73FE497-B92E-416e-8326-45AD0D270091 =20 - -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -INF IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf -!else -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/SecCore.inf -!endif - +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/SecCore.inf INF MdeModulePkg/Core/Pei/PeiMain.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -INF Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf -INF IntelFspWrapperPkg/FspInitPei/FspInitPei.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/CpuPeim.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/CpuPeim.inf INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf =20 -INF $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf +INF Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/SeCUma.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/fTPMInitPeim.inf -!endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/SeCUma.inf =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE INF SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf @@ -353,12 +294,10 @@ [FV.FVRECOVERY] !endif !endif =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE !if $(PCIESC_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/PchEarlyInitPeim.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/MemoryInit.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/PchEarlyInitPeim.inf !endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA3= 2/MemoryInit.inf =20 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf =20 @@ -396,10 +335,6 @@ [FV.FVMAIN] # EDK II Related Platform codes # =20 - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - INF IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf - !endif - INF MdeModulePkg/Core/Dxe/DxeMain.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf !if $(ACPI50_ENABLE) =3D=3D TRUE @@ -408,14 +343,14 @@ [FV.FVMAIN] !endif =20 =20 -INF IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusC= odeRouterRuntimeDxe.inf INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerR= untimeDxe.inf INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRout= erSmm.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf -INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf +INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf +INF MdeModulePkg/Universal/Metronome/Metronome.inf INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf !if $(ARCH) =3D=3D IA32 INF USE=3DIA32 MdeModulePkg/Logo/Logo.inf @@ -425,13 +360,12 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf =20 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf -INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf +INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSpiSmm.inf !if $(SECURE_BOOT_ENABLE) INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig= Dxe.inf !endif @@ -441,89 +375,62 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRunt= imeDxe.inf INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe= .inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf -INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf +INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf =20 =20 -INF $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf +INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 !if $(DATAHUB_ENABLE) =3D=3D TRUE INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf !endif -INF IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerD= xe/DatahubStatusCodeHandlerDxe.inf INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/Dptf.inf =20 # # EDK II Related Silicon codes # -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchS3SupportDxe.inf =20 -!if $(USE_HPET_TIMER) =3D=3D TRUE INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf -!else -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmartTimer.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmmControl.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSmbusDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/IntelPchLegacyInterrupt.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchReset.inf =20 -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf -!endif -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchInitDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchInitSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSmiDispatcher.inf !if $(PCIESC_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchPcieSmm.inf !endif =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf -!else -INF IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf -INF Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf -!endif -!if $(MINNOW2_FSP_BUILD) =3D=3D FALSE - !if $(SEC_ENABLE) =3D=3D TRUE - INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTU= RE)$(TARGET)/$(DXE_ARCHITECTURE)/HeciDrv.inf - INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTU= RE)$(TARGET)/$(DXE_ARCHITECTURE)/SeCPolicyInitDxe.inf - !endif -!endif +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchSpiRuntime.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchPolicyInitDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PchBiosWriteProtect.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmmAccess.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PciHostBridge.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/VlvInitDxe.inf !if $(TPM_ENABLED) =3D=3D TRUE INF SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf INF RuleOverride =3D DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif -!if $(FTPM_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/IA32/Tpm2DeviceSeCPei.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/Tpm2DeviceSeCDxe.inf -INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf -INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/FtpmSmm.inf -!endif =20 # # EDK II Related Platform codes # -INF $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf -INF $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf -INF $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf -INF $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf -INF $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf -INF $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf -INF $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf -INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf +INF Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf +INF Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf +INF Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf +INF Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +INF Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf +INF Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PlatformCpuPolicy.inf +INF Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf !if $(GOP_DRIVER_ENABLE) =3D=3D TRUE - INF $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf + INF Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf FILE DRIVER =3D FF0C8745-3270-4439-B74F-3E45F8C77064 { SECTION DXE_DEPEX_EXP =3D {gPlatformGOPPolicyGuid} SECTION PE32 =3D Vlv2SocBinPkg/GOP/7.2.1011/RELEASE_VS2008x86/$(DXE_ARCH= ITECTURE)/IntelGopDriver.efi @@ -531,7 +438,7 @@ [FV.FVMAIN] } !endif =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PnpDxe.inf # # SMM # @@ -542,25 +449,22 @@ [FV.FVMAIN] INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf -INF $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2O= nSmmSwDispatchThunk.inf =20 -# -# Remove the following two SMM binary modules that prevent platform from b= ooting to UEFI Shell -# -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/PowerManagement2.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/DigitalThermalSensor.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/GraphicDxeInitSmm.inf =20 # # ACPI # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDx= e.inf -INF $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf +INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 -INF RuleOverride =3D ACPITABLE $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiT= ables.inf +INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.inf =20 -INF $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf +INF Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf =20 INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsR= esourceTableDxe.inf =20 @@ -569,26 +473,17 @@ [FV.FVMAIN] # INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/ISPDxe.inf =20 =20 # # ISA # -INF $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf -INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf -INF IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf +INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf !if $(SOURCE_DEBUG_ENABLE) !=3D TRUE INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf !endif -#INF IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf -#INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf =20 -# -# SDIO -# -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/MmcHost.inf -#INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE= )$(TARGET)/$(DXE_ARCHITECTURE)/MmcMediaDevice.inf # # IDE/SCSI/AHCI # @@ -598,7 +493,7 @@ [FV.FVMAIN] =20 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf !if $(SATA_ENABLE) =3D=3D TRUE -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SataController.inf # =20 # @@ -615,7 +510,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.i= nf -INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -638,9 +532,9 @@ [FV.FVMAIN] # SMBIOS # INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf -INF $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf +INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 -INF RuleOverride =3D BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)= $(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf +INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmbiosMemory.inf =20 =20 # @@ -675,8 +569,14 @@ [FV.FVMAIN] !if $(NETWORK_ENABLE) =3D=3D TRUE FILE DRIVER =3D 22DE1691-D65D-456a-993E-A253DD1F308C { SECTION PE32 =3D Vlv2SocBinPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/Rtk= UndiDxe.efi - SECTION UI =3D "UNDI" + SECTION UI =3D "RtkUndiDxe" } + !if $(DXE_ARCHITECTURE) =3D=3D "X64" + FILE DRIVER =3D 7C7467E9-8BB3-4BF1-8694-6FED7D25D13E { + SECTION PE32 =3D Vlv2SocBinPkg/UNDI/I211PcieUndiDxe/$(DXE_ARCHITECTU= RE)/E7006X3.EFI + SECTION UI =3D "E7006X3" + } + !endif !endif =20 !if $(CAPSULE_ENABLE) @@ -786,11 +686,7 @@ [Rule.Common.SEC] [Rule.Common.SEC.BINARY] FILE SEC =3D $(NAMED_GUID) RELOCS_STRIPPED { PE32 PE32 Align =3D 8 |.efi -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - RAW RAW |.raw -!else RAW BIN Align =3D 16 |.com -!endif } =20 [Rule.Common.PEI_CORE] @@ -868,7 +764,7 @@ [Rule.Common.UEFI_DRIVER.BINARY] =20 [Rule.Common.UEFI_DRIVER.NATIVE_BINARY] FILE DRIVER =3D $(NAMED_GUID) { - DXE_DEPEX DXE_DEPEX Optional $(WORKSPACE)/$(PLATFORM_PACKAGE)/Int= elGopDepex/IntelGopDriver.depex + DXE_DEPEX DXE_DEPEX Optional $(WORKSPACE)/Vlv2TbltDevicePkg/Intel= GopDepex/IntelGopDriver.depex PE32 PE32 |.efi UI STRING=3D"$(MODULE_NAME)" Optional VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index 0a57587e82..25d1beb400 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -18,25 +18,11 @@ [Defines] PLATFORM_GUID =3D 465B0A0B-7AC1-443b-8F67-7B8DEC14= 5F90 PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 - - # - # Set platform specific package/folder name, same as passed from PREBUIL= D script. - # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package= build folder - # DEFINE only takes effect at R9 DSC and FDF. - # - DEFINE PLATFORM_PACKAGE =3D Vlv2TbltDevicePkg - DEFINE PLATFORM_RC_PACKAGE =3D Vlv2DeviceRefCodePkg - DEFINE PLATFORM_BINARY_PACKAGE =3D Vlv2SocBinPkg - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_PACKAGE) + OUTPUT_DIRECTORY =3D Build/Vlv2TbltDevicePkg SUPPORTED_ARCHITECTURES =3D IA32|X64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 - DEFINE CPU_ARCH =3DValleyView2 - DEFINE PROJECT_SC_FAMILY =3DIntelPch - DEFINE PROJECT_SC_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView2= Soc/SouthCluster - DEFINE PROJECT_VLV_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView= 2Soc/NorthCluster - DEFINE RC_BINARY_RELEASE =3D TRUE # # Platform On/Off features are defined here @@ -47,22 +33,18 @@ [Defines] # 3.BayleyBay # ENBDT_PF_ENABLE =3D TRUE # - !include $(PLATFORM_PACKAGE)/AutoPlatformCFG.txt - !include $(PLATFORM_PACKAGE)/PlatformPkgConfig.dsc + !include Vlv2TbltDevicePkg/AutoPlatformCFG.txt + !include Vlv2TbltDevicePkg/PlatformPkgConfig.dsc =20 DEFINE PLATFORMX64_ENABLE =3D TRUE =20 !if $(X64_CONFIG) =3D=3D TRUE DEFINE DXE_ARCHITECTURE =3D X64 - DEFINE EDK_DXE_ARCHITECTURE =3D X64 - DEFINE UNDI_DXE_ARCHITECTURE =3D 64 !else DEFINE DXE_ARCHITECTURE =3D IA32 - DEFINE EDK_DXE_ARCHITECTURE =3D Ia32 - DEFINE UNDI_DXE_ARCHITECTURE =3D 32 !endif =20 - FLASH_DEFINITION =3D $(PLATFORM_PACKAGE)/PlatformPkgG= cc.fdf + FLASH_DEFINITION =3D Vlv2TbltDevicePkg/PlatformPkgGcc= .fdf !if $(LFMA_ENABLE) =3D=3D TRUE FIX_LOAD_TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF DEFINE TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF @@ -73,10 +55,6 @@ [Defines] =20 DEFINE PLATFORM_PCIEXPRESS_BASE =3D 0E0000000 =20 - DEFINE SEC_ENABLE =3D FALSE - DEFINE SEC_DEBUG_INFO_ENABLE =3D FALSE - DEFINE FTPM_ENABLE =3D FALSE - ##########################################################################= ###### # # SKU Identification section - list of all SKU IDs supported by this @@ -100,7 +78,6 @@ [LibraryClasses.common] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf - DxeSmmDriverEntryPoint|IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/= DxeSmmDriverEntryPoint.inf =20 # # Basic @@ -144,8 +121,7 @@ [LibraryClasses.common] GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib= .inf - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= .inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf # # Framework @@ -168,10 +144,6 @@ [LibraryClasses.common] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf !endif =20 -!if $(S3_ENABLE) =3D=3D TRUE - S3Lib|IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf -!endif - OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf !if $(CAPSULE_ENABLE) =3D=3D TRUE CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf @@ -199,27 +171,27 @@ [LibraryClasses.common] # # ICH # - SmbusLib|$(PLATFORM_PACKAGE)/Library/SmbusLib/SmbusLib.inf - SmmLib|$(PLATFORM_PACKAGE)/Library/PchSmmLib/PchSmmLib.inf + SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # # Platform # - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf - ResetSystemLib|$(PLATFORM_PACKAGE)/Library/ResetSystemLib/ResetSystemLib= .inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf + ResetSystemLib|Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.i= nf =20 - PlatformCmosLib|$(PLATFORM_PACKAGE)/Library/PlatformCmosLib/PlatformCmos= Lib.inf + PlatformCmosLib|Vlv2TbltDevicePkg/Library/PlatformCmosLib/PlatformCmosLi= b.inf =20 # # Misc # - MonoStatusCodeLib|$(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf + MonoStatusCodeLib|Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf !if $(TARGET) =3D=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf @@ -231,10 +203,11 @@ [LibraryClasses.common] =20 !endif =20 + PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf + !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDeb= ug/PeCoffExtraActionLibDebug.inf DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibS= erialPort/DebugCommunicationLibSerialPort.inf - PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !else PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf @@ -249,10 +222,10 @@ [LibraryClasses.common] OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !endif =20 - BiosIdLib|$(PLATFORM_PACKAGE)/Library/BiosIdLib/BiosIdLib.inf - CpuIA32Lib|$(PLATFORM_PACKAGE)/Library/CpuIA32Lib/CpuIA32Lib.inf + BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf + CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf =20 - StallSmmLib|$(PLATFORM_PACKAGE)/Library/StallSmmLib/StallSmmLib.inf + StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -266,13 +239,10 @@ [LibraryClasses.common] AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf -!if $(RC_BINARY_RELEASE) =3D=3D TRUE - I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf -!endif ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(FTPM_ENABLE) =3D=3D TRUE || $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE +!if $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -283,12 +253,6 @@ [LibraryClasses.common] =20 =20 Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - FspApiLib|IntelFspWrapperPkg/Library/BaseFspApiLib/BaseFspApiLib.inf - FspPlatformInfoLib|IntelFspWrapperPkg/Library/BaseFspPlatformInfoLibSamp= le/BaseFspPlatformInfoLibSample.inf - FspPlatformSecLib|Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/FspPlatformSecLibVlv2.inf - FspHobProcessLib|Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLi= bVlv2/FspHobProcessLibVlv2.inf -!endif =20 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 @@ -309,14 +273,14 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CO= RE, LibraryClasses.IA32.SEC MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExt= ractGuidedSectionLib.inf - MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatf= ormLib.inf + MultiPlatformLib|Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfor= mLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf =20 !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(TARGET) =3D=3D RELEASE @@ -324,7 +288,7 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE= , LibraryClasses.IA32.SEC SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -333,13 +297,6 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_COR= E, LibraryClasses.IA32.SEC DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf !endif =20 - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - PlatformFspLib|Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf - !endif -!if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLi= bSeC.inf -!endif - [LibraryClasses.X64] # # DXE phase common @@ -356,7 +313,7 @@ [LibraryClasses.X64] !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf - EfiRegTableLib|$(PLATFORM_PACKAGE)/Library/EfiRegTableLib/EfiRegTableLib= .inf + EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -371,14 +328,14 @@ [LibraryClasses.X64.DXE_DRIVER] CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf !endif =20 - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= Dxe.inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDx= e.inf =20 [LibraryClasses.X64.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf @@ -386,7 +343,7 @@ [LibraryClasses.X64.DXE_CORE] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerform= anceLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE @@ -411,7 +368,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 @@ -485,12 +442,6 @@ [PcdsFeatureFlag.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE -!endif - gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE -!if $(DATAHUB_STATUS_CODE_ENABLE) =3D=3D TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|TRUE -!else - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE !endif gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst= |FALSE !if $(TARGET) =3D=3D RELEASE @@ -516,59 +467,20 @@ [PcdsFeatureFlag.common] !endif =20 =20 - ## This PCD specifies whether PS2 keyboard does a extended verification = during start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|FALSE - - ## This PCD specifies whether PS2 mouse does a extended verification dur= ing start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2MouseExtendedVerification|FALSE - !if $(VARIABLE_INFO_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|FALSE !endif =20 - gEfiCpuTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE - !if $(SOURCE_DEBUG_ENABLE) gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmDebug|TRUE !endif =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE + [PcdsFixedAtBuild.common] -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -# $(FLASH_REGION_VLVMICROCODE_BASE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0xFFC00000 -# $(FLASH_REGION_VLVMICROCODE_SIZE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x00040000 - gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset|0x60 -# $(FLASH_AREA_BASE_ADDRESS) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress|0xFF800000 -# $(FLASH_AREA_SIZE) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize|0x00800000 -# $(FLASH_REGION_FSPBIN_BASE) - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|0xFFCC0000 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - # in FSP, when this got used, the memory already is up - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 -!else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 -!endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - -!else - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 - !else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 - !endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - gEfiCpuTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x3C00 -!endif - - !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x22000 !else @@ -576,11 +488,8 @@ [PcdsFixedAtBuild.common] !endif gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x00000800 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x400 - gEfiCpuTokenSpaceGuid.PcdCpuIEDRamSize|0x400000 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize|0x= 10000 gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport|FALSE - gEfiCpuTokenSpaceGuid.PcdCpuSmmApSyncTimeout|1000 !if $(S4_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|TRUE !else @@ -598,13 +507,9 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|60 !endif =20 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize|0x10= 000 gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|$(TOP_MEM= ORY_ADDRESS) gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor|0x0 gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor|0x01 - gEfiCpuTokenSpaceGuid.PcdCpuIEDEnabled|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable|TRUE =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 @@ -650,11 +555,6 @@ [PcdsFixedAtBuild.IA32] [PcdsPatchableInModule.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x$(PLATFORM_PCIEXPRES= S_BASE) - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion= |FALSE - - ## This PCD specifies whether to use the optimized timing for best PS2 d= etection performance. - # Note this PCD could be set to TRUE for best boot performance and set = to FALSE for best device compatibility. - gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection|TRUE =20 ########################################################################= ############################### # @@ -829,10 +729,6 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdFTPMStatus|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateSmmDataPtr|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0 - gEfiCpuTokenSpaceGuid.PcdCpuS3DataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuHotPlugDataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuCallbackSignal|0 - gEfiCpuTokenSpaceGuid.PcdCpuConfigContextBuffer|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 @@ -845,24 +741,7 @@ [PcdsDynamicExDefault.X64.DEFAULT] =20 [Components.IA32] =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf - - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf { - !if $(TARGET) =3D=3D DEBUG - - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf - IntelFspWrapperPkg/FspInitPei/FspInitPei.inf { - !if $(TARGET) =3D=3D DEBUG - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - !endif + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf =20 MdeModulePkg/Core/Pei/PeiMain.inf { !if $(TARGET) =3D=3D DEBUG @@ -873,31 +752,23 @@ [Components.IA32] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } =20 - $(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf { + Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf { !if $(TARGET) =3D=3D DEBUG gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2E !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.= inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - !if $(FTPM_ENABLE)=3D=3DTRUE - *_*_IA32_CC_FLAGS =3D /D FTPM_ENABLE - !endif } =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE -$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf !endif =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf { + Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf { *_*_IA32_CC_FLAGS =3D -DRC_BINARY_RELEASE !if $(TARGET) =3D=3D DEBUG @@ -917,10 +788,6 @@ [Components.IA32] } !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/Tpm2DeviceS= eCPei.inf -!endif - !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { @@ -931,7 +798,7 @@ [Components.IA32] } !endif =20 - $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf { + Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 @@ -940,34 +807,33 @@ [Components.IA32] !endif PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf } - $(PLATFORM_PACKAGE)/FvInfoPei/FvInfoPei.inf + Vlv2TbltDevicePkg/FvInfoPei/FvInfoPei.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyIni= tPeim.inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArp= Disabled.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.= inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAcces= s.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmContr= ol.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf MdeModulePkg/Universal/PCD/Pei/Pcd.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf UefiCpuPkg/CpuIoPei/CpuIoPei.inf UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MpS3.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PiSmmCommu= nicationPei.inf + UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf =20 !if $(RECOVERY_ENABLE) # # Recovery # - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf @@ -993,17 +859,6 @@ [Components.IA32] MdeModulePkg/Universal/Variable/Pei/VariablePei.inf MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - NULL|SecurityPkg/Library\HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - } -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1013,7 +868,7 @@ [Components.IA32] !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerf= ormancePei.inf{ - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } =20 !endif @@ -1021,17 +876,6 @@ [Components.IA32] MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouter= Pei.inf !endif [Components.X64] - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf { - !if $(TARGET) =3D=3D DEBUG - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - - !endif # # EDK II Related Platform codes # @@ -1049,24 +893,10 @@ [Components.X64] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf !endif } - IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x27 - - !if $(TARGET) !=3D RELEASE - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf - !endif - - ICC:*_*_*_CC_FLAGS =3D -D MDEPKG_NDEBUG - GCC:RELEASE_*_*_CC_FLAGS =3D -D MDEPKG_NDEBUG - } MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf =20 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf @@ -1099,13 +929,9 @@ [Components.X64] =20 !if $(TPM_ENABLED) =3D=3D TRUE NULL|SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.i= nf -!endif -!if $(FTPM_ENABLE) =3D=3D TRUE - NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib= .inf !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/MpCpu.inf - $(PLATFORM_PACKAGE)/Metronome/Metronome.inf + MdeModulePkg/Universal/Metronome/Metronome.inf =20 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ @@ -1115,12 +941,8 @@ [Components.X64] PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf - !if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - !else + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf - !endif } =20 $(PLATFORM_PACKAGE)/UiApp/UiApp.inf @@ -1132,11 +954,11 @@ [Components.X64] MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm= .inf !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf { @@ -1158,9 +980,9 @@ [Components.X64] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.i= nf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf =20 - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf =20 - $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf + Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 !if $(DATAHUB_ENABLE) =3D=3D TRUE IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { @@ -1168,38 +990,30 @@ [Components.X64] gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 } !endif - IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe= /DatahubStatusCodeHandlerDxe.inf MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchS3SupportDxe.inf - !if $(USE_HPET_TIMER) =3D=3D TRUE - PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf - !else - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmartTimer.inf - !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmControl.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf + PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmContro= l.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmbusDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/IntelPchLegacyInterrupt.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchReset.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitDxe.inf{ + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusD= xe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDx= e.inf{ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSm= m.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmiDispatcher.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDis= patcher.inf =20 !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPcieSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSm= m.inf !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiRuntime.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPolicyInitDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchBiosWriteProtect.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmAccess.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PciHostBridge.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/VlvInitDxe.inf - - IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRun= time.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicy= InitDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWr= iteProtect.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBr= idge.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDx= e.inf =20 # # Performance Application; Set PERFORMANCE_ENABLE=3DTRUE for normal boot= performance and smm performance data @@ -1219,35 +1033,9 @@ [Components.X64] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Dptf.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PnpDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf =20 -!if $(SEC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/HeciDrv.inf { -!if $(SEC_DEBUG_INFO_ENABLE) =3D=3D TRUE - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D1 -!else - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D0 -!endif - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SeCPolicyInitDxe.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Tpm2DeviceSeCDxe.inf - SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf{ - - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library\DxePcdLib/DxePcdLib.inf - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/FtpmSmm.inf -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1274,24 +1062,23 @@ [Components.X64] # # EDK II Related Platform codes # - $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf{ + Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf{ !if $(TARGET) !=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf !endif PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } - $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf + Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf + Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf + Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf =20 - $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf - $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PlatformCpuPolicy.inf - $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf - $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf + Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf + Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformC= puPolicy.inf + Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf !if $(GOP_DRIVER_ENABLE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf + Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf =20 !endif =20 @@ -1302,13 +1089,15 @@ [Components.X64] MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf UefiCpuPkg/CpuDxe/CpuDxe.inf + UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf - $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnS= mmSwDispatchThunk.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PowerManagement2.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/DigitalThermalSensor.inf + + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerMana= gement2.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalTh= ermalSensor.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/GraphicDx= eInitSmm.inf =20 # # ACPI @@ -1321,14 +1110,14 @@ [Components.X64] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } + MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 - $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiTables.inf + Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf =20 - $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf + Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf =20 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsRes= ourceTableDxe.inf =20 @@ -1338,31 +1127,23 @@ [Components.X64] MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/ISPDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf =20 =20 -# -# ISA -# - $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf - IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf -# -# SDIO -# -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcHost.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcMediaDevice.inf + # + # ISA + # + Vlv2TbltDevicePkg/PcuSio/PcuSio.inf + MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf + !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerf= ormanceDxe.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerf= ormanceSmm.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } !endif =20 @@ -1370,7 +1151,6 @@ [Components.X64] # IDE/SCSI/AHCI # MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf @@ -1394,7 +1174,7 @@ [Components.X64] gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } !if $(SATA_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SataController.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataContr= oller.inf !endif MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf !if $(SCSI_ENABLE) =3D=3D TRUE @@ -1407,7 +1187,6 @@ [Components.X64] MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf - IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -1431,9 +1210,9 @@ [Components.X64] # SMBIOS # MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf - $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf + Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmbiosMemory.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # @@ -1448,12 +1227,6 @@ [Components.X64] # !include NetworkPkg/Network.dsc.inc =20 -!if $(NETWORK_ENABLE) =3D=3D TRUE - !if $(CSM_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Snp16Dxe.inf - !endif -!endif - !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE) MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf @@ -1471,7 +1244,7 @@ [Components.X64] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } !endif =20 @@ -1483,11 +1256,7 @@ [BuildOptions] # # Define token for different Platform # -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - DEFINE MINNOW2_FSP_OPTION =3D -DMINNOW2_FSP_BUILD -!else DEFINE MINNOW2_FSP_OPTION =3D -!endif =20 !if $(ENBDT_PF_BUILD) =3D=3D TRUE DEFINE ENBDT_PF_ENABLE =3D -DENBDT_PF_ENABLE=3D1 @@ -1526,11 +1295,6 @@ [BuildOptions] DEFINE X64_BUILD_ENABLE =3D !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - DEFINE DSC_FTPM_BUILD_OPTIONS =3D -DFTPM_ENABLE -!else - DEFINE DSC_FTPM_BUILD_OPTIONS =3D -!endif !if $(TPM_ENABLED) =3D=3D TRUE DEFINE DSC_TPM_BUILD_OPTIONS =3D -DTPM_ENABLED !else @@ -1538,7 +1302,7 @@ [BuildOptions] !endif =20 =20 - DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_BUILD_OPTIONS) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS)= $(DSC_TPM_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) + DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) = $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) !if $(PERFORMANCE_ENABLE) =3D=3D TRUE DEFINE PDB_BUILD_OPTION =3D /Zi !endif @@ -1570,76 +1334,6 @@ [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOpti= ons.common.EDKII.SMM_CORE] MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096 GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 =20 -[BuildOptions.Common.EDK] - -# -# Define token for different Platform -# -!if $(ENBDT_PF_BUILD) =3D=3D TRUE - DEFINE ENBDT_PF_ENABLE =3D -DENBDT_PF_ENABLE=3D1 -!else - DEFINE ENBDT_PF_ENABLE =3D -DENBDT_PF_ENABLE=3D0 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE - RELEASE_*_*_DLINK_FLAGS =3D -DEBUG -!endif - -!if $(S3_ENABLE) =3D=3D TRUE - DEFINE DSC_S3_BUILD_OPTIONS =3D -DEFI_S3_RESUME -!else - DEFINE DSC_S3_BUILD_OPTIONS =3D -!endif - -!if $(ENBDT_S3_SUPPORT) =3D=3D TRUE - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D -DNOCS_S3_SUPPORT -!else - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D -!endif - -!if $(X64_CONFIG) =3D=3D TRUE - DEFINE X64_BUILD_ENABLE =3D -DX64_BUILD_ENABLE=3D1 -!else - DEFINE X64_BUILD_ENABLE =3D -!endif - - - DEFINE EDK_GLUE_LIB_DEBUG =3D - DEFINE DEBUG_BUILD_OPTIONS =3D -D EFI_DEBUG -D DEBUG_MODE=3D1 /GL- $(ED= K_GLUE_LIB_DEBUG) -DEDKII_GLUE_DebugPrintErrorLevel=3D(EFI_D_ERROR) - DEFINE EDK_DSC_FEATURE_BUILD_OPTIONS =3D $(DSC_S3_BUILD_OPTIONS) $(DSC_A= CPI_BUILD_OPTIONS) $(DSC_SEC_BUILD_OPTIONS) $(DSC_FTPM_BUILD_OPTIONS) $(DSC= _FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) $(SOFTSDV_BUILD_OPTI= ONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUILD_OPTIONS) $(COMPACT_BUILD_OPTION= S) $(VP_BUILD_OPTIONS) $(QT_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPT= IONS) -D$(PROJECT_SC_CHIPSET) - - DEFINE EDK_DSC_OTHER_BUILD_OPTIONS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPT= IONS) $(SV_BUILD_OPTIONS) $(INTEL_FASTBOOT_BUILD_OPTION) - DEFINE EDK_DSC_GLOBAL_BUILD_OPTIONS =3D $(ENBDT_PF_ENABLE) $(EDK_DSC_FEA= TURE_BUILD_OPTIONS) $(EDK_DSC_OTHER_BUILD_OPTIONS) -D EFI_SPECIFICATION_VER= SION=3D0x00020000 -D PI_SPECIFICATION_VERSION=3D0x00000009 -D TIANO_RELEA= SE_VERSION=3D0x00080006 -D SUPPORT_DEPRECATED_PCI_CFG_PPI -D CSM_SMMENTRY_P= ORT8DATA8 -D EDKII_GLUE_PciExpressBaseAddress=3D0x$(PLATFORM_PCIEXPRESS_BAS= E) -D MAX_VARIABLE_SIZE=3D0x2000 -D EFI_FIRMWARE_VENDOR=3D"L/"INTEL/"" -D E= FI_BUILD_VERSION=3D"L/"EDKII/"" -DEFI_PEI_REPORT_STATUS_CODE_ON $(ENBDT_S3_= SUPPORT_OPTIONS) - - *_*_IA32_ASM_FLAGS =3D -DEFI32 -D EDKII_GLUE_PciExpressBaseAddre= ss=3D$(PLATFORM_PCIEXPRESS_BASE)h -DNOCS_S3_SUPPORT - DEBUG_*_IA32_CC_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_CC_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_VFRPP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_VFRPP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_APP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_APP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_PP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_PP_FLAGS =3D -D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_IA32_ASLPP_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASLCC_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASM16_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - - *_*_X64_ASM_FLAGS =3D -DEFIX64 -D EDKII_GLUE_PciExpressBaseAddr= ess=3D$(PLATFORM_PCIEXPRESS_BASE)h -DNOCS_S3_SUPPORT - DEBUG_*_X64_CC_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_CC_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_VFRPP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_VFRPP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_APP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_APP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_PP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_PP_FLAGS =3D -D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_X64_ASLPP_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASLCC_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASM16_FLAGS =3D -D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - # *_*_*_BUILD_FLAGS =3D -s - *_*_*_VFR_FLAGS =3D -c - *_*_*_BUILD_FLAGS =3D -c - [BuildOptions.Common.EDKII] *_*_IA32_ASM_FLAGS =3D $(VP_BUILD_OPTIONS) -D EDKII_GLUE_PciExpressB= aseAddress=3D$(PLATFORM_PCIEXPRESS_BASE)h -DNOCS_S3_SUPPORT =20 @@ -1654,25 +1348,3 @@ [BuildOptions.Common.EDKII] *_*_X64_APP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_PP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_ASLPP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) - - -[Components.X64] - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cBus.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cHost.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cPortA0Pio.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cMmioDeviceDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 933a7ec760..8a5c42577d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -18,25 +18,11 @@ [Defines] PLATFORM_GUID =3D 465B0A0B-7AC1-443b-8F67-7B8DEC14= 5F90 PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 - - # - # Set platform specific package/folder name, same as passed from PREBUIL= D script. - # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package= build folder - # DEFINE only takes effect at R9 DSC and FDF. - # - DEFINE PLATFORM_PACKAGE =3D Vlv2TbltDevicePkg - DEFINE PLATFORM_RC_PACKAGE =3D Vlv2DeviceRefCodePkg - DEFINE PLATFORM_BINARY_PACKAGE =3D Vlv2SocBinPkg - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_PACKAGE) + OUTPUT_DIRECTORY =3D Build/Vlv2TbltDevicePkgIA32 SUPPORTED_ARCHITECTURES =3D IA32 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 - DEFINE CPU_ARCH =3DValleyView2 - DEFINE PROJECT_SC_FAMILY =3DIntelPch - DEFINE PROJECT_SC_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView2= Soc/SouthCluster - DEFINE PROJECT_VLV_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView= 2Soc/NorthCluster - DEFINE RC_BINARY_RELEASE =3D TRUE # # Platform On/Off features are defined here @@ -47,20 +33,16 @@ [Defines] # 3.BayleyBay # ENBDT_PF_ENABLE =3D TRUE # - !include $(PLATFORM_PACKAGE)/AutoPlatformCFG.txt - !include $(PLATFORM_PACKAGE)/PlatformPkgConfig.dsc + !include Vlv2TbltDevicePkg/AutoPlatformCFG.txt + !include Vlv2TbltDevicePkg/PlatformPkgConfig.dsc =20 !if $(X64_CONFIG) =3D=3D TRUE DEFINE DXE_ARCHITECTURE =3D X64 - DEFINE EDK_DXE_ARCHITECTURE =3D X64 - DEFINE UNDI_DXE_ARCHITECTURE =3D 64 !else DEFINE DXE_ARCHITECTURE =3D IA32 - DEFINE EDK_DXE_ARCHITECTURE =3D Ia32 - DEFINE UNDI_DXE_ARCHITECTURE =3D 32 !endif =20 - FLASH_DEFINITION =3D $(PLATFORM_PACKAGE)/PlatformPkg.= fdf + FLASH_DEFINITION =3D Vlv2TbltDevicePkg/PlatformPkg.fdf !if $(LFMA_ENABLE) =3D=3D TRUE FIX_LOAD_TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF DEFINE TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF @@ -71,10 +53,6 @@ [Defines] =20 DEFINE PLATFORM_PCIEXPRESS_BASE =3D 0E0000000 =20 - DEFINE SEC_ENABLE =3D FALSE - DEFINE SEC_DEBUG_INFO_ENABLE =3D FALSE - DEFINE FTPM_ENABLE =3D FALSE - ##########################################################################= ###### # # SKU Identification section - list of all SKU IDs supported by this @@ -98,7 +76,6 @@ [LibraryClasses.common] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf - DxeSmmDriverEntryPoint|IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/= DxeSmmDriverEntryPoint.inf =20 # # Basic @@ -142,8 +119,7 @@ [LibraryClasses.common] GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib= .inf - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= .inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf # # Framework @@ -166,10 +142,6 @@ [LibraryClasses.common] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf !endif =20 -!if $(S3_ENABLE) =3D=3D TRUE - S3Lib|IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf -!endif - OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf !if $(CAPSULE_ENABLE) =3D=3D TRUE CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf @@ -197,27 +169,27 @@ [LibraryClasses.common] # # ICH # - SmbusLib|$(PLATFORM_PACKAGE)/Library/SmbusLib/SmbusLib.inf - SmmLib|$(PLATFORM_PACKAGE)/Library/PchSmmLib/PchSmmLib.inf + SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # # Platform # - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf - ResetSystemLib|$(PLATFORM_PACKAGE)/Library/ResetSystemLib/ResetSystemLib= .inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf + ResetSystemLib|Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.i= nf =20 - PlatformCmosLib|$(PLATFORM_PACKAGE)/Library/PlatformCmosLib/PlatformCmos= Lib.inf + PlatformCmosLib|Vlv2TbltDevicePkg/Library/PlatformCmosLib/PlatformCmosLi= b.inf =20 # # Misc # - MonoStatusCodeLib|$(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf + MonoStatusCodeLib|Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf !if $(TARGET) =3D=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf @@ -229,10 +201,11 @@ [LibraryClasses.common] =20 !endif =20 + PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf + !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDeb= ug/PeCoffExtraActionLibDebug.inf DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibS= erialPort/DebugCommunicationLibSerialPort.inf - PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !else PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf @@ -247,10 +220,10 @@ [LibraryClasses.common] OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !endif =20 - BiosIdLib|$(PLATFORM_PACKAGE)/Library/BiosIdLib/BiosIdLib.inf - CpuIA32Lib|$(PLATFORM_PACKAGE)/Library/CpuIA32Lib/CpuIA32Lib.inf + BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf + CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf =20 - StallSmmLib|$(PLATFORM_PACKAGE)/Library/StallSmmLib/StallSmmLib.inf + StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -264,13 +237,10 @@ [LibraryClasses.common] AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf -!if $(RC_BINARY_RELEASE) =3D=3D TRUE - I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf -!endif ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(FTPM_ENABLE) =3D=3D TRUE || $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE +!if $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -281,13 +251,6 @@ [LibraryClasses.common] =20 =20 Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - FspApiLib|IntelFspWrapperPkg/Library/BaseFspApiLib/BaseFspApiLib.inf - FspPlatformInfoLib|IntelFspWrapperPkg/Library/BaseFspPlatformInfoLibSamp= le/BaseFspPlatformInfoLibSample.inf - FspPlatformSecLib|Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/FspPlatformSecLibVlv2.inf - FspHobProcessLib|Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLi= bVlv2/FspHobProcessLibVlv2.inf -!endif - BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -307,14 +270,14 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CO= RE, LibraryClasses.IA32.SEC MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExt= ractGuidedSectionLib.inf - MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatf= ormLib.inf + MultiPlatformLib|Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfor= mLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf =20 !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(TARGET) =3D=3D RELEASE @@ -322,7 +285,7 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE= , LibraryClasses.IA32.SEC SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -331,13 +294,6 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_COR= E, LibraryClasses.IA32.SEC DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf !endif =20 - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - PlatformFspLib|Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf - !endif -!if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLi= bSeC.inf -!endif - [LibraryClasses.IA32] # # DXE phase common @@ -354,7 +310,7 @@ [LibraryClasses.IA32] !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf - EfiRegTableLib|$(PLATFORM_PACKAGE)/Library/EfiRegTableLib/EfiRegTableLib= .inf + EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -369,14 +325,14 @@ [LibraryClasses.IA32.DXE_DRIVER] CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf !endif =20 - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= Dxe.inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDx= e.inf =20 [LibraryClasses.IA32.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf @@ -384,7 +340,7 @@ [LibraryClasses.IA32.DXE_CORE] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerform= anceLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE @@ -409,7 +365,7 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER] =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 @@ -483,12 +439,6 @@ [PcdsFeatureFlag.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE -!endif - gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE -!if $(DATAHUB_STATUS_CODE_ENABLE) =3D=3D TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|TRUE -!else - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE !endif gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst= |FALSE !if $(TARGET) =3D=3D RELEASE @@ -514,59 +464,20 @@ [PcdsFeatureFlag.common] !endif =20 =20 - ## This PCD specifies whether PS2 keyboard does a extended verification = during start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|FALSE - - ## This PCD specifies whether PS2 mouse does a extended verification dur= ing start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2MouseExtendedVerification|FALSE - !if $(VARIABLE_INFO_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|FALSE !endif =20 - gEfiCpuTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE - !if $(SOURCE_DEBUG_ENABLE) gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmDebug|TRUE !endif =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE + [PcdsFixedAtBuild.common] -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -# $(FLASH_REGION_VLVMICROCODE_BASE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0xFFC00000 -# $(FLASH_REGION_VLVMICROCODE_SIZE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x00040000 - gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset|0x60 -# $(FLASH_AREA_BASE_ADDRESS) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress|0xFF800000 -# $(FLASH_AREA_SIZE) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize|0x00800000 -# $(FLASH_REGION_FSPBIN_BASE) - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|0xFFCC0000 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - # in FSP, when this got used, the memory already is up - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 -!else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 -!endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - -!else - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 - !else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 - !endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - gEfiCpuTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x3C00 -!endif - - !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x22000 !else @@ -574,11 +485,8 @@ [PcdsFixedAtBuild.common] !endif gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x00000800 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x400 - gEfiCpuTokenSpaceGuid.PcdCpuIEDRamSize|0x400000 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize|0x= 10000 gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport|FALSE - gEfiCpuTokenSpaceGuid.PcdCpuSmmApSyncTimeout|1000 !if $(S4_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|TRUE !else @@ -596,13 +504,9 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|60 !endif =20 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize|0x10= 000 gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|$(TOP_MEM= ORY_ADDRESS) gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor|0x0 gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor|0x01 - gEfiCpuTokenSpaceGuid.PcdCpuIEDEnabled|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable|TRUE =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 @@ -648,11 +552,6 @@ [PcdsFixedAtBuild.IA32] [PcdsPatchableInModule.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x$(PLATFORM_PCIEXPRES= S_BASE) - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion= |FALSE - - ## This PCD specifies whether to use the optimized timing for best PS2 d= etection performance. - # Note this PCD could be set to TRUE for best boot performance and set = to FALSE for best device compatibility. - gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection|TRUE =20 ########################################################################= ############################### # @@ -827,10 +726,6 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdFTPMStatus|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateSmmDataPtr|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0 - gEfiCpuTokenSpaceGuid.PcdCpuS3DataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuHotPlugDataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuCallbackSignal|0 - gEfiCpuTokenSpaceGuid.PcdCpuConfigContextBuffer|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 @@ -843,24 +738,7 @@ [PcdsDynamicExDefault.X64.DEFAULT] =20 [Components.IA32] =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf - - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf { - !if $(TARGET) =3D=3D DEBUG - - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf - IntelFspWrapperPkg/FspInitPei/FspInitPei.inf { - !if $(TARGET) =3D=3D DEBUG - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - !endif + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf =20 MdeModulePkg/Core/Pei/PeiMain.inf { !if $(TARGET) =3D=3D DEBUG @@ -871,31 +749,23 @@ [Components.IA32] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } =20 - $(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf { + Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf { !if $(TARGET) =3D=3D DEBUG gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2E !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.= inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - !if $(FTPM_ENABLE)=3D=3DTRUE - *_*_IA32_CC_FLAGS =3D /D FTPM_ENABLE - !endif } =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE -$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf !endif =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf { + Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf { *_*_IA32_CC_FLAGS =3D /DRC_BINARY_RELEASE !if $(TARGET) =3D=3D DEBUG @@ -915,10 +785,6 @@ [Components.IA32] } !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/Tpm2DeviceS= eCPei.inf -!endif - !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { @@ -929,7 +795,7 @@ [Components.IA32] } !endif =20 - $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf { + Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 @@ -938,34 +804,33 @@ [Components.IA32] !endif PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf } - $(PLATFORM_PACKAGE)/FvInfoPei/FvInfoPei.inf + Vlv2TbltDevicePkg/FvInfoPei/FvInfoPei.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyIni= tPeim.inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArp= Disabled.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.= inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAcces= s.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmContr= ol.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf MdeModulePkg/Universal/PCD/Pei/Pcd.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf UefiCpuPkg/CpuIoPei/CpuIoPei.inf UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MpS3.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PiSmmCommu= nicationPei.inf + UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf =20 !if $(RECOVERY_ENABLE) # # Recovery # - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf @@ -991,17 +856,6 @@ [Components.IA32] MdeModulePkg/Universal/Variable/Pei/VariablePei.inf MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - NULL|SecurityPkg/Library\HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - } -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1011,7 +865,7 @@ [Components.IA32] !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerf= ormancePei.inf{ - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } =20 !endif @@ -1019,17 +873,6 @@ [Components.IA32] MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouter= Pei.inf !endif [Components.IA32] - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf { - !if $(TARGET) =3D=3D DEBUG - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - - !endif # # EDK II Related Platform codes # @@ -1047,24 +890,10 @@ [Components.IA32] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf !endif } - IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x27 - - !if $(TARGET) !=3D RELEASE - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf - !endif - - ICC:*_*_*_CC_FLAGS =3D /D MDEPKG_NDEBUG - GCC:*_*_*_CC_FLAGS =3D -D MDEPKG_NDEBUG - } MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf =20 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf @@ -1084,13 +913,9 @@ [Components.IA32] =20 !if $(TPM_ENABLED) =3D=3D TRUE NULL|SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.i= nf -!endif -!if $(FTPM_ENABLE) =3D=3D TRUE - NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib= .inf !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/MpCpu.inf - $(PLATFORM_PACKAGE)/Metronome/Metronome.inf + MdeModulePkg/Universal/Metronome/Metronome.inf =20 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ @@ -1100,12 +925,8 @@ [Components.IA32] PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf - !if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - !else + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf - !endif } =20 $(PLATFORM_PACKAGE)/UiApp/UiApp.inf @@ -1117,11 +938,11 @@ [Components.IA32] MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm= .inf !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf { @@ -1143,9 +964,9 @@ [Components.IA32] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.i= nf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf =20 - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf =20 - $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf + Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 !if $(DATAHUB_ENABLE) =3D=3D TRUE IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { @@ -1153,38 +974,30 @@ [Components.IA32] gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 } !endif - IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe= /DatahubStatusCodeHandlerDxe.inf MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchS3SupportDxe.inf - !if $(USE_HPET_TIMER) =3D=3D TRUE - PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf - !else - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmartTimer.inf - !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmControl.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf + PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmContro= l.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmbusDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/IntelPchLegacyInterrupt.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchReset.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitDxe.inf{ + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusD= xe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDx= e.inf{ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSm= m.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmiDispatcher.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDis= patcher.inf =20 !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPcieSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSm= m.inf !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiRuntime.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPolicyInitDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchBiosWriteProtect.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmAccess.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PciHostBridge.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/VlvInitDxe.inf - - IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRun= time.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicy= InitDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWr= iteProtect.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBr= idge.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDx= e.inf =20 # # Performance Application; Set PERFORMANCE_ENABLE=3DTRUE for normal boot= performance and smm performance data @@ -1204,35 +1017,9 @@ [Components.IA32] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Dptf.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PnpDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf =20 -!if $(SEC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/HeciDrv.inf { -!if $(SEC_DEBUG_INFO_ENABLE) =3D=3D TRUE - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D1 -!else - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D0 -!endif - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SeCPolicyInitDxe.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Tpm2DeviceSeCDxe.inf - SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf{ - - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library\DxePcdLib/DxePcdLib.inf - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/FtpmSmm.inf -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1259,24 +1046,23 @@ [Components.IA32] # # EDK II Related Platform codes # - $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf{ + Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf{ !if $(TARGET) !=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf !endif PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } - $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf + Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf + Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf + Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf =20 - $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf - $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PlatformCpuPolicy.inf - $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf - $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf + Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf + Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformC= puPolicy.inf + Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf !if $(GOP_DRIVER_ENABLE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf + Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf =20 !endif =20 @@ -1287,13 +1073,15 @@ [Components.IA32] MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf UefiCpuPkg/CpuDxe/CpuDxe.inf + UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf - $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnS= mmSwDispatchThunk.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PowerManagement2.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/DigitalThermalSensor.inf + + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerMana= gement2.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalTh= ermalSensor.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/GraphicDx= eInitSmm.inf =20 # # ACPI @@ -1306,14 +1094,14 @@ [Components.IA32] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } + MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 - $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiTables.inf + Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf =20 - $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf + Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf =20 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsRes= ourceTableDxe.inf =20 @@ -1323,31 +1111,23 @@ [Components.IA32] MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/ISPDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf =20 =20 -# -# ISA -# - $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf - IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf -# -# SDIO -# -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcHost.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcMediaDevice.inf + # + # ISA + # + Vlv2TbltDevicePkg/PcuSio/PcuSio.inf + MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf + !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerf= ormanceDxe.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerf= ormanceSmm.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } !endif =20 @@ -1355,7 +1135,6 @@ [Components.IA32] # IDE/SCSI/AHCI # MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf @@ -1379,7 +1158,7 @@ [Components.IA32] gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } !if $(SATA_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SataController.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataContr= oller.inf !endif MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf !if $(SCSI_ENABLE) =3D=3D TRUE @@ -1392,7 +1171,6 @@ [Components.IA32] MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf - IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -1416,9 +1194,9 @@ [Components.IA32] # SMBIOS # MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf - $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf + Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmbiosMemory.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # @@ -1433,12 +1211,6 @@ [Components.IA32] # !include NetworkPkg/Network.dsc.inc =20 -!if $(NETWORK_ENABLE) =3D=3D TRUE - !if $(CSM_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Snp16Dxe.inf - !endif -!endif - !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE) MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf @@ -1456,7 +1228,7 @@ [Components.IA32] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } !endif =20 @@ -1468,11 +1240,7 @@ [BuildOptions] # # Define token for different Platform # -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - DEFINE MINNOW2_FSP_OPTION =3D /DMINNOW2_FSP_BUILD -!else DEFINE MINNOW2_FSP_OPTION =3D -!endif =20 !if $(ENBDT_PF_BUILD) =3D=3D TRUE DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D1 @@ -1511,11 +1279,6 @@ [BuildOptions] DEFINE X64_BUILD_ENABLE =3D !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - DEFINE DSC_FTPM_BUILD_OPTIONS =3D /DFTPM_ENABLE -!else - DEFINE DSC_FTPM_BUILD_OPTIONS =3D -!endif !if $(TPM_ENABLED) =3D=3D TRUE DEFINE DSC_TPM_BUILD_OPTIONS =3D /DTPM_ENABLED !else @@ -1523,7 +1286,7 @@ [BuildOptions] !endif =20 =20 - DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_BUILD_OPTIONS) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS)= $(DSC_TPM_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) + DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) = $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) !if $(PERFORMANCE_ENABLE) =3D=3D TRUE DEFINE PDB_BUILD_OPTION =3D /Zi !endif @@ -1556,76 +1319,6 @@ [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOpti= ons.common.EDKII.SMM_CORE] MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096 GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 =20 -[BuildOptions.Common.EDK] - -# -# Define token for different Platform -# -!if $(ENBDT_PF_BUILD) =3D=3D TRUE - DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D1 -!else - DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D0 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE - RELEASE_*_*_DLINK_FLAGS =3D /DEBUG -!endif - -!if $(S3_ENABLE) =3D=3D TRUE - DEFINE DSC_S3_BUILD_OPTIONS =3D /DEFI_S3_RESUME -!else - DEFINE DSC_S3_BUILD_OPTIONS =3D -!endif - -!if $(ENBDT_S3_SUPPORT) =3D=3D TRUE - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D /DNOCS_S3_SUPPORT -!else - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D -!endif - -!if $(X64_CONFIG) =3D=3D TRUE - DEFINE X64_BUILD_ENABLE =3D /DX64_BUILD_ENABLE=3D1 -!else - DEFINE X64_BUILD_ENABLE =3D -!endif - - - DEFINE EDK_GLUE_LIB_DEBUG =3D - DEFINE DEBUG_BUILD_OPTIONS =3D /D EFI_DEBUG /D DEBUG_MODE=3D1 /GL- $(ED= K_GLUE_LIB_DEBUG) /DEDKII_GLUE_DebugPrintErrorLevel=3D(EFI_D_ERROR) - DEFINE EDK_DSC_FEATURE_BUILD_OPTIONS =3D $(DSC_S3_BUILD_OPTIONS) $(DSC_A= CPI_BUILD_OPTIONS) $(DSC_SEC_BUILD_OPTIONS) $(DSC_FTPM_BUILD_OPTIONS) $(DSC= _FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) $(SOFTSDV_BUILD_OPTI= ONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUILD_OPTIONS) $(COMPACT_BUILD_OPTION= S) $(VP_BUILD_OPTIONS) $(QT_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPT= IONS) /D$(PROJECT_SC_CHIPSET) - - DEFINE EDK_DSC_OTHER_BUILD_OPTIONS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPT= IONS) $(SV_BUILD_OPTIONS) $(INTEL_FASTBOOT_BUILD_OPTION) - DEFINE EDK_DSC_GLOBAL_BUILD_OPTIONS =3D $(ENBDT_PF_ENABLE) $(EDK_DSC_FEA= TURE_BUILD_OPTIONS) $(EDK_DSC_OTHER_BUILD_OPTIONS) /D EFI_SPECIFICATION_VER= SION=3D0x00020000 /D PI_SPECIFICATION_VERSION=3D0x00000009 /D TIANO_RELEA= SE_VERSION=3D0x00080006 /D SUPPORT_DEPRECATED_PCI_CFG_PPI /D CSM_SMMENTRY_P= ORT8DATA8 /D EDKII_GLUE_PciExpressBaseAddress=3D0x$(PLATFORM_PCIEXPRESS_BAS= E) /D MAX_VARIABLE_SIZE=3D0x2000 /D EFI_FIRMWARE_VENDOR=3D"L/"INTEL/"" /D E= FI_BUILD_VERSION=3D"L/"EDKII/"" /DEFI_PEI_REPORT_STATUS_CODE_ON $(ENBDT_S3_= SUPPORT_OPTIONS) - - *_*_IA32_ASM_FLAGS =3D /DEFI32 /D EDKII_GLUE_PciExpressBaseAddre= ss=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT - DEBUG_*_IA32_CC_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_CC_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_VFRPP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_VFRPP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_APP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_APP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_PP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_PP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_IA32_ASLPP_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASLCC_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASM16_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - - *_*_X64_ASM_FLAGS =3D /DEFIX64 /D EDKII_GLUE_PciExpressBaseAddr= ess=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT - DEBUG_*_X64_CC_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_CC_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_VFRPP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_VFRPP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_APP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_APP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_PP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_PP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_X64_ASLPP_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASLCC_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASM16_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - # *_*_*_BUILD_FLAGS =3D -s - *_*_*_VFR_FLAGS =3D -c - *_*_*_BUILD_FLAGS =3D -c - [BuildOptions.Common.EDKII] *_*_IA32_ASM_FLAGS =3D $(VP_BUILD_OPTIONS) /D EDKII_GLUE_PciExpressB= aseAddress=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT =20 @@ -1640,25 +1333,3 @@ [BuildOptions.Common.EDKII] *_*_X64_APP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_PP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_ASLPP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) - - -[Components.IA32] - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cBus.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cHost.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cPortA0Pio.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cMmioDeviceDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 9ec48f9fee..c0fe0892ac 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -18,25 +18,11 @@ [Defines] PLATFORM_GUID =3D 465B0A0B-7AC1-443b-8F67-7B8DEC14= 5F90 PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 - - # - # Set platform specific package/folder name, same as passed from PREBUIL= D script. - # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package= build folder - # DEFINE only takes effect at R9 DSC and FDF. - # - DEFINE PLATFORM_PACKAGE =3D Vlv2TbltDevicePkg - DEFINE PLATFORM_RC_PACKAGE =3D Vlv2DeviceRefCodePkg - DEFINE PLATFORM_BINARY_PACKAGE =3D Vlv2SocBinPkg - OUTPUT_DIRECTORY =3D Build/$(PLATFORM_PACKAGE) + OUTPUT_DIRECTORY =3D Build/Vlv2TbltDevicePkg SUPPORTED_ARCHITECTURES =3D IA32|X64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 - DEFINE CPU_ARCH =3DValleyView2 - DEFINE PROJECT_SC_FAMILY =3DIntelPch - DEFINE PROJECT_SC_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView2= Soc/SouthCluster - DEFINE PROJECT_VLV_ROOT =3D../$(PLATFORM_RC_PACKAGE)/ValleyView= 2Soc/NorthCluster - DEFINE RC_BINARY_RELEASE =3D TRUE # # Platform On/Off features are defined here @@ -47,22 +33,18 @@ [Defines] # 3.BayleyBay # ENBDT_PF_ENABLE =3D TRUE # - !include $(PLATFORM_PACKAGE)/AutoPlatformCFG.txt - !include $(PLATFORM_PACKAGE)/PlatformPkgConfig.dsc + !include Vlv2TbltDevicePkg/AutoPlatformCFG.txt + !include Vlv2TbltDevicePkg/PlatformPkgConfig.dsc =20 DEFINE PLATFORMX64_ENABLE =3D TRUE =20 !if $(X64_CONFIG) =3D=3D TRUE DEFINE DXE_ARCHITECTURE =3D X64 - DEFINE EDK_DXE_ARCHITECTURE =3D X64 - DEFINE UNDI_DXE_ARCHITECTURE =3D 64 !else DEFINE DXE_ARCHITECTURE =3D IA32 - DEFINE EDK_DXE_ARCHITECTURE =3D Ia32 - DEFINE UNDI_DXE_ARCHITECTURE =3D 32 !endif =20 - FLASH_DEFINITION =3D $(PLATFORM_PACKAGE)/PlatformPkg.= fdf + FLASH_DEFINITION =3D Vlv2TbltDevicePkg/PlatformPkg.fdf !if $(LFMA_ENABLE) =3D=3D TRUE FIX_LOAD_TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF DEFINE TOP_MEMORY_ADDRESS =3D 0xFFFFFFFFFFFFFFFF @@ -73,10 +55,6 @@ [Defines] =20 DEFINE PLATFORM_PCIEXPRESS_BASE =3D 0E0000000 =20 - DEFINE SEC_ENABLE =3D FALSE - DEFINE SEC_DEBUG_INFO_ENABLE =3D FALSE - DEFINE FTPM_ENABLE =3D FALSE - ##########################################################################= ###### # # SKU Identification section - list of all SKU IDs supported by this @@ -100,7 +78,6 @@ [LibraryClasses.common] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf - DxeSmmDriverEntryPoint|IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/= DxeSmmDriverEntryPoint.inf =20 # # Basic @@ -144,8 +121,7 @@ [LibraryClasses.common] GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib= .inf - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= .inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf # # Framework @@ -167,9 +143,6 @@ [LibraryClasses.common] !if $(SCSI_ENABLE) =3D=3D TRUE UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf !endif -!if $(S3_ENABLE) =3D=3D TRUE - S3Lib|IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf -!endif =20 OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf !if $(CAPSULE_ENABLE) =3D=3D TRUE @@ -198,27 +171,27 @@ [LibraryClasses.common] # # ICH # - SmbusLib|$(PLATFORM_PACKAGE)/Library/SmbusLib/SmbusLib.inf - SmmLib|$(PLATFORM_PACKAGE)/Library/PchSmmLib/PchSmmLib.inf + SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # # Platform # - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf - ResetSystemLib|$(PLATFORM_PACKAGE)/Library/ResetSystemLib/ResetSystemLib= .inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf + ResetSystemLib|Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.i= nf =20 - PlatformCmosLib|$(PLATFORM_PACKAGE)/Library/PlatformCmosLib/PlatformCmos= Lib.inf + PlatformCmosLib|Vlv2TbltDevicePkg/Library/PlatformCmosLib/PlatformCmosLi= b.inf =20 # # Misc # - MonoStatusCodeLib|$(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf + MonoStatusCodeLib|Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf !if $(TARGET) =3D=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf @@ -230,10 +203,11 @@ [LibraryClasses.common] =20 !endif =20 + PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf + !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDeb= ug/PeCoffExtraActionLibDebug.inf DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibS= erialPort/DebugCommunicationLibSerialPort.inf - PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !else PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf @@ -248,10 +222,10 @@ [LibraryClasses.common] OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf !endif =20 - BiosIdLib|$(PLATFORM_PACKAGE)/Library/BiosIdLib/BiosIdLib.inf - CpuIA32Lib|$(PLATFORM_PACKAGE)/Library/CpuIA32Lib/CpuIA32Lib.inf + BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf + CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf =20 - StallSmmLib|$(PLATFORM_PACKAGE)/Library/StallSmmLib/StallSmmLib.inf + StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -265,15 +239,10 @@ [LibraryClasses.common] AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf -!if $(RC_BINARY_RELEASE) =3D=3D TRUE - I2cLib|Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf -!endif ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf - ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib= .inf - HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsing= Lib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(FTPM_ENABLE) =3D=3D TRUE || $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE +!if $(NETWORK_ISCSI_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -284,13 +253,6 @@ [LibraryClasses.common] =20 =20 Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - FspApiLib|IntelFspWrapperPkg/Library/BaseFspApiLib/BaseFspApiLib.inf - FspPlatformInfoLib|IntelFspWrapperPkg/Library/BaseFspPlatformInfoLibSamp= le/BaseFspPlatformInfoLibSample.inf - FspPlatformSecLib|Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/FspPlatformSecLibVlv2.inf - FspHobProcessLib|Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLi= bVlv2/FspHobProcessLibVlv2.inf -!endif - BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -310,14 +272,14 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CO= RE, LibraryClasses.IA32.SEC MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExt= ractGuidedSectionLib.inf - MultiPlatformLib|$(PLATFORM_PACKAGE)/Library/MultiPlatformLib/MultiPlatf= ormLib.inf + MultiPlatformLib|Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfor= mLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf =20 !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(TARGET) =3D=3D RELEASE @@ -325,7 +287,7 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE= , LibraryClasses.IA32.SEC SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf !else DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebug= LibReportStatusCode.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -334,13 +296,6 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_COR= E, LibraryClasses.IA32.SEC DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf !endif =20 - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - PlatformFspLib|Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf - !endif -!if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLi= bSeC.inf -!endif - [LibraryClasses.X64] # # DXE phase common @@ -357,7 +312,7 @@ [LibraryClasses.X64] !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf - EfiRegTableLib|$(PLATFORM_PACKAGE)/Library/EfiRegTableLib/EfiRegTableLib= .inf + EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -372,14 +327,14 @@ [LibraryClasses.X64.DXE_DRIVER] CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.= inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf !endif =20 - FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib= Dxe.inf + FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDx= e.inf =20 [LibraryClasses.X64.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf @@ -387,7 +342,7 @@ [LibraryClasses.X64.DXE_CORE] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf !if $(PERFORMANCE_ENABLE) =3D=3D TRUE PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerform= anceLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE @@ -412,7 +367,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAcpiTi= merLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTime= rLib.inf !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 @@ -486,12 +441,6 @@ [PcdsFeatureFlag.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE -!endif - gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE -!if $(DATAHUB_STATUS_CODE_ENABLE) =3D=3D TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|TRUE -!else - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE !endif gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst= |FALSE !if $(TARGET) =3D=3D RELEASE @@ -517,59 +466,20 @@ [PcdsFeatureFlag.common] !endif =20 =20 - ## This PCD specifies whether PS2 keyboard does a extended verification = during start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|FALSE - - ## This PCD specifies whether PS2 mouse does a extended verification dur= ing start. - gEfiMdeModulePkgTokenSpaceGuid.PcdPs2MouseExtendedVerification|FALSE - !if $(VARIABLE_INFO_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|TRUE !else gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics|FALSE !endif =20 - gEfiCpuTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE - !if $(SOURCE_DEBUG_ENABLE) gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmDebug|TRUE !endif =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp|TRUE + [PcdsFixedAtBuild.common] -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE -# $(FLASH_REGION_VLVMICROCODE_BASE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0xFFC00000 -# $(FLASH_REGION_VLVMICROCODE_SIZE) - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x00040000 - gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset|0x60 -# $(FLASH_AREA_BASE_ADDRESS) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress|0xFF800000 -# $(FLASH_AREA_SIZE) - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize|0x00800000 -# $(FLASH_REGION_FSPBIN_BASE) - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|0xFFCC0000 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - # in FSP, when this got used, the memory already is up - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 -!else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 -!endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - -!else - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0x00080000 - !else - gEfiCpuTokenSpaceGuid.PcdTemporaryRamBase|0xFEF80000 - !endif - gEfiCpuTokenSpaceGuid.PcdTemporaryRamSize|0x00010000 - gEfiCpuTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x3C00 -!endif - - !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x22000 !else @@ -577,11 +487,8 @@ [PcdsFixedAtBuild.common] !endif gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x00000800 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x400 - gEfiCpuTokenSpaceGuid.PcdCpuIEDRamSize|0x400000 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize|0x= 10000 gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport|FALSE - gEfiCpuTokenSpaceGuid.PcdCpuSmmApSyncTimeout|1000 !if $(S4_ENABLE) =3D=3D TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|TRUE !else @@ -599,13 +506,9 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|60 !endif =20 - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize|0x10= 000 gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|$(TOP_MEM= ORY_ADDRESS) gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor|0x0 gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor|0x01 - gEfiCpuTokenSpaceGuid.PcdCpuIEDEnabled|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable|TRUE - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable|TRUE =20 !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 @@ -651,11 +554,6 @@ [PcdsFixedAtBuild.IA32] [PcdsPatchableInModule.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x$(PLATFORM_PCIEXPRES= S_BASE) - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion= |FALSE - - ## This PCD specifies whether to use the optimized timing for best PS2 d= etection performance. - # Note this PCD could be set to TRUE for best boot performance and set = to FALSE for best device compatibility. - gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection|TRUE =20 ########################################################################= ############################### # @@ -830,10 +728,6 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdFTPMStatus|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateSmmDataPtr|0 gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0 - gEfiCpuTokenSpaceGuid.PcdCpuS3DataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuHotPlugDataAddress|0 - gEfiCpuTokenSpaceGuid.PcdCpuCallbackSignal|0 - gEfiCpuTokenSpaceGuid.PcdCpuConfigContextBuffer|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 @@ -846,24 +740,7 @@ [PcdsDynamicExDefault.X64.DEFAULT] =20 [Components.IA32] =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf - - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf { - !if $(TARGET) =3D=3D DEBUG - - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf - IntelFspWrapperPkg/FspInitPei/FspInitPei.inf { - !if $(TARGET) =3D=3D DEBUG - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - !endif + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf =20 MdeModulePkg/Core/Pei/PeiMain.inf { !if $(TARGET) =3D=3D DEBUG @@ -874,31 +751,23 @@ [Components.IA32] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } =20 - $(PLATFORM_PACKAGE)/MonoStatusCode/MonoStatusCode.inf { + Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf { !if $(TARGET) =3D=3D DEBUG gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2E !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.= inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - !if $(FTPM_ENABLE)=3D=3DTRUE - *_*_IA32_CC_FLAGS =3D /D FTPM_ENABLE - !endif } =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE -$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf !endif =20 !if $(RC_BINARY_RELEASE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf { + Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf { *_*_IA32_CC_FLAGS =3D /DRC_BINARY_RELEASE !if $(TARGET) =3D=3D DEBUG @@ -918,10 +787,6 @@ [Components.IA32] } !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/Tpm2DeviceS= eCPei.inf -!endif - !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { @@ -932,7 +797,7 @@ [Components.IA32] } !endif =20 - $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf { + Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803805c6 @@ -941,34 +806,33 @@ [Components.IA32] !endif PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf } - $(PLATFORM_PACKAGE)/FvInfoPei/FvInfoPei.inf + Vlv2TbltDevicePkg/FvInfoPei/FvInfoPei.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyIni= tPeim.inf { + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf { gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 } !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArp= Disabled.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.= inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAcces= s.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmContr= ol.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf MdeModulePkg/Universal/PCD/Pei/Pcd.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf UefiCpuPkg/CpuIoPei/CpuIoPei.inf UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MpS3.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PiSmmCommu= nicationPei.inf + UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf =20 !if $(RECOVERY_ENABLE) # # Recovery # - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf @@ -994,17 +858,6 @@ [Components.IA32] MdeModulePkg/Universal/Variable/Pei/VariablePei.inf MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - NULL|SecurityPkg/Library\HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - } -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1014,7 +867,7 @@ [Components.IA32] !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerf= ormancePei.inf{ - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } =20 !endif @@ -1022,17 +875,6 @@ [Components.IA32] MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouter= Pei.inf !endif [Components.X64] - !if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf { - !if $(TARGET) =3D=3D DEBUG - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000046 - - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - !endif - } - - !endif # # EDK II Related Platform codes # @@ -1050,24 +892,10 @@ [Components.X64] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf !endif } - IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x27 - - !if $(TARGET) !=3D RELEASE - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf - !endif - - ICC:*_*_*_CC_FLAGS =3D /D MDEPKG_NDEBUG - GCC:*_*_*_CC_FLAGS =3D -D MDEPKG_NDEBUG - } MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf =20 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf @@ -1100,13 +928,9 @@ [Components.X64] =20 !if $(TPM_ENABLED) =3D=3D TRUE NULL|SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.i= nf -!endif -!if $(FTPM_ENABLE) =3D=3D TRUE - NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib= .inf !endif } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/MpCpu.inf - $(PLATFORM_PACKAGE)/Metronome/Metronome.inf + MdeModulePkg/Universal/Metronome/Metronome.inf =20 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ @@ -1116,12 +940,8 @@ [Components.X64] PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf - !if $(FTPM_ENABLE) =3D=3D TRUE - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - !else + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf - !endif } =20 $(PLATFORM_PACKAGE)/UiApp/UiApp.inf @@ -1133,11 +953,11 @@ [Components.X64] MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm= .inf !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf { @@ -1159,9 +979,9 @@ [Components.X64] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.i= nf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf =20 - $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf + Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf =20 - $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf + Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 !if $(DATAHUB_ENABLE) =3D=3D TRUE IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { @@ -1169,38 +989,30 @@ [Components.X64] gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 } !endif - IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe= /DatahubStatusCodeHandlerDxe.inf MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchS3SupportDxe.inf - !if $(USE_HPET_TIMER) =3D=3D TRUE - PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf - !else - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmartTimer.inf - !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmControl.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf + PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmContro= l.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmbusDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/IntelPchLegacyInterrupt.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchReset.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitDxe.inf{ + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusD= xe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.= inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDx= e.inf{ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchInitSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSm= m.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSmiDispatcher.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDis= patcher.inf =20 !if $(PCIESC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPcieSmm.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSm= m.inf !endif - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchSpiRuntime.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchPolicyInitDxe.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PchBiosWriteProtect.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmmAccess.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PciHostBridge.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/VlvInitDxe.inf - - IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRun= time.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicy= InitDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWr= iteProtect.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess= .inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBr= idge.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDx= e.inf =20 # # Performance Application; Set PERFORMANCE_ENABLE=3DTRUE for normal boot= performance and smm performance data @@ -1220,35 +1032,9 @@ [Components.X64] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Dptf.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PnpDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf =20 -!if $(SEC_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/HeciDrv.inf { -!if $(SEC_DEBUG_INFO_ENABLE) =3D=3D TRUE - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D1 -!else - - *_*_X64_CC_FLAGS =3D /DSEC_DEBUG_INFO=3D0 -!endif - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SeCPolicyInitDxe.inf -!endif - -!if $(FTPM_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/Tpm2DeviceSeCDxe.inf - SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf{ - - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf - PcdLib|MdePkg/Library\DxePcdLib/DxePcdLib.inf - Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2Devi= ceLibSeC.inf - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/FtpmSmm.inf -!endif !if $(TPM_ENABLED) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { @@ -1275,24 +1061,23 @@ [Components.X64] # # EDK II Related Platform codes # - $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf{ + Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf{ !if $(TARGET) !=3D RELEASE DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSeria= lPort.inf !endif PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } - $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf - $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf + Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf + Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf + Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf =20 - $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf - $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PlatformCpuPolicy.inf - $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf - $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf + Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf + Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformC= puPolicy.inf + Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf !if $(GOP_DRIVER_ENABLE) =3D=3D TRUE - $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf + Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf =20 !endif =20 @@ -1303,13 +1088,15 @@ [Components.X64] MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf UefiCpuPkg/CpuDxe/CpuDxe.inf + UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf - $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnS= mmSwDispatchThunk.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/PowerManagement2.inf - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/DigitalThermalSensor.inf + + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerMana= gement2.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalTh= ermalSensor.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/GraphicDx= eInitSmm.inf =20 # # ACPI @@ -1322,14 +1109,14 @@ [Components.X64] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } + MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 - $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiTables.inf + Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf =20 - $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf + Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf =20 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsRes= ourceTableDxe.inf =20 @@ -1339,31 +1126,23 @@ [Components.X64] MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf =20 =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/ISPDxe.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf =20 =20 -# -# ISA -# - $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf - IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf - IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf - IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf -# -# SDIO -# -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcHost.inf -# $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECT= URE)/MmcMediaDevice.inf + # + # ISA + # + Vlv2TbltDevicePkg/PcuSio/PcuSio.inf + MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf + !if $(ACPI50_ENABLE) =3D=3D TRUE MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerf= ormanceDxe.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerf= ormanceSmm.inf { - TimerLib|$(PLATFORM_PACKAGE)/Library/IntelPchAcpiTimerLib/IntelPchAc= piTimerLib.inf + TimerLib|Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpi= TimerLib.inf } !endif =20 @@ -1371,7 +1150,6 @@ [Components.X64] # IDE/SCSI/AHCI # MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf @@ -1395,7 +1173,7 @@ [Components.X64] gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } !if $(SATA_ENABLE) =3D=3D TRUE - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SataController.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataContr= oller.inf !endif MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf !if $(SCSI_ENABLE) =3D=3D TRUE @@ -1408,7 +1186,6 @@ [Components.X64] MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf - IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -1432,9 +1209,9 @@ [Components.X64] # SMBIOS # MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf - $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf + Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/SmbiosMemory.inf + Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # @@ -1449,12 +1226,6 @@ [Components.X64] # !include NetworkPkg/Network.dsc.inc =20 -!if $(NETWORK_ENABLE) =3D=3D TRUE - !if $(CSM_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Snp16Dxe.inf - !endif -!endif - !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE) MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf @@ -1472,7 +1243,7 @@ [Components.X64] DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLi= b.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf } !endif =20 @@ -1484,11 +1255,7 @@ [BuildOptions] # # Define token for different Platform # -!if $(MINNOW2_FSP_BUILD) =3D=3D TRUE - DEFINE MINNOW2_FSP_OPTION =3D /DMINNOW2_FSP_BUILD -!else DEFINE MINNOW2_FSP_OPTION =3D -!endif =20 !if $(ENBDT_PF_BUILD) =3D=3D TRUE DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D1 @@ -1527,11 +1294,6 @@ [BuildOptions] DEFINE X64_BUILD_ENABLE =3D !endif =20 -!if $(FTPM_ENABLE) =3D=3D TRUE - DEFINE DSC_FTPM_BUILD_OPTIONS =3D /DFTPM_ENABLE -!else - DEFINE DSC_FTPM_BUILD_OPTIONS =3D -!endif !if $(TPM_ENABLED) =3D=3D TRUE DEFINE DSC_TPM_BUILD_OPTIONS =3D /DTPM_ENABLED !else @@ -1539,7 +1301,7 @@ [BuildOptions] !endif =20 =20 - DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_BUILD_OPTIONS) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS)= $(DSC_TPM_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) + DEFINE EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS =3D $(MINNOW2_FSP_OPTION) $(M= INNOW2_BUILD_OPTION) $(ENBDT_PF_ENABLE) $(EXTERNAL_VGA_BUILD_OPTION) $(PCIE= _ENUM_WA_BUILD_OPTION) $(X0_WA_ENABLE_BUILD_OPTION) $(A0_WA_ENABLE_BUILD_OP= TION) $(MICROCODE_FREE_BUILD_OPTIONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUIL= D_OPTIONS) $(COMPACT_BUILD_OPTIONS) $(VP_BUILD_OPTIONS) $(SYSCTL_ID_BUILD_O= PTION) $(CLKGEN_CONFIG_EXTRA_BUILD_OPTION) $(SYSCTL_X0_CONVERT_BOARD_OPTION= ) $(ENBDT_S3_SUPPORT_OPTIONS) $(SATA_SUPPORT_BUILD_OPTION) $(PCIESC_SUPPORT= _BUILD_OPTION) $(DSC_FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) = $(DSC_BYTI_SECURE_BOOT_BUILD_OPTIONS) !if $(PERFORMANCE_ENABLE) =3D=3D TRUE DEFINE PDB_BUILD_OPTION =3D /Zi !endif @@ -1572,76 +1334,6 @@ [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOpti= ons.common.EDKII.SMM_CORE] MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096 GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 =20 -[BuildOptions.Common.EDK] - -# -# Define token for different Platform -# -!if $(ENBDT_PF_BUILD) =3D=3D TRUE - DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D1 -!else - DEFINE ENBDT_PF_ENABLE =3D /DENBDT_PF_ENABLE=3D0 -!endif - -!if $(PERFORMANCE_ENABLE) =3D=3D TRUE - RELEASE_*_*_DLINK_FLAGS =3D /DEBUG -!endif - -!if $(S3_ENABLE) =3D=3D TRUE - DEFINE DSC_S3_BUILD_OPTIONS =3D /DEFI_S3_RESUME -!else - DEFINE DSC_S3_BUILD_OPTIONS =3D -!endif - -!if $(ENBDT_S3_SUPPORT) =3D=3D TRUE - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D /DNOCS_S3_SUPPORT -!else - DEFINE ENBDT_S3_SUPPORT_OPTIONS =3D -!endif - -!if $(X64_CONFIG) =3D=3D TRUE - DEFINE X64_BUILD_ENABLE =3D /DX64_BUILD_ENABLE=3D1 -!else - DEFINE X64_BUILD_ENABLE =3D -!endif - - - DEFINE EDK_GLUE_LIB_DEBUG =3D - DEFINE DEBUG_BUILD_OPTIONS =3D /D EFI_DEBUG /D DEBUG_MODE=3D1 /GL- $(ED= K_GLUE_LIB_DEBUG) /DEDKII_GLUE_DebugPrintErrorLevel=3D(EFI_D_ERROR) - DEFINE EDK_DSC_FEATURE_BUILD_OPTIONS =3D $(DSC_S3_BUILD_OPTIONS) $(DSC_A= CPI_BUILD_OPTIONS) $(DSC_SEC_BUILD_OPTIONS) $(DSC_FTPM_BUILD_OPTIONS) $(DSC= _FTPM_ERROR_WR_BUILD_OPTIONS) $(DSC_TPM_BUILD_OPTIONS) $(SOFTSDV_BUILD_OPTI= ONS) $(SIMICS_BUILD_OPTIONS) $(HYBRID_BUILD_OPTIONS) $(COMPACT_BUILD_OPTION= S) $(VP_BUILD_OPTIONS) $(QT_BUILD_OPTIONS) $(DSC_BYTI_SECURE_BOOT_BUILD_OPT= IONS) /D$(PROJECT_SC_CHIPSET) - - DEFINE EDK_DSC_OTHER_BUILD_OPTIONS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPT= IONS) $(SV_BUILD_OPTIONS) $(INTEL_FASTBOOT_BUILD_OPTION) - DEFINE EDK_DSC_GLOBAL_BUILD_OPTIONS =3D $(ENBDT_PF_ENABLE) $(EDK_DSC_FEA= TURE_BUILD_OPTIONS) $(EDK_DSC_OTHER_BUILD_OPTIONS) /D EFI_SPECIFICATION_VER= SION=3D0x00020000 /D PI_SPECIFICATION_VERSION=3D0x00000009 /D TIANO_RELEA= SE_VERSION=3D0x00080006 /D SUPPORT_DEPRECATED_PCI_CFG_PPI /D CSM_SMMENTRY_P= ORT8DATA8 /D EDKII_GLUE_PciExpressBaseAddress=3D0x$(PLATFORM_PCIEXPRESS_BAS= E) /D MAX_VARIABLE_SIZE=3D0x2000 /D EFI_FIRMWARE_VENDOR=3D"L/"INTEL/"" /D E= FI_BUILD_VERSION=3D"L/"EDKII/"" /DEFI_PEI_REPORT_STATUS_CODE_ON $(ENBDT_S3_= SUPPORT_OPTIONS) - - *_*_IA32_ASM_FLAGS =3D /DEFI32 /D EDKII_GLUE_PciExpressBaseAddre= ss=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT - DEBUG_*_IA32_CC_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_CC_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_VFRPP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_VFRPP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_APP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_APP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_IA32_PP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) = $(DEBUG_BUILD_OPTIONS) - RELEASE_*_IA32_PP_FLAGS =3D /D EFI32 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_IA32_ASLPP_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASLCC_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_IA32_ASM16_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - - *_*_X64_ASM_FLAGS =3D /DEFIX64 /D EDKII_GLUE_PciExpressBaseAddr= ess=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT - DEBUG_*_X64_CC_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_CC_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_VFRPP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_VFRPP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_APP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_APP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - DEBUG_*_X64_PP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS)= $(DEBUG_BUILD_OPTIONS) - RELEASE_*_X64_PP_FLAGS =3D /D EFIX64 $(EDK_DSC_GLOBAL_BUILD_OPTIONS) - *_*_X64_ASLPP_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASLCC_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D0x$= (PLATFORM_PCIEXPRESS_BASE) - *_*_X64_ASM16_FLAGS =3D /D EDKII_GLUE_PciExpressBaseAddress=3D$(P= LATFORM_PCIEXPRESS_BASE)h - # *_*_*_BUILD_FLAGS =3D -s - *_*_*_VFR_FLAGS =3D -c - *_*_*_BUILD_FLAGS =3D -c - [BuildOptions.Common.EDKII] *_*_IA32_ASM_FLAGS =3D $(VP_BUILD_OPTIONS) /D EDKII_GLUE_PciExpressB= aseAddress=3D$(PLATFORM_PCIEXPRESS_BASE)h /DNOCS_S3_SUPPORT =20 @@ -1656,25 +1348,3 @@ [BuildOptions.Common.EDKII] *_*_X64_APP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_PP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) *_*_X64_ASLPP_FLAGS =3D $(EDK_EDKII_DSC_FEATURE_BUILD_OPTIONS) - - -[Components.X64] - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cBus.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cHost.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043 - } - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cPortA0Pio.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - - $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTU= RE)/I2cMmioDeviceDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x00000043 - } - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.h b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe= .h index 53372bb922..1ba75175e1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h @@ -1,18 +1,15 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - **/ =20 #ifndef _PLAT_OVER_MNGR_H_ #define _PLAT_OVER_MNGR_H_ =20 -#include +#include =20 #include #include @@ -57,24 +54,11 @@ #include #include #include -#include + +typedef UINT16 STRING_REF; + extern EFI_HII_HANDLE mHiiHandle; =20 -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 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupD= xe.inf index 6d7e7c3f6c..ae100df26d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf @@ -1,11 +1,8 @@ # # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
-# = =20 +# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# # # This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this pro= tocol doesn't exist. # It doesn't install again if this protocol exists. @@ -63,7 +60,6 @@ [Sources] [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec #for PchAccess.h SecurityPkg/SecurityPkg.dec @@ -94,10 +90,6 @@ [Guids] # # gEfiCallerIdGuid ## Private ## Variable:L"= PlatDriOver" gEfiIfrTianoGuid ## CONSUMES ## Guid - gEfiProcessorSubClassGuid - gEfiMiscSubClassGuid - gEfiCacheSubClassGuid - gEfiMemorySubClassGuid gEfiPlatformInfoGuid gEfiNormalSetupGuid gEfiSecureBootEnableDisableGuid @@ -123,8 +115,6 @@ [Protocols] gEfiDevicePathToTextProtocolGuid ## CONSUMED gEdkiiFormBrowserEx2ProtocolGuid =20 - gEfiDataHubProtocolGuid - gEfiLegacyBiosProtocolGuid gEfiSimpleNetworkProtocolGuid =20 gEfiDiskInfoProtocolGuid ## CONSUMED diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRec= ords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords= .c index c404ada588..fb82cdb984 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 SetupInfoRecords.c @@ -19,7 +16,6 @@ Revision History: --*/ =20 #include "PlatformSetupDxe.h" -#include #include #include #include @@ -31,7 +27,6 @@ Revision History: #include #include #include -#include #include =20 #include "Valleyview.h" @@ -1172,11 +1167,6 @@ UpdatePlatformInformation ( { UINT32 MicroCodeVersion; CHAR16 Buffer[40]; - UINT8 IgdVBIOSRevH; - UINT8 IgdVBIOSRevL; - UINT16 EDX; - EFI_IA32_REGISTER_SET RegSet; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios =3D NULL; EFI_STATUS Status; UINT8 CpuFlavor=3D0; EFI_PEI_HOB_POINTERS GuidHob; @@ -1202,35 +1192,6 @@ UpdatePlatformInformation ( } } =20 - // - //VBIOS version - // - Status =3D gBS->LocateProtocol( - &gEfiLegacyBiosProtocolGuid, - NULL, - (void **)&LegacyBios - ); - if (!EFI_ERROR (Status)) { - RegSet.X.AX =3D 0x5f01; - Status =3D LegacyBios->Int86 (LegacyBios, 0x10, &RegSet); - ASSERT_EFI_ERROR(Status); - - // - // simulate AMI int15 (ax=3D5f01) handler - // check NbInt15.asm in AMI code for asm edition - // - EDX =3D (UINT16)((RegSet.E.EBX >> 16) & 0xffff); - IgdVBIOSRevH =3D (UINT8)(((EDX & 0x0F00) >> 4) | (EDX & 0x000F)); - IgdVBIOSRevL =3D (UINT8)(((RegSet.X.BX & 0x0F00) >> 4) | (RegSet.X.BX & = 0x000F)); - - if (IgdVBIOSRevH=3D=3D0 && IgdVBIOSRevL=3D=3D0){ - HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), L= "N/A", NULL); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%02X%02X", IgdVBIOSRevH,IgdV= BIOSRevL); - HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), B= uffer, NULL); - } - } - Status =3D GetGOPDriverName(Name); =20 if (!EFI_ERROR(Status)) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c index 8b46fbdfd1..14b9250e99 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 Platform.c @@ -70,26 +68,9 @@ UINT8 mTco1Sources[] =3D { IchnNmi }; =20 -UINTN -DevicePathSize ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ); - VOID S4S5ProgClock(); =20 -EFI_STATUS -InitRuntimeScriptTable ( - IN EFI_SYSTEM_TABLE *SystemTable - ); - -VOID -S5SleepWakeOnRtcCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext - ); - - VOID EnableS5WakeOnRtc(); =20 @@ -98,12 +79,6 @@ HexToBcd( UINT8 HexValue ); =20 -UINT8 -BcdToHex( - IN UINT8 BcdValue - ); - - VOID CpuSmmSxWorkAround( ); @@ -779,46 +754,6 @@ DummyTco1Callback ( { } =20 -UINTN -DevicePathSize ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - EFI_DEVICE_PATH_PROTOCOL *Start; - - if (DevicePath =3D=3D NULL) { - return 0; - } - - // - // Search for the end of the device path structure - // - Start =3D DevicePath; - while (!IsDevicePathEnd (DevicePath)) { - DevicePath =3D NextDevicePathNode (DevicePath); - } - - // - // Compute the size and add back in the size of the end device path stru= cture - // - return ((UINTN)DevicePath - (UINTN)Start) + sizeof(EFI_DEVICE_PATH_PROTO= COL); -} - -/** - - @param DispatchHandle The handle of this callback, obtained when regis= tering - @param DispatchContext The predefined context which contained sleep typ= e and phase - -**/ -VOID -S5SleepWakeOnRtcCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext - ) -{ - EnableS5WakeOnRtc(); -} - /** =20 @retval 1. Check Alarm interrupt is not set. @@ -981,17 +916,3 @@ HexToBcd( return ((UINT8)(LowByte + (HighByte << 4))); } =20 -UINT8 -BcdToHex( - IN UINT8 BcdValue - ) -{ - UINTN HighByte; - UINTN LowByte; - - HighByte =3D (UINTN)((BcdValue >> 4) * 10); - LowByte =3D (UINTN)(BcdValue & 0x0F); - - return ((UINT8)(LowByte + HighByte)); -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf index 1b7b05d9b3..3c4f55cf54 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf @@ -1,11 +1,8 @@ # # -# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# # # Module Name: # @@ -51,16 +48,8 @@ [LibraryClasses] =20 [Guids] gEfiSetupVariableGuid - gDmiDataGuid - gEfiAcpiVariableCompatiblityGuid - gEfiPciLanInfoGuid - gEfiPciLanInfoGuid - -[FeaturePcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode =20 [Protocols] - gEfiSmmBase2ProtocolGuid gEfiSmmIchnDispatchProtocolGuid gEfiGlobalNvsAreaProtocolGuid gEfiSmmSwDispatchProtocolGuid @@ -75,13 +64,11 @@ [Packages] IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec =20 [Pcd.common] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress =20 [Depex] - gEfiSmmBase2ProtocolGuid AND gEfiSmmAccess2ProtocolGuid AND gEfiSmmPowerButtonDispatchProtocolGuid AND gEfiSmmSxDispatchProtocolGuid AND diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c b/Platfo= rm/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c index 19089233b2..7bd0270655 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 IchS3Save.c @@ -23,52 +20,6 @@ Revision History extern UINT16 mAcpiBaseAddr; EFI_PHYSICAL_ADDRESS mRuntimeScriptTableBase; =20 -EFI_STATUS -InitRuntimeScriptTable ( - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - UINT32 VarAttrib; - UINTN VarSize; - ACPI_VARIABLE_SET_COMPATIBILITY *AcpiVariableBase; - - // - // Allocate runtime ACPI script table space. We need it to save some - // settings done by CSM, which runs after normal script table closed - // - Status =3D gBS->AllocatePages ( - AllocateAnyPages, - EfiACPIReclaimMemory, - 1, - &mRuntimeScriptTableBase - ); - if (EFI_ERROR(Status)) { - return EFI_OUT_OF_RESOURCES ; - } - - // - // Save runtime script table base into global ACPI variable - // - VarAttrib =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACC= ESS - | EFI_VARIABLE_NON_VOLATILE; - VarSize =3D sizeof (UINTN); - Status =3D SystemTable->RuntimeServices->GetVariable ( - ACPI_GLOBAL_VARIABLE, - &gEfiAcpiVariableCompatiblityGuid, - &VarAttrib, - &VarSize, - &AcpiVariableBase - ); - if (EFI_ERROR(Status)) { - return Status; - } - - AcpiVariableBase->RuntimeScriptTableBase =3D mRuntimeScriptTableBase; - - return EFI_SUCCESS; -} - EFI_STATUS SaveRuntimeScriptTable ( VOID diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h index 8bf2ebafc1..bcb1d8ae92 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 SmmPlatform.h @@ -35,7 +33,6 @@ Abstract: #include #include #include "Protocol/GlobalNvsArea.h" -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf b/Pla= tform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf index 331076a2d4..2c0a13f6af 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf @@ -1,9 +1,8 @@ #/*++ # -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent -# =20 # # Module Name: # @@ -29,7 +28,6 @@ [Sources] [Packages] MdePkg/MdePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2SocBinPkg/Vlv2SocBinPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec =20 [LibraryClasses] diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardMa= nufacturerFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscB= aseBoardManufacturerFunction.c index aa8c213d83..4e02486853 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufactu= rerFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufactu= rerFunction.c @@ -1,10 +1,8 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 - =20 Module Name: =20 @@ -138,7 +136,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) &MacStr ); if (EFI_ERROR (Status)) {=09 - return Status; + MacStr =3D L"000000000000"; } SerialNumber =3D MacStr; =20 SerialNumStrLen =3D StrLen(SerialNumber); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c index 15c180129c..81b66ce9af 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c @@ -1,13 +1,9 @@ /*++ =20 -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved. - = =20 +Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - - Module Name: =20 MiscOemType0x94Function.c @@ -36,7 +32,6 @@ Abstract: #include =20 #include -#include #include #include #include @@ -527,11 +522,6 @@ UpdatePlatformInformation ( { UINT32 MicroCodeVersion; CHAR16 Buffer[40]; - UINT8 IgdVBIOSRevH; - UINT8 IgdVBIOSRevL; - UINT16 EDX; - EFI_IA32_REGISTER_SET RegSet; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios =3D NULL; EFI_STATUS Status; UINT8 CpuFlavor=3D0; EFI_PEI_HOB_POINTERS GuidHob; @@ -561,34 +551,6 @@ UpdatePlatformInformation ( } } =20 - // - //VBIOS version - // - Status =3D gBS->LocateProtocol( - &gEfiLegacyBiosProtocolGuid, - NULL, - (VOID **)&LegacyBios - ); - - RegSet.X.AX =3D 0x5f01; - Status =3D LegacyBios->Int86 (LegacyBios, 0x10, &RegSet); - ASSERT_EFI_ERROR(Status); - - // - // simulate AMI int15 (ax=3D5f01) handler - // check NbInt15.asm in AMI code for asm edition - // - EDX =3D (UINT16)((RegSet.E.EBX >> 16) & 0xffff); - IgdVBIOSRevH =3D (UINT8)(((EDX & 0x0F00) >> 4) | (EDX & 0x000F)); - IgdVBIOSRevL =3D (UINT8)(((RegSet.X.BX & 0x0F00) >> 4) | (RegSet.X.BX & = 0x000F)); - - if (IgdVBIOSRevH=3D=3D0 && IgdVBIOSRevL=3D=3D0) { - HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), L= "N/A", NULL); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%02X%02X", IgdVBIOSRevH,IgdV= BIOSRevL); - HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), B= uffer, NULL); - } - Status =3D TGetGOPDriverName(Name); =20 if(!EFI_ERROR(Status)) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManuf= acturerFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSyst= emManufacturerFunction.c index 63c4f50ed5..f537e0db76 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturer= Function.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturer= Function.c @@ -1,10 +1,8 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 - =20 Module Name: =20 @@ -219,8 +217,8 @@ AddSmbiosManuCallback ( NULL, &MacStr ); - if (EFI_ERROR (Status)) {=09 - return Status; + if (EFI_ERROR (Status)) { + MacStr =3D L"000000000000"; } SerialNumber =3D MacStr;=20 SerialNumStrLen =3D StrLen(SerialNumber); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf index 9d2f5410a0..99b1a18185 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf @@ -2,12 +2,9 @@ # Component name for module MiscSubclass # # FIX ME! -# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
-# = =20 +# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+# # SPDX-License-Identifier: BSD-2-Clause-Patent -# = =20 -# -# # ## =20 @@ -87,9 +84,8 @@ [Packages] MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - NetworkPkg/NetworkPkg.dec + NetworkPkg/NetworkPkg.dec =20 [LibraryClasses] HiiLib @@ -107,13 +103,10 @@ [LibraryClasses] PrintLib CpuIA32Lib PchPlatformLib - I2cLib NetLib HobLib =20 [Guids] - gEfiProcessorSubClassGuid - gEfiCacheSubClassGuid gEfiNormalSetupGuid gEfiPlatformInfoGuid gEfiVlv2VariableGuid @@ -137,4 +130,4 @@ [Pcd] gEfiVLVTokenSpaceGuid.PcdProductSerialNumber =20 [Depex] - gEfiSmbiosProtocolGuid AND gMemInfoProtocolGuid AND gEfiMpServiceProtocol= Guid AND gEfiSimpleNetworkProtocolGuid + gEfiSmbiosProtocolGuid AND gMemInfoProtocolGuid AND gEfiMpServiceProtoco= lGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegio= n.c b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c index ba81bd9def..8fe1482106 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c @@ -1,13 +1,10 @@ =20 /*++ =20 -Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved - = =20 +Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 IgdOpRegion.c @@ -35,14 +32,12 @@ Abstract: =20 #include "IgdOpRegion.h" #include "VlvPlatformInit.h" -#include -#include +#include #include =20 #include =20 #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegio= n.h b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.h index cd1d208d61..597bdaf46a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.h @@ -1,13 +1,10 @@ =20 /*++ =20 -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved - = =20 +Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 IgdOpRegion.h @@ -36,7 +33,7 @@ Abstract: #include "VlvPlatformInit.h" #include "VlvCommonDefinitions.h" #include -#include +#include =20 // // @@ -177,24 +174,6 @@ GetSVER ( OUT UINT8 *SVER ); =20 -/** - Acquire the string associated with the ProducerGuid and return it. - - @param ProducerGuid The Guid to search the HII database for - @param Token The token value of the string to extract - @param String The string that is extracted - - @retval EFI_SUCCESS The function completed successfully - @retval EFI_NOT_FOUND The requested string was not found - -**/ -EFI_STATUS -GetStringFromToken ( - IN EFI_GUID *ProducerGuid, - IN STRING_REF Token, - OUT CHAR16 **String - ); - /** =20 Graphics OpRegion / Software SCI driver installation function. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatfor= mInitDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatf= ormInitDxe.inf index 9d277dd7cf..1e86adadb3 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf @@ -2,11 +2,10 @@ # #/*++ # -# Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# = =20 + # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 # # Module Name: # @@ -34,7 +33,6 @@ [Sources] =20 [Packages] MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat b/Platform/Intel/= Vlv2TbltDevicePkg/bld_vlv.bat index d8594053b0..8cf8938a4e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat @@ -212,8 +212,12 @@ if defined VS140COMNTOOLS ( goto :BldFail ) =20 -echo Ensuring correct build directory is present for GenBiosId... -set BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TA= G% +echo Ensuring correct build directory is present +if "%Arch%"=3D=3D"IA32" ( + set BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%IA32\%TARGET%_%TOOL_CH= AIN_TAG% +) else ( + set BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_= TAG% +) =20 echo Modifing Conf files for this build... :: Remove lines with these tags from target.txt @@ -240,16 +244,6 @@ move /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Co= nf\target.txt >nul :: Build BIOS ::********************************************************************** =20 -echo Creating BiosId... -if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 -%PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUILD_= PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat -if "%Arch%"=3D=3D"X64" ( - if not exist %BUILD_PATH%\X64 mkdir %BUILD_PATH%\X64 - %PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUI= LD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat -) - -if %ERRORLEVEL% NEQ 0 goto BldFail - echo. echo Invoking EDK2 build... call build %Build_Flags% @@ -267,31 +261,14 @@ pushd %PLATFORM_PACKAGE% %PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd > %BUILD_PATH%\FV\Hi= iDefaultData.txt =20 :: save changes to VlvXXX.fd -%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s %BUILD_PATH%\FV= \HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv%Arch%.fd +%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s %BUILD_PATH%\FV= \HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv.ROM popd =20 if %ERRORLEVEL% NEQ 0 goto BldFail ::echo FD successfully updated with default Hii values. =20 -:: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environm= ent variables -find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings -for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j -del /f/q ver_strings >nul - -set BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MI= NOR%.ROM -copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd %PLATFORM_PACKAGE%\Stitch\%BIOS_Na= me% >nul -copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd %BUILD_PATH%\FV\Vlv.ROM >nul - -echo. -echo Build location: %BUILD_PATH% -echo BIOS ROM Created: %BIOS_Name% -echo. -echo -------------------- The EDKII BIOS build has successfully completed.= -------------------- -echo. - @REM build capsule here -echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv -build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc +call build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc =20 goto Exit =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43062): https://edk2.groups.io/g/devel/message/43062 Mute This Topic: https://groups.io/mt/32267618/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43063+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43063+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949763; cv=none; d=zoho.com; s=zohoarc; b=cYi/IYOXXYuiM7mm7JiqwxOgQifH5LlFCAUg44HUkCJe3BhnW7TiGrApK0auQo5Tzj2IP9aEn3wvJ3ZtM+ZazI26zlHSKkxqWy9uukGQ4qvoXlfb2WZtfclXjzmVxXmZmnvYpxn+AKHnG/QTZ3b85Watm4gFNoR2ElwIMQ04io8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949763; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=kTshOJ8y1qjCJYd0mVUvv+EJsbwbRa/zWVhhEN7Hs0A=; b=j7bHL0B5Yo2TImcAJo20EFVvvGxMPAchx5Jk1Ud3uWLl6So170M6jpOfBnUalgSe/18T9e6LJNuQdk5V+0ULQwQcAXKNNJVwpQcApkZMobda/10r0EnDsUQJOR7rOLbsRegoeE52d0tcVr/5GFnQMWBrGd+wErRMaZQKsPQ0Xx0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43063+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156194976360667.56626281470767; Sun, 30 Jun 2019 19:56:03 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480182" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:55:58 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 03/14] Vlv2TbltDevicePkg: Remove unused modules/libraries Date: Sun, 30 Jun 2019 19:55:42 -0700 Message-Id: <20190701025553.18596-4-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949762; bh=Luj/7AAceYj0IIYPZ+TlJX7h/pBxVwK7vjlelWAHZo0=; h=Cc:Date:From:Reply-To:Subject:To; b=QY4pBMqYJo7KXE4+98426S0Juvut60mSYUT7a2tQailZWCk1gPor48oM4RpF4nWi7d8 Y0LSnKFpIVDH+PrgkpceHSXphEYZiHfOw9gRNh3c7FCrcbQwibRKrpf53dKC/nQOmsAU6 lWXd5LxnW09P6N2QPtcufWBZoMD/UEGPae8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Delete platform specific SerialPortLib * Delete platform specific Metronome module * Delete platform specific BootScriptSaveDxe module * Delete SmmSwDispatch2OnSmmSwDispatchThunk module * Delete SmramSaveInfoHandlerSmm module * Delete unused FSP content * Delete unused I2C content * Delete unused Stitch content * Delete unused portions of PlatformSmm module Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../BootScriptSaveDxe/BootScriptSaveDxe.inf | 60 -- .../InternalBootScriptSave.h | 102 --- .../BootScriptSaveDxe/ScriptSave.c | 626 --------------- .../FspAzaliaConfigData/AzaliaConfig.bin | Bin 3708 -> 0 bytes .../FspSupport/BootModePei/BootModePei.c | 42 - .../FspSupport/BootModePei/BootModePei.inf | 40 - .../FspHobProcessLibVlv2.c | 421 ---------- .../FspHobProcessLibVlv2.inf | 74 -- .../FspPlatformSecLibVlv2.c | 144 ---- .../FspPlatformSecLibVlv2.inf | 82 -- .../Ia32/AsmSaveSecContext.asm | 45 -- .../SecFspPlatformSecLibVlv2/Ia32/Fsp.inc | 45 -- .../Ia32/PeiCoreEntry.asm | 135 ---- .../Ia32/SecEntry.asm | 338 -------- .../SecFspPlatformSecLibVlv2/Ia32/Stack.S | 71 -- .../SecFspPlatformSecLibVlv2/Ia32/Stack.asm | 76 -- .../SecFspPlatformSecLibVlv2/PlatformInit.c | 36 - .../SecFspPlatformSecLibVlv2/SaveSecContext.c | 108 --- .../SecGetPerformance.c | 83 -- .../SecPlatformInformation.c | 77 -- .../SecFspPlatformSecLibVlv2/SecRamInitData.c | 16 - .../SecTempRamSupport.c | 149 ---- .../SecFspPlatformSecLibVlv2/UartInit.c | 192 ----- .../Include/Protocol/TpmMp.h | 136 ---- .../Include/Protocol/UsbPolicy.h | 126 --- .../Vlv2TbltDevicePkg/Library/I2CLib/I2CLib.c | 46 -- .../Library/I2CLib/I2CLibNull.inf | 39 - .../Library/I2CLibDxe/I2CLib.c | 735 ------------------ .../Library/I2CLibDxe/I2CLibDxe.inf | 39 - .../Library/I2CLibDxe/I2CRegs.h | 126 --- .../Library/I2CLibPei/I2CAccess.h | 44 -- .../Library/I2CLibPei/I2CDelayPei.c | 46 -- .../Library/I2CLibPei/I2CDelayPei.h | 30 - .../Library/I2CLibPei/I2CIoLibPei.c | 178 ----- .../Library/I2CLibPei/I2CIoLibPei.h | 153 ---- .../Library/I2CLibPei/I2CLibPei.c | 638 --------------- .../Library/I2CLibPei/I2CLibPei.h | 280 ------- .../Library/I2CLibPei/I2CLibPei.inf | 40 - .../Library/PlatformFspLib/PlatformFspLib.c | 44 -- .../Library/PlatformFspLib/PlatformFspLib.inf | 49 -- .../SerialPortLib/PlatformSerialPortLib.h | 53 -- .../Library/SerialPortLib/SerialPortLib.c | 246 ------ .../Library/SerialPortLib/SerialPortLib.inf | 52 -- .../Library/SerialPortLib/SioInit.c | 127 --- .../Library/SerialPortLib/SioInit.h | 62 -- .../Metronome/LegacyMetronome.c | 185 ----- .../Metronome/LegacyMetronome.h | 64 -- .../Vlv2TbltDevicePkg/Metronome/Metronome.inf | 49 -- .../PlatformSmm/SmmScriptSave.c | 252 ------ .../PlatformSmm/SmmScriptSave.h | 50 -- .../SmmSwDispatch2OnSmmSwDispatchThunk.c | 459 ----------- .../SmmSwDispatch2OnSmmSwDispatchThunk.inf | 54 -- .../SmramSaveInfoHandlerSmm.c | 164 ---- .../SmramSaveInfoHandlerSmm.inf | 60 -- .../Stitch/IFWIHeader/Vacant.bin | Bin 3928064 -> 0 bytes .../Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat | 270 ------- .../Stitch/MNW2_Stitch_Config.txt | 10 - 57 files changed, 7868 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/Boot= ScriptSaveDxe.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/Inte= rnalBootScriptSave.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/Scri= ptSave.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspAzaliaConfigData/Az= aliaConfig.bin delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei= /BootModePei.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei= /BootModePei.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Pei= FspHobProcessLibVlv2/FspHobProcessLibVlv2.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Pei= FspHobProcessLibVlv2/FspHobProcessLibVlv2.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/FspPlatformSecLibVlv2.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/FspPlatformSecLibVlv2.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/AsmSaveSecContext.asm delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/Fsp.inc delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/PeiCoreEntry.asm delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/SecEntry.asm delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/Stack.S delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/Ia32/Stack.asm delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/PlatformInit.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/SaveSecContext.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/SecGetPerformance.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/SecPlatformInformation.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/SecRamInitData.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/SecTempRamSupport.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/Sec= FspPlatformSecLibVlv2/UartInit.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/TpmMp= .h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/UsbPo= licy.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLib.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLibN= ull.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CL= ib.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CL= ibDxe.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CR= egs.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CA= ccess.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CD= elayPei.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CD= elayPei.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CI= oLibPei.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CI= oLibPei.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CL= ibPei.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CL= ibPei.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CL= ibPei.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib= /PlatformFspLib.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib= /PlatformFspLib.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/= PlatformSerialPortLib.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/= SerialPortLib.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/= SerialPortLib.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/= SioInit.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/= SioInit.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetron= ome.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetron= ome.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Metronome/Metronome.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptS= ave.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptS= ave.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwD= ispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwD= ispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSm= m/SmramSaveInfoHandlerSmm.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSm= m/SmramSaveInfoHandlerSmm.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIHeader/Vaca= nt.bin delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Stitch/MNW2_Stitch_Con= fig.txt diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/BootScriptS= aveDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/BootScriptS= aveDxe.inf deleted file mode 100644 index d2fa621096..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/BootScriptSaveDxe.= inf +++ /dev/null @@ -1,60 +0,0 @@ -# -# -## @file -# Component description file for ScriptSave Lite module. -# -# This is an implementation of the Boot Script Save protocol. -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D BootScriptSaveDxe - FILE_GUID =3D 42BB673D-09F3-4e2e-9FEE-D081131DED5B - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - - ENTRY_POINT =3D InitializeScriptSave - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - ScriptSave.c - InternalBootScriptSave.h - - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - MdeModulePkg/MdeModulePkg.dec - - -[LibraryClasses] - PcdLib - UefiRuntimeServicesTableLib - UefiBootServicesTableLib - MemoryAllocationLib - UefiDriverEntryPoint - BaseMemoryLib - DebugLib - BaseLib - S3BootScriptLib - -[Protocols] - gEfiBootScriptSaveProtocolGuid # PROTOCOL ALWAYS_PRODUCED - - -[Depex] - TRUE - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/InternalBoo= tScriptSave.h b/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/Internal= BootScriptSave.h deleted file mode 100644 index f232281e2b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/InternalBootScript= Save.h +++ /dev/null @@ -1,102 +0,0 @@ -/** @file -// -// - Internal header file for S3 Boot Script Saver driver. - - Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ - -#ifndef _INTERNAL_BOOT_SCRIPT_SAVE_H_ -#define _INTERNAL_BOOT_SCRIPT_SAVE_H_ -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/** - Adds a record into a specified Framework boot script table. - - This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script re= cord - will be added into the new table. A boot script table can add new script= records - until EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is called. Currently, t= he only - meaningful table name is EFI_ACPI_S3_RESUME_SCRIPT_TABLE. This function = is - responsible for allocating necessary memory for the script. - - This function has a variable parameter list. The exact parameter list de= pends on - the OpCode that is passed into the function. If an unsupported OpCode or= illegal - parameter list is passed in, this function returns EFI_INVALID_PARAMETER. - If there are not enough resources available for storing more scripts, th= is function returns - EFI_OUT_OF_RESOURCES. - - @param[in] This A pointer to the EFI_BOOT_SCRIPT_SAVE_P= ROTOCOL instance. - @param[in] TableName Name of the script table. Currently, th= e only meaningful value is - EFI_ACPI_S3_RESUME_SCRIPT_TABLE. - @param[in] OpCode The operation code (opcode) number. - @param[in] ... Argument list that is specific to each = opcode. - - @retval EFI_SUCCESS The operation succeeded. A record was a= dded into the - specified script table. - @retval EFI_INVALID_PARAMETER The parameter is illegal or the given b= oot script is not supported. - If the opcode is unknow or not supporte= d because of the PCD - Feature Flags. - @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store t= he boot script. - -**/ -EFI_STATUS -EFIAPI -BootScriptWrite ( - IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This, - IN UINT16 TableName, - IN UINT16 OpCode, - ... - ); - -/** - Closes the specified script table. - - This function closes the specified boot script table and returns the bas= e address - of the table. It allocates a new pool to duplicate all the boot scripts = in the specified - table. Once this function is called, the specified table will be destroy= ed after it is - copied into the allocated pool. As a result, any attempts to add a scrip= t record into a - closed table will cause a new table to be created. The base address of t= he allocated pool - will be returned in Address. After using the boot script table, the call= er is responsible - for freeing the pool that is allocated by this function. If the boot scr= ipt table, - such as EFI_ACPI_S3_RESUME_SCRIPT_TABLE, is required to be stored in a n= onperturbed - memory region, the caller should copy the table into the nonperturbed me= mory region by itself. - - @param[in] This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROT= OCOL instance. - @param[in] TableName Name of the script table. Currently, the o= nly meaningful value is - EFI_ACPI_S3_RESUME_SCRIPT_TABLE. - @param[in] Address A pointer to the physical address where th= e table begins. - - @retval EFI_SUCCESS The table was successfully returned. - @retval EFI_NOT_FOUND The specified table was not created previo= usly. - @retval EFI_OUT_OF_RESOURCE Memory is insufficient to hold the reorgan= ized boot script table. - @retval EFI_UNSUPPORTED The table type is not EFI_ACPI_S3_RESUME_S= CRIPT_TABLE. - -**/ -EFI_STATUS -EFIAPI -BootScriptCloseTable ( - IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This, - IN UINT16 TableName, - OUT EFI_PHYSICAL_ADDRESS *Address - ); -#endif //_INTERNAL_BOOT_SCRIPT_SAVE_H_ diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/ScriptSave.= c b/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/ScriptSave.c deleted file mode 100644 index 837a8c95cd..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BootScriptSaveDxe/ScriptSave.c +++ /dev/null @@ -1,626 +0,0 @@ -/** @file - Implementation for S3 Boot Script Saver driver. - -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ - -#include "InternalBootScriptSave.h" - -EFI_HANDLE mHandle =3D NULL; -EFI_BOOT_SCRIPT_SAVE_PROTOCOL mS3ScriptSave =3D { - BootScriptWrite, - BootScriptCloseTable - }; - -/** - Internal function to add IO write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptIoWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINTN Count; - UINT8 *Buffer; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Count =3D VA_ARG (Marker, UINTN); - Buffer =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer); -} - -/** - Internal function to add IO read/write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptIoReadWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINT8 *Data; - UINT8 *DataMask; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Data =3D VA_ARG (Marker, UINT8 *); - DataMask =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask); -} - -/** - Internal function to add memory write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptMemWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINTN Count; - UINT8 *Buffer; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Count =3D VA_ARG (Marker, UINTN); - Buffer =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSaveMemWrite (Width, Address, Count, Buffer); -} - -/** - Internal function to add memory read/write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptMemReadWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINT8 *Data; - UINT8 *DataMask; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Data =3D VA_ARG (Marker, UINT8 *); - DataMask =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSaveMemReadWrite (Width, Address, Data, DataMask); -} - -/** - Internal function to add PciCfg write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptPciCfgWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINTN Count; - UINT8 *Buffer; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Count =3D VA_ARG (Marker, UINTN); - Buffer =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSavePciCfgWrite (Width, Address, Count, Buffer); -} - -/** - Internal function to PciCfg read/write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptPciCfgReadWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINT8 *Data; - UINT8 *DataMask; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Data =3D VA_ARG (Marker, UINT8 *); - DataMask =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSavePciCfgReadWrite (Width, Address, Data, DataMask); -} - -/** - Internal function to add PciCfg2 write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptPciCfg2Write ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINTN Count; - UINT8 *Buffer; - UINT16 Segment; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Count =3D VA_ARG (Marker, UINTN); - Buffer =3D VA_ARG (Marker, UINT8 *); - Segment =3D VA_ARG (Marker, UINT16); - - return S3BootScriptSavePciCfg2Write (Width, Segment, Address, Count, Buf= fer); -} - -/** - Internal function to PciCfg2 read/write opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptPciCfg2ReadWrite ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT16 Segment; - UINT64 Address; - UINT8 *Data; - UINT8 *DataMask; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - Segment =3D VA_ARG (Marker, UINT16); - Data =3D VA_ARG (Marker, UINT8 *); - DataMask =3D VA_ARG (Marker, UINT8 *); - - return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, = DataMask); -} - -/** - Internal function to add smbus execute opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptSmbusExecute ( - IN VA_LIST Marker - ) -{ - EFI_SMBUS_DEVICE_ADDRESS SlaveAddress; - EFI_SMBUS_DEVICE_COMMAND Command; - EFI_SMBUS_OPERATION Operation; - BOOLEAN PecCheck; - VOID *Buffer; - UINTN *DataSize; - UINTN SmBusAddress; - - SlaveAddress.SmbusDeviceAddress =3D VA_ARG (Marker, UINTN); - Command =3D VA_ARG (Marker, EFI_SMBUS_DEVICE_COM= MAND); - Operation =3D VA_ARG (Marker, EFI_SMBUS_OPERATION); - PecCheck =3D VA_ARG (Marker, BOOLEAN); - SmBusAddress =3D SMBUS_LIB_ADDRESS (SlaveAddress.Smbu= sDeviceAddress,Command,0,PecCheck); - DataSize =3D VA_ARG (Marker, UINTN *); - Buffer =3D VA_ARG (Marker, VOID *); - - return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, = Buffer); -} - -/** - Internal function to add stall opcode to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptStall ( - IN VA_LIST Marker - ) -{ - UINT32 Duration; - - Duration =3D VA_ARG (Marker, UINT32); - - return S3BootScriptSaveStall (Duration); -} - -/** - Internal function to add Save jmp address according to DISPATCH_OPCODE. - We ignore "Context" parameter. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptDispatch ( - IN VA_LIST Marker - ) -{ - VOID *EntryPoint; - - EntryPoint =3D (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); - return S3BootScriptSaveDispatch (EntryPoint); -} - -/** - Internal function to add memory pool operation to the table. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptMemPoll ( - IN VA_LIST Marker - ) -{ - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - UINT8 *BitMask; - UINT8 *BitValue; - UINTN Duration; - UINT64 LoopTimes; - - Width =3D VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address =3D VA_ARG (Marker, UINT64); - BitMask =3D VA_ARG (Marker, UINT8 *); - BitValue =3D VA_ARG (Marker, UINT8 *); - Duration =3D (UINTN)VA_ARG (Marker, UINT64); - LoopTimes =3D VA_ARG (Marker, UINT64); - - return S3BootScriptSaveMemPoll (Width, Address, BitMask, BitValue, Durat= ion, LoopTimes); -} - -/** - Internal function to add Save jmp address according to DISPATCH_OPCODE2. - The "Context" parameter is not ignored. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enough resource to do operation. - @retval EFI_SUCCESS Opcode is added. - -**/ -EFI_STATUS -BootScriptDispatch2 ( - IN VA_LIST Marker - ) -{ - VOID *EntryPoint; - VOID *Context; - - EntryPoint =3D (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); - Context =3D (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); - - return S3BootScriptSaveDispatch2 (EntryPoint, Context); -} - -/** - Internal function to add the opcode link node to the link list. - - @param Marker The variable argument list to get the opco= de - and associated attributes. - - @retval EFI_OUT_OF_RESOURCES Not enought resource to complete the opera= tions. - @retval EFI_SUCCESS The opcode entry is added to the link list - successfully. -**/ -EFI_STATUS -BootScriptInformation ( - IN VA_LIST Marker - ) -{ - UINT32 InformationLength; - EFI_PHYSICAL_ADDRESS Information; - - InformationLength =3D VA_ARG (Marker, UINT32); - Information =3D VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); - return S3BootScriptSaveInformation (InformationLength, (VOID*)(UINTN)Inf= ormation); -} - -/** - Adds a record into a specified Framework boot script table. - - This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script re= cord - will be added into the new table. A boot script table can add new script= records - until EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is called. Currently, t= he only - meaningful table name is EFI_ACPI_S3_RESUME_SCRIPT_TABLE. This function = is - responsible for allocating necessary memory for the script. - - This function has a variable parameter list. The exact parameter list de= pends on - the OpCode that is passed into the function. If an unsupported OpCode or= illegal - parameter list is passed in, this function returns EFI_INVALID_PARAMETER. - If there are not enough resources available for storing more scripts, th= is function returns - EFI_OUT_OF_RESOURCES. - - @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROT= OCOL instance. - @param TableName Name of the script table. Currently, the o= nly meaningful value is - EFI_ACPI_S3_RESUME_SCRIPT_TABLE. - @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opc= ode. - - @retval EFI_SUCCESS The operation succeeded. A record was adde= d into the - specified script table. - @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot= script is not supported. - If the opcode is unknow or not supported b= ecause of the PCD - Feature Flags. - @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the = boot script. - -**/ -EFI_STATUS -EFIAPI -BootScriptWrite ( - IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This, - IN UINT16 TableName, - IN UINT16 OpCode, - ... - ) -{ - EFI_STATUS Status; - VA_LIST Marker; - - if (TableName !=3D FRAMEWORK_EFI_ACPI_S3_RESUME_SCRIPT_TABLE) { - // - // Only S3 boot script is supported for now. - // - return EFI_OUT_OF_RESOURCES; - } - - // - // Build script according to opcode. - // - switch (OpCode) { - - case EFI_BOOT_SCRIPT_IO_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptIoWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptIoReadWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptMemWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptMemReadWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptPciCfgWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptPciCfgReadWrite (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptSmbusExecute (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_STALL_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptStall (Marker); - VA_END (Marker); - - break; - - case EFI_BOOT_SCRIPT_DISPATCH_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptDispatch (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptDispatch2 (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_INFORMATION_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptInformation (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_MEM_POLL_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptMemPoll (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptPciCfg2Write (Marker); - VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE: - VA_START (Marker, OpCode); - Status =3D BootScriptPciCfg2ReadWrite (Marker); - VA_END (Marker); - break; - - default: - Status =3D EFI_INVALID_PARAMETER; - break; - } - - return Status; -} - -/** - Closes the specified script table. - - This function closes the specified boot script table and returns the bas= e address - of the table. It allocates a new pool to duplicate all the boot scripts = in the specified - table. Once this function is called, the specified table will be destroy= ed after it is - copied into the allocated pool. As a result, any attempts to add a scrip= t record into a - closed table will cause a new table to be created. The base address of t= he allocated pool - will be returned in Address. After using the boot script table, the call= er is responsible - for freeing the pool that is allocated by this function. If the boot scr= ipt table, - such as EFI_ACPI_S3_RESUME_SCRIPT_TABLE, is required to be stored in a n= onperturbed - memory region, the caller should copy the table into the nonperturbed me= mory region by itself. - - @param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROT= OCOL instance. - @param TableName Name of the script table. Currently, the o= nly meaningful value is - EFI_ACPI_S3_RESUME_SCRIPT_TABLE. - @param Address A pointer to the physical address where th= e table begins. - - @retval EFI_SUCCESS The table was successfully returned. - @retval EFI_NOT_FOUND The specified table was not created previo= usly. - @retval EFI_OUT_OF_RESOURCE Memory is insufficient to hold the reorgan= ized boot script table. - @retval EFI_UNSUPPORTED The table type is not EFI_ACPI_S3_RESUME_S= CRIPT_TABLE. - -**/ -EFI_STATUS -EFIAPI -BootScriptCloseTable ( - IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This, - IN UINT16 TableName, - OUT EFI_PHYSICAL_ADDRESS *Address - ) -{ - if (TableName !=3D FRAMEWORK_EFI_ACPI_S3_RESUME_SCRIPT_TABLE) { - // - // Only S3 boot script is supported for now. - // - return EFI_NOT_FOUND; - } - *Address =3D (EFI_PHYSICAL_ADDRESS)(UINTN)S3BootScriptCloseTable (); - - if (*Address =3D=3D 0) { - return EFI_NOT_FOUND; - } - return EFI_SUCCESS; -} - -/** - This routine is entry point of ScriptSave driver. - - @param ImageHandle Handle for this drivers loaded image proto= col. - @param SystemTable EFI system table. - - @retval EFI_OUT_OF_RESOURCES No enough resource. - @retval EFI_SUCCESS Succesfully installed the ScriptSave drive= r. - @retval other Errors occured. - -**/ -EFI_STATUS -EFIAPI -InitializeScriptSave ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - return gBS->InstallProtocolInterface ( - &mHandle, - &gEfiBootScriptSaveProtocolGuid, - EFI_NATIVE_INTERFACE, - &mS3ScriptSave - ); - -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaCon= fig.bin b/Platform/Intel/Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaConfig= .bin deleted file mode 100644 index da24c02b5d25ce888c630c664095902b4bb035e7..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3708 zcmd^>Pl#JZ9LMK3`)XRdt$F?9>(+TQNqa~UwYzRL6+{xdH3}71P@h!~iwKK?QYsja zyX|(fq4Da)Ts;(X@!&zpF$WI;5lLww$LD8u(;7lcLET;q4D-G_leaV9 z`ONQ|ZR6t$o%9hYzfnH1u=3DS6uQmNdpwECI9F1+yKF{PAjL*H2Jq)QXOgh~bLdf(Yj zx{Q{=3D{HK>X>1pl1uVg3l=3DgxJ~cL&&eufBh)t{i$qa zymz6Ko;kFR$wk^39x8#&*q1$rZw$W`_Fm2JUDS6xE|21XSG|_dwU+4RE znKN}^tDE}4qiNQxW^7I6Yro`3NRa-~bRo2weO(nLeSfk1ro?RE+MR!%+@QkN| zrz?1RVBOP<7MszNaYi3BJiC@!v@JCm(@cx`ZMA0GY9(%~l4+||7vWKaClMY+c+gjQ z+voj#HEa4xy9}OWcz*^@GMnznsNr~Yq{O;PtS`?xHS5iqf=3DFDD$QES96{Kg1=3D%Vbl zMS0m3VWGl$E3CW1e9uE-M4TfHuF7zggR5SiJXdw*(`=3DpbI(mb%kTWcEhBrA2 zIYZCcqnz27oLR(~l{m8=3DXBH05tjw7?&V+lSxhFc{O#D8_N*nw2{oOocc9uFV911CMxhZ~yh!&U!3uUB~VR348M9xdb1!oZ`MA&-1bp24F$9_ib7 zy+Jd@Xo-0u1OCdZW_uj7pLY=3D(Nlvx(3VIzscz9+{7(zIzV1OU&2I*UZ;H zWLQt8t)~8r)UF%R=3DvCNs4M)egTR9b1ayTo1d^~nE5K0H#7;CB7D2Hf7NN4M@8 zHA%Q@KgMm@!(F>wZry{scKj6e=3D=3D4xMQYkzSwVSzj1AJKSaMh8|ZiFi`_ua(_elr(C^Vdb2!j{0U29Y3;+NC diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootMo= dePei.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModeP= ei.c deleted file mode 100644 index bf6c7efba5..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.c +++ /dev/null @@ -1,42 +0,0 @@ -/** @file - This PEIM will parse the hoblist from fsp and report them into pei core. - This file contains the main entrypoint of the PEIM. - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - - -#include -#include - -static EFI_PEI_PPI_DESCRIPTOR mPpiList[] =3D { - { - EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, - &gEfiPeiMasterBootModePpiGuid, - NULL - }, -}; - -/** - This is the entrypoint of PEIM - - @param FileHandle Handle of the file being invoked. - @param PeiServices Describes the list of possible PEI Services. - - @retval EFI_SUCCESS if it completed successfully. -**/ -EFI_STATUS -EFIAPI -BootModePeiEntryPoint ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - (*PeiServices)->SetBootMode(PeiServices, BOOT_WITH_FULL_CONFIGURATION); - - (*PeiServices)->InstallPpi (PeiServices, &mPpiList[0]); - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootMo= dePei.inf b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootMod= ePei.inf deleted file mode 100644 index 27200bca15..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.i= nf +++ /dev/null @@ -1,40 +0,0 @@ -## @file -# FSP PEI Module -# -# Parses the hoblist from fsp and report them into pei core. It will insta= ll -# the memory as required. -# -# Copyright (c) 2014, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D BootModePeim - FILE_GUID =3D 2B1D0832-2184-4C8F-A90D-8E4AF9DE5BCD - MODULE_TYPE =3D PEIM - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D BootModePeiEntryPoint - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 -# - -[Sources] - BootModePei.c - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - PeimEntryPoint - -[Ppis] - gEfiPeiMasterBootModePpiGuid - -[Depex] - TRUE diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobP= rocessLibVlv2/FspHobProcessLibVlv2.c b/Platform/Intel/Vlv2TbltDevicePkg/Fsp= Support/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c deleted file mode 100644 index 8a97e25bd4..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessL= ibVlv2/FspHobProcessLibVlv2.c +++ /dev/null @@ -1,421 +0,0 @@ -/** @file - Null instance of Platform Sec Lib. - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -EFI_GUID gFspReservedMemoryResourceHobTsegGuid =3D {0xd038747c, 0xd00c, 0x= 4980, {0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55}}; - -// -// Additional pages are used by DXE memory manager. -// It should be consistent between RetrieveRequiredMemorySize() and GetPei= MemSize() -// -#define PEI_ADDITIONAL_MEMORY_SIZE (16 * EFI_PAGE_SIZE) - -/** - Get the mem size in memory type infromation table. - - @param PeiServices PEI Services table. - - @return the mem size in memory type infromation table. -**/ -UINT64 -GetMemorySizeInMemoryTypeInformation ( - IN EFI_PEI_SERVICES **PeiServices - ) -{ - EFI_PEI_HOB_POINTERS Hob; - EFI_MEMORY_TYPE_INFORMATION *MemoryData; - UINT8 Index; - UINTN TempPageNum; - - MemoryData =3D NULL; - (*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES **)PeiServices, (VOI= D **) &Hob.Raw); - while (!END_OF_HOB_LIST (Hob)) { - if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_GUID_EXTENSION && - CompareGuid (&Hob.Guid->Name, &gEfiMemoryTypeInformationGuid)) { - MemoryData =3D (EFI_MEMORY_TYPE_INFORMATION *) (Hob.Raw + sizeof (EF= I_HOB_GENERIC_HEADER) + sizeof (EFI_GUID)); - break; - } - - Hob.Raw =3D GET_NEXT_HOB (Hob); - } - - if (MemoryData =3D=3D NULL) { - return 0; - } - - TempPageNum =3D 0; - for (Index =3D 0; MemoryData[Index].Type !=3D EfiMaxMemoryType; Index++)= { - // - // Accumulate default memory size requirements - // - TempPageNum +=3D MemoryData[Index].NumberOfPages; - } - - return TempPageNum * EFI_PAGE_SIZE; -} - -/** - Get the mem size need to be reserved in PEI phase. - - @param PeiServices PEI Services table. - - @return the mem size need to be reserved in PEI phase. -**/ -UINT64 -RetrieveRequiredMemorySize ( - IN EFI_PEI_SERVICES **PeiServices - ) -{ - UINT64 Size; - - Size =3D GetMemorySizeInMemoryTypeInformation (PeiServices); - return Size + PEI_ADDITIONAL_MEMORY_SIZE; -} - -/** - Get the mem size need to be consumed and reserved in PEI phase. - - @param PeiServices PEI Services table. - @param BootMode Current boot mode. - - @return the mem size need to be consumed and reserved in PEI phase. -**/ -UINT64 -GetPeiMemSize ( - IN EFI_PEI_SERVICES **PeiServices, - IN UINT32 BootMode - ) -{ - UINT64 Size; - UINT64 MinSize; - - if (BootMode =3D=3D BOOT_IN_RECOVERY_MODE) { - return PcdGet32 (PcdPeiRecoveryMinMemSize); - } - - Size =3D GetMemorySizeInMemoryTypeInformation (PeiServices); - - if (BootMode =3D=3D BOOT_ON_FLASH_UPDATE) { - // - // Maybe more size when in CapsuleUpdate phase ? - // - MinSize =3D PcdGet32 (PcdPeiMinMemSize); - } else { - MinSize =3D PcdGet32 (PcdPeiMinMemSize); - } - - return MinSize + Size + PEI_ADDITIONAL_MEMORY_SIZE; -} - -/** - BIOS process FspBobList. - - @param FspHobList Pointer to the HOB data structure produced by FSP. - - @return If platform process the FSP hob list successfully. -**/ -EFI_STATUS -EFIAPI -FspHobProcessForMemoryResource ( - IN VOID *FspHobList - ) -{ - EFI_PEI_HOB_POINTERS Hob; - UINT64 LowMemorySize; - UINT64 FspMemorySize; - EFI_PHYSICAL_ADDRESS FspMemoryBase; - UINT64 PeiMemSize; - EFI_PHYSICAL_ADDRESS PeiMemBase; - UINT64 S3PeiMemSize; - EFI_PHYSICAL_ADDRESS S3PeiMemBase; - BOOLEAN FoundFspMemHob; - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; - PEI_CAPSULE_PPI *Capsule; - VOID *CapsuleBuffer; - UINTN CapsuleBufferLength; - UINT64 RequiredMemSize; - EFI_PEI_SERVICES **PeiServices; - UINT64 TsegSize; - EFI_PHYSICAL_ADDRESS TsegBase; - BOOLEAN FoundTsegHob; - - PeiServices =3D (EFI_PEI_SERVICES **)GetPeiServicesTablePointer (); - - PeiServicesGetBootMode (&BootMode); - - PeiMemBase =3D 0; - LowMemorySize =3D 0; - FspMemorySize =3D 0; - FspMemoryBase =3D 0; - FoundFspMemHob =3D FALSE; - TsegSize =3D 0; - TsegBase =3D 0; - FoundTsegHob =3D FALSE; - - // - // Parse the hob list from fsp - // Report all the resource hob except the memory between 1M and 4G - // - Hob.Raw =3D (UINT8 *)(UINTN)FspHobList; - DEBUG((DEBUG_INFO, "FspHobList - 0x%x\n", FspHobList)); - - while ((Hob.Raw =3D GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, Hob.Ra= w)) !=3D NULL) { - DEBUG((DEBUG_INFO, "\nResourceType: 0x%x\n", Hob.ResourceDescriptor->R= esourceType)); - if ((Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_SYSTEM_M= EMORY) || - (Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_MEMORY_R= ESERVED)) { - DEBUG((DEBUG_INFO, "ResourceAttribute: 0x%x\n", Hob.ResourceDescript= or->ResourceAttribute)); - DEBUG((DEBUG_INFO, "PhysicalStart: 0x%x\n", Hob.ResourceDescriptor->= PhysicalStart)); - DEBUG((DEBUG_INFO, "ResourceLength: 0x%x\n", Hob.ResourceDescriptor-= >ResourceLength)); - DEBUG((DEBUG_INFO, "Owner: %g\n\n", &Hob.ResourceDescriptor->Owner)); - } - - if ((Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_SYSTEM_M= EMORY) // Found the low memory length below 4G - && (Hob.ResourceDescriptor->PhysicalStart >=3D BASE_1MB) - && (Hob.ResourceDescriptor->PhysicalStart + Hob.ResourceDescriptor= ->ResourceLength <=3D BASE_4GB)) { - LowMemorySize +=3D Hob.ResourceDescriptor->ResourceLength; - Hob.Raw =3D GET_NEXT_HOB (Hob); - continue; - } - - if ((Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_MEMORY_R= ESERVED) // Found the low memory length below 4G - && (Hob.ResourceDescriptor->PhysicalStart >=3D BASE_1MB) - && (Hob.ResourceDescriptor->PhysicalStart + Hob.ResourceDescriptor= ->ResourceLength <=3D BASE_4GB) - && (CompareGuid (&Hob.ResourceDescriptor->Owner, &gFspReservedMemo= ryResourceHobGuid))) { - FoundFspMemHob =3D TRUE; - FspMemoryBase =3D Hob.ResourceDescriptor->PhysicalStart; - FspMemorySize =3D Hob.ResourceDescriptor->ResourceLength; - DEBUG((DEBUG_INFO, "Find fsp mem hob, base 0x%x, len 0x%x\n", FspMem= oryBase, FspMemorySize)); - } - - if ((Hob.ResourceDescriptor->ResourceType =3D=3D EFI_RESOURCE_MEMORY_R= ESERVED) // Found the low memory length below 4G - && (Hob.ResourceDescriptor->PhysicalStart >=3D 0x100000) - && (Hob.ResourceDescriptor->PhysicalStart + Hob.ResourceDescriptor->= ResourceLength <=3D 0x100000000) - && (CompareGuid (&Hob.ResourceDescriptor->Owner, &gFspReservedMemory= ResourceHobTsegGuid))) { - FoundTsegHob =3D TRUE; - TsegBase =3D Hob.ResourceDescriptor->PhysicalStart; - - - if ((Hob.ResourceDescriptor->ResourceLength =3D=3D 0 ) || (Hob.Re= sourceDescriptor->ResourceLength > 0x800000)){ - Hob.ResourceDescriptor->ResourceLength =3D 0x800000; - } - - - TsegSize =3D Hob.ResourceDescriptor->ResourceLength; - DEBUG((EFI_D_ERROR, "Find Tseg mem hob, base 0x%lx, len 0x%lx\n", = TsegBase, TsegSize)); - } - - // - // Report the resource hob - // - BuildResourceDescriptorHob ( - Hob.ResourceDescriptor->ResourceType, - Hob.ResourceDescriptor->ResourceAttribute, - Hob.ResourceDescriptor->PhysicalStart, - Hob.ResourceDescriptor->ResourceLength - ); - - Hob.Raw =3D GET_NEXT_HOB (Hob); - } - - if (!FoundFspMemHob) { - DEBUG((DEBUG_INFO, "Didn't find the fsp used memory information.\n")); - //ASSERT(FALSE); - } - - DEBUG((DEBUG_INFO, "LowMemorySize: 0x%x.\n", LowMemorySize)); - DEBUG((DEBUG_INFO, "FspMemoryBase: 0x%x.\n", FspMemoryBase)); - DEBUG((DEBUG_INFO, "FspMemorySize: 0x%x.\n", FspMemorySize)); - - if (BootMode =3D=3D BOOT_ON_S3_RESUME) { - BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, - ( - EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - // EFI_RESOURCE_ATTRIBUTE_TESTED | - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE - ), - BASE_1MB, - LowMemorySize - ); - - Status =3D GetS3MemoryInfo (&S3PeiMemBase, &S3PeiMemSize); - ASSERT_EFI_ERROR (Status); - DEBUG((DEBUG_INFO, "S3 memory %Xh - %Xh bytes\n", S3PeiMemBase, S3PeiM= emSize)); - - // - // Make sure Stack and PeiMemory are not overlap - JYAO1 - // - - Status =3D PeiServicesInstallPeiMemory ( - S3PeiMemBase, - S3PeiMemSize - ); - ASSERT_EFI_ERROR (Status); - } else { - PeiMemSize =3D GetPeiMemSize (PeiServices, BootMode); - DEBUG((DEBUG_INFO, "PEI memory size =3D %Xh bytes\n", PeiMemSize)); - - // - // Capsule mode - // - Capsule =3D NULL; - CapsuleBuffer =3D NULL; - CapsuleBufferLength =3D 0; - if (BootMode =3D=3D BOOT_ON_FLASH_UPDATE) { - Status =3D PeiServicesLocatePpi ( - &gPeiCapsulePpiGuid, - 0, - NULL, - (VOID **) &Capsule - ); - ASSERT_EFI_ERROR (Status); - - if (Status =3D=3D EFI_SUCCESS) { - // - // Make sure Stack and CapsuleBuffer are not overlap - JYAO1 - // - CapsuleBuffer =3D (VOID *)(UINTN)BASE_1MB; - CapsuleBufferLength =3D (UINTN)(LowMemorySize - PeiMemSize); - // - // Call the Capsule PPI Coalesce function to coalesce the capsule = data. - // - Status =3D Capsule->Coalesce (PeiServices, &CapsuleBuffer, &Capsul= eBufferLength); - } - } - - RequiredMemSize =3D RetrieveRequiredMemorySize (PeiServices); - DEBUG((DEBUG_INFO, "Required memory size =3D %Xh bytes\n", RequiredMem= Size)); - - // - // Report the main memory - // - BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, - ( - EFI_RESOURCE_ATTRIBUTE_PRESENT | - EFI_RESOURCE_ATTRIBUTE_INITIALIZED | - EFI_RESOURCE_ATTRIBUTE_TESTED | - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | - EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE - ), - BASE_1MB, - LowMemorySize - ); - - // - // Make sure Stack and CapsuleBuffer are not overlap - JYAO1 - // - - // - // Install efi memory - // - PeiMemBase =3D BASE_1MB + LowMemorySize - PeiMemSize; - Status =3D PeiServicesInstallPeiMemory ( - PeiMemBase, - PeiMemSize - RequiredMemSize - ); - ASSERT_EFI_ERROR (Status); - - if (Capsule !=3D NULL) { - Status =3D Capsule->CreateState (PeiServices, CapsuleBuffer, Capsule= BufferLength); - } - } - - // - // Report GUIDed HOB for reserving SMRAM regions - // - if (FoundTsegHob) { - EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *SmramHobDescriptorBlock; - - SmramHobDescriptorBlock =3D BuildGuidHob ( - &gEfiSmmPeiSmramMemoryReserveGuid, - sizeof (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK) - ); - ASSERT (SmramHobDescriptorBlock !=3D NULL); - - SmramHobDescriptorBlock->NumberOfSmmReservedRegions =3D 1; - - SmramHobDescriptorBlock->Descriptor[0].PhysicalStart =3D TsegBase; - SmramHobDescriptorBlock->Descriptor[0].CpuStart =3D TsegBase; - SmramHobDescriptorBlock->Descriptor[0].PhysicalSize =3D TsegSize; - SmramHobDescriptorBlock->Descriptor[0].RegionState =3D EFI_SMRAM_CLO= SED; - } - return EFI_SUCCESS; -} - -/** - BIOS process FspBobList for other data (not Memory Resource Descriptor). - - @param[in] FspHobList Pointer to the HOB data structure produced by FSP. - - @return If platform process the FSP hob list successfully. -**/ -EFI_STATUS -EFIAPI -FspHobProcessForOtherData ( - IN VOID *FspHobList - ) -{ - EFI_PEI_SERVICES **PeiServices; - - PeiServices =3D (EFI_PEI_SERVICES **)GetPeiServicesTablePointer (); - - // - // Other hob for platform - // - PlatformHobCreateFromFsp ((CONST EFI_PEI_SERVICES **) PeiServices, FspH= obList); - - return EFI_SUCCESS; -} - -/** - BIOS process FspBobList. - - @param[in] FspHobList Pointer to the HOB data structure produced by FSP. - - @return If platform process the FSP hob list successfully. -**/ -EFI_STATUS -EFIAPI -FspHobProcess ( - IN VOID *FspHobList - ) -{ - EFI_STATUS Status; - - Status =3D FspHobProcessForMemoryResource (FspHobList); - if (EFI_ERROR (Status)) { - return Status; - } - Status =3D FspHobProcessForOtherData (FspHobList); - - return Status; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobP= rocessLibVlv2/FspHobProcessLibVlv2.inf b/Platform/Intel/Vlv2TbltDevicePkg/F= spSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.inf deleted file mode 100644 index b789b27f4c..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessL= ibVlv2/FspHobProcessLibVlv2.inf +++ /dev/null @@ -1,74 +0,0 @@ -## @file -# -# Copyright (c) 2014, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -##########################################################################= ###### -# -# Defines Section - statements that will be processed to create a Makefile. -# -##########################################################################= ###### -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D PeiFspHobProcessLibVlv2 - FILE_GUID =3D C7B7070B-E5A8-4b86-9110-BDCA1095F496 - MODULE_TYPE =3D SEC - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D FspHobProcessLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -##########################################################################= ###### -# -# Sources Section - list of files that are required for the build to succe= ed. -# -##########################################################################= ###### - -[Sources] - FspHobProcessLibVlv2.c - - -##########################################################################= ###### -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -##########################################################################= ###### - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - IntelFspPkg/IntelFspPkg.dec - IntelFspWrapperPkg/IntelFspWrapperPkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - -[LibraryClasses] - BaseLib - BaseMemoryLib - HobLib - DebugLib - FspPlatformInfoLib - PeiServicesLib - PeiServicesTablePointerLib - PlatformFspLib - -[Pcd] - gFspWrapperTokenSpaceGuid.PcdPeiMinMemSize - gFspWrapperTokenSpaceGuid.PcdPeiRecoveryMinMemSize - -[Guids] - gFspReservedMemoryResourceHobGuid - gEfiMemoryTypeInformationGuid - gEfiSmmPeiSmramMemoryReserveGuid - -[Ppis] - gPeiCapsulePpiGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/FspPlatformSecLibVlv2.c b/Platform/Intel/Vlv2TbltDevicePkg/F= spSupport/Library/SecFspPlatformSecLibVlv2/FspPlatformSecLibVlv2.c deleted file mode 100644 index 2b03cfaec9..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/FspPlatformSecLibVlv2.c +++ /dev/null @@ -1,144 +0,0 @@ -/** @file - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include -#include -#include - -#include - -/** - This interface conveys state information out of the Security (SEC) phase= into PEI. - - @param PeiServices Pointer to the PEI Services Table. - @param StructureSize Pointer to the variable describing siz= e of the input buffer. - @param PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORM= ATION_RECORD. - - @retval EFI_SUCCESS The data was successfully returned. - @retval EFI_BUFFER_TOO_SMALL The buffer was too small. - -**/ -EFI_STATUS -EFIAPI -SecPlatformInformation ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN OUT UINT64 *StructureSize, - OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord - ); - -/** - This interface conveys performance information out of the Security (SEC)= phase into PEI. - - This service is published by the SEC phase. The SEC phase handoff has an= optional - EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed= from SEC into the - PEI Foundation. As such, if the platform supports collecting performance= data in SEC, - this information is encapsulated into the data structure abstracted by t= his service. - This information is collected for the boot-strap processor (BSP) on IA-3= 2. - - @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the PEI_SEC_PER= FORMANCE_PPI. - @param[out] Performance The pointer to performance data collected in SE= C phase. - - @retval EFI_SUCCESS The data was successfully returned. - -**/ -EFI_STATUS -EFIAPI -SecGetPerformance ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN PEI_SEC_PERFORMANCE_PPI *This, - OUT FIRMWARE_SEC_PERFORMANCE *Performance - ); - -/** - This service of the TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RA= M into - permanent memory. - - @param PeiServices Pointer to the PEI Services Table. - @param TemporaryMemoryBase Source Address in temporary memory from wh= ich the SEC or PEIM will copy the - Temporary RAM contents. - @param PermanentMemoryBase Destination Address in permanent memory in= to which the SEC or PEIM will copy the - Temporary RAM contents. - @param CopySize Amount of memory to migrate from temporary= to permanent memory. - - @retval EFI_SUCCESS The data was successfully returned. - @retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize > Temporary= MemoryBase when - TemporaryMemoryBase > PermanentMemoryBase. - -**/ -EFI_STATUS -EFIAPI -SecTemporaryRamSupport ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase, - IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, - IN UINTN CopySize - ); - -EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformationPpi =3D { - SecPlatformInformation -}; - -PEI_SEC_PERFORMANCE_PPI mSecPerformancePpi =3D { - SecGetPerformance -}; - -EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI gSecTemporaryRamSupportPpi =3D { - SecTemporaryRamSupport -}; - -EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformPpi[] =3D { - { - EFI_PEI_PPI_DESCRIPTOR_PPI, - &gEfiSecPlatformInformationPpiGuid, - &mSecPlatformInformationPpi - }, - { - EFI_PEI_PPI_DESCRIPTOR_PPI, - &gPeiSecPerformancePpiGuid, - &mSecPerformancePpi - }, - { - EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, - &gEfiTemporaryRamSupportPpiGuid, - &gSecTemporaryRamSupportPpi - }, -}; - -/** - A developer supplied function to perform platform specific operations. - - It's a developer supplied function to perform any operations appropriate= to a - given platform. It's invoked just before passing control to PEI core by = SEC - core. Platform developer may modify the SecCoreData passed to PEI Core. - It returns a platform specific PPI list that platform wishes to pass to = PEI core. - The Generic SEC core module will merge this list to join the final list = passed to - PEI core. - - @param SecCoreData The same parameter as passing to PEI core.= It - could be overridden by this function. - - @return The platform specific PPI list to be passed to PEI core or - NULL if there is no need of such platform specific PPI list. - -**/ -EFI_PEI_PPI_DESCRIPTOR * -EFIAPI -SecPlatformMain ( - IN OUT EFI_SEC_PEI_HAND_OFF *SecCoreData - ) -{ - EFI_PEI_PPI_DESCRIPTOR *PpiList; - - InitializeApicTimer (0, (UINT32) -1, TRUE, 5); - - PpiList =3D &mPeiSecPlatformPpi[0]; - - return PpiList; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/FspPlatformSecLibVlv2.inf b/Platform/Intel/Vlv2TbltDevicePkg= /FspSupport/Library/SecFspPlatformSecLibVlv2/FspPlatformSecLibVlv2.inf deleted file mode 100644 index 578066d98f..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/FspPlatformSecLibVlv2.inf +++ /dev/null @@ -1,82 +0,0 @@ -## @file -# -# Copyright (c) 2014, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -##########################################################################= ###### -# -# Defines Section - statements that will be processed to create a Makefile. -# -##########################################################################= ###### -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SecPeiFspPlatformSecLibVlv2 - FILE_GUID =3D 6653876C-F6A1-45BB-A027-20455093BC6D - MODULE_TYPE =3D SEC - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D FspPlatformSecLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -##########################################################################= ###### -# -# Sources Section - list of files that are required for the build to succe= ed. -# -##########################################################################= ###### - -[Sources] - FspPlatformSecLibVlv2.c - SecRamInitData.c - SaveSecContext.c - SecPlatformInformation.c - SecGetPerformance.c - SecTempRamSupport.c - PlatformInit.c - UartInit.c - -[Sources.IA32] - Ia32/SecEntry.asm - Ia32/PeiCoreEntry.asm - Ia32/AsmSaveSecContext.asm - Ia32/Stack.asm - -##########################################################################= ###### -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -##########################################################################= ###### - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - UefiCpuPkg/UefiCpuPkg.dec - IntelFspWrapperPkg/IntelFspWrapperPkg.dec - -[LibraryClasses] - LocalApicLib - SerialPortLib - -[Ppis] - gEfiSecPlatformInformationPpiGuid - gPeiSecPerformancePpiGuid - gEfiTemporaryRamSupportPpiGuid - -[Pcd] - gFspWrapperTokenSpaceGuid.PcdPeiTemporaryRamStackSize - gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase - gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize - -[FixedPcd] - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress - gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize - gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress - gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/AsmSaveSecContext.asm b/Platform/Intel/Vlv2TbltDevicePk= g/FspSupport/Library/SecFspPlatformSecLibVlv2/Ia32/AsmSaveSecContext.asm deleted file mode 100644 index 2546a09a1a..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/AsmSaveSecContext.asm +++ /dev/null @@ -1,45 +0,0 @@ -;-------------------------------------------------------------------------= ----- -; -; Copyright (c) 2014, Intel Corporation. All rights reserved.
-; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; SecEntry.asm -; -; Abstract: -; -; This is the code that goes from real-mode to protected mode. -; It consumes the reset vector, calls two basic APIs from FSP binary. -; -;-------------------------------------------------------------------------= ----- - -.686p -.xmm -.model flat,c -.code - -;-------------------------------------------------------------------------= --- -; MMX Usage: -; MM0 =3D BIST State -; MM5 =3D Save time-stamp counter value high32bit -; MM6 =3D Save time-stamp counter value low32bit. -; -; It should be same as SecEntry.asm and PeiCoreEntry.asm. -;-------------------------------------------------------------------------= --- - -AsmSaveBistValue PROC PUBLIC - mov eax, [esp+4] - movd mm0, eax - ret -AsmSaveBistValue ENDP - -AsmSaveTickerValue PROC PUBLIC - mov eax, [esp+4] - movd mm6, eax - mov eax, [esp+8] - movd mm5, eax - ret -AsmSaveTickerValue ENDP - -END diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/Fsp.inc b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/L= ibrary/SecFspPlatformSecLibVlv2/Ia32/Fsp.inc deleted file mode 100644 index 23295587b4..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/Fsp.inc +++ /dev/null @@ -1,45 +0,0 @@ -;-------------------------------------------------------------------------= ----- -; -; Copyright (c) 2014, Intel Corporation. All rights reserved.
-; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; Fsp.inc -; -; Abstract: -; -; Fsp related definitions -; -;-------------------------------------------------------------------------= ----- - - -; -; Fv Header -; -FVH_SIGINATURE_OFFSET EQU 028h -FVH_SIGINATURE_VALID_VALUE EQU 04856465Fh ; valid signature:_FVH -FVH_HEADER_LENGTH_OFFSET EQU 030h -FVH_EXTHEADER_OFFSET_OFFSET EQU 034h -FVH_EXTHEADER_SIZE_OFFSET EQU 010h - -; -; Ffs Header -; -FSP_HEADER_GUID_DWORD1 EQU 0912740BEh -FSP_HEADER_GUID_DWORD2 EQU 047342284h -FSP_HEADER_GUID_DWORD3 EQU 0B08471B9h -FSP_HEADER_GUID_DWORD4 EQU 00C3F3527h -FFS_HEADER_SIZE_VALUE EQU 018h - -; -; Section Header -; -SECTION_HEADER_TYPE_OFFSET EQU 03h -RAW_SECTION_HEADER_SIZE_VALUE EQU 04h - -; -; Fsp Header -; -FSP_HEADER_IMAGEBASE_OFFSET EQU 01Ch -FSP_HEADER_TEMPRAMINIT_OFFSET EQU 030h diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/PeiCoreEntry.asm b/Platform/Intel/Vlv2TbltDevicePkg/Fsp= Support/Library/SecFspPlatformSecLibVlv2/Ia32/PeiCoreEntry.asm deleted file mode 100644 index 3d34c62ea4..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/PeiCoreEntry.asm +++ /dev/null @@ -1,135 +0,0 @@ -;-------------------------------------------------------------------------= ----- -; -; Copyright (c) 2014, Intel Corporation. All rights reserved.
-; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; SecEntry.asm -; -; Abstract: -; -; This is the code that goes from real-mode to protected mode. -; It consumes the reset vector, calls two basic APIs from FSP binary. -; -;-------------------------------------------------------------------------= ----- - -.686p -.xmm -.model flat, c -.code - -EXTRN SecStartup:NEAR -EXTRN PlatformInit:NEAR - -CallPeiCoreEntryPoint PROC PUBLIC - ; - ; Obtain the hob list pointer - ; - mov eax, [esp+4] - ; - ; Obtain the stack information - ; ECX: start of range - ; EDX: end of range - ; - mov ecx, [esp+8] - mov edx, [esp+0Ch] - - ; - ; Platform init - ; - pushad - push edx - push ecx - push eax - call PlatformInit - pop eax - pop eax - pop eax - popad - - ; - ; Set stack top pointer - ; - mov esp, edx - - ; - ; Push the hob list pointer - ; - push eax - - ; - ; Save the value - ; ECX: start of range - ; EDX: end of range - ; - mov ebp, esp - push ecx - push edx - - ; - ; Push processor count to stack first, then BIST status (AP then BSP) - ; - mov eax, 1 - cpuid - shr ebx, 16 - and ebx, 0000000FFh - cmp bl, 1 - jae PushProcessorCount - - ; - ; Some processors report 0 logical processors. Effectively 0 =3D 1. - ; So we fix up the processor count - ; - inc ebx - -PushProcessorCount: - push ebx - - ; - ; We need to implement a long-term solution for BIST capture. For now, = we just copy BSP BIST - ; for all processor threads - ; - xor ecx, ecx - mov cl, bl -PushBist: - movd eax, mm0 - push eax - loop PushBist - - ; Save Time-Stamp Counter - movd eax, mm5 - push eax - - movd eax, mm6 - push eax - - ; - ; Pass entry point of the PEI core - ; - mov edi, 0FFFFFFE0h - push DWORD PTR ds:[edi] - - ; - ; Pass BFV into the PEI Core - ; - mov edi, 0FFFFFFFCh - push DWORD PTR ds:[edi] - - ; - ; Pass stack size into the PEI Core - ; - mov ecx, [ebp - 4] - mov edx, [ebp - 8] - push ecx ; RamBase - - sub edx, ecx - push edx ; RamSize - - ; - ; Pass Control into the PEI Core - ; - call SecStartup -CallPeiCoreEntryPoint ENDP - -END diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/SecEntry.asm b/Platform/Intel/Vlv2TbltDevicePkg/FspSupp= ort/Library/SecFspPlatformSecLibVlv2/Ia32/SecEntry.asm deleted file mode 100644 index b7026c433f..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/SecEntry.asm +++ /dev/null @@ -1,338 +0,0 @@ -;-------------------------------------------------------------------------= ----- -; -; Copyright (c) 2014, Intel Corporation. All rights reserved.
-; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; SecEntry.asm -; -; Abstract: -; -; This is the code that goes from real-mode to protected mode. -; It consumes the reset vector, calls two basic APIs from FSP binary. -; -;-------------------------------------------------------------------------= ----- - INCLUDE Fsp.inc - -.686p -.xmm -.model small, c - -EXTRN CallPeiCoreEntryPoint:NEAR -EXTRN TempRamInitParams:FAR - -; Pcds -EXTRN PcdGet32 (PcdFlashFvFspBase):DWORD -EXTRN PcdGet32 (PcdFlashFvFspSize):DWORD - -_TEXT_REALMODE SEGMENT PARA PUBLIC USE16 'CODE' - ASSUME CS:_TEXT_REALMODE, DS:_TEXT_REALMODE - -;-------------------------------------------------------------------------= --- -; -; Procedure: _ModuleEntryPoint -; -; Input: None -; -; Output: None -; -; Destroys: Assume all registers -; -; Description: -; -; Transition to non-paged flat-model protected mode from a -; hard-coded GDT that provides exactly two descriptors. -; This is a bare bones transition to protected mode only -; used for a while in PEI and possibly DXE. -; -; After enabling protected mode, a far jump is executed to -; transfer to PEI using the newly loaded GDT. -; -; Return: None -; -; MMX Usage: -; MM0 =3D BIST State -; MM5 =3D Save time-stamp counter value high32bit -; MM6 =3D Save time-stamp counter value low32bit. -; -;-------------------------------------------------------------------------= --- - -align 4 -_ModuleEntryPoint PROC NEAR C PUBLIC - fninit ; clear any pending Floating point= exceptions - ; - ; Store the BIST value in mm0 - ; - movd mm0, eax - - ; - ; Save time-stamp counter value - ; rdtsc load 64bit time-stamp counter to EDX:EAX - ; - rdtsc - movd mm5, edx - movd mm6, eax - - ; - ; Load the GDT table in GdtDesc - ; - mov esi, OFFSET GdtDesc - DB 66h - lgdt fword ptr cs:[si] - - ; - ; Transition to 16 bit protected mode - ; - mov eax, cr0 ; Get control register 0 - or eax, 00000003h ; Set PE bit (bit #0) & MP bit (bit #= 1) - mov cr0, eax ; Activate protected mode - - mov eax, cr4 ; Get control register 4 - or eax, 00000600h ; Set OSFXSR bit (bit #9) & OSXMMEXCP= T bit (bit #10) - mov cr4, eax - - ; - ; Now we're in 16 bit protected mode - ; Set up the selectors for 32 bit protected mode entry - ; - mov ax, SYS_DATA_SEL - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - ; - ; Transition to Flat 32 bit protected mode - ; The jump to a far pointer causes the transition to 32 bit mode - ; - mov esi, offset ProtectedModeEntryLinearAddress - jmp fword ptr cs:[si] - -_ModuleEntryPoint ENDP -_TEXT_REALMODE ENDS - -_TEXT_PROTECTED_MODE SEGMENT PARA PUBLIC USE32 'CODE' - ASSUME CS:_TEXT_PROTECTED_MODE, DS:_TEXT_PROTEC= TED_MODE - -;-------------------------------------------------------------------------= --- -; -; Procedure: ProtectedModeEntryPoint -; -; Input: None -; -; Output: None -; -; Destroys: Assume all registers -; -; Description: -; -; This function handles: -; Call two basic APIs from FSP binary -; Initializes stack with some early data (BIST, PEI entry, etc) -; -; Return: None -; -;-------------------------------------------------------------------------= --- - -align 4 -ProtectedModeEntryPoint PROC NEAR PUBLIC - - ; Find the fsp info header - mov edi, PcdGet32 (PcdFlashFvFspBase) - mov ecx, PcdGet32 (PcdFlashFvFspSize) - - mov eax, dword ptr [edi + FVH_SIGINATURE_OFFSET] - cmp eax, FVH_SIGINATURE_VALID_VALUE - jnz FspHeaderNotFound - - xor eax, eax - mov ax, word ptr [edi + FVH_EXTHEADER_OFFSET_OFFSET] - cmp ax, 0 - jnz FspFvExtHeaderExist - - xor eax, eax - mov ax, word ptr [edi + FVH_HEADER_LENGTH_OFFSET] ; Bypass Fv Header - add edi, eax - jmp FspCheckFfsHeader - -FspFvExtHeaderExist: - add edi, eax - mov eax, dword ptr [edi + FVH_EXTHEADER_SIZE_OFFSET] ; Bypass Ext Fv H= eader - add edi, eax - - ; Round up to 8 byte alignment - mov eax, edi - and al, 07h - jz FspCheckFfsHeader - - and edi, 0FFFFFFF8h - add edi, 08h - -FspCheckFfsHeader: - ; Check the ffs guid - mov eax, dword ptr [edi] - cmp eax, FSP_HEADER_GUID_DWORD1 - jnz FspHeaderNotFound - - mov eax, dword ptr [edi + 4] - cmp eax, FSP_HEADER_GUID_DWORD2 - jnz FspHeaderNotFound - - mov eax, dword ptr [edi + 8] - cmp eax, FSP_HEADER_GUID_DWORD3 - jnz FspHeaderNotFound - - mov eax, dword ptr [edi + 0Ch] - cmp eax, FSP_HEADER_GUID_DWORD4 - jnz FspHeaderNotFound - - add edi, FFS_HEADER_SIZE_VALUE ; Bypass the ffs header - - ; Check the section type as raw section - mov al, byte ptr [edi + SECTION_HEADER_TYPE_OFFSET] - cmp al, 019h - jnz FspHeaderNotFound - - add edi, RAW_SECTION_HEADER_SIZE_VALUE ; Bypass the section header - jmp FspHeaderFound - -FspHeaderNotFound: - jmp $ - -FspHeaderFound: - ; Get the fsp TempRamInit Api address - mov eax, dword ptr [edi + FSP_HEADER_IMAGEBASE_OFFSET] - add eax, dword ptr [edi + FSP_HEADER_TEMPRAMINIT_OFFSET] - - ; Setup the hardcode stack - mov esp, OFFSET TempRamInitStack - - ; Call the fsp TempRamInit Api - jmp eax - -TempRamInitDone: - cmp eax, 0 - jnz FspApiFailed - - ; ECX: start of range - ; EDX: end of range - mov esp, edx - push edx - push ecx - push eax ; zero - no hob list yet - call CallPeiCoreEntryPoint - -FspApiFailed: - jmp $ - -align 10h -TempRamInitStack: - DD OFFSET TempRamInitDone - DD OFFSET TempRamInitParams - -ProtectedModeEntryPoint ENDP - -; -; ROM-based Global-Descriptor Table for the Tiano PEI Phase -; -align 16 -PUBLIC BootGdtTable - -; -; GDT[0]: 0x00: Null entry, never used. -; -NULL_SEL EQU $ - GDT_BASE ; Selector [0] -GDT_BASE: -BootGdtTable DD 0 - DD 0 -; -; Linear data segment descriptor -; -LINEAR_SEL EQU $ - GDT_BASE ; Selector [0x8] - DW 0FFFFh ; limit 0xFFFFF - DW 0 ; base 0 - DB 0 - DB 092h ; present, ring 0, data, expand-up= , writable - DB 0CFh ; page-granular, 32-bit - DB 0 -; -; Linear code segment descriptor -; -LINEAR_CODE_SEL EQU $ - GDT_BASE ; Selector [0x10] - DW 0FFFFh ; limit 0xFFFFF - DW 0 ; base 0 - DB 0 - DB 09Bh ; present, ring 0, data, expand-up= , not-writable - DB 0CFh ; page-granular, 32-bit - DB 0 -; -; System data segment descriptor -; -SYS_DATA_SEL EQU $ - GDT_BASE ; Selector [0x18] - DW 0FFFFh ; limit 0xFFFFF - DW 0 ; base 0 - DB 0 - DB 093h ; present, ring 0, data, expand-up= , not-writable - DB 0CFh ; page-granular, 32-bit - DB 0 - -; -; System code segment descriptor -; -SYS_CODE_SEL EQU $ - GDT_BASE ; Selector [0x20] - DW 0FFFFh ; limit 0xFFFFF - DW 0 ; base 0 - DB 0 - DB 09Ah ; present, ring 0, data, expand-up= , writable - DB 0CFh ; page-granular, 32-bit - DB 0 -; -; Spare segment descriptor -; -SYS16_CODE_SEL EQU $ - GDT_BASE ; Selector [0x28] - DW 0FFFFh ; limit 0xFFFFF - DW 0 ; base 0 - DB 0Eh ; Changed from F000 to E000. - DB 09Bh ; present, ring 0, code, expand-up= , writable - DB 00h ; byte-granular, 16-bit - DB 0 -; -; Spare segment descriptor -; -SYS16_DATA_SEL EQU $ - GDT_BASE ; Selector [0x30] - DW 0FFFFh ; limit 0xFFFF - DW 0 ; base 0 - DB 0 - DB 093h ; present, ring 0, data, expand-up= , not-writable - DB 00h ; byte-granular, 16-bit - DB 0 - -; -; Spare segment descriptor -; -SPARE5_SEL EQU $ - GDT_BASE ; Selector [0x38] - DW 0 ; limit 0 - DW 0 ; base 0 - DB 0 - DB 0 ; present, ring 0, data, expand-up= , writable - DB 0 ; page-granular, 32-bit - DB 0 -GDT_SIZE EQU $ - BootGdtTable ; Size, in bytes - -; -; GDT Descriptor -; -GdtDesc: ; GDT descriptor - DW GDT_SIZE - 1 ; GDT limit - DD OFFSET BootGdtTable ; GDT base address - - -ProtectedModeEntryLinearAddress LABEL FWORD -ProtectedModeEntryLinearOffset LABEL DWORD - DD OFFSET ProtectedModeEntryPoint ; Offset of our 32 bit code - DW LINEAR_CODE_SEL - -_TEXT_PROTECTED_MODE ENDS -END diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/Stack.S b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/L= ibrary/SecFspPlatformSecLibVlv2/Ia32/Stack.S deleted file mode 100644 index 9bd29ce0f4..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/Stack.S +++ /dev/null @@ -1,71 +0,0 @@ -#-------------------------------------------------------------------------= ----- -# -# Copyright (c) 2014, Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# Abstract: -# -# Switch the stack from temporary memory to permenent memory. -# -#-------------------------------------------------------------------------= ----- - - -#-------------------------------------------------------------------------= ----- -# VOID -# EFIAPI -# SecSwitchStack ( -# UINT32 TemporaryMemoryBase, -# UINT32 PermenentMemoryBase -# )# -#-------------------------------------------------------------------------= ----- -ASM_GLOBAL ASM_PFX (SecSwitchStack) -ASM_PFX(SecSwitchStack): - # - # Save standard registers so they can be used to change stack - # - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - - # - # !!CAUTION!! this function address's is pushed into stack after - # migration of whole temporary memory, so need save it to permenent - # memory at first! - # - movl 20(%esp), %ebx # Save the first parameter - movl 24(%esp), %ecx # Save the second parameter - - # - # Save this function's return address into permenent memory at first. - # Then, Fixup the esp point to permenent memory - # - movl %esp, %eax - subl %ebx, %eax - addl %ecx, %eax - movl 0(%esp), %edx # copy pushed register's value to permene= nt memory - movl %edx, 0(%eax) - movl 4(%esp), %edx - movl %edx, 4(%eax) - movl 8(%esp), %edx - movl %edx, 8(%eax) - movl 12(%esp), %edx - movl %edx, 12(%eax) - movl 16(%esp), %edx # Update this function's return address in= to permenent memory - movl %edx, 16(%eax) - movl %eax, %esp # From now, esp is pointed to permenent me= mory - - # - # Fixup the ebp point to permenent memory - # - movl %ebp, %eax - subl %ebx, %eax - addl %ecx, %eax - movl %eax, %ebp # From now, ebp is pointed to permenent me= mory - - popl %edx - popl %ecx - popl %ebx - popl %eax - ret - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/Ia32/Stack.asm b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport= /Library/SecFspPlatformSecLibVlv2/Ia32/Stack.asm deleted file mode 100644 index 95e56cec9b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/Ia32/Stack.asm +++ /dev/null @@ -1,76 +0,0 @@ -;-------------------------------------------------------------------------= ----- -; -; Copyright (c) 2014, Intel Corporation. All rights reserved.
-; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Abstract: -; -; Switch the stack from temporary memory to permenent memory. -; -;-------------------------------------------------------------------------= ----- - - .586p - .model flat,C - .code - -;-------------------------------------------------------------------------= ----- -; VOID -; EFIAPI -; SecSwitchStack ( -; UINT32 TemporaryMemoryBase, -; UINT32 PermenentMemoryBase -; ); -;-------------------------------------------------------------------------= ----- -SecSwitchStack PROC - ; - ; Save three register: eax, ebx, ecx - ; - push eax - push ebx - push ecx - push edx - - ; - ; !!CAUTION!! this function address's is pushed into stack after - ; migration of whole temporary memory, so need save it to permenent - ; memory at first! - ; - - mov ebx, [esp + 20] ; Save the first parameter - mov ecx, [esp + 24] ; Save the second parameter - - ; - ; Save this function's return address into permenent memory at first. - ; Then, Fixup the esp point to permenent memory - ; - mov eax, esp - sub eax, ebx - add eax, ecx - mov edx, dword ptr [esp] ; copy pushed register's value to p= ermenent memory - mov dword ptr [eax], edx - mov edx, dword ptr [esp + 4] - mov dword ptr [eax + 4], edx - mov edx, dword ptr [esp + 8] - mov dword ptr [eax + 8], edx - mov edx, dword ptr [esp + 12] - mov dword ptr [eax + 12], edx - mov edx, dword ptr [esp + 16] ; Update this function's return add= ress into permenent memory - mov dword ptr [eax + 16], edx - mov esp, eax ; From now, esp is pointed to perme= nent memory - - ; - ; Fixup the ebp point to permenent memory - ; - mov eax, ebp - sub eax, ebx - add eax, ecx - mov ebp, eax ; From now, ebp is pointed to permenent = memory - - pop edx - pop ecx - pop ebx - pop eax - ret -SecSwitchStack ENDP - - END diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/PlatformInit.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport= /Library/SecFspPlatformSecLibVlv2/PlatformInit.c deleted file mode 100644 index d4e1c2a425..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/PlatformInit.c +++ /dev/null @@ -1,36 +0,0 @@ -/** @file - This PEIM will parse the hoblist from fsp and report them into pei core. - This file contains the main entrypoint of the PEIM. - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - - -#include -#include -#include - -VOID EnableInternalUart (); - -VOID -EFIAPI -PlatformInit ( - IN VOID *FspHobList, - IN VOID *StartOfRange, - IN VOID *EndOfRange - ) -{ - // - // Platform initialization - // Enable Serial port here - // - EnableInternalUart (); - SerialPortInitialize (); - - DEBUG ((DEBUG_INFO, "PlatformInit\n")); - DEBUG ((DEBUG_INFO, "FspHobList - 0x%x\n", FspHobList)); - DEBUG ((DEBUG_INFO, "StartOfRange - 0x%x\n", StartOfRange)); - DEBUG ((DEBUG_INFO, "EndOfRange - 0x%x\n", EndOfRange)); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/SaveSecContext.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSuppo= rt/Library/SecFspPlatformSecLibVlv2/SaveSecContext.c deleted file mode 100644 index 382e617b27..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/SaveSecContext.c +++ /dev/null @@ -1,108 +0,0 @@ -/** @file - This PEIM will parse the hoblist from fsp and report them into pei core. - This file contains the main entrypoint of the PEIM. - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - - -#include -#include - -#include -#include - -/** - Save BIST value before call FspInit. - - @param Bist BIST value. -**/ -VOID -AsmSaveBistValue ( - IN UINT32 Bist - ); - -/** - Save Ticker value before call FspInit. - - @param Ticker Ticker value. -**/ -VOID -AsmSaveTickerValue ( - IN UINT64 Ticker - ); - -/** - Save SEC context before call FspInit. - - @param PeiServices Pointer to PEI Services Table. -**/ -VOID -EFIAPI -SaveSecContext ( - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - UINT32 *Bist; - UINT64 *Ticker; - UINT32 Size; - UINT32 Count; - UINT32 TopOfTemporaryRam; - VOID *TopOfTemporaryRamPpi; - EFI_STATUS Status; - - DEBUG ((DEBUG_INFO, "SaveSecContext - 0x%x\n", PeiServices)); - - Status =3D (*PeiServices)->LocatePpi ( - PeiServices, - &gTopOfTemporaryRamPpiGuid, - 0, - NULL, - (VOID **) &TopOfTemporaryRamPpi - ); - if (EFI_ERROR (Status)) { - return ; - } - - DEBUG ((DEBUG_INFO, "TopOfTemporaryRamPpi - 0x%x\n", TopOfTemporaryRamPp= i)); - - // - // The entries of BIST information, together with the number of them, - // reside in the bottom of stack, left untouched by normal stack operati= on. - // This routine copies the BIST information to the buffer pointed by - // PlatformInformationRecord for output. - // - // |--------------| <- TopOfTemporaryRam - // |Number of BSPs| - // |--------------| - // | BIST | - // |--------------| - // | .... | - // |--------------| - // | TSC[63:32] | - // |--------------| - // | TSC[31:00] | - // |--------------| - // - - TopOfTemporaryRam =3D (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof(UINT3= 2); - TopOfTemporaryRam -=3D sizeof(UINT32) * 2; - DEBUG ((DEBUG_INFO, "TopOfTemporaryRam - 0x%x\n", TopOfTemporaryRam)); - Count =3D *(UINT32 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT= 32)); - DEBUG ((DEBUG_INFO, "Count - 0x%x\n", Count)); - Size =3D Count * sizeof (IA32_HANDOFF_STATUS); - DEBUG ((DEBUG_INFO, "Size - 0x%x\n", Size)); - - Bist =3D (UINT32 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT32) - Size); - DEBUG ((DEBUG_INFO, "Bist - 0x%x\n", *Bist)); - Ticker =3D (UINT64 *)(UINTN)(TopOfTemporaryRam - sizeof(UINT32) - Size -= sizeof(UINT64)); - DEBUG ((DEBUG_INFO, "Ticker - 0x%lx\n", *Ticker)); - - // - // Just need record BSP - // - AsmSaveBistValue (*Bist); - AsmSaveTickerValue (*Ticker); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/SecGetPerformance.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSu= pport/Library/SecFspPlatformSecLibVlv2/SecGetPerformance.c deleted file mode 100644 index c5c22a29c2..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/SecGetPerformance.c +++ /dev/null @@ -1,83 +0,0 @@ -/** @file - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include -#include - -#include -#include -#include - -/** - This interface conveys performance information out of the Security (SEC)= phase into PEI. - - This service is published by the SEC phase. The SEC phase handoff has an= optional - EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed= from SEC into the - PEI Foundation. As such, if the platform supports collecting performance= data in SEC, - this information is encapsulated into the data structure abstracted by t= his service. - This information is collected for the boot-strap processor (BSP) on IA-3= 2. - - @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the PEI_SEC_PER= FORMANCE_PPI. - @param[out] Performance The pointer to performance data collected in SE= C phase. - - @retval EFI_SUCCESS The data was successfully returned. - -**/ -EFI_STATUS -EFIAPI -SecGetPerformance ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN PEI_SEC_PERFORMANCE_PPI *This, - OUT FIRMWARE_SEC_PERFORMANCE *Performance - ) -{ - UINT32 Size; - UINT32 Count; - UINT32 TopOfTemporaryRam; - UINT64 Ticker; - VOID *TopOfTemporaryRamPpi; - EFI_STATUS Status; - - DEBUG ((DEBUG_INFO, "SecGetPerformance\n")); - - Status =3D (*PeiServices)->LocatePpi ( - PeiServices, - &gTopOfTemporaryRamPpiGuid, - 0, - NULL, - (VOID **) &TopOfTemporaryRamPpi - ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - // - // |--------------| <- TopOfTemporaryRam - // |Number of BSPs| - // |--------------| - // | BIST | - // |--------------| - // | .... | - // |--------------| - // | TSC[63:32] | - // |--------------| - // | TSC[31:00] | - // |--------------| - // - TopOfTemporaryRam =3D (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof(UINT3= 2); - TopOfTemporaryRam -=3D sizeof(UINT32) * 2; - Count =3D *(UINT32 *) (UINTN) (TopOfTemporaryRam - sizeof (U= INT32)); - Size =3D Count * sizeof (UINT64); - - Ticker =3D *(UINT64 *) (UINTN) (TopOfTemporaryRam - sizeof (UINT32) - Si= ze - sizeof (UINT32) * 2); - Performance->ResetEnd =3D GetTimeInNanoSecond (Ticker); - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/SecPlatformInformation.c b/Platform/Intel/Vlv2TbltDevicePkg/= FspSupport/Library/SecFspPlatformSecLibVlv2/SecPlatformInformation.c deleted file mode 100644 index a1ba35d47d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/SecPlatformInformation.c +++ /dev/null @@ -1,77 +0,0 @@ -/** @file - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include -#include - -#include -#include - -/** - This interface conveys state information out of the Security (SEC) phase= into PEI. - - @param PeiServices Pointer to the PEI Services Table. - @param StructureSize Pointer to the variable describing siz= e of the input buffer. - @param PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORM= ATION_RECORD. - - @retval EFI_SUCCESS The data was successfully returned. - @retval EFI_BUFFER_TOO_SMALL The buffer was too small. - -**/ -EFI_STATUS -EFIAPI -SecPlatformInformation ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN OUT UINT64 *StructureSize, - OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord - ) -{ - UINT32 *Bist; - UINT32 Size; - UINT32 Count; - UINT32 TopOfTemporaryRam; - VOID *TopOfTemporaryRamPpi; - EFI_STATUS Status; - - DEBUG ((DEBUG_INFO, "SecPlatformInformation\n")); - - Status =3D (*PeiServices)->LocatePpi ( - PeiServices, - &gTopOfTemporaryRamPpiGuid, - 0, - NULL, - (VOID **) &TopOfTemporaryRamPpi - ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - // - // The entries of BIST information, together with the number of them, - // reside in the bottom of stack, left untouched by normal stack operati= on. - // This routine copies the BIST information to the buffer pointed by - // PlatformInformationRecord for output. - // - TopOfTemporaryRam =3D (UINT32)(UINTN)TopOfTemporaryRamPpi - sizeof (UINT= 32); - TopOfTemporaryRam -=3D sizeof(UINT32) * 2; - Count =3D *((UINT32 *)(UINTN) (TopOfTemporaryRam - sizeof (U= INT32))); - Size =3D Count * sizeof (IA32_HANDOFF_STATUS); - - if ((*StructureSize) < (UINT64) Size) { - *StructureSize =3D Size; - return EFI_BUFFER_TOO_SMALL; - } - - *StructureSize =3D Size; - Bist =3D (UINT32 *) (TopOfTemporaryRam - sizeof (UINT32) - Si= ze); - - CopyMem (PlatformInformationRecord, Bist, Size); - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/SecRamInitData.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSuppo= rt/Library/SecFspPlatformSecLibVlv2/SecRamInitData.c deleted file mode 100644 index 33734e3111..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/SecRamInitData.c +++ /dev/null @@ -1,16 +0,0 @@ -/** @file - Calling Fsp Apis in SEC - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32 TempRamInitParams[4] =3D { - ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchAddress) + FixedPcdGet32 (Pc= dFlashMicroCodeOffset)), - ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32 = (PcdFlashMicroCodeOffset)), - FixedPcdGet32 (PcdFlashCodeCacheAddress), - FixedPcdGet32 (PcdFlashCodeCacheSize) -}; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/SecTempRamSupport.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSu= pport/Library/SecFspPlatformSecLibVlv2/SecTempRamSupport.c deleted file mode 100644 index 8dd1367980..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/SecTempRamSupport.c +++ /dev/null @@ -1,149 +0,0 @@ -/** @file - C functions in SEC - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include - -#include -#include -#include -#include - -/** - Switch the stack in the temporary memory to the one in the permanent mem= ory. - - This function must be invoked after the memory migration immediately. Th= e relative - position of the stack in the temporary and permanent memory is same. - - @param TemporaryMemoryBase Base address of the temporary memory. - @param PermenentMemoryBase Base address of the permanent memory. -**/ -VOID -EFIAPI -SecSwitchStack ( - UINT32 TemporaryMemoryBase, - UINT32 PermenentMemoryBase - ); - -/** - This service of the TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RA= M into - permanent memory. - - @param PeiServices Pointer to the PEI Services Table. - @param TemporaryMemoryBase Source Address in temporary memory from wh= ich the SEC or PEIM will copy the - Temporary RAM contents. - @param PermanentMemoryBase Destination Address in permanent memory in= to which the SEC or PEIM will copy the - Temporary RAM contents. - @param CopySize Amount of memory to migrate from temporary= to permanent memory. - - @retval EFI_SUCCESS The data was successfully returned. - @retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize > Temporary= MemoryBase when - TemporaryMemoryBase > PermanentMemoryBase. - -**/ -EFI_STATUS -EFIAPI -SecTemporaryRamSupport ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase, - IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, - IN UINTN CopySize - ) -{ - IA32_DESCRIPTOR IdtDescriptor; - VOID* OldHeap; - VOID* NewHeap; - VOID* OldStack; - VOID* NewStack; - DEBUG_AGENT_CONTEXT_POSTMEM_SEC DebugAgentContext; - BOOLEAN OldStatus; - UINTN PeiStackSize; - - PeiStackSize =3D (UINTN)PcdGet32 (PcdPeiTemporaryRamStackSize); - if (PeiStackSize =3D=3D 0) { - PeiStackSize =3D (CopySize >> 1); - } - - ASSERT (PeiStackSize < CopySize); - - // - // |-------------------|----> - // | Stack | PeiStackSize - // |-------------------|----> - // | Heap | PeiTemporayRamSize - // |-------------------|----> TempRamBase - // - // |-------------------|----> - // | Heap | PeiTemporayRamSize - // |-------------------|----> - // | Stack | PeiStackSize - // |-------------------|----> PermanentMemoryBase - // - - OldHeap =3D (VOID*)(UINTN)TemporaryMemoryBase; - NewHeap =3D (VOID*)((UINTN)PermanentMemoryBase + PeiStackSize); - - OldStack =3D (VOID*)((UINTN)TemporaryMemoryBase + CopySize - PeiStackSiz= e); - NewStack =3D (VOID*)(UINTN)PermanentMemoryBase; - - DebugAgentContext.HeapMigrateOffset =3D (UINTN)NewHeap - (UINTN)OldHeap; - DebugAgentContext.StackMigrateOffset =3D (UINTN)NewStack - (UINTN)OldSta= ck; - - OldStatus =3D SaveAndSetDebugTimerInterrupt (FALSE); - - // - // Initialize Debug Agent to support source level debug in PEI phase aft= er memory ready. - // It will build HOB and fix up the pointer in IDT table. - // - InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, (VOID *) &DebugAgent= Context, NULL); - - // - // Migrate Heap - // - CopyMem (NewHeap, OldHeap, CopySize - PeiStackSize); - - // - // Migrate Stack - // - CopyMem (NewStack, OldStack, PeiStackSize); - - - // - // We need *not* fix the return address because currently, - // The PeiCore is executed in flash. - // - - // - // Rebase IDT table in permanent memory - // - AsmReadIdtr (&IdtDescriptor); - IdtDescriptor.Base =3D IdtDescriptor.Base - (UINTN)OldStack + (UINTN)New= Stack; - - AsmWriteIdtr (&IdtDescriptor); - - - // - // Program MTRR - // - - // - // SecSwitchStack function must be invoked after the memory migration - // immediately, also we need fixup the stack change caused by new call i= nto - // permanent memory. - // - SecSwitchStack ( - (UINT32) (UINTN) OldStack, - (UINT32) (UINTN) NewStack - ); - - SaveAndSetDebugTimerInterrupt (OldStatus); - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlat= formSecLibVlv2/UartInit.c b/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Lib= rary/SecFspPlatformSecLibVlv2/UartInit.c deleted file mode 100644 index 2a9ab17120..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSec= LibVlv2/UartInit.c +++ /dev/null @@ -1,192 +0,0 @@ -/** @file - This PEIM will parse the hoblist from fsp and report them into pei core. - This file contains the main entrypoint of the PEIM. - - Copyright (c) 2014, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - - -#include -#include -#include - -#define PCI_IDX 0xCF8 -#define PCI_DAT 0xCFC - -#define PCI_LPC_BASE (0x8000F800) -#define PCI_LPC_REG(x) (PCI_LPC_BASE + (x)) - -#define PMC_BASE_ADDRESS 0xFED03000 // PMC Memory Base= Address -#define R_PCH_LPC_PMC_BASE 0x44 // PBASE, 32bit, 5= 12 Bytes -#define B_PCH_LPC_PMC_BASE_EN BIT1 // Enable Bit -#define R_PCH_PMC_GEN_PMCON_1 0x20 // General PM Conf= iguration 1 -#define B_PCH_PMC_GEN_PMCON_SUS_PWR_FLR BIT14 // SUS Well Power = Failure -#define B_PCH_PMC_GEN_PMCON_PWROK_FLR BIT16 // PWROK Failure - -#define R_PCH_LPC_UART_CTRL 0x80 // UART Control -#define B_PCH_LPC_UART_CTRL_COM1_EN BIT0 // COM1 Enable - -#define ILB_BASE_ADDRESS 0xFED08000 // ILB Memory Base= Address -#define R_PCH_ILB_IRQE 0x88 // IRQ Enable Cont= rol - -#define IO_BASE_ADDRESS 0xFED0C000 // IO Memory Base = Address - -#define V_PCH_ILB_IRQE_UARTIRQEN_IRQ3 BIT3 // UART IRQ3 Enable -#define V_PCH_ILB_IRQE_UARTIRQEN_IRQ4 BIT4 // UART IRQ4 Enable -#define PCIEX_BASE_ADDRESS 0xE0000000 -#define PCI_EXPRESS_BASE_ADDRESS PCIEX_BASE_ADDRESS -#define PciD31F0RegBase PCIEX_BASE_ADDRESS + (UI= NT32) (31 << 15) -#define SB_RCBA 0xfed1c000 - -typedef enum { - PchA0 =3D 0, - PchA1 =3D 1, - PchB0 =3D 2, - PchB1 =3D 3, - PchB2 =3D 4, - PchB3 =3D 5, - PchC0 =3D 6, - PchSteppingMax -} PCH_STEPPING; - -#define MmPciAddress( Segment, Bus, Device, Function, Register ) \ - ( (UINTN)PCI_EXPRESS_BASE_ADDRESS + \ - (UINTN)(Bus << 20) + \ - (UINTN)(Device << 15) + \ - (UINTN)(Function << 12) + \ - (UINTN)(Register) \ - ) - -#define DEFAULT_PCI_BUS_NUMBER_PCH 0 -#define PCI_DEVICE_NUMBER_PCH_LPC 31 -#define PCI_FUNCTION_NUMBER_PCH_LPC 0 - -#define R_PCH_LPC_RID_CC 0x08 // Revision ID & C= lass Code - -#define V_PCH_LPC_RID_0 0x01 // A0 Stepping (17= x 17) -#define V_PCH_LPC_RID_1 0x02 // A0 Stepping (25= x 27) -#define V_PCH_LPC_RID_2 0x03 // A1 Stepping (17= x 17) -#define V_PCH_LPC_RID_3 0x04 // A1 Stepping (25= x 27) -#define V_PCH_LPC_RID_4 0x05 // B0 Stepping (17= x 17) -#define V_PCH_LPC_RID_5 0x06 // B0 Stepping (25= x 27) -#define V_PCH_LPC_RID_6 0x07 // B1 Stepping (17= x 17) -#define V_PCH_LPC_RID_7 0x08 // B1 Stepping (25= x 27) -#define V_PCH_LPC_RID_8 0x09 // B2 Stepping (17= x 17) -#define V_PCH_LPC_RID_9 0x0A // B2 Stepping (25= x 27) -#define V_PCH_LPC_RID_A 0x0B // B3 Stepping (17= x 17) -#define V_PCH_LPC_RID_B 0x0C // B3 Stepping (25= x 27) -#define V_PCH_LPC_RID_C 0x0D // C0 Stepping (17= x 17) -#define V_PCH_LPC_RID_D 0x0E // C0 Stepping (25= x 27) - -/** - Return Pch stepping type - - @param[in] None - - @retval PCH_STEPPING Pch stepping type - -**/ -PCH_STEPPING -EFIAPI -PchStepping ( - VOID - ) -{ - UINT8 RevId; - - RevId =3D MmioRead8 ( - MmPciAddress (0, - DEFAULT_PCI_BUS_NUMBER_PCH, - PCI_DEVICE_NUMBER_PCH_LPC, - PCI_FUNCTION_NUMBER_PCH_LPC, - R_PCH_LPC_RID_CC) - ); - - switch (RevId) { - case V_PCH_LPC_RID_0: - case V_PCH_LPC_RID_1: - return PchA0; - break; - - case V_PCH_LPC_RID_2: - case V_PCH_LPC_RID_3: - return PchA1; - break; - - case V_PCH_LPC_RID_4: - case V_PCH_LPC_RID_5: - return PchB0; - break; - - case V_PCH_LPC_RID_6: - case V_PCH_LPC_RID_7: - return PchB1; - break; - - case V_PCH_LPC_RID_8: - case V_PCH_LPC_RID_9: - return PchB2; - break; - - case V_PCH_LPC_RID_A: - case V_PCH_LPC_RID_B: - return PchB3; - break; - - case V_PCH_LPC_RID_C: - case V_PCH_LPC_RID_D: - return PchC0; - break; - - default: - return PchSteppingMax; - break; - - } -} - -/** - Enable legacy decoding on ICH6 - - @param[in] none - - @retval EFI_SUCCESS Always returns success. - -**/ -VOID -EnableInternalUart( - VOID - ) -{ - - // - // Program and enable PMC Base. - // - IoWrite32 (PCI_IDX, PCI_LPC_REG(R_PCH_LPC_PMC_BASE)); - IoWrite32 (PCI_DAT, (PMC_BASE_ADDRESS | B_PCH_LPC_PMC_BASE_EN)); - - // - // Enable COM1 for debug message output. - // - MmioAndThenOr32 (PMC_BASE_ADDRESS + R_PCH_PMC_GEN_PMCON_1, (UINT32) (~(B= _PCH_PMC_GEN_PMCON_SUS_PWR_FLR + B_PCH_PMC_GEN_PMCON_PWROK_FLR)), BIT24); - - // - // Silicon Steppings - // - if (PchStepping()>=3D PchB0) - MmioOr8 (ILB_BASE_ADDRESS + R_PCH_ILB_IRQE, (UINT8) V_PCH_ILB_IRQE_UAR= TIRQEN_IRQ4); - else - MmioOr8 (ILB_BASE_ADDRESS + R_PCH_ILB_IRQE, (UINT8) V_PCH_ILB_IRQE_UAR= TIRQEN_IRQ3); - MmioAnd32(IO_BASE_ADDRESS + 0x0520, (UINT32)~(0x00000187)); - MmioOr32 (IO_BASE_ADDRESS + 0x0520, (UINT32)0x81); // UART3_RXD-L - MmioAnd32(IO_BASE_ADDRESS + 0x0530, (UINT32)~(0x00000007)); - MmioOr32 (IO_BASE_ADDRESS + 0x0530, (UINT32)0x1); // UART3_RXD-L - MmioOr8 (PciD31F0RegBase + R_PCH_LPC_UART_CTRL, (UINT8) B_PCH_LPC_UART_C= TRL_COM1_EN); - - SerialPortInitialize (); - SerialPortWrite ((UINT8 *)"EnableInternalUart!\r\n", sizeof("EnableInter= nalUart!\r\n") - 1); - - return ; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/TpmMp.h b/Pl= atform/Intel/Vlv2TbltDevicePkg/Include/Protocol/TpmMp.h deleted file mode 100644 index 415e53daf2..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/TpmMp.h +++ /dev/null @@ -1,136 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - Tpm.h - -Abstract: - - ---*/ - -#ifndef __EFI_TPM_MP_DRIVER_PROTOCOL_H__ -#define __EFI_TPM_MP_DRIVER_PROTOCOL_H__ - - -#define EFI_TPM_MP_DRIVER_PROTOCOL_GUID \ - { 0xde161cfe, 0x1e60, 0x42a1, 0x8c, 0xc3, 0xee, 0x7e, 0xf0, 0x73, 0x52, = 0x12 } - - -EFI_FORWARD_DECLARATION (EFI_TPM_MP_DRIVER_PROTOCOL); - -#define TPM_DRIVER_STATUS 0 -#define TPM_DEVICE_STATUS 1 - -#define TPM_DRIVER_OK 0 -#define TPM_DRIVER_FAILED 1 -#define TPM_DRIVER_NOT_OPENED 2 -#define TPM_DEVICE_OK 0 -#define TPM_DEVICE_UNRECOVERABLE 1 -#define TPM_DEVICE_RECOVERABLE 2 -#define TPM_DEVICE_NOT_FOUND 3 - -// -// Prototypes for the TPM MP Driver Protocol -// - -/** - This service Open the TPM interface - - @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL. - - @retval EFI_SUCCESS Operation completed successfully - @retval EFI_DEVICE_ERROR The command was unsuccessful - @retval EFI_NOT_FOUND The component was not running - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TPM_MP_INIT) ( - IN EFI_TPM_MP_DRIVER_PROTOCOL *This - ); - -/** - This service close the TPM interface and deactivate TPM - - @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROTOCOL. - - @retval EFI_SUCCESS Operation completed successfully - @retval EFI_DEVICE_ERROR The command was unsuccessful - @retval EFI_NOT_FOUND The component was not running - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TPM_MP_CLOSE) ( - IN EFI_TPM_MP_DRIVER_PROTOCOL *This - ); - -/** - This service get the current status infomation of TPM - - @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PRO= TOCOL. - @param[in] ReqStatusType Requested type of status information, = driver or device. - @param[in] Status Pointer to the returned status. - - @retval EFI_SUCCESS Operation completed successfully - @retval EFI_DEVICE_ERROR The command was unsuccessful - @retval EFI_INVALID_PARAMETER One or more of the parameters are inco= rrect - @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small - @retval EFI_NOT_FOUND The component was not running - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TPM_MP_GET_STATUS_INFO) ( - IN EFI_TPM_MP_DRIVER_PROTOCOL *This, - IN UINT32 ReqStatusType, - OUT UINT32 *Status - ); - -/** - This service transmit data to the TPM and get response from TPM - - @param[in] This A pointer to the EFI_TPM_MP_DRIVER_PROT= OCOL. - @param[in] TransmitBuf Pointer to a buffer containing TPM trans= mit data. - @param[in] TransmitBufLen Sizeof TPM input buffer in bytes. - @param[in] ReceiveBuf Pointer to a buffer containing TPM rece= ive data. - @param[in] ReceiveBufLen On input, size of TPM receive buffer in= bytes. - On output, number of bytes written. - - @retval EFI_SUCCESS Operation completed successfully - @retval EFI_DEVICE_ERROR The command was unsuccessful - @retval EFI_INVALID_PARAMETER One or more of the parameters are incor= rect - @retval EFI_BUFFER_TOO_SMALL The receive buffer is too small - @retval EFI_NOT_FOUND The component was not running - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TPM_MP_TRANSMIT) ( - IN EFI_TPM_MP_DRIVER_PROTOCOL *This, - IN UINT8 *TransmitBuffer, - IN UINT32 TransmitBufferLen, - OUT UINT8 *ReceiveBuf, - IN OUT UINT32 *ReceiveBufLen - ); - - - -typedef struct _EFI_TPM_MP_DRIVER_PROTOCOL { - EFI_TPM_MP_INIT Init; - EFI_TPM_MP_CLOSE Close; - EFI_TPM_MP_GET_STATUS_INFO GetStatusInfo; - EFI_TPM_MP_TRANSMIT Transmit; -} EFI_TPM_MP_DRIVER_PROTOCOL; - -extern EFI_GUID gEfiTpmMpDriverProtocolGuid; - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/UsbPolicy.h = b/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/UsbPolicy.h deleted file mode 100644 index 16e9f9c6bc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/UsbPolicy.h +++ /dev/null @@ -1,126 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - UsbPolicy.h - -Abstract: - ---*/ - -#ifndef _USB_POLICY_H_ -#define _USB_POLICY_H_ - -EFI_FORWARD_DECLARATION (EFI_USB_POLICY_PROTOCOL); - -#define USB_POLICY_GUID \ - {\ - 0xf617b358, 0x12cf, 0x414a, 0xa0, 0x69, 0x60, 0x67, 0x7b, 0xda, 0x13, = 0xb4\ - } - -#define TIANO_CODE_BASE 0x00 -#define ICBD_CODE_BASE 0x01 - -#define ATUO_TYPE 0x00 -#define USB_FDD_TYPE 0x01 -#define HDD_TYPE 0x02 -#define ZIP_TYPE 0x03 -#define CDROM_TYPE 0x04 -#define SIZE_TYPE 0x05 - -#define ZIP_FDD 0x80 - -#define FDD_EMULATION 0x00 -#define HDD_EMULATION 0x01 - -#define HIGH_SPEED 0x00 -#define FULL_SPEED 0x01 -#define SUPER_SPEED 0x02 - -#define LEGACY_KB_EN 0x01 -#define LEGACY_KB_DIS 0x00 -#define LEGACY_MS_EN 0x01 -#define LEGACY_MS_DIS 0x00 -#define LEGACY_USB_EN 0x00 -#define LEGACY_USB_DIS 0x01 -#define LEGACY_FREE_SUPP 0x01 -#define LEGACY_FREE_UN_SUPP 0x00 -#define LEGACY_PERIOD_SUPP 0x01 -#define LEGACY_PERIOD_UN_SUPP 0x00 - -#define LEGACY_USB_TIME_TUE_ENABLE 0x01 -#define LEGACY_USB_TIME_TUE_DISABLE 0x00 -#define USB_HAVE_HUB_INTERNEL 0x01 -#define USB_NOT_HAVE_HUB_INTERNEL 0x00 - -#define USB_POLICY_PROTOCOL_REVISION_1 1 -#define USB_POLICY_PROTOCOL_REVISION_2 2 - -#ifndef __GNUC__ -#pragma warning ( disable : 4306 ) -#pragma warning ( disable : 4054 ) -#endif - -#define GET_USB_CFG (UsbCfg);\ - do{\ - UINT16 *pSegOfEbda;\ - UINT32 mToEbda;\ - pSegOfEbda =3D (UINT16 *)(UINTN)0x40E;\ - mToEbda =3D (UINT32)(((UINTN)(*pSegOfEbda) << 4) + 0x80);\ - UsbCfg =3D (USB_CFG *)(UINTN)mToEbda;\ - }while(0); - -#pragma pack(1) -typedef struct { - UINT8 HasUSBKeyboard:1; - UINT8 HasUSBMouse:1; - UINT8 LegacyFreeSupport:1; - UINT8 UsbOperationMode:1; - UINT8 LegacyKBEnable:1; - UINT8 LegacyMSEnable:1; - UINT8 USBPeriodSupport:1; - UINT8 Reserved:1; -} USB_DEVICE_INFOR; - -typedef struct { - UINT8 Codebase; - UINT8 USBHDDForceType; - UINT8 Configurated; - UINT8 LpcAcpiBase; - UINT8 AcpiTimerReg; - UINT8 Reserved1[0x01]; - UINT8 LegacyUsbEnable; - USB_DEVICE_INFOR UsbDeviceInfor; - UINT16 UsbEmulationSize; - UINT8 Reserved2[0x06]; -} USB_CFG; -#pragma pack() - -typedef struct _EFI_USB_POLICY_PROTOCOL{ - UINT8 Version; - UINT8 UsbMassStorageEmulationType; // 1: FDD_Type; 2: HDD_Type; other= :Auto_Type* - UINT8 UsbOperationMode; // 0: High_Speed; 1: Full_Speed; - UINT8 LegacyKBEnable; // 0: Disabled; 1: Enabled* - UINT8 LegacyMSEnable; // 0: Disabled; 1: Enabled* - UINT8 USBPeriodSupport; // 0; Unsupport; 1: Support - UINT8 LegacyUsbEnable; // 1: Disabled; 0: Enabled* - UINT8 LegacyFreeSupport; // 0: Unsupport; 1: Support - UINT8 CodeBase; - UINT8 LpcAcpiBase; // 40h(default) - UINT8 AcpiTimerReg; - UINT8 UsbTimeTue; - UINT8 InternelHubExist; // 1: Host have internel hub on bo= ard; 0: No internel hub on board - UINT8 EnumWaitPortStableStall; // Value for wait port stable when= enum a new dev. - UINT16 UsbEmulationSize; // Mbytes. - UINT8 UsbZipEmulationType; - UINT8 Reserved[3]; // Reserved fields for future expa= nsion w/o protocol change -} EFI_USB_POLICY_PROTOCOL; - -extern EFI_GUID gUsbPolicyGuid; - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLib.c b/Pla= tform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLib.c deleted file mode 100644 index 85f066a9e3..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLib.c +++ /dev/null @@ -1,46 +0,0 @@ -/*++ - -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved - = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - I2CLib.c - - - ---*/ -#ifdef ECP_FLAG -#include "EdkIIGlueDxe.h" -#else -#include -#include -#endif -#include -#include -#include -#include -#ifdef ECP_FLAG -#include "I2CLib.h" -#else -#include -#endif -#include -#ifndef ECP_FLAG -#include -#endif - -EFI_STATUS ByteReadI2C( - IN UINT8 BusNo, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer - ) -{ - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf= b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf deleted file mode 100644 index d669a4eaf8..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLib/I2CLibNull.inf +++ /dev/null @@ -1,39 +0,0 @@ -## @file -# Null instance of Debug Agent Library with empty functions. -# -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D I2CLib - FILE_GUID =3D 7f62bf44-2ba7-4c2d-9d4a-91c8906ff053 - MODULE_TYPE =3D BASE - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D I2CLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources.common] - I2CLib.c - -[LibraryClasses] - BaseLib - IoLib - TimerLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - -[Protocols] - gEfiGlobalNvsAreaProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLib.c b/= Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLib.c deleted file mode 100644 index 104c2ded43..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLib.c +++ /dev/null @@ -1,735 +0,0 @@ -/** @file - Functions for accessing I2C registers. - =20 - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 ---*/ - -#include -#include -#include =20 -#include -#include -#include =20 -#include -#include -#include -#include - -#define GLOBAL_NVS_OFFSET(Field) (UINTN)((CHAR8*)&((EFI_GLOBAL_NVS_AREA= *)0)->Field - (CHAR8*)0) - -#define PCIEX_BASE_ADDRESS 0xE0000000 -#define PCI_EXPRESS_BASE_ADDRESS ((VOID *) (UINTN) PCIEX_BASE_ADDRESS) -#define MmPciAddress( Segment, Bus, Device, Function, Register ) \ - ((UINTN)PCI_EXPRESS_BASE_ADDRESS + \ - (UINTN)(Bus << 20) + \ - (UINTN)(Device << 15) + \ - (UINTN)(Function << 12) + \ - (UINTN)(Register) \ - ) -#define PCI_D31F0_REG_BASE PCIEX_BASE_ADDRESS + (UINT32) (31 <= < 15) - -typedef struct _LPSS_PCI_DEVICE_INFO { - UINTN Segment; - UINTN BusNum; - UINTN DeviceNum; - UINTN FunctionNum; - UINTN Bar0; - UINTN Bar1; -} LPSS_PCI_DEVICE_INFO; - -LPSS_PCI_DEVICE_INFO mLpssPciDeviceList[] =3D { - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_DMAC1, PCI_FU= NCTION_NUMBER_PCH_LPSS_DMAC, 0xFE900000, 0xFE908000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C0, 0xFE910000, 0xFE918000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C1, 0xFE920000, 0xFE928000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C2, 0xFE930000, 0xFE938000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C3, 0xFE940000, 0xFE948000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C4, 0xFE950000, 0xFE958000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C5, 0xFE960000, 0xFE968000}, - {0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPSS_I2C, PCI_FU= NCTION_NUMBER_PCH_LPSS_I2C6, 0xFE970000, 0xFE978000} -}; - -#define LPSS_PCI_DEVICE_NUMBER sizeof(mLpssPciDeviceList)/sizeof(LPSS_PCI= _DEVICE_INFO) - -STATIC UINTN mI2CBaseAddress =3D 0; -STATIC UINT16 mI2CSlaveAddress =3D 0; - -UINT16 mI2cMode=3DB_IC_RESTART_EN | B_IC_SLAVE_DISABLE | B_MASTER_MODE ; - -UINTN mI2cNvsBaseAddress[] =3D { - GLOBAL_NVS_OFFSET(LDMA2Addr), - GLOBAL_NVS_OFFSET(I2C1Addr), - GLOBAL_NVS_OFFSET(I2C2Addr), - GLOBAL_NVS_OFFSET(I2C3Addr), - GLOBAL_NVS_OFFSET(I2C4Addr), - GLOBAL_NVS_OFFSET(I2C5Addr), - GLOBAL_NVS_OFFSET(I2C6Addr), - GLOBAL_NVS_OFFSET(I2C7Addr) - }; - -/** - This function get I2Cx controller base address (BAR0). - - @param I2cControllerIndex Bus Number of I2C controller. - - @return I2C BAR.=20 -**/ -UINTN -GetI2cBarAddr( - IN UINT8 I2cControllerIndex - ) -{ - EFI_STATUS Status; - EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea; - UINTN AcpiBaseAddr; - UINTN PciMmBase=3D0; - - ASSERT(gBS!=3DNULL); - - Status =3D gBS->LocateProtocol ( - &gEfiGlobalNvsAreaProtocolGuid, - NULL, - &GlobalNvsArea - ); - =20 - // - // PCI mode from PEI ( Global NVS is not ready). - // - if (EFI_ERROR(Status)) { - DEBUG ((EFI_D_INFO, "GetI2cBarAddr() gEfiGlobalNvsAreaProtocolGuid:%r\= n", Status)); - // - // Global NVS is not ready. - // - return 0; - } - - AcpiBaseAddr =3D *(UINTN*)((CHAR8*)GlobalNvsArea->Area + mI2cNvsBaseAdd= ress[I2cControllerIndex + 1]); - =20 - // - //PCI mode from DXE (global NVS protocal) to LPSS OnReadytoBoot(swith to= ACPI). - // - if(AcpiBaseAddr=3D=3D0) { - PciMmBase =3D MmPciAddress ( - mLpssPciDeviceList[I2cControllerIndex + 1].Segment, - mLpssPciDeviceList[I2cControllerIndex + 1].BusNum, - mLpssPciDeviceList[I2cControllerIndex + 1].DeviceNum, - mLpssPciDeviceList[I2cControllerIndex + 1].FunctionNum, - 0 - ); - DEBUG((EFI_D_ERROR, "\nGetI2cBarAddr() I2C Device %x %x %x PciMmBase:%= x\n", \ - mLpssPciDeviceList[I2cControllerIndex + 1].BusNum, \ - mLpssPciDeviceList[I2cControllerIndex + 1].DeviceNum, \ - mLpssPciDeviceList[I2cControllerIndex + 1].FunctionNum, PciMmBa= se)); - - if (MmioRead32 (PciMmBase) !=3D 0xFFFFFFFF) { - if((MmioRead32 (PciMmBase+R_PCH_LPSS_I2C_STSCMD)& B_PCH_LPSS_I2C_STS= CMD_MSE)) { - // - // Get the address allocted. - // - mLpssPciDeviceList[I2cControllerIndex + 1].Bar0=3DMmioRead32 (PciM= mBase+R_PCH_LPSS_I2C_BAR); =20 - mLpssPciDeviceList[I2cControllerIndex + 1].Bar1=3DMmioRead32 (PciM= mBase+R_PCH_LPSS_I2C_BAR1); - } - } - AcpiBaseAddr =3DmLpssPciDeviceList[I2cControllerIndex+1].Bar0; - } - =20 - // - // ACPI mode from BDS: LPSS OnReadytoBoot - // - else { - DEBUG ((EFI_D_INFO, "GetI2cBarAddr() NVS Varialable is updated by this= LIB or LPSS \n")); - } - =20 - DEBUG ((EFI_D_INFO, "GetI2cBarAddr() I2cControllerIndex+1 0x%x AcpiBaseA= ddr:0x%x \n", (I2cControllerIndex + 1), AcpiBaseAddr)); - return AcpiBaseAddr; -} - - -/** - This function enables I2C controllers. - - @param I2cControllerIndex Bus Number of I2C controllers. - - @return Result of the I2C initialization. -**/ -EFI_STATUS -ProgramPciLpssI2C ( - IN UINT8 I2cControllerIndex - ) -{ - UINT32 PmcBase; - UINTN PciMmBase=3D0; - EFI_STATUS Status; - EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea; - - UINT32 PmcFunctionDsiable[]=3D { - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC1, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC2, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC3, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC4, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC5, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC6, - B_PCH_PMC_FUNC_DIS_LPSS2_FUNC7 - }; - - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() Start\n")); - - // - // Set the VLV Function Disable Register to ZERO - // - PmcBase =3D MmioRead32 (PCI_D31F0_REG_BASE + R_PCH_LPC_PMC_BASE) & B_PCH= _LPC_PMC_BASE_BAR; - if(MmioRead32(PmcBase+R_PCH_PMC_FUNC_DIS)&PmcFunctionDsiable[I2cControll= erIndex]) { - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() End:I2C[%x] is disabled\n",I2= cControllerIndex)); - return EFI_NOT_READY; - } - =20 - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C()------------I2cControllerIndex= =3D%x,PMC=3D%x\n",I2cControllerIndex,MmioRead32(PmcBase+R_PCH_PMC_FUNC_DIS)= )); - - { - PciMmBase =3D MmPciAddress ( - mLpssPciDeviceList[I2cControllerIndex+1].Segment, - mLpssPciDeviceList[I2cControllerIndex+1].BusNum, - mLpssPciDeviceList[I2cControllerIndex+1].DeviceNum, - mLpssPciDeviceList[I2cControllerIndex+1].FunctionNum, - 0 - ); - =20 - DEBUG((EFI_D_ERROR, "Program Pci Lpss I2C Device %x %x %x PciMmBase:%= x\n", \ - mLpssPciDeviceList[I2cControllerIndex+1].BusNum, \ - mLpssPciDeviceList[I2cControllerIndex+1].DeviceNum, \ - mLpssPciDeviceList[I2cControllerIndex+1].FunctionNum, PciMmBase= )); - - if (MmioRead32 (PciMmBase) !=3D 0xFFFFFFFF) { - if((MmioRead32 (PciMmBase+R_PCH_LPSS_I2C_STSCMD)& B_PCH_LPSS_I2C_STS= CMD_MSE)) { - // - // Get the address allocted. - // - mLpssPciDeviceList[I2cControllerIndex+1].Bar0=3DMmioRead32 (PciMmB= ase+R_PCH_LPSS_I2C_BAR); =20 - mLpssPciDeviceList[I2cControllerIndex+1].Bar1=3DMmioRead32 (PciMmB= ase+R_PCH_LPSS_I2C_BAR1); - DEBUG((EFI_D_ERROR, "ProgramPciLpssI2C() bar0:0x%x bar1:0x%x\n",mL= pssPciDeviceList[I2cControllerIndex+1].Bar0, mLpssPciDeviceList[I2cControll= erIndex+1].Bar1)); - } else { - =20 - // - // Program BAR 0 - // - ASSERT (((mLpssPciDeviceList[I2cControllerIndex+1].Bar0 & B_PCH_LP= SS_I2C_BAR_BA) =3D=3D mLpssPciDeviceList[I2cControllerIndex+1].Bar0) && (mL= pssPciDeviceList[I2cControllerIndex+1].Bar0 !=3D 0)); - MmioWrite32 ((UINTN) (PciMmBase + R_PCH_LPSS_I2C_BAR), (UINT32) (m= LpssPciDeviceList[I2cControllerIndex+1].Bar0 & B_PCH_LPSS_I2C_BAR_BA)); - =20 - // - // Program BAR 1 - // - ASSERT (((mLpssPciDeviceList[I2cControllerIndex+1].Bar1 & B_PCH_LP= SS_I2C_BAR1_BA) =3D=3D mLpssPciDeviceList[I2cControllerIndex+1].Bar1) && (m= LpssPciDeviceList[I2cControllerIndex+1].Bar1 !=3D 0)); - MmioWrite32 ((UINTN) (PciMmBase + R_PCH_LPSS_I2C_BAR1), (UINT32) (= mLpssPciDeviceList[I2cControllerIndex+1].Bar1 & B_PCH_LPSS_I2C_BAR1_BA)); - =20 - // - // Bus Master Enable & Memory Space Enable - // - MmioOr32 ((UINTN) (PciMmBase + R_PCH_LPSS_I2C_STSCMD), (UINT32) (B= _PCH_LPSS_I2C_STSCMD_BME | B_PCH_LPSS_I2C_STSCMD_MSE)); - ASSERT (MmioRead32 (mLpssPciDeviceList[I2cControllerIndex+1].Bar0)= !=3D 0xFFFFFFFF); - } - =20 - // - // Release Resets - // - MmioWrite32 (mLpssPciDeviceList[I2cControllerIndex+1].Bar0 + R_PCH_L= PIO_I2C_MEM_RESETS,(B_PCH_LPIO_I2C_MEM_RESETS_FUNC | B_PCH_LPIO_I2C_MEM_RES= ETS_APB)); - =20 - // - // Activate Clocks - // - MmioWrite32 (mLpssPciDeviceList[I2cControllerIndex+1].Bar0 + R_PCH_L= PSS_I2C_MEM_PCP,0x80020003);//No use for A0 - - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() Programmed()\n")); - } - =20 - // - // BDS: already switched to ACPI mode - // - else { - ASSERT(gBS!=3DNULL); - Status =3D gBS->LocateProtocol ( - &gEfiGlobalNvsAreaProtocolGuid, - NULL, - &GlobalNvsArea - ); - if (EFI_ERROR(Status)) { - DEBUG ((EFI_D_INFO, "GetI2cBarAddr() gEfiGlobalNvsAreaProtocolGuid= :%r\n", Status)); - // - // gEfiGlobalNvsAreaProtocolGuid is not ready. - // - return 0; - } - mLpssPciDeviceList[I2cControllerIndex + 1].Bar0 =3D *(UINTN*)((CHAR8= *)GlobalNvsArea->Area + mI2cNvsBaseAddress[I2cControllerIndex + 1]); - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C(): is switched to ACPI 0x:%x = \n",mLpssPciDeviceList[I2cControllerIndex + 1].Bar0)); - } - } - =20 - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() End\n")); - - return EFI_SUCCESS; -} - -/** - Disable I2C Bus. - - @param VOID. - - @return Result of the I2C disabling. -**/ -RETURN_STATUS -I2cDisable ( - VOID - ) -{=20 - // - // 0.1 seconds - // - UINT32 NumTries =3D 10000; - =20 - MmioWrite32 ( mI2CBaseAddress + R_IC_ENABLE, 0 ); - while ( 0 !=3D ( MmioRead32 ( mI2CBaseAddress + R_IC_ENABLE_STATUS) & 1)= ) { - MicroSecondDelay (10); - NumTries --; - if(0 =3D=3D NumTries) { - return RETURN_NOT_READY; - } - } - =20 - return RETURN_SUCCESS; -} - -/** - Enable I2C Bus. - - @param VOID. - - @return Result of the I2C disabling. -**/ -RETURN_STATUS -I2cEnable ( - VOID - ) -{ - // - // 0.1 seconds - // - UINT32 NumTries =3D 10000; - =20 - MmioWrite32 (mI2CBaseAddress + R_IC_ENABLE, 1); - =20 - while (0 =3D=3D (MmioRead32 (mI2CBaseAddress + R_IC_ENABLE_STATUS) & 1))= { - MicroSecondDelay (10); - NumTries --; - if(0 =3D=3D NumTries){ - return RETURN_NOT_READY; - } - } - =20 - return RETURN_SUCCESS; -} - -/** - Enable I2C Bus. - - @param VOID. - - @return Result of the I2C enabling. -**/ -RETURN_STATUS -I2cBusFrequencySet ( - IN UINTN BusClockHertz - ) -{ - DEBUG((EFI_D_INFO,"InputFreq BusClockHertz: %d\r\n",BusClockHertz)); - =20 - // - // Set the 100 KHz clock divider according to SV result and I2C spec - // - MmioWrite32 ( mI2CBaseAddress + R_IC_SS_SCL_HCNT, (UINT16)0x214 ); - MmioWrite32 ( mI2CBaseAddress + R_IC_SS_SCL_LCNT, (UINT16)0x272 ); - =20 - // - // Set the 400 KHz clock divider according to SV result and I2C spec - // - MmioWrite32 ( mI2CBaseAddress + R_IC_FS_SCL_HCNT, (UINT16)0x50 ); - MmioWrite32 ( mI2CBaseAddress + R_IC_FS_SCL_LCNT, (UINT16)0xAD ); - - switch ( BusClockHertz ) { - case 100 * 1000: - MmioWrite32 ( mI2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x40);//100K - mI2cMode =3D V_SPEED_STANDARD; - break; - case 400 * 1000: - MmioWrite32 ( mI2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x32);//400K - mI2cMode =3D V_SPEED_FAST; - break; - default: - MmioWrite32 ( mI2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x09);//3.4M - mI2cMode =3D V_SPEED_HIGH; - } - - // - // Select the frequency counter, - // Enable restart condition, - // Enable master FSM, disable slave FSM. - // - mI2cMode |=3D B_IC_RESTART_EN | B_IC_SLAVE_DISABLE | B_MASTER_MODE; - - return EFI_SUCCESS; -} - -/** - Initializes the host controller to execute I2C commands. - - @param I2cControllerIndex Index of I2C controller in LPSS device. 0 repr= esents I2C0, which is PCI function 1 of LPSS device. =20 - =20 - @return EFI_SUCCESS Opcode initialization on the I2C host controll= er completed. - @return EFI_DEVICE_ERROR Device error, operation failed. -**/ -EFI_STATUS -I2CInit ( - IN UINT8 I2cControllerIndex, - IN UINT16 SlaveAddress - ) -{ - EFI_STATUS Status=3DRETURN_SUCCESS; - UINT32 NumTries =3D 0; - UINTN GnvsI2cBarAddr=3D0; - =20 - // - // Verify the parameters - // - if ((1023 < SlaveAddress) || (6 < I2cControllerIndex)) { - Status =3D RETURN_INVALID_PARAMETER; - DEBUG((EFI_D_INFO,"I2CInit Exit with RETURN_INVALID_PARAMETER\r\n")); - return Status; - } - MmioWrite32 ( mI2CBaseAddress + R_IC_TAR, (UINT16)SlaveAddress ); - mI2CSlaveAddress =3D SlaveAddress; - - // - // 1.PEI: program and init ( before pci enumeration). - // 2.DXE:update address and re-init ( after pci enumeration). - // 3.BDS:update ACPI address and re-init ( after acpi mode is enabled). - // - if(mI2CBaseAddress =3D=3D mLpssPciDeviceList[I2cControllerIndex + 1].Bar= 0) { - =20 - // - // I2CInit is already called. - // - GnvsI2cBarAddr=3DGetI2cBarAddr(I2cControllerIndex); - =20 - if((GnvsI2cBarAddr =3D=3D 0)||(GnvsI2cBarAddr =3D=3D mI2CBaseAddress))= { - DEBUG((EFI_D_INFO,"I2CInit Exit with mI2CBaseAddress:%x =3D=3D [%x].= Bar0\r\n",mI2CBaseAddress,I2cControllerIndex+1)); - return RETURN_SUCCESS; - } - } - =20 - Status=3DProgramPciLpssI2C(I2cControllerIndex); - if(Status!=3DEFI_SUCCESS) { - return Status; - } - - - mI2CBaseAddress =3D (UINT32) mLpssPciDeviceList[I2cControllerIndex + 1].= Bar0; - DEBUG ((EFI_D_ERROR, "mI2CBaseAddress =3D 0x%x \n",mI2CBaseAddress)); - =20 - // - // 1 seconds. - // - NumTries =3D 10000;=20 - while ((1 =3D=3D ( MmioRead32 ( mI2CBaseAddress + R_IC_STATUS) & STAT_MS= T_ACTIVITY ))) { - MicroSecondDelay(10); - NumTries --; - if(0 =3D=3D NumTries) { - DEBUG((EFI_D_INFO, "Try timeout\r\n")); - return RETURN_DEVICE_ERROR; - } - } - =20 - Status =3D I2cDisable(); - DEBUG((EFI_D_INFO, "I2cDisable Status =3D %r\r\n", Status)); - I2cBusFrequencySet(400 * 1000); - - MmioWrite32(mI2CBaseAddress + R_IC_INTR_MASK, 0x0); - if (0x7f < SlaveAddress ) - SlaveAddress =3D ( SlaveAddress & 0x3ff ) | IC_TAR_10BITADDR_MASTER; - MmioWrite32 ( mI2CBaseAddress + R_IC_TAR, (UINT16)SlaveAddress ); - MmioWrite32 ( mI2CBaseAddress + R_IC_RX_TL, 0); - MmioWrite32 ( mI2CBaseAddress + R_IC_TX_TL, 0 ); - MmioWrite32 ( mI2CBaseAddress + R_IC_CON, mI2cMode); - Status =3D I2cEnable(); - - DEBUG((EFI_D_INFO, "I2cEnable Status =3D %r\r\n", Status)); - MmioRead32 ( mI2CBaseAddress + R_IC_CLR_TX_ABRT ); - =20 - return EFI_SUCCESS; -} - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C devic= e has been connected - @param SlaveAddress Device Address from which the byte value has t= o be read - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value read has to be stor= ed - @param Start Whether a RESTART is issued before the byte = is sent or received - @param End Whether STOP is generated after a data byte = is sent or received =20 - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS=20 -ByteReadI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer, - IN UINT8 Start, - IN UINT8 End - ) -{ - - EFI_STATUS Status; - UINT32 I2cStatus; - UINT16 ReceiveData; - UINT8 *ReceiveDataEnd; - UINT8 *ReceiveRequest; - UINT16 RawIntrStat; - UINT32 Count=3D0; - - Status =3D EFI_SUCCESS; - - ReceiveDataEnd =3D &ReadBuffer [ReadBytes]; - if( ReadBytes ) { - - ReceiveRequest =3D ReadBuffer; - DEBUG((EFI_D_INFO,"Read: ---------------%d bytes to RX\r\n",ReceiveDat= aEnd - ReceiveRequest)); - - while ((ReceiveDataEnd > ReceiveRequest) || (ReceiveDataEnd > ReadBuff= er)) { - =20 - // - // Check for NACK - // - RawIntrStat =3D (UINT16)MmioRead32 (mI2CBaseAddress + R_IC_RawIntrSt= at); - if ( 0 !=3D ( RawIntrStat & I2C_INTR_TX_ABRT )) { - MmioRead32 ( mI2CBaseAddress + R_IC_CLR_TX_ABRT ); - Status =3D RETURN_DEVICE_ERROR; - DEBUG((EFI_D_INFO,"TX ABRT ,%d bytes hasn't been transferred\r\n",= ReceiveDataEnd - ReceiveRequest)); - break; - } - =20 - // - // Determine if another byte was received - // - I2cStatus =3D (UINT16)MmioRead32 (mI2CBaseAddress + R_IC_STATUS); - if (0 !=3D ( I2cStatus & STAT_RFNE )) { - ReceiveData =3D (UINT16)MmioRead32 ( mI2CBaseAddress + R_IC_DATA_C= MD ); - *ReadBuffer++ =3D (UINT8)ReceiveData; - DEBUG((EFI_D_INFO,"MmioRead32 ,1 byte 0x:%x is received\r\n",Recei= veData)); - } - - if(ReceiveDataEnd =3D=3D ReceiveRequest) { - MicroSecondDelay ( FIFO_WRITE_DELAY ); - DEBUG((EFI_D_INFO,"ReceiveDataEnd=3D=3DReceiveRequest------------%= x\r\n",I2cStatus & STAT_RFNE)); - Count++; - if(Count<1024) { - // - // To avoid sys hung without ul-pmc device on RVP, - // waiting the last request to get data and make (ReceiveDataEnd= > ReadBuffer) =3DTRUE. - // - continue; - } else { - break; - } - } - =20 - // - // Wait until a read request will fit. - // - if (0 =3D=3D (I2cStatus & STAT_TFNF)) { - DEBUG((EFI_D_INFO,"Wait until a read request will fit\r\n")); - MicroSecondDelay (10); - continue; - } - =20 - // - // Issue the next read request. - // - if(End && Start) { - MmioWrite32 ( mI2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_RE= START|B_CMD_STOP); - } else if (!End && Start) { - MmioWrite32 ( mI2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_RE= START); - } else if (End && !Start) { - MmioWrite32 ( mI2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|B_CMD_ST= OP); - } else if (!End && !Start) { - MmioWrite32 ( mI2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD); - } - MicroSecondDelay (FIFO_WRITE_DELAY); - - ReceiveRequest +=3D 1; - } - } - =20 - return Status; -} - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be written - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value written is stored - @param Start Whether a RESTART is issued before the byte = is sent or received - @param End Whether STOP is generated after a data byte = is sent or received =20 - =20 - @return EFI_SUCCESS IF the byte value has been successfully wri= tten - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS ByteWriteI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer, - IN UINT8 Start, - IN UINT8 End - ) -{ - - EFI_STATUS Status; - UINT32 I2cStatus; - UINT8 *TransmitEnd; - UINT16 RawIntrStat; - UINT32 Count=3D0; - - Status =3D EFI_SUCCESS; - - Status=3DI2CInit(I2cControllerIndex, SlaveAddress); - if(Status!=3DEFI_SUCCESS) - return Status; - - TransmitEnd =3D &WriteBuffer[WriteBytes]; - if( WriteBytes ) { - DEBUG((EFI_D_INFO,"Write: --------------%d bytes to TX\r\n",TransmitEn= d - WriteBuffer)); - while (TransmitEnd > WriteBuffer) { - I2cStatus =3D MmioRead32 (mI2CBaseAddress + R_IC_STATUS); - RawIntrStat =3D (UINT16)MmioRead32 (mI2CBaseAddress + R_IC_RawIntrSt= at); - if (0 !=3D ( RawIntrStat & I2C_INTR_TX_ABRT)) { - MmioRead32 ( mI2CBaseAddress + R_IC_CLR_TX_ABRT); - Status =3D RETURN_DEVICE_ERROR; - DEBUG((EFI_D_ERROR,"TX ABRT TransmitEnd:0x%x WriteBuffer:0x%x\r\n"= , TransmitEnd, WriteBuffer)); - break; - } - if (0 =3D=3D (I2cStatus & STAT_TFNF)) { - // - // If TX not full , will send cmd or continue to wait - // - MicroSecondDelay (FIFO_WRITE_DELAY); - continue; - } - - if(End && Start) { - MmioWrite32 (mI2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++)|B_C= MD_RESTART|B_CMD_STOP); - } else if (!End && Start) { - MmioWrite32 (mI2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++)|B_C= MD_RESTART); - } else if (End && !Start) { - MmioWrite32 (mI2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++)|B_C= MD_STOP); - } else if (!End && !Start ) { - MmioWrite32 (mI2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffer++)); - } - =20 - // - // Add a small delay to work around some odd behavior being seen. W= ithout this delay bytes get dropped. - // - MicroSecondDelay ( FIFO_WRITE_DELAY );//wait after send cmd - =20 - // - // Time out - // - while(1) { - RawIntrStat =3D MmioRead16 ( mI2CBaseAddress + R_IC_RawIntrStat ); - if (0 !=3D ( RawIntrStat & I2C_INTR_TX_ABRT)) { - MmioRead16 (mI2CBaseAddress + R_IC_CLR_TX_ABRT); - Status =3D RETURN_DEVICE_ERROR; - DEBUG((EFI_D_ERROR,"TX ABRT TransmitEnd:0x%x WriteBuffer:0x%x\r\= n", TransmitEnd, WriteBuffer)); - } - if(0 =3D=3D MmioRead16(mI2CBaseAddress + R_IC_TXFLR)) break; - - MicroSecondDelay (FIFO_WRITE_DELAY); - Count++; - if(Count<1024) { - // - // to avoid sys hung without ul-pmc device on RVP. - // Waiting the last request to get data and make (ReceiveDataEnd= > ReadBuffer) =3DTRUE. - // - continue; - } else { - break; - } - }//while( 1 ) - } - - } - - return Status; -} - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be read - @param Offset Offset from which the data has to be read - @param ReadBytes Number of bytes to be read - @param *ReadBuffer Address to which the value read has to be s= tored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS ByteReadI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer - ) -{ - EFI_STATUS Status; - - DEBUG ((EFI_D_INFO, "ByteReadI2C:---offset:0x%x\n",Offset)); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress,1,&Offset,= TRUE,FALSE); - Status =3D ByteReadI2CBasic(I2cControllerIndex, SlaveAddress,ReadBytes,R= eadBuffer,TRUE,TRUE); - - return Status; -} - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been = connected - @param SlaveAddress Device Address from which the byte value has= to be written - @param Offset Offset from which the data has to be written - @param WriteBytes Number of bytes to be written - @param *Byte Address to which the value written is stored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS ByteWriteI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer - ) -{ - EFI_STATUS Status; - - DEBUG ((EFI_D_INFO, "ByteWriteI2C:---offset/bytes/buf:0x%x,0x%x,0x%x,0x%= x\n",Offset,WriteBytes,WriteBuffer,*WriteBuffer)); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress,1,&Offset,= TRUE,FALSE); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress,WriteBytes= ,WriteBuffer,FALSE,TRUE); - - return Status; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLibDxe.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLibDxe.inf deleted file mode 100644 index cd10f1de93..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CLibDxe.inf +++ /dev/null @@ -1,39 +0,0 @@ -## @file -# Instance of I2C Library. -# -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D I2CLib - FILE_GUID =3D 7f62bf44-2ba7-4c2d-9d4a-91c8906ff053 - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D I2CLib|DXE_DRIVER DXE_RUNTIME_DRIVER = UEFI_DRIVER UEFI_APPLICATION - =20 -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources.common] - I2CLib.c - -[LibraryClasses] - BaseLib - IoLib - TimerLib - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - -[Protocols] - gEfiGlobalNvsAreaProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CRegs.h b= /Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CRegs.h deleted file mode 100644 index 57455162f6..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibDxe/I2CRegs.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file - Register Definitions for I2C Driver/PEIM. - =20 - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 ---*/ - -#ifndef I2C_REGS_H -#define I2C_REGS_H - -// -// FIFO write delay value. -// -#define FIFO_WRITE_DELAY 2 - -// -// MMIO Register Definitions. -// -#define R_IC_CON ( 0x00) // I2C Control =20 -#define B_IC_RESTART_EN BIT5 -#define B_IC_SLAVE_DISABLE BIT6 -#define V_SPEED_STANDARD 0x02 -#define V_SPEED_FAST 0x04 -#define V_SPEED_HIGH 0x06 -#define B_MASTER_MODE BIT0 - -#define R_IC_TAR ( 0x04) // I2C Target Address -#define IC_TAR_10BITADDR_MASTER BIT12 - -#define R_IC_SAR ( 0x08) // I2C Slave Address -#define R_IC_HS_MADDR ( 0x0C) // I2C HS MasterMode = Code Address -#define R_IC_DATA_CMD ( 0x10) // I2C Rx/Tx Data Buf= fer and Command - -#define B_READ_CMD BIT8 // 1 =3D read, 0 =3D= write -#define B_CMD_STOP BIT9 // 1 =3D STOP -#define B_CMD_RESTART BIT10 // 1 =3D IC_RESTART_= EN - -#define V_WRITE_CMD_MASK ( 0xFF) - -#define R_IC_SS_SCL_HCNT ( 0x14) // Standard Speed I2C= Clock SCL High Count -#define R_IC_SS_SCL_LCNT ( 0x18) // Standard Speed I2C= Clock SCL Low Count -#define R_IC_FS_SCL_HCNT ( 0x1C) // Full Speed I2C Clo= ck SCL High Count -#define R_IC_FS_SCL_LCNT ( 0x20) // Full Speed I2C Clo= ck SCL Low Count -#define R_IC_HS_SCL_HCNT ( 0x24) // High Speed I2C Clo= ck SCL High Count -#define R_IC_HS_SCL_LCNT ( 0x28) // High Speed I2C Clo= ck SCL Low Count -#define R_IC_INTR_STAT ( 0x2C) // I2C Inetrrupt Stat= us -#define R_IC_INTR_MASK ( 0x30) // I2C Interrupt Mask -#define I2C_INTR_GEN_CALL BIT11 // General call recei= ved -#define I2C_INTR_START_DET BIT10 -#define I2C_INTR_STOP_DET BIT9 -#define I2C_INTR_ACTIVITY BIT8 -#define I2C_INTR_TX_ABRT BIT6 // Set on NACK -#define I2C_INTR_TX_EMPTY BIT4 -#define I2C_INTR_TX_OVER BIT3 -#define I2C_INTR_RX_FULL BIT2 // Data bytes in RX F= IFO over threshold -#define I2C_INTR_RX_OVER BIT1 -#define I2C_INTR_RX_UNDER BIT0 -#define R_IC_RawIntrStat ( 0x34) // I2C Raw Interrupt St= atus -#define R_IC_RX_TL ( 0x38) // I2C Receive FIFO T= hreshold -#define R_IC_TX_TL ( 0x3C) // I2C Transmit FIFO = Threshold -#define R_IC_CLR_INTR ( 0x40) // Clear Combined and= Individual Interrupts -#define R_IC_CLR_RX_UNDER ( 0x44) // Clear RX_UNDER Int= errupt -#define R_IC_CLR_RX_OVER ( 0x48) // Clear RX_OVERinter= rupt -#define R_IC_CLR_TX_OVER ( 0x4C) // Clear TX_OVER inte= rrupt -#define R_IC_CLR_RD_REQ ( 0x50) // Clear RD_REQ inter= rupt -#define R_IC_CLR_TX_ABRT ( 0x54) // Clear TX_ABRT inte= rrupt -#define R_IC_CLR_RX_DONE ( 0x58) // Clear RX_DONE inte= rrupt -#define R_IC_CLR_ACTIVITY ( 0x5C) // Clear ACTIVITY int= errupt -#define R_IC_CLR_STOP_DET ( 0x60) // Clear STOP_DET int= errupt -#define R_IC_CLR_START_DET ( 0x64) // Clear START_DET in= terrupt -#define R_IC_CLR_GEN_CALL ( 0x68) // Clear GEN_CALL int= errupt -#define R_IC_ENABLE ( 0x6C) // I2C Enable -#define R_IC_STATUS ( 0x70) // I2C Status - -#define R_IC_SDA_HOLD ( 0x7C) // I2C IC_DEFAULT_SDA= _HOLD//16bits - -#define STAT_MST_ACTIVITY BIT5 // Master FSM Activit= y Status. -#define STAT_RFF BIT4 // RX FIFO is complet= ely full -#define STAT_RFNE BIT3 // RX FIFO is not emp= ty -#define STAT_TFE BIT2 // TX FIFO is complet= ely empty -#define STAT_TFNF BIT1 // TX FIFO is not full - -#define R_IC_TXFLR ( 0x74) // Transmit FIFO Leve= l Register -#define R_IC_RXFLR ( 0x78) // Receive FIFO Level= Register -#define R_IC_TX_ABRT_SOURCE ( 0x80) // I2C Transmit Abort= Status Register -#define R_IC_SLV_DATA_NACK_ONLY ( 0x84) // Generate SLV_DATA_= NACK Register -#define R_IC_DMA_CR ( 0x88) // DMA Control Regist= er -#define R_IC_DMA_TDLR ( 0x8C) // DMA Transmit Data = Level -#define R_IC_DMA_RDLR ( 0x90) // DMA Receive Data L= evel -#define R_IC_SDA_SETUP ( 0x94) // I2C SDA Setup Regi= ster -#define R_IC_ACK_GENERAL_CALL ( 0x98) // I2C ACK General Ca= ll Register -#define R_IC_ENABLE_STATUS ( 0x9C) // I2C Enable Status = Register -#define R_IC_COMP_PARAM ( 0xF4) // Component Paramete= r Register -#define R_IC_COMP_VERSION ( 0xF8) // Component Version = ID -#define R_IC_COMP_TYPE ( 0xFC) // Component Type - -#define I2C_SS_SCL_HCNT_VALUE_100M 0x1DD -#define I2C_SS_SCL_LCNT_VALUE_100M 0x1E4 -#define I2C_FS_SCL_HCNT_VALUE_100M 0x54 -#define I2C_FS_SCL_LCNT_VALUE_100M 0x9a -#define I2C_HS_SCL_HCNT_VALUE_100M 0x7 -#define I2C_HS_SCL_LCNT_VALUE_100M 0xE - -#define IC_TAR_10BITADDR_MASTER BIT12 -#define FIFO_SIZE 32 -#define R_IC_INTR_STAT ( 0x2C) // I2c Inetrrupt Sta= tus -#define R_IC_INTR_MASK ( 0x30) // I2c Interrupt Mask -#define I2C_INTR_GEN_CALL BIT11 // General call recei= ved -#define I2C_INTR_START_DET BIT10 -#define I2C_INTR_STOP_DET BIT9 -#define I2C_INTR_ACTIVITY BIT8 -#define I2C_INTR_TX_ABRT BIT6 // Set on NACK -#define I2C_INTR_TX_EMPTY BIT4 -#define I2C_INTR_TX_OVER BIT3 -#define I2C_INTR_RX_FULL BIT2 // Data bytes in RX F= IFO over threshold -#define I2C_INTR_RX_OVER BIT1 -#define I2C_INTR_RX_UNDER BIT0 - -#define R_PCH_LPIO_I2C_MEM_RESETS 0x804 // Software Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_FUNC BIT1 // Function Clock = Domain Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_APB BIT0 // APB Domain Reset -#define R_PCH_LPSS_I2C_MEM_PCP 0x800 // Private Clock P= arameters - -#endif \ No newline at end of file diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CAccess.h= b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CAccess.h deleted file mode 100644 index bf6ef4c747..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CAccess.h +++ /dev/null @@ -1,44 +0,0 @@ -/** @file - Misc Registers Definition. - =20 - Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 ---*/ - -#ifndef _I2C_ACCESS_H_ -#define _I2C_ACCESS_H_ - -#include "I2CIoLibPei.h" - -#define DEFAULT_PCI_BUS_NUMBER_PCH 0 - -#define PCI_DEVICE_NUMBER_PCH_LPC 31 -#define PCI_FUNCTION_NUMBER_PCH_LPC 0 - -#define R_PCH_LPC_ACPI_BASE 0x40 // ABASE, 1= 6bit -#define R_PCH_LPC_ACPI_BASEADR 0x400 // ABASE, 1= 6bit -#define B_PCH_LPC_ACPI_BASE_EN BIT1 // Enable B= it -#define B_PCH_LPC_ACPI_BASE_BAR 0x0000FF80 // Base Add= ress, 128 Bytes -#define V_PCH_ACPI_PM1_TMR_MAX_VAL 0x1000000 // The time= r is 24 bit overflow -#define B_PCH_ACPI_PM1_TMR_VAL 0xFFFFFF // The time= r value mask - -#define R_PCH_ACPI_PM1_TMR 0x08 // Power Ma= nagement 1 Timer -#define V_PCH_ACPI_PM1_TMR_FREQUENCY 3579545 // Timer Fr= equency - - -#define PchLpcPciCfg8(Register) I2CLibPeiMmioRead8 (MmPciAddress (0, DEFAU= LT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPC, 0, Register)) - -#define PCIEX_BASE_ADDRESS 0xE0000000 -#define PCI_EXPRESS_BASE_ADDRESS ((VOID *) (UINTN) PCIEX_BAS= E_ADDRESS) - -#define MmPciAddress( Segment, Bus, Device, Function, Register ) \ - ( (UINTN)PCI_EXPRESS_BASE_ADDRESS + \ - (UINTN)(Bus << 20) + \ - (UINTN)(Device << 15) + \ - (UINTN)(Function << 12) + \ - (UINTN)(Register) \ - ) -#endif - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei= .c b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei.c deleted file mode 100644 index d5f8dfd012..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei.c +++ /dev/null @@ -1,46 +0,0 @@ -/** @file - MicroSecondDelay implementation of ACPI Timer. - =20 - Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 ---*/ - -#include "PiPei.h" -#include "I2CAccess.h" -#include "I2CDelayPei.h" -#include -#include -#include - -/** - Stalls the CPU for at least the given number of microseconds. - Stalls the CPU for the number of microseconds specified by MicroSeconds. - - @param MicroSeconds The minimum number of microseconds to delay. - - @return EFI_STATUS - -**/ -EFI_STATUS -EFIAPI -MicroSecondDelay ( - IN UINTN MicroSeconds - ) -{ - - EFI_PEI_STALL_PPI *StallPpi; - EFI_STATUS Status; - CONST EFI_PEI_SERVICES **PeiServices; - =20 - PeiServices =3D GetPeiServicesTablePointer(); - - - Status =3D (**PeiServices).LocatePpi (PeiServices, &gEfiPeiStallPpiGuid,= 0, NULL, &StallPpi); - ASSERT(!EFI_ERROR(Status)); - - StallPpi->Stall (PeiServices, StallPpi, MicroSeconds); - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei= .h b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei.h deleted file mode 100644 index 604f1f67c5..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei.h +++ /dev/null @@ -1,30 +0,0 @@ -/** @file - MicroSecondDelay implementation of ACPI Timer. - - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __I2C_DELAY_PEI__ - -#define __I2C_DELAY_PEI__ -#include "PiPei.h" - -/** - Stalls the CPU for at least the given number of microseconds. - - Stalls the CPU for the number of microseconds specified by MicroSeconds. - - @param MicroSeconds The minimum number of microseconds to delay. - - @return MicroSeconds - -**/ -EFI_STATUS -EFIAPI -MicroSecondDelay ( - IN UINTN MicroSeconds - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei= .c b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei.c deleted file mode 100644 index 6a37dbec1d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei.c +++ /dev/null @@ -1,178 +0,0 @@ -/** @file - Functions for access I2C MMIO register. - - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include -#include - -/** - Reads an 8-bit MMIO register. - - Reads the 8-bit MMIO register specified by Address. The 8-bit read value= is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 8-bit MMIO register operations are not supported, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -I2CLibPeiMmioRead8 ( - IN UINTN Address - ) -{ - UINT8 Value; - - Value =3D *(volatile UINT8*)Address; - return Value; -} - -/** - Reads a 16-bit MMIO register. - - Reads the 16-bit MMIO register specified by Address. The 16-bit read val= ue is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 16-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 16-bit boundary, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ -UINT16 -EFIAPI -I2CLibPeiMmioRead16 ( - IN UINTN Address - ) -{ - UINT16 Value; - - ASSERT ((Address & 1) =3D=3D 0); - Value =3D *(volatile UINT16*)Address; - return Value; -} - -/** - Writes a 16-bit MMIO register. - - Writes the 16-bit MMIO register specified by Address with the value spec= ified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 16-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 16-bit boundary, then ASSERT(). - - @param Address The MMIO register to write. - @param Value The value to write to the MMIO register. - - @return Value. - -**/ -UINT16 -EFIAPI -I2CLibPeiMmioWrite16 ( - IN UINTN Address, - IN UINT16 Value - ) -{ - ASSERT ((Address & 1) =3D=3D 0); - *(volatile UINT16*)Address =3D Value; - return Value; -} - -/** - Reads a 32-bit MMIO register. - - Reads the 32-bit MMIO register specified by Address. The 32-bit read val= ue is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioRead32 ( - IN UINTN Address - ) -{ - UINT32 Value; - - ASSERT ((Address & 3) =3D=3D 0); - Value =3D *(volatile UINT32*)Address; - - return Value; -} - -/** - Writes a 32-bit MMIO register. - - Writes the 32-bit MMIO register specified by Address with the value spec= ified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to write. - @param Value The value to write to the MMIO register. - - @return Value. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioWrite32 ( - IN UINTN Address, - IN UINT32 Value - ) -{ - ASSERT ((Address & 3) =3D=3D 0); - *(volatile UINT32*)Address =3D Value; - return Value; -} - -/** - OR a 32-bit MMIO register. - - OR the 32-bit MMIO register specified by Address with the value specified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to write OR. - @param Value The value to OR to the MMIO register. - - @return Value. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioOr32 ( - IN UINTN Address, - IN UINT32 OrData - ) -{ - return I2CLibPeiMmioWrite32 (Address, I2CLibPeiMmioRead32(Address) | OrD= ata); -} - - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei= .h b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei.h deleted file mode 100644 index b68bc1ed09..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei.h +++ /dev/null @@ -1,153 +0,0 @@ -/** @file - Functions for access I2C MMIO register. - - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __I2C_IOLIB_PEI__ - -#define __I2C_IOLIB_PEI__ -#include - - -/** - Reads an 8-bit MMIO register. - - Reads the 8-bit MMIO register specified by Address. The 8-bit read value= is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 8-bit MMIO register operations are not supported, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ - -UINT8 -EFIAPI -I2CLibPeiMmioRead8 ( - IN UINTN Address - ); - - -/** - Reads a 16-bit MMIO register. - - Reads the 16-bit MMIO register specified by Address. The 16-bit read val= ue is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 16-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 16-bit boundary, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ -UINT16 -EFIAPI -I2CLibPeiMmioRead16 ( - IN UINTN Address - ); - - -/** - Writes a 16-bit MMIO register. - - Writes the 16-bit MMIO register specified by Address with the value spec= ified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 16-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 16-bit boundary, then ASSERT(). - - @param Address The MMIO register to write. - @param Value The value to write to the MMIO register. - - @return Value. - -**/ -UINT16 -EFIAPI -I2CLibPeiMmioWrite16 ( - IN UINTN Address, - IN UINT16 Value - ); - - -/** - Reads a 32-bit MMIO register. - - Reads the 32-bit MMIO register specified by Address. The 32-bit read val= ue is - returned. This function must guarantee that all MMIO read and write - operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to read. - - @return The value read. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioRead32 ( - IN UINTN Address - ); - - -/** - Writes a 32-bit MMIO register. - - Writes the 32-bit MMIO register specified by Address with the value spec= ified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to write. - @param Value The value to write to the MMIO register. - - @return Value. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioWrite32 ( - IN UINTN Address, - IN UINT32 Value - ); - - -/** - OR a 32-bit MMIO register. - - OR the 32-bit MMIO register specified by Address with the value specified - by Value and returns Value. This function must guarantee that all MMIO r= ead - and write operations are serialized. - - If 32-bit MMIO register operations are not supported, then ASSERT(). - If Address is not aligned on a 32-bit boundary, then ASSERT(). - - @param Address The MMIO register to write OR. - @param Value The value to OR to the MMIO register. - - @return Value. - -**/ -UINT32 -EFIAPI -I2CLibPeiMmioOr32 ( - IN UINTN Address, - IN UINT32 OrData - ); - - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.c= b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.c deleted file mode 100644 index dd5cceb70d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.c +++ /dev/null @@ -1,638 +0,0 @@ -/** @file - I2C PEI Lib Instance. - - Copyright (c) 1999- 2015, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "I2CDelayPei.h" -#include "I2CIoLibPei.h" -#include "I2CAccess.h" -#include "I2CLibPei.h" -#include -#include -#include -#include -#include -#include =20 -#include =20 - -#define LPSS_PCI_DEVICE_NUMBER 8 - -#define R_PCH_LPIO_I2C_MEM_RESETS 0x804 // Software Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_FUNC BIT1 // Function Clock = Domain Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_APB BIT0 // APB Domain Reset -#define R_PCH_LPSS_I2C_MEM_PCP 0x800 // Private Clock P= arameters - -#define PEI_TEPM_LPSS_DMA_BAR 0xFE900000 -#define PEI_TEPM_LPSS_I2C0_BAR 0xFE910000 -#define PCI_CONFIG_SPACE_SIZE 0x10000 - -EFI_GUID mI2CPeiInitGuid =3D { - 0x96DED71A, 0xB9E7, 0x4EAD, 0x96, 0x2C, 0x01, 0x69, 0x3C, 0xED, 0x2A, 0x= 64 -}; - - -UINT16 I2CGPIO[]=3D { - // - // 19.1.6 I2C0 - // I2C0_SDA-OD-O - write 0x2003CC81 to IOBASE + 0x0210 - // I2C0_SCL-OD-O - write 0x2003CC81 to IOBASE + 0x0200 - // - 0x0210, - 0x0200, - - // - // 19.1.7 I2C1 - // I2C1_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x01F0 - // I2C1_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x01E0 - // - 0x01F0, - 0x01E0, - - // - // 19.1.8 I2C2 - // I2C2_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x01D0 - // I2C2_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x01B0 - // - 0x01D0, - 0x01B0, - - // - // 19.1.9 I2C3 - // I2C3_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x0190 - // I2C3_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x01C0 - //=20 - 0x0190, - 0x01C0, - - // - // 19.1.10 I2C4 - // I2C4_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x01A0 - // I2C4_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x0170 - // - 0x01A0, - 0x0170, - - //=20 - // 19.1.11 I2C5 - // I2C5_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x0150 - // I2C5_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x0140 - //=20 - 0x0150, - 0x0140, - - // - // 19.1.12 I2C6 - // I2C6_SDA-OD-O/I - write 0x2003CC81 to IOBASE + 0x0180 - // I2C6_SCL-OD-O/I - write 0x2003CC81 to IOBASE + 0x0160 - //=20 - 0x0180, - 0x0160 -}; - -/** - Constructor of this library. - - @param VOID - - @return EFI_SUCCESS -**/ -EFI_STATUS -EFIAPI -IntelI2CPeiLibConstructor ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - UINTN Index; - =20 - for (Index =3D 0; Index < sizeof(I2CGPIO)/sizeof(UINT16); Index ++) { - I2CLibPeiMmioWrite32(IO_BASE_ADDRESS+I2CGPIO[Index], 0x2003CC81); - } - - return EFI_SUCCESS; -} - -/** - Programe all I2C controllers on LPSS.=20 - =20 - I2C0 is function 1 of LPSS. I2C1 is function 2 of LPSS, etc.. - - @param VOID - - @return EFI_SUCCESS -**/ -EFI_STATUS -ProgramPciLpssI2C ( - VOID - ) -{ - UINT32 PmcBase; - UINT32 DevID; - UINTN PciMmBase=3D0; - UINTN Index; - UINTN Bar0; - UINTN Bar1; - DEBUG ((EFI_D_INFO, "Pei ProgramPciLpssI2C() Start\n")); - =20 - // - // Set the VLV Function Disable Register to ZERO - // - PmcBase =3D I2CLibPeiMmioRead32(PciD31F0RegBase + R_PCH_LPC_PMC_= BASE) & B_PCH_LPC_PMC_BASE_BAR; - =20 - if(I2CLibPeiMmioRead32(PmcBase + R_PCH_PMC_FUNC_DIS)& - (B_PCH_PMC_FUNC_DIS_LPSS2_FUNC1 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC2 - | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC3 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC4 |= B_PCH_PMC_FUNC_DIS_LPSS2_FUNC5 - | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC6 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC7))= { - I2CLibPeiMmioWrite32( - PmcBase+R_PCH_PMC_FUNC_DIS, - I2CLibPeiMmioRead32(PmcBase + R_PCH_PMC_FUNC_DIS)& \ - ~(B_PCH_PMC_FUNC_DIS_LPSS2_FUNC1 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC2 \ - | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC3 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC4 \ - | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC5 | B_PCH_PMC_FUNC_DIS_LPSS2_FUNC6|= B_PCH_PMC_FUNC_DIS_LPSS2_FUNC7) - ); - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() enable all I2C controllers\n"= )); - } - - for(Index =3D 0; Index < LPSS_PCI_DEVICE_NUMBER; Index ++) { - - PciMmBase =3D MmPciAddress ( - 0, - DEFAULT_PCI_BUS_NUMBER_PCH, - PCI_DEVICE_NUMBER_PCH_LPSS_I2C, - Index, - 0 - ); - DevID =3D I2CLibPeiMmioRead32(PciMmBase); - - Bar0 =3D PEI_TEPM_LPSS_DMA_BAR + (Index * PCI_CONFIG_SPACE_SIZE); - Bar1 =3D Bar0 + 0x8000; - - DEBUG((EFI_D_ERROR, "Program Pci Lpss I2C Device Function=3D%x DevID= =3D%08x\n", Index, DevID)); - =20 - // - // Check if device present - // - if (DevID !=3D 0xFFFFFFFF) { - if(!(I2CLibPeiMmioRead32 (PciMmBase + R_PCH_LPSS_I2C_STSCMD) & B_PCH= _LPSS_I2C_STSCMD_MSE)) { - // - // Program BAR 0 - // - I2CLibPeiMmioWrite32((UINTN) (PciMmBase + R_PCH_LPSS_I2C_BAR), (UI= NT32)(Bar0 & B_PCH_LPSS_I2C_BAR_BA)); - =20 - DEBUG ((EFI_D_ERROR, "I2CBaseAddress1 =3D 0x%x \n",I2CLibPeiMmioRe= ad32 (PciMmBase+R_PCH_LPSS_I2C_BAR))); - =20 - // - // Program BAR 1 - // - I2CLibPeiMmioWrite32 ((UINTN)(PciMmBase + R_PCH_LPSS_I2C_BAR1), (U= INT32)(Bar1 & B_PCH_LPSS_I2C_BAR1_BA)); - DEBUG ((EFI_D_ERROR, "I2CBaseAddress1 =3D 0x%x \n",I2CLibPeiMmioRe= ad32(PciMmBase+R_PCH_LPSS_I2C_BAR1))); - =20 - // - // Bus Master Enable & Memory Space Enable - // - I2CLibPeiMmioWrite32((UINTN) (PciMmBase + R_PCH_LPSS_I2C_STSCMD), = (UINT32)(B_PCH_LPSS_I2C_STSCMD_BME | B_PCH_LPSS_I2C_STSCMD_MSE)); - } - =20 - // - // Release Resets - // - I2CLibPeiMmioWrite32 (Bar0 + R_PCH_LPIO_I2C_MEM_RESETS, (B_PCH_LPIO_= I2C_MEM_RESETS_FUNC | B_PCH_LPIO_I2C_MEM_RESETS_APB)); - =20 - // - // Activate Clocks - // - I2CLibPeiMmioWrite32 (Bar0 + R_PCH_LPSS_I2C_MEM_PCP, 0x80020003);//N= o use for A0 - - DEBUG ((EFI_D_INFO, "ProgramPciLpssI2C() Programmed()\n")); - } - - } - =20 - DEBUG ((EFI_D_INFO, "Pei ProgramPciLpssI2C() End\n")); - - return EFI_SUCCESS; -} - -/** - Disable I2C Bus. - - @param I2cControllerIndex Index of I2C controller. - - @return EFI_SUCCESS -**/ -EFI_STATUS -I2cDisable ( - IN UINT8 I2cControllerIndex - ) -{ - UINTN I2CBaseAddress; - UINT32 NumTries =3D 10000; // 0.1 seconds - =20 - I2CBaseAddress =3D (UINT32) PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex = * PCI_CONFIG_SPACE_SIZE; - =20 - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_ENABLE, 0); - while (0 !=3D ( I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_ENABLE_STATUS= ) & 1)) { - MicroSecondDelay (10); - NumTries --; - if(0 =3D=3D NumTries) return EFI_NOT_READY; - } - =20 - return EFI_SUCCESS; -} - -/** - Enable I2C Bus. - - @param I2cControllerIndex Index of I2C controller. - - @return EFI_SUCCESS -**/ -EFI_STATUS -I2cEnable ( - IN UINT8 I2cControllerIndex - ) -{ - UINTN I2CBaseAddress; - UINT32 NumTries =3D 10000; // 0.1 seconds - =20 - I2CBaseAddress =3D (UINT32) PEI_TEPM_LPSS_I2C0_BAR+ I2cControllerIndex *= PCI_CONFIG_SPACE_SIZE; - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_ENABLE, 1); - while (0 =3D=3D ( I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_ENABLE_STA= TUS ) & 1)) { - MicroSecondDelay (10); - NumTries --; - if(0 =3D=3D NumTries) return EFI_NOT_READY; - } - =20 - return EFI_SUCCESS; -} - - -/** - Set the I2C controller bus clock frequency. - - @param[in] This Address of the library's I2C context structure - @param[in] PlatformData Address of the platform configuration data - @param[in] BusClockHertz New I2C bus clock frequency in Hertz - - @retval RETURN_SUCCESS The bus frequency was set successfully. - @retval RETURN_UNSUPPORTED The controller does not support this frequen= cy. - -**/ -EFI_STATUS -I2cBusFrequencySet ( - IN UINTN I2CBaseAddress, - IN UINTN BusClockHertz, - IN UINT16 *I2cMode - ) -{ - DEBUG((EFI_D_INFO,"InputFreq BusClockHertz: %d\r\n",BusClockHertz)); - - *I2cMode =3D B_IC_RESTART_EN | B_IC_SLAVE_DISABLE | B_MASTER_MODE; - - // - // Set the 100 KHz clock divider - // - // From Table 10 of the I2C specification - // - // High: 4.00 uS - // Low: 4.70 uS - // - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_SS_SCL_HCNT, (UINT16)0x214 = ); - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_SS_SCL_LCNT, (UINT16)0x272 = ); - =20 - // - // Set the 400 KHz clock divider - // - // From Table 10 of the I2C specification - // - // High: 0.60 uS - // Low: 1.30 uS - // - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_FS_SCL_HCNT, (UINT16)0x50 ); - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_FS_SCL_LCNT, (UINT16)0xAD ); - - switch ( BusClockHertz ) { - case 100 * 1000: - I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x40)= ;//100K - *I2cMode |=3D V_SPEED_STANDARD; - break; - case 400 * 1000: - I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x32)= ;//400K - *I2cMode |=3D V_SPEED_FAST; - break; - default: - I2CLibPeiMmioWrite32 ( I2CBaseAddress + R_IC_SDA_HOLD, (UINT16)0x09)= ;//3.4M - *I2cMode |=3D V_SPEED_HIGH; - } - - return EFI_SUCCESS; -} - -/** - Initializes the host controller to execute I2C commands. - - @param I2cControllerIndex Index of I2C controller in LPSS device. 0 repr= esents I2C0, which is PCI function 1 of LPSS device. =20 - =20 - @return EFI_SUCCESS Opcode initialization on the I2C host controll= er completed. - @return EFI_DEVICE_ERROR Device error, operation failed. -**/ -EFI_STATUS -I2CInit ( - UINT8 I2cControllerIndex,=20 - UINT16 SlaveAddress - ) -{ - EFI_STATUS Status; - UINT32 NumTries =3D 0; - UINTN I2CBaseAddress; - UINT16 I2cMode; - UINTN PciMmBase=3D0; - - - PciMmBase =3D MmPciAddress ( - 0, - DEFAULT_PCI_BUS_NUMBER_PCH, - PCI_DEVICE_NUMBER_PCH_LPSS_I2C, - (I2cControllerIndex + 1), - 0 - ); - - I2CBaseAddress =3D I2CLibPeiMmioRead32 (PciMmBase+R_PCH_LPSS_I2C_BAR); - - // - // Verify the parameters - // - if (1023 < SlaveAddress ) { - Status =3D EFI_INVALID_PARAMETER; - DEBUG((EFI_D_INFO,"I2cStartRequest Exit with Status %r\r\n", Status)); - return Status; - } - - if(I2CBaseAddress =3D=3D (PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex *= PCI_CONFIG_SPACE_SIZE)) { - return EFI_SUCCESS; - } - ProgramPciLpssI2C(); - - I2CBaseAddress =3D (UINT32) (PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex= * PCI_CONFIG_SPACE_SIZE); - DEBUG ((EFI_D_ERROR, "I2CBaseAddress =3D 0x%x \n",I2CBaseAddress)); - NumTries =3D 10000; // 1 seconds - while ((1 =3D=3D ( I2CLibPeiMmioRead32 ( I2CBaseAddress + R_IC_STATUS) &= STAT_MST_ACTIVITY ))) { - MicroSecondDelay(10); - NumTries --; - if(0 =3D=3D NumTries) - return EFI_DEVICE_ERROR; - } - - Status =3D I2cDisable (I2cControllerIndex); - DEBUG((EFI_D_INFO, "I2cDisable Status =3D %r\r\n", Status)); - - I2cBusFrequencySet(I2CBaseAddress, 400 * 1000, &I2cMode);//Set I2cMode - - I2CLibPeiMmioWrite16(I2CBaseAddress + R_IC_INTR_MASK, 0x0); - if (0x7F < SlaveAddress) { - SlaveAddress =3D (SlaveAddress & 0x3ff ) | IC_TAR_10BITADDR_MASTER; - } - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_TAR, (UINT16) SlaveAddress ); - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_RX_TL, 0); - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_TX_TL, 0 ); - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_CON, I2cMode); - - Status =3D I2cEnable(I2cControllerIndex); - DEBUG((EFI_D_INFO, "I2cEnable Status =3D %r\r\n", Status)); - I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_CLR_TX_ABRT ); - =20 - return EFI_SUCCESS; -} - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been = connected - @param SlaveAddress Device Address from which the byte value has= to be read - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value read has to be st= ored - =20 - @return EFI_SUCCESS If the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS ByteReadI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer, - IN UINT8 Start, - IN UINT8 End - ) -{ - - EFI_STATUS Status; - UINT32 I2cStatus; - UINT16 ReceiveData; - UINT8 *ReceiveDataEnd; - UINT8 *ReceiveRequest; - UINT16 RawIntrStat; - UINTN I2CBaseAddress; - - I2CBaseAddress =3D (UINT32)(PEI_TEPM_LPSS_I2C0_BAR + I2cControllerIndex = * PCI_CONFIG_SPACE_SIZE); - - Status =3D EFI_SUCCESS; - - I2CInit(I2cControllerIndex, SlaveAddress); - - ReceiveDataEnd =3D &ReadBuffer [ReadBytes]; - if(ReadBytes) { - ReceiveRequest =3D ReadBuffer; - DEBUG((EFI_D_INFO,"Read: ---------------%d bytes to RX\r\n",ReceiveDat= aEnd - ReceiveRequest)); - - while ((ReceiveDataEnd > ReceiveRequest) || (ReceiveDataEnd > ReadBuff= er)) { - // - // Check for NACK - // - RawIntrStat =3D I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_RawIntrSt= at ); - if ( 0 !=3D (RawIntrStat & I2C_INTR_TX_ABRT )) { - I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_CLR_TX_ABRT ); - Status =3D RETURN_DEVICE_ERROR; - DEBUG((EFI_D_INFO,"TX ABRT ,%d bytes hasn't been transferred\r\n",= ReceiveDataEnd - ReceiveRequest)); - break; - } - =20 - // - // Determine if another byte was received - // - I2cStatus =3D I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_STATUS ); - if ( 0 !=3D ( I2cStatus & STAT_RFNE )) { - ReceiveData =3D I2CLibPeiMmioRead16 ( I2CBaseAddress + R_IC_DATA_C= MD ); - *ReadBuffer++ =3D (UINT8)ReceiveData; - DEBUG((EFI_D_INFO,"MmioRead32 ,1 byte 0x:%x is received\r\n",Recei= veData)); - } - - if(ReceiveDataEnd=3D=3DReceiveRequest) { - // - // Waiting the last request to get data and make (ReceiveDataEnd >= ReadBuffer) =3DTRUE. - // - continue; - } - =20 - // - // Wait until a read request will fit - // - if ( 0 =3D=3D ( I2cStatus & STAT_TFNF )) { - MicroSecondDelay ( 10 ); - continue; - } - =20 - // - // Issue the next read request - // - if(End && Start ) { - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|= B_CMD_RESTART|B_CMD_STOP); - } else if (!End && Start ) { - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|= B_CMD_RESTART); - } else if (End && !Start ) { - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD|= B_CMD_STOP); - } else if (!End && !Start ) { - I2CLibPeiMmioWrite16 ( I2CBaseAddress + R_IC_DATA_CMD, B_READ_CMD); - } - ReceiveRequest +=3D 1; - } - - } - return Status; - -} - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be written - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value written is stored - =20 - @return EFI_SUCCESS IF the byte value has been successfully wri= tten - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS=20 -ByteWriteI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer, - IN UINT8 Start, - IN UINT8 End - ) -{ - - EFI_STATUS Status; - UINT32 I2cStatus; - UINT8 *TransmitEnd; - UINT16 RawIntrStat; - UINTN I2CBaseAddress; - - I2CBaseAddress =3D (UINT32)PEI_TEPM_LPSS_I2C0_BAR+ I2cControllerIndex * = PCI_CONFIG_SPACE_SIZE; - - Status =3D EFI_SUCCESS; - - I2CInit(I2cControllerIndex, SlaveAddress); - - TransmitEnd =3D &WriteBuffer [WriteBytes]; - if( WriteBytes ) { - - DEBUG((EFI_D_INFO,"Write: --------------%d bytes to TX\r\n", TransmitE= nd - WriteBuffer)); - - while ( TransmitEnd > WriteBuffer) { - I2cStatus =3D I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_STATUS); - RawIntrStat =3D I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_RawIntrSt= at); - if ( 0 !=3D (RawIntrStat & I2C_INTR_TX_ABRT)) { - I2CLibPeiMmioRead16 (I2CBaseAddress + R_IC_CLR_TX_ABRT); - Status =3D RETURN_DEVICE_ERROR; - DEBUG((EFI_D_ERROR,"TX ABRT TransmitEnd:0x%x WriteBuffer:0x%x\r\n"= , TransmitEnd, WriteBuffer)); - break; - } - if (0 =3D=3D ( I2cStatus & STAT_TFNF)) { - continue; - } - if(End && Start) { - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffe= r++) | B_CMD_RESTART | B_CMD_STOP); - } else if (!End && Start ) { - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffe= r++) | B_CMD_RESTART); - } else if (End && !Start ) { - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffe= r++) | B_CMD_STOP); - } else if (!End && !Start ) { - I2CLibPeiMmioWrite16 (I2CBaseAddress + R_IC_DATA_CMD, (*WriteBuffe= r++)); - } - =20 - // Add a small delay to work around some odd behavior being seen. W= ithout this delay bytes get dropped. - MicroSecondDelay ( FIFO_WRITE_DELAY ); - } - - } - =20 - if(EFI_ERROR(Status)) { - DEBUG((EFI_D_INFO,"I2cStartRequest Exit with Status %r\r\n",Status)); - } - =20 - return Status; -} - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be read - @param Offset Offset from which the data has to be read - @param ReadBytes Number of bytes to be read - @param *ReadBuffer Address to which the value read has to be s= tored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS=20 -ByteReadI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer - ) -{ - EFI_STATUS Status; - - DEBUG ((EFI_D_ERROR, "ByteReadI2C:---offset:0x%x\n",Offset)); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress, 1, &Offse= t,TRUE,FALSE); - Status =3D ByteReadI2CBasic(I2cControllerIndex, SlaveAddress, ReadBytes,= ReadBuffer, TRUE, TRUE); - - return Status; -} - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been = connected - @param SlaveAddress Device Address from which the byte value has= to be written - @param Offset Offset from which the data has to be written - @param WriteBytes Number of bytes to be written - @param *Byte Address to which the value written is stored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS ByteWriteI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer - ) -{ - EFI_STATUS Status; - - DEBUG ((EFI_D_ERROR, "ByteWriteI2C:---offset/bytes/buf:0x%x,0x%x,0x%x,0x= %x\n",Offset,WriteBytes,WriteBuffer,*WriteBuffer)); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress, 1, &Offse= t, TRUE, FALSE); - Status =3D ByteWriteI2CBasic(I2cControllerIndex, SlaveAddress, WriteByte= s, WriteBuffer, FALSE, TRUE); - - return Status; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.h= b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.h deleted file mode 100644 index 47536aebf7..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.h +++ /dev/null @@ -1,280 +0,0 @@ -/** @file - I2C PEI Lib Instance. - - Copyright (c) 1999- 2015, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef I2C_PEI_REGS_H -#define I2C_PEI_REGS_H - -#include "PiPei.h" - -#define R_PCH_LPC_PMC_BASE 0x44 -#define B_PCH_LPC_PMC_BASE_BAR 0xFFFFFE00 -#define R_PCH_PMC_FUNC_DIS 0x34 // Function Disabl= e Register -#define PCIEX_BASE_ADDRESS 0xE0000000 -#define PciD31F0RegBase PCIEX_BASE_ADDRESS + (UI= NT32) (31 << 15) -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC7 BIT7 // LPSS SPI Disable -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC6 BIT6 // LPSS HSUART #2 = Disable -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC5 BIT5 // LPSS HSUART #1 = Disable -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC4 BIT4 // LPSS I2S Disable -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC3 BIT3 // LPSS PCM Disable -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC2 BIT2 // LPSS I2C #2 Dis= able -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC1 BIT1 // LPSS I2C #1 Dis= able -#define B_PCH_PMC_FUNC_DIS_LPSS_FUNC0 BIT0 // LPSS DMA Disable - - -#define DEFAULT_PCI_BUS_NUMBER_PCH 0 - -#define R_PCH_LPSS_I2C_STSCMD 0x04 // Status & Command -#define B_PCH_LPSS_I2C_STSCMD_RMA BIT29 // RMA -#define B_PCH_LPSS_I2C_STSCMD_RCA BIT28 // RCA -#define B_PCH_LPSS_I2C_STSCMD_CAPLIST BIT20 // Capability List -#define B_PCH_LPSS_I2C_STSCMD_INTRSTS BIT19 // Interrupt Status -#define B_PCH_LPSS_I2C_STSCMD_INTRDIS BIT10 // Interrupt Disab= le -#define B_PCH_LPSS_I2C_STSCMD_SERREN BIT8 // SERR# Enable -#define B_PCH_LPSS_I2C_STSCMD_BME BIT2 // Bus Master Enab= le -#define B_PCH_LPSS_I2C_STSCMD_MSE BIT1 // Memory Space En= able - -#define R_PCH_LPSS_I2C_BAR 0x10 // BAR -#define B_PCH_LPSS_I2C_BAR_BA 0xFFFFF000 // Base Addre= ss -#define B_PCH_LPSS_I2C_BAR_SI 0x00000FF0 // Size Indic= ator -#define B_PCH_LPSS_I2C_BAR_PF BIT3 // Prefetchable -#define B_PCH_LPSS_I2C_BAR_TYPE (BIT2 | BIT1) // Type -#define B_PCH_LPSS_I2C_BAR_MS BIT0 // Message Space - -#define R_PCH_LPSS_I2C_BAR1 0x14 // BAR 1 -#define B_PCH_LPSS_I2C_BAR1_BA 0xFFFFF000 // Base Addre= ss -#define B_PCH_LPSS_I2C_BAR1_SI 0x00000FF0 // Size Indic= ator -#define B_PCH_LPSS_I2C_BAR1_PF BIT3 // Prefetchable -#define B_PCH_LPSS_I2C_BAR1_TYPE (BIT2 | BIT1) // Type -#define B_PCH_LPSS_I2C_BAR1_MS BIT0 // Message Space - -#define NUM_RETRIES 0xFFFF - -// -// LPIO I2C Module Memory Space Registers -// -#define R_PCH_LPIO_I2C_MEM_RESETS 0x804 // Software Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_FUNC BIT1 // Function Clock = Domain Reset -#define B_PCH_LPIO_I2C_MEM_RESETS_APB BIT0 // APB Domain Reset - -#define R_PCH_LPSS_I2C_MEM_PCP 0x800 // Private Clock P= arameters - -#define bit(a) 1 << (a) - -// -// MMIO Register Definitions -// - -#define I2C0_REG_SPACE_ADDR_BASE 0xFF138000 //01K - -#define R_IC_CON ( 0x00) // I2C Control -#define B_IC_RESTART_EN BIT5 -#define B_IC_SLAVE_DISABLE BIT6 -#define V_SPEED_STANDARD 0x02 -#define V_SPEED_FAST 0x04 -#define V_SPEED_HIGH 0x06 -#define B_MASTER_MODE BIT0 - -#define R_IC_TAR ( 0x04) // I2C Target Address -#define IC_TAR_10BITADDR_MASTER BIT12 - -#define R_IC_SAR ( 0x08) // I2C Slave Address -#define R_IC_HS_MADDR ( 0x0C) // I2C HS MasterMode = Code Address -#define R_IC_DATA_CMD ( 0x10) // I2C Rx/Tx Data Buf= fer and Command - -#define B_READ_CMD BIT8 // 1 =3D read, 0 =3D= write -#define B_CMD_STOP BIT9 // 1 =3D STOP -#define B_CMD_RESTART BIT10 // 1 =3D IC_RESTART_= EN - -#define V_WRITE_CMD_MASK ( 0xFF) - -#define R_IC_SS_SCL_HCNT ( 0x14) // Standard Speed I2C= Clock SCL High Count -#define R_IC_SS_SCL_LCNT ( 0x18) // Standard Speed I2C= Clock SCL Low Count -#define R_IC_FS_SCL_HCNT ( 0x1C) // Full Speed I2C Clo= ck SCL High Count -#define R_IC_FS_SCL_LCNT ( 0x20) // Full Speed I2C Clo= ck SCL Low Count -#define R_IC_HS_SCL_HCNT ( 0x24) // High Speed I2C Clo= ck SCL High Count -#define R_IC_HS_SCL_LCNT ( 0x28) // High Speed I2C Clo= ck SCL Low Count -#define R_IC_INTR_STAT ( 0x2C) // I2C Inetrrupt Stat= us -#define R_IC_INTR_MASK ( 0x30) // I2C Interrupt Mask -#define I2C_INTR_GEN_CALL BIT11 // General call recei= ved -#define I2C_INTR_START_DET BIT10 -#define I2C_INTR_STOP_DET BIT9 -#define I2C_INTR_ACTIVITY BIT8 -#define I2C_INTR_TX_ABRT BIT6 // Set on NACK -#define I2C_INTR_TX_EMPTY BIT4 -#define I2C_INTR_TX_OVER BIT3 -#define I2C_INTR_RX_FULL BIT2 // Data bytes in RX F= IFO over threshold -#define I2C_INTR_RX_OVER BIT1 -#define I2C_INTR_RX_UNDER BIT0 -#define R_IC_RawIntrStat ( 0x34) // I2C Raw Interrupt St= atus -#define R_IC_RX_TL ( 0x38) // I2C Receive FIFO T= hreshold -#define R_IC_TX_TL ( 0x3C) // I2C Transmit FIFO = Threshold -#define R_IC_CLR_INTR ( 0x40) // Clear Combined and= Individual Interrupts -#define R_IC_CLR_RX_UNDER ( 0x44) // Clear RX_UNDER Int= errupt -#define R_IC_CLR_RX_OVER ( 0x48) // Clear RX_OVERinter= rupt -#define R_IC_CLR_TX_OVER ( 0x4C) // Clear TX_OVER inte= rrupt -#define R_IC_CLR_RD_REQ ( 0x50) // Clear RD_REQ inter= rupt -#define R_IC_CLR_TX_ABRT ( 0x54) // Clear TX_ABRT inte= rrupt -#define R_IC_CLR_RX_DONE ( 0x58) // Clear RX_DONE inte= rrupt -#define R_IC_CLR_ACTIVITY ( 0x5C) // Clear ACTIVITY int= errupt -#define R_IC_CLR_STOP_DET ( 0x60) // Clear STOP_DET int= errupt -#define R_IC_CLR_START_DET ( 0x64) // Clear START_DET in= terrupt -#define R_IC_CLR_GEN_CALL ( 0x68) // Clear GEN_CALL int= errupt -#define R_IC_ENABLE ( 0x6C) // I2C Enable -#define R_IC_STATUS ( 0x70) // I2C Status - -#define R_IC_SDA_HOLD ( 0x7C) // I2C IC_DEFAULT_SDA= _HOLD//16bits - -#define STAT_MST_ACTIVITY BIT5 // Master FSM Activit= y Status. -#define STAT_RFF BIT4 // RX FIFO is complet= ely full -#define STAT_RFNE BIT3 // RX FIFO is not emp= ty -#define STAT_TFE BIT2 // TX FIFO is complet= ely empty -#define STAT_TFNF BIT1 // TX FIFO is not full - -#define R_IC_TXFLR ( 0x74) // Transmit FIFO Leve= l Register -#define R_IC_RXFLR ( 0x78) // Receive FIFO Level= Register -#define R_IC_TX_ABRT_SOURCE ( 0x80) // I2C Transmit Abort= Status Register -#define R_IC_SLV_DATA_NACK_ONLY ( 0x84) // Generate SLV_DATA_= NACK Register -#define R_IC_DMA_CR ( 0x88) // DMA Control Regist= er -#define R_IC_DMA_TDLR ( 0x8C) // DMA Transmit Data = Level -#define R_IC_DMA_RDLR ( 0x90) // DMA Receive Data L= evel -#define R_IC_SDA_SETUP ( 0x94) // I2C SDA Setup Regi= ster -#define R_IC_ACK_GENERAL_CALL ( 0x98) // I2C ACK General Ca= ll Register -#define R_IC_ENABLE_STATUS ( 0x9C) // I2C Enable Status = Register -#define R_IC_COMP_PARAM ( 0xF4) // Component Paramete= r Register -#define R_IC_COMP_VERSION ( 0xF8) // Component Version = ID -#define R_IC_COMP_TYPE ( 0xFC) // Component Type - -#define I2C_SS_SCL_HCNT_VALUE_100M 0x1DD -#define I2C_SS_SCL_LCNT_VALUE_100M 0x1E4 -#define I2C_FS_SCL_HCNT_VALUE_100M 0x54 -#define I2C_FS_SCL_LCNT_VALUE_100M 0x9a -#define I2C_HS_SCL_HCNT_VALUE_100M 0x7 -#define I2C_HS_SCL_LCNT_VALUE_100M 0xE - -// -// FIFO write workaround value. -// -#define FIFO_WRITE_DELAY 2 -#define IC_TAR_10BITADDR_MASTER BIT12 -#define FIFO_SIZE 32 -#define R_IC_INTR_STAT ( 0x2C) // I2c Inetrrupt Sta= tus -#define R_IC_INTR_MASK ( 0x30) // I2c Interrupt Mask -#define I2C_INTR_GEN_CALL BIT11 // General call recei= ved -#define I2C_INTR_START_DET BIT10 -#define I2C_INTR_STOP_DET BIT9 -#define I2C_INTR_ACTIVITY BIT8 -#define I2C_INTR_TX_ABRT BIT6 // Set on NACK -#define I2C_INTR_TX_EMPTY BIT4 -#define I2C_INTR_TX_OVER BIT3 -#define I2C_INTR_RX_FULL BIT2 // Data bytes in RX F= IFO over threshold -#define I2C_INTR_RX_OVER BIT1 -#define I2C_INTR_RX_UNDER BIT0 - -/** - Programe all I2C controllers on LPSS.=20 - =20 - I2C0 is function 1 of LPSS. I2C1 is function 2 of LPSS, etc.. - - @param VOID - - @return EFI_SUCCESS -**/ -EFI_STATUS -ProgramPciLpssI2C ( - VOID - ); - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been = connected - @param SlaveAddress Device Address from which the byte value has= to be read - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value read has to be st= ored - @param Start Whether a RESTART is issued before the byte = is sent or received - @param End Whether STOP is generated after a data byte = is sent or received =20 - =20 - @return EFI_SUCCESS If the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS -ByteReadI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer, - IN UINT8 Start, - IN UINT8 End - ); - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be written - @param Offset Offset from which the data has to be read - @param *Byte Address to which the value written is stored - @param Start Whether a RESTART is issued before the byte = is sent or received - @param End Whether STOP is generated after a data byte = is sent or received =20 - =20 - @return EFI_SUCCESS IF the byte value has been successfully wri= tten - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS -ByteWriteI2CBasic( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer, - IN UINT8 Start, - IN UINT8 End - ); - -/** - Reads a Byte from I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been= connected - @param SlaveAddress Device Address from which the byte value ha= s to be read - @param Offset Offset from which the data has to be read - @param ReadBytes Number of bytes to be read - @param *ReadBuffer Address to which the value read has to be s= tored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS -ByteReadI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN ReadBytes, - OUT UINT8 *ReadBuffer - ); - -/** - Writes a Byte to I2C Device. -=20 - @param I2cControllerIndex I2C Bus no to which the I2C device has been = connected - @param SlaveAddress Device Address from which the byte value has= to be written - @param Offset Offset from which the data has to be written - @param WriteBytes Number of bytes to be written - @param *Byte Address to which the value written is stored - =20 - @return EFI_SUCCESS IF the byte value has been successfully read - @return EFI_DEVICE_ERROR Operation Failed, Device Error -**/ -EFI_STATUS -ByteWriteI2C( - IN UINT8 I2cControllerIndex, - IN UINT8 SlaveAddress, - IN UINT8 Offset, - IN UINTN WriteBytes, - IN UINT8 *WriteBuffer - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.inf deleted file mode 100644 index a78212a0e7..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/I2CLibPei/I2CLibPei.inf +++ /dev/null @@ -1,40 +0,0 @@ -## @file -# Instance of I2C Library. -# -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D I2CLibPei - FILE_GUID =3D 8EF61509-890B-4FF2-B352-1C0E9CDDEC8B - MODULE_TYPE =3D PEIM - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D LockBoxLib|PEIM - CONSTRUCTOR =3D IntelI2CPeiLibConstructor - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources.common] - I2CLibPei.c - I2CIoLibPei.c - -[LibraryClasses] - TimerLib - -[PPIs] - gEfiPeiStallPpiGuid - - -[Packages] - MdePkg/MdePkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/Platfo= rmFspLib.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/Platfo= rmFspLib.c deleted file mode 100644 index b99c3b0122..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLi= b.c +++ /dev/null @@ -1,44 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ -#include "PiPei.h" -#include -#include -#include -#include -#include - -EFI_STATUS -PlatformHobCreateFromFsp ( - IN CONST EFI_PEI_SERVICES **PeiServices, - VOID *HobList - ) -{ - VOID *HobData; - VOID *NewHobData; - UINTN DataSize; - - // - // Other hob, todo: put this into FspWrapPlatformLib - // - if ((HobList =3D GetNextGuidHob (&gEfiMemoryConfigDataGuid, HobList)) != =3D NULL) { - HobData =3D GET_GUID_HOB_DATA (HobList); - DataSize =3D GET_GUID_HOB_DATA_SIZE(HobList); - DEBUG((EFI_D_ERROR, "gEfiMemoryConfigDataGuid Hob found: 0x%x.\n", Dat= aSize)); - - NewHobData =3D BuildGuidHob (&gEfiMemoryConfigDataGuid, DataSize); - (*PeiServices)->CopyMem ( - NewHobData, - HobData, - DataSize - ); - } - - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/Platfo= rmFspLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/Plat= formFspLib.inf deleted file mode 100644 index ddd97c5ad9..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLi= b.inf +++ /dev/null @@ -1,49 +0,0 @@ -# -# -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -# FSP Platform HOB Library -# -# -# -## - - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D PlatformFspLib - FILE_GUID =3D 1305A712-33A6-4fa7-BA59-AEAC3362931A - MODULE_TYPE =3D BASE - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D PlatformFspLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - PlatformFspLib.c - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - IntelFspWrapperPkg/IntelFspWrapperPkg.dec - -[LibraryClasses] - BaseLib - DebugLib - HobLib - -[Guids] - gEfiMemoryConfigDataGuid - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/Platfor= mSerialPortLib.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/P= latformSerialPortLib.h deleted file mode 100644 index fe47e8f68d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/PlatformSerial= PortLib.h +++ /dev/null @@ -1,53 +0,0 @@ -/** @file - Header file of Serial port hardware definition. - - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __PLATFORM_SERIAL_PORT_LIB_H_ -#define __PLATFORM_SERIAL_PORT_LIB_H_ - -#include -#include -#include -#include -#include - -// -// UART Register Offsets -// -#define BAUD_LOW_OFFSET 0x00 -#define BAUD_HIGH_OFFSET 0x01 -#define IER_OFFSET 0x01 -#define LCR_SHADOW_OFFSET 0x01 -#define FCR_SHADOW_OFFSET 0x02 -#define IR_CONTROL_OFFSET 0x02 -#define FCR_OFFSET 0x02 -#define EIR_OFFSET 0x02 -#define BSR_OFFSET 0x03 -#define LCR_OFFSET 0x03 -#define MCR_OFFSET 0x04 -#define LSR_OFFSET 0x05 -#define MSR_OFFSET 0x06 - -// -// UART Register Bit Defines -// -#define LSR_TXRDY 0x20 -#define LSR_RXDA 0x01 -#define DLAB 0x01 - -#define UART_DATA 8 -#define UART_STOP 1 -#define UART_PARITY 0 -#define UART_BREAK_SET 0 - -VOID -InitializeSio ( - VOID - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialP= ortLib.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialPor= tLib.c deleted file mode 100644 index f6012593d0..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialPortLib.c +++ /dev/null @@ -1,246 +0,0 @@ -/** @file - Serial I/O Port library functions with no library constructor/destructor - - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "PlatformSerialPortLib.h" - -UINT16 gComBase =3D 0x3f8; -UINTN gBps =3D 115200; -UINT8 gData =3D 8; -UINT8 gStop =3D 1; -UINT8 gParity =3D 0; -UINT8 gBreakSet =3D 0; - -/** - Initialize Serial Port - - The Baud Rate Divisor registers are programmed and the LCR - is used to configure the communications format. Hard coded - UART config comes from globals in DebugSerialPlatform lib. - - @param None - - @retval None - -**/ -RETURN_STATUS -EFIAPI -UARTInitialize ( - VOID - ) -{ - UINTN Divisor; - UINT8 OutputData; - UINT8 Data; - - // - // Map 5..8 to 0..3 - // - Data =3D (UINT8) (gData - (UINT8) 5); - - // - // Calculate divisor for baud generator - // - Divisor =3D 115200 / gBps; - - // - // Set communications format - // - OutputData =3D (UINT8) ((DLAB << 7) | ((gBreakSet << 6) | ((gParity << 3= ) | ((gStop << 2) | Data)))); - IoWrite8 (gComBase + LCR_OFFSET, OutputData); - - // - // Configure baud rate - // - IoWrite8 (gComBase + BAUD_HIGH_OFFSET, (UINT8) (Divisor >> 8)); - IoWrite8 (gComBase + BAUD_LOW_OFFSET, (UINT8) (Divisor & 0xff)); - - // - // Switch back to bank 0 - // - OutputData =3D (UINT8) ((~DLAB << 7) | ((gBreakSet << 6) | ((gParity << = 3) | ((gStop << 2) | Data)))); - IoWrite8 (gComBase + LCR_OFFSET, OutputData); - - return RETURN_SUCCESS; -} - -/** - Common function to initialize UART Serial device and USB Serial device. - - @param None - - @retval None - -**/ -RETURN_STATUS -EFIAPI -SerialPortInitialize ( - VOID - ) -{ - - UARTInitialize (); - - - return RETURN_SUCCESS; -} - -/** - Write data to serial device. - - If the buffer is NULL, then return 0; - if NumberOfBytes is zero, then return 0. - - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buff= er. - - @retval 0 Write data failed. - @retval !0 Actual number of bytes writed to serial device. - -**/ -UINTN -EFIAPI -UARTDbgOut ( - IN UINT8 *Buffer, - IN UINTN NumberOfBytes -) -{ - UINTN Result; - UINT8 Data; - - if (NULL =3D=3D Buffer) { - return 0; - } - - Result =3D NumberOfBytes; - - while (NumberOfBytes--) { - // - // Wait for the serial port to be ready. - // - do { - Data =3D IoRead8 ((UINT16) PcdGet64 (PcdSerialRegisterBase) + LSR_OF= FSET); - } while ((Data & LSR_TXRDY) =3D=3D 0); - IoWrite8 ((UINT16) PcdGet64 (PcdSerialRegisterBase), *Buffer++); - } - - return Result; -} - -/** - Common function to write data to UART Serial device and USB Serial devic= e. - - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buff= er. - -**/ -UINTN -EFIAPI -SerialPortWrite ( - IN UINT8 *Buffer, - IN UINTN NumberOfBytes -) -{ - if (FeaturePcdGet (PcdStatusCodeUseIsaSerial)) { - UARTDbgOut (Buffer, NumberOfBytes); - } - - return RETURN_SUCCESS; -} - -/** - Read data from serial device and save the datas in buffer. - - If the buffer is NULL, then return 0; - if NumberOfBytes is zero, then return 0. - - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buff= er. - - @retval 0 Read data failed. - @retval !0 Actual number of bytes raed to serial device. - -**/ -UINTN -EFIAPI -UARTDbgIn ( - OUT UINT8 *Buffer, - IN UINTN NumberOfBytes -) -{ - UINTN Result; - UINT8 Data; - - if (NULL =3D=3D Buffer) { - return 0; - } - - Result =3D NumberOfBytes; - - while (NumberOfBytes--) { - // - // Wait for the serial port to be ready. - // - do { - Data =3D IoRead8 ((UINT16) PcdGet64 (PcdSerialRegisterBase) + LSR_OF= FSET); - } while ((Data & LSR_RXDA) =3D=3D 0); - - *Buffer++ =3D IoRead8 ((UINT16) PcdGet64 (PcdSerialRegisterBase)); - } - - return Result; -} - -/** - Common function to Read data from UART serial device, USB serial device = and save the datas in buffer. - - @param Buffer Point of data buffer which need to be writed. - @param NumberOfBytes Number of output bytes which are cached in Buff= er. - -**/ -UINTN -EFIAPI -SerialPortRead ( - OUT UINT8 *Buffer, - IN UINTN NumberOfBytes -) -{ - if (FeaturePcdGet (PcdStatusCodeUseIsaSerial)) { - UARTDbgIn (Buffer, NumberOfBytes); - } - - return RETURN_SUCCESS; -} - - -/** - Polls a serial device to see if there is any data waiting to be read. - - Polls aserial device to see if there is any data waiting to be read. - If there is data waiting to be read from the serial device, then TRUE is= returned. - If there is no data waiting to be read from the serial device, then FALS= E is returned. - - @retval TRUE Data is waiting to be read from the serial devi= ce. - @retval FALSE There is no data waiting to be read from the se= rial device. - -**/ -BOOLEAN -EFIAPI -SerialPortPoll ( - VOID - ) -{ - UINT8 Data; - - // - // Read the serial port status. - // - Data =3D IoRead8 ((UINT16) PcdGet64 (PcdSerialRegisterBase) + LSR_OFFSET= ); - - return (BOOLEAN) ((Data & LSR_RXDA) !=3D 0); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialP= ortLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialP= ortLib.inf deleted file mode 100644 index 0e7a6d3cfc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SerialPortLib.= inf +++ /dev/null @@ -1,52 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -#**/ - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SerialPortLib - FILE_GUID =3D 15B26F43-A389-4bae-BDE3-4BB0719B7D4F - MODULE_TYPE =3D BASE - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D SerialPortLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -[Sources] - SerialPortLib.c - SioInit.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - -[LibraryClasses] - BaseLib - PcdLib - IoLib - PciLib - TimerLib - -[FixedPcd.common] - gEfiSerialPortTokenSpaceGuid.PcdSerialBoudRate - gEfiSerialPortTokenSpaceGuid.PcdSerialRegisterBase - -[FeaturePcd] - gEfiSerialPortTokenSpaceGuid.PcdStatusCodeUseIsaSerial - gEfiSerialPortTokenSpaceGuid.PcdStatusCodeUseUsbSerial - gEfiSerialPortTokenSpaceGuid.PcdStatusCodeUseRam diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit= .c b/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit.c deleted file mode 100644 index d9d48539dc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit.c +++ /dev/null @@ -1,127 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - SioInit.c - -Abstract: - - Functions for LpcSio initialization - ---*/ - -#include "PlatformSerialPortLib.h" -#include "SioInit.h" - -typedef struct { - UINT8 Register; - UINT8 Value; -} EFI_SIO_TABLE; - -EFI_SIO_TABLE mSioTableWpcn381u[] =3D { - {0x29, 0x0A0}, - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_UART0}, = // Select UART0 device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT0_BASE_ADDRES= S >> 8)}, // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT0_BASE_ADDRES= S & 0x00FF)}, // Set Base Address LSB - {WPCN381U_IRQ1_REGISTER, 0x014}, = // Set to IRQ4 - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_UART1}, = // Select UART1 device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT1_BASE_ADDRES= S >> 8)}, // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT1_BASE_ADDRES= S & 0x00FF)}, // Set Base Address LSB - {WPCN381U_IRQ1_REGISTER, 0x013}, = // Set to IRQ3 - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_GPIO}, = // Select GPIO device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_GPIO_BASE_ADDRESS >> 8)}= , // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_GPIO_BASE_ADDRESS & 0x00= FF)}, // Set Base Address LSB - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {0x21, 0x001}, = // Global Device Enable - {0x26, 0x000} -}; - -EFI_SIO_TABLE mSioTableWdcp376[] =3D { - {0x29, 0x0A0}, - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_UART0}, = // Select UART0 device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT0_BASE_ADDRES= S >> 8)}, // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT0_BASE_ADDRES= S & 0x00FF)}, // Set Base Address LSB - {WPCN381U_IRQ1_REGISTER, 0x014}, = // Set to IRQ4 - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_UART1}, = // Select UART1 device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT1_BASE_ADDRES= S >> 8)}, // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_SERIAL_PORT1_BASE_ADDRES= S & 0x00FF)}, // Set Base Address LSB - {WPCN381U_IRQ1_REGISTER, 0x013}, = // Set to IRQ3 - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_GPIO}, = // Select GPIO device - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_GPIO_BASE_ADDRESS >> 8)}= , // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_GPIO_BASE_ADDRESS & 0x00= FF)}, // Set Base Address LSB - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {0x21, 0x001}, = // Global Device Enable - {0x26, 0x000}, - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_PS2K}, = // Select PS2 Keyboard - {WPCN381U_BASE1_HI_REGISTER, (UINT8)(WPCN381U_KB_BASE1_ADDRESS >> 8)},= // Set Base Address MSB - {WPCN381U_BASE1_LO_REGISTER, (UINT8)(WPCN381U_KB_BASE1_ADDRESS & 0x00F= F)}, // Set Base Address LSB - {WPCN381U_BASE2_HI_REGISTER, (UINT8)(WPCN381U_KB_BASE2_ADDRESS >> 8)},= // Set Base Address MSB - {WPCN381U_BASE2_LO_REGISTER, (UINT8)(WPCN381U_KB_BASE2_ADDRESS & 0x00F= F)}, // Set Base Address LSB - {WPCN381U_IRQ1_REGISTER, 0x011}, = // Set to IRQ1 - {0xF0, (SIO_KBC_CLOCK << 6)}, = // Select KBC Clock Source - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE}, = // Enable it with Activation bit - {WPCN381U_LD_SEL_REGISTER, WPCN381U_LDN_PS2M}, = // Select PS2 Mouse - {WPCN381U_IRQ1_REGISTER, 0x01c}, = // Set to IRQ12 - {WPCN381U_ACTIVATE_REGISTER, WPCN381U_ACTIVATE_VALUE} = // Enable it with Activation bit -}; - -/** - Initialization for SIO. - - @param FfsHeader FV this PEIM was loaded from. - @param PeiServices General purpose services available to every PEIM. - - None - -**/ -VOID -InitializeSio ( - VOID - ) -{ - UINT16 Index; - UINT16 IndexPort; - UINT16 DataPort; - - // - // Super I/O initialization for Winbond WPCN381U - // - IndexPort =3D WPCN381U_CONFIG_INDEX; - DataPort =3D WPCN381U_CONFIG_DATA; - - // - // Check for Winbond WPCN381U - // - IoWrite8 (IndexPort, WPCN381U_DEV_ID_REGISTER); // Winbond WPCN381U De= vice ID register is 0x20 - - if (IoRead8 (DataPort) =3D=3D WPCN381U_CHIP_ID) { // Winbond WPCN381U = Device ID is 0xF4 - // - // Configure WPCN381U SIO - // - for (Index =3D 0; Index < sizeof (mSioTableWpcn381u) / sizeof (EFI_SIO= _TABLE); Index++) { - IoWrite8 (IndexPort, mSioTableWpcn381u[Index].Register); - IoWrite8 (DataPort, mSioTableWpcn381u[Index].Value); - } - } - - if (IoRead8 (DataPort) =3D=3D WDCP376_CHIP_ID) { // Winbond WDCP376 De= vice ID is 0xF1 - // - // Configure WDCP376 SIO - // - for (Index =3D 0; Index < sizeof (mSioTableWdcp376) / sizeof (EFI_SIO_= TABLE); Index++) { - IoWrite8 (IndexPort, mSioTableWdcp376[Index].Register); - IoWrite8 (DataPort, mSioTableWdcp376[Index].Value); - } - } - return; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit= .h b/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit.h deleted file mode 100644 index 06fa19b93d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SerialPortLib/SioInit.h +++ /dev/null @@ -1,62 +0,0 @@ -/** @file - Header file of Serial port hardware definition. - - Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _SIO_INIT_H_ -#define _SIO_INIT_H_ - -#define WPCN381U_CONFIG_INDEX 0x2E -#define WPCN381U_CONFIG_DATA 0x2F -#define WPCN381U_CONFIG_INDEX1 0x164E -#define WPCN381U_CONFIG_DATA1 0x164F -#define WPCN381U_CHIP_ID 0xF4 -#define WDCP376_CHIP_ID 0xF1 - -// -// SIO Logical Devices Numbers -// -#define WPCN381U_LDN_UART0 0x03 // LDN for Serial Port = Controller -#define WPCN381U_LDN_UART1 0x02 // LDN for Parallel Por= t Controller -#define WPCN381U_LDN_PS2K 0x06 // LDN for PS2 Keyboard= Controller -#define WPCN381U_LDN_PS2M 0x05 // LDN for PS2 Mouse Co= ntroller -#define WPCN381U_KB_BASE1_ADDRESS 0x60 // Base Address of KB c= ontroller -#define WPCN381U_KB_BASE2_ADDRESS 0x64 // Base Address of KB c= ontroller -#define SIO_KBC_CLOCK 0x01 // 0/1/2 - 8/12/16 MHz = KBC Clock Source -#define WPCN381U_LDN_GPIO 0x07 // LDN for GPIO - -// -// SIO Registers Layout -// -#define WPCN381U_LD_SEL_REGISTER 0x07 // Logical Device Selec= t Register Address -#define WPCN381U_DEV_ID_REGISTER 0x20 // Device Identificatio= n Register Address -#define WPCN381U_ACTIVATE_REGISTER 0x30 // Device Identificatio= n Register Address -#define WPCN381U_BASE1_HI_REGISTER 0x60 // Device BaseAddres Re= gister #1 MSB Address -#define WPCN381U_BASE1_LO_REGISTER 0x61 // Device BaseAddres Re= gister #1 LSB Address -#define WPCN381U_BASE2_HI_REGISTER 0x62 // Device BaseAddres Re= gister #1 MSB Address -#define WPCN381U_BASE2_LO_REGISTER 0x63 // Device Ba1eAddres Re= gister #1 LSB Address -#define WPCN381U_IRQ1_REGISTER 0x70 // Device IRQ Register = #1 Address -#define WPCN381U_IRQ2_REGISTER 0x71 // Device IRQ Register = #2 Address - -// -// SIO Activation Values -// -#define WPCN381U_ACTIVATE_VALUE 0x01 // Value to activate De= vice -#define WPCN381U_DEACTIVATE_VALUE 0x00 // Value to deactivate = Device - -// -// SIO GPIO -// -#define WPCN381U_GPIO_BASE_ADDRESS 0x0A20 // SIO GPIO Base Address - -// -// SIO Serial Port Settings -// -#define WPCN381U_SERIAL_PORT0_BASE_ADDRESS 0x03F8 // Base Address of Seri= al Port 0 (COMA / UART0) -#define WPCN381U_SERIAL_PORT1_BASE_ADDRESS 0x02F8 // Base Address of Seri= al Port 1 (COMB / UART1) - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.c b= /Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.c deleted file mode 100644 index b1fb4adb34..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.c +++ /dev/null @@ -1,185 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - - LegacyMetronome.c - -Abstract: - - This contains the installation function for the driver. - ---*/ - -#include "LegacyMetronome.h" - -// -// Handle for the Metronome Architectural Protocol instance produced by th= is driver -// -EFI_HANDLE mMetronomeHandle =3D NULL; - -// -// The Metronome Architectural Protocol instance produced by this driver -// -EFI_METRONOME_ARCH_PROTOCOL mMetronome =3D { - WaitForTick, - TICK_PERIOD -}; - -// -// The CPU I/O Protocol used to access system hardware -// -EFI_CPU_IO_PROTOCOL *mCpuIo =3D NULL; - -// -// Worker Functions -// - -/** - Write an 8 bit value to an I/O port and save it to the S3 script - - @param Port IO Port - @param Data Data in IO Port - - @retval None. - -**/ -VOID -ScriptWriteIo8 ( - UINT16 Port, - UINT8 Data - ) -{ - mCpuIo->Io.Write ( - mCpuIo, - EfiCpuIoWidthUint8, - Port, - 1, - &Data - ); - -} - -/** - - Read the refresh bit from the REFRESH_PORT - - @param None. - - @retval Refresh bit. - -**/ -UINT8 -ReadRefresh ( - VOID - ) -{ - UINT8 Data; - - mCpuIo->Io.Read ( - mCpuIo, - EfiCpuIoWidthUint8, - REFRESH_PORT, - 1, - &Data - ); - return (UINT8) (Data & REFRESH_ON); -} - -/** - - Waits for the TickNumber of ticks from a known platform time source. - - @param This Pointer to the protocol instance. - @param TickNumber Tick Number to be waited - - - @retval EFI_SUCCESS If number of ticks occurred. - @retval EFI_NOT_FOUND Could not locate CPU IO protocol - -**/ -EFI_STATUS -EFIAPI -WaitForTick ( - IN EFI_METRONOME_ARCH_PROTOCOL *This, - IN UINT32 TickNumber - ) -{ - // - // Wait for TickNumber toggles of the Refresh bit - // - for (; TickNumber !=3D 0x00; TickNumber--) { - while (ReadRefresh () =3D=3D REFRESH_ON) - ; - while (ReadRefresh () =3D=3D REFRESH_OFF) - ; - } - - return EFI_SUCCESS; -} - -// -// Driver Entry Point -// -/** - Install the LegacyMetronome driver. Loads a Metronome Arch Protocol bas= ed - on the Port 61 timer. - - @param ImageHandle Handle for the image of this driver - @param SystemTable Pointer to the EFI System Table - - @retval EFI_SUCCESS Metronome Architectural Protocol Installed - -**/ -EFI_STATUS -EFIAPI -InstallLegacyMetronome ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - - // - // Make sure the Metronome Architectural Protocol is not already install= ed in the system - // - ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiMetronomeArchProtocolGuid); - - // - // Get the CPU I/O Protocol that this driver requires - // If the CPU I/O Protocol is not found, then ASSERT because the depende= ncy expression - // should guarantee that it is present in the handle database. - // - Status =3D gBS->LocateProtocol ( - &gEfiCpuIoProtocolGuid, - NULL, - (void **)&mCpuIo - ); - ASSERT_EFI_ERROR (Status); - - // - // Program port 61 timer 1 as refresh timer. We could use ACPI timer in = the - // future. - // - ScriptWriteIo8 (TIMER1_CONTROL_PORT, LOAD_COUNTER1_LSB); - ScriptWriteIo8 (TIMER1_COUNT_PORT, COUNTER1_COUNT); - - // - // Install on a new handle - // - Status =3D gBS->InstallMultipleProtocolInterfaces ( - &mMetronomeHandle, - &gEfiMetronomeArchProtocolGuid, - &mMetronome, - NULL - ); - ASSERT_EFI_ERROR (Status); - - return Status; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.h b= /Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.h deleted file mode 100644 index 9599eca702..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/LegacyMetronome.h +++ /dev/null @@ -1,64 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - LegacyMetronome.h - -Abstract: - - Driver implementing the EFI 2.0 metronome protocol using the legacy PORT= 61 - timer. - ---*/ - -#ifndef _LEGACY_METRONOME_H -#define _LEGACY_METRONOME_H - -// -// Statements that include other files -// -#include "Protocol/Metronome.h" -#include "Protocol/CpuIo.h" -#include "Library/DebugLib.h" -#include "Library/UefiBootServicesTableLib.h" - - -// -// Private definitions -// -#define TICK_PERIOD 300 -#define REFRESH_PORT 0x61 -#define REFRESH_ON 0x10 -#define REFRESH_OFF 0x00 -#define TIMER1_CONTROL_PORT 0x43 -#define TIMER1_COUNT_PORT 0x41 -#define LOAD_COUNTER1_LSB 0x54 -#define COUNTER1_COUNT 0x12 - -// -// Function Prototypes -// -/** - Waits for the TickNumber of ticks from a known platform time source. - - @param This Pointer to the protocol instance. - @param TickNumber Tick Number to be waited - - @retval EFI_SUCCESS If number of ticks occurred. - @retval EFI_NOT_FOUND Could not locate CPU IO protocol - -**/ -EFI_STATUS -EFIAPI -WaitForTick ( - IN EFI_METRONOME_ARCH_PROTOCOL *This, - IN UINT32 TickNumber - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/Metronome.inf b/Pla= tform/Intel/Vlv2TbltDevicePkg/Metronome/Metronome.inf deleted file mode 100644 index 173370d652..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Metronome/Metronome.inf +++ /dev/null @@ -1,49 +0,0 @@ -# -# -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# - -# Module Name: -# -# LegacyMetronome.inf -# -# Abstract: -# -# Component description file for LegacyMetronome module -# -#--*/ -[defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D LegacyMetronome - FILE_GUID =3D 07A9330A-F347-11d4-9A49-0090273FC14D - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D InstallLegacyMetronome - -[sources.common] - LegacyMetronome.c - LegacyMetronome.h - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - -[LibraryClasses] - UefiDriverEntryPoint - UefiBootServicesTableLib - DevicePathLib - UefiLib - -[Protocols] - -gEfiMetronomeArchProtocolGuid -gEfiCpuIoProtocolGuid - -[Depex] -gEfiCpuIoProtocolGuid AND gEfiBootScriptSaveProtocolGuid - - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.c b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.c deleted file mode 100644 index 26599620ba..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.c +++ /dev/null @@ -1,252 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - - SmmScriptSave.c - -Abstract: - - ScriptTableSave module at run time - ---*/ - -#include "SmmScriptSave.h" - -// -// internal functions -// - -EFI_STATUS -BootScriptIoWrite ( - IN EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN VA_LIST Marker - ); - -EFI_STATUS -BootScriptPciCfgWrite ( - IN EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN VA_LIST Marker - ); - -VOID -SmmCopyMem ( - IN UINT8 *Destination, - IN UINT8 *Source, - IN UINTN ByteCount - ); - -// -// Function implementations -// -EFI_STATUS -SmmBootScriptWrite ( - IN OUT EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN UINTN Type, - IN UINT16 OpCode, - ... - ) -{ - EFI_STATUS Status; - VA_LIST Marker; - - if (ScriptTable =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - // - // Build script according to opcode - // - switch ( OpCode ) { - - case EFI_BOOT_SCRIPT_IO_WRITE_OPCODE: - VA_START(Marker, OpCode); - Status =3D BootScriptIoWrite (ScriptTable, Marker); - VA_END(Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE: - VA_START(Marker, OpCode); - Status =3D BootScriptPciCfgWrite(ScriptTable, Marker); - VA_END(Marker); - break; - - default: - Status =3D EFI_SUCCESS; - break; - } - - return Status; -} - - -EFI_STATUS -SmmBootScriptCreateTable ( - IN OUT EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN UINTN Type - ) -{ - BOOT_SCRIPT_POINTERS Script; - UINT8 *Buffer; - - if (ScriptTable =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - Buffer =3D (UINT8*) ((UINTN)(*ScriptTable)); - - // - // Fill Table Header - // - Script.Raw =3D Buffer; - Script.TableInfo->OpCode =3D EFI_BOOT_SCRIPT_TABLE_OPCODE; - Script.TableInfo->Length =3D sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER); - Script.TableInfo->TableLength =3D sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER); - - // - // Update current table pointer - // - *ScriptTable =3D *ScriptTable + sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER); - return EFI_SUCCESS; -} - - -EFI_STATUS -SmmBootScriptCloseTable ( - IN EFI_SMM_SCRIPT_TABLE ScriptTableBase, - IN EFI_SMM_SCRIPT_TABLE ScriptTablePtr, - IN UINTN Type - ) -{ - BOOT_SCRIPT_POINTERS Script; - - // - // Add final "termination" node to script table - // - Script.Raw =3D (UINT8*) ((UINTN)ScriptTablePtr); - Script.Terminate->OpCode =3D EFI_BOOT_SCRIPT_TERMINATE_OPCODE; - Script.Terminate->Length =3D sizeof (EFI_BOOT_SCRIPT_TERMINATE); - ScriptTablePtr +=3D sizeof (EFI_BOOT_SCRIPT_TERMINATE); - - - // - // Update Table Header - // - Script.Raw =3D (UINT8*) ((UINTN)ScriptTableBase); - Script.TableInfo->OpCode =3D EFI_BOOT_SCRIPT_TABLE_OPCODE; - Script.TableInfo->Length =3D sizeof (EFI_BOOT_SCRIPT_TABLE_HEADER); - Script.TableInfo->TableLength =3D (UINT32)(ScriptTablePtr - ScriptTableB= ase); - - return EFI_SUCCESS; -} - - -EFI_STATUS -BootScriptIoWrite ( - IN EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN VA_LIST Marker - ) -{ - BOOT_SCRIPT_POINTERS Script; - EFI_BOOT_SCRIPT_WIDTH Width; - UINTN Address; - UINTN Count; - UINT8 *Buffer; - UINTN NodeLength; - UINT8 WidthInByte; - - Width =3D VA_ARG(Marker, EFI_BOOT_SCRIPT_WIDTH); - Address =3D VA_ARG(Marker, UINTN); - Count =3D VA_ARG(Marker, UINTN); - Buffer =3D VA_ARG(Marker, UINT8*); - - WidthInByte =3D (UINT8)(0x01 << (Width & 0x03)); - Script.Raw =3D (UINT8*) ((UINTN)(*ScriptTable)); - NodeLength =3D sizeof (EFI_BOOT_SCRIPT_IO_WRITE) + (WidthInByte * Count= ); - - // - // Build script data - // - Script.IoWrite->OpCode =3D EFI_BOOT_SCRIPT_IO_WRITE_OPCODE; - Script.IoWrite->Length =3D (UINT8)(NodeLength); - Script.IoWrite->Width =3D Width; - Script.IoWrite->Address =3D Address; - Script.IoWrite->Count =3D (UINT32)Count; - SmmCopyMem ( - (UINT8*)(Script.Raw + sizeof (EFI_BOOT_SCRIPT_IO_WRITE)), - Buffer, - WidthInByte * Count - ); - - // - // Update Script table pointer - // - *ScriptTable =3D *ScriptTable + NodeLength; - return EFI_SUCCESS; -} - - -EFI_STATUS -BootScriptPciCfgWrite ( - IN EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN VA_LIST Marker - ) -{ - BOOT_SCRIPT_POINTERS Script; - EFI_BOOT_SCRIPT_WIDTH Width; - UINT64 Address; - UINTN Count; - UINT8 *Buffer; - UINTN NodeLength; - UINT8 WidthInByte; - - Width =3D VA_ARG(Marker, EFI_BOOT_SCRIPT_WIDTH); - Address =3D VA_ARG(Marker, UINT64); - Count =3D VA_ARG(Marker, UINTN); - Buffer =3D VA_ARG(Marker, UINT8*); - - WidthInByte =3D (UINT8)(0x01 << (Width & 0x03)); - Script.Raw =3D (UINT8*) ((UINTN)(*ScriptTable)); - NodeLength =3D sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE) + (WidthInByte= * Count); - - // - // Build script data - // - Script.PciWrite->OpCode =3D EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE; - Script.PciWrite->Length =3D (UINT8)(NodeLength); - Script.PciWrite->Width =3D Width; - Script.PciWrite->Address =3D Address; - Script.PciWrite->Count =3D (UINT32)Count; - SmmCopyMem ( - (UINT8*)(Script.Raw + sizeof (EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE)), - Buffer, - WidthInByte * Count - ); - - // - // Update Script table pointer - // - *ScriptTable =3D *ScriptTable + NodeLength; - return EFI_SUCCESS; -} - -VOID -SmmCopyMem ( - IN UINT8 *Destination, - IN UINT8 *Source, - IN UINTN ByteCount - ) -{ - UINTN Index; - - for (Index =3D 0; Index < ByteCount; Index++, Destination++, Source++) { - *Destination =3D *Source; - } -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.h b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.h deleted file mode 100644 index d3eca8cdc0..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmScriptSave.h +++ /dev/null @@ -1,50 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - SmmScriptSave.h - -Abstract: - - This is an implementation of the BootScript at run time. - ---*/ - -#ifndef _RUNTIME_SCRIPT_SAVE_H -#define _RUNTIME_SCRIPT_SAVE_H - -#include "Efi.h" -#include "EfiBootScript.h" - - -typedef EFI_PHYSICAL_ADDRESS EFI_SMM_SCRIPT_TABLE; - -EFI_STATUS -SmmBootScriptCreateTable ( - IN OUT EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN UINTN Type - ); - -EFI_STATUS -SmmBootScriptWrite ( - IN OUT EFI_SMM_SCRIPT_TABLE *ScriptTable, - IN UINTN Type, - IN UINT16 OpCode, - ... - ); - -EFI_STATUS -SmmBootScriptCloseTable ( - IN EFI_SMM_SCRIPT_TABLE ScriptTableBase, - IN EFI_SMM_SCRIPT_TABLE ScriptTablePtr, - IN UINTN Type - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatch= Thunk/SmmSwDispatch2OnSmmSwDispatchThunk.c b/Platform/Intel/Vlv2TbltDeviceP= kg/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.c deleted file mode 100644 index 0dbd6f00e1..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatchThunk/S= mmSwDispatch2OnSmmSwDispatchThunk.c +++ /dev/null @@ -1,459 +0,0 @@ -/** @file - SMM SwDispatch2 Protocol on SMM SwDispatch Protocol Thunk driver. - - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -typedef struct { - LIST_ENTRY Link; - EFI_HANDLE DispatchHandle; - UINTN SwSmiInputValue; - UINTN DispatchFunction; -} EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT; - -/** - Register a child SMI source dispatch function for the specified software= SMI. - - This service registers a function (DispatchFunction) which will be calle= d when the software - SMI source specified by RegisterContext->SwSmiCpuIndex is detected. On r= eturn, - DispatchHandle contains a unique handle which may be used later to unreg= ister the function - using UnRegister(). - - @param[in] This Pointer to the EFI_SMM_SW_DISPATCH2_PR= OTOCOL instance. - @param[in] DispatchFunction Function to register for handler when = the specified software - SMI is generated. - @param[in, out] RegisterContext Pointer to the dispatch function's con= text. - The caller fills this context in befor= e calling - the register function to indicate to t= he register - function which Software SMI input valu= e the - dispatch function should be invoked fo= r. - @param[out] DispatchHandle Handle generated by the dispatcher to = track the - function instance. - - @retval EFI_SUCCESS The dispatch function has been successful= ly - registered and the SMI source has been en= abled. - @retval EFI_DEVICE_ERROR The SW driver was unable to enable the SM= I source. - @retval EFI_INVALID_PARAMETER RegisterContext is invalid. The SW SMI in= put value - is not within valid range. - @retval EFI_OUT_OF_RESOURCES There is not enough memory (system or SMM= ) to manage this - child. - @retval EFI_OUT_OF_RESOURCES A unique software SMI value could not be = assigned - for this dispatch. -**/ -EFI_STATUS -EFIAPI -SmmSwDispatch2Register ( - IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, - IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction, - IN OUT EFI_SMM_SW_REGISTER_CONTEXT *RegisterContext, - OUT EFI_HANDLE *DispatchHandle - ); - -/** - Unregister a child SMI source dispatch function for the specified softwa= re SMI. - - This service removes the handler associated with DispatchHandle so that = it will no longer be - called in response to a software SMI. - - @param[in] This Pointer to the EFI_SMM_SW_DISPATCH2_PROTO= COL instance. - @param[in] DispatchHandle Handle of dispatch function to deregister. - - @retval EFI_SUCCESS The dispatch function has been successful= ly unregistered. - @retval EFI_INVALID_PARAMETER The DispatchHandle was not valid. -**/ -EFI_STATUS -EFIAPI -SmmSwDispatch2UnRegister ( - IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, - IN EFI_HANDLE DispatchHandle - ); - -EFI_SMM_SW_DISPATCH2_PROTOCOL gSmmSwDispatch2 =3D { - SmmSwDispatch2Register, - SmmSwDispatch2UnRegister, - 0 // MaximumSwiValue -}; - -EFI_SMM_SW_DISPATCH_PROTOCOL *mSmmSwDispatch; -UINT8 mSmiTriggerRegister; -UINT8 mSmiDataRegister; - -EFI_SMM_CPU_PROTOCOL *mSmmCpuProtocol; -LIST_ENTRY mSmmSwDispatch2ThunkQueue =3D INITIALIZE_LIS= T_HEAD_VARIABLE (mSmmSwDispatch2ThunkQueue); - -/** - This function find SmmSwDispatch2Context by SwSmiInputValue. - - @param SwSmiInputValue The SwSmiInputValue to indentify the SmmSwDispatc= h2 context - - @return SmmSwDispatch2 context -**/ -EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT * -FindSmmSwDispatch2ContextBySwSmiInputValue ( - IN UINTN SwSmiInputValue - ) -{ - LIST_ENTRY *Link; - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT *ThunkContext; - - for (Link =3D mSmmSwDispatch2ThunkQueue.ForwardLink; - Link !=3D &mSmmSwDispatch2ThunkQueue; - Link =3D Link->ForwardLink) { - ThunkContext =3D BASE_CR ( - Link, - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT, - Link - ); - if (ThunkContext->SwSmiInputValue =3D=3D SwSmiInputValue) { - return ThunkContext; - } - } - return NULL; -} - -/** - This function find SmmSwDispatch2Context by DispatchHandle. - - @param DispatchHandle The DispatchHandle to indentify the SmmSwDispatch2= Thunk context - - @return SmmSwDispatch2Thunk context -**/ -EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT * -FindSmmSwDispatch2ContextByDispatchHandle ( - IN EFI_HANDLE DispatchHandle - ) -{ - LIST_ENTRY *Link; - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT *ThunkContext; - - for (Link =3D mSmmSwDispatch2ThunkQueue.ForwardLink; - Link !=3D &mSmmSwDispatch2ThunkQueue; - Link =3D Link->ForwardLink) { - ThunkContext =3D BASE_CR ( - Link, - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT, - Link - ); - if (ThunkContext->DispatchHandle =3D=3D DispatchHandle) { - return ThunkContext; - } - } - return NULL; -} - -/** - Framework dispatch function for a Software SMI handler. - - @param DispatchHandle The handle of this dispatch function. - @param DispatchContext The pointer to the dispatch function's con= text. - The SwSmiInputValue field is filled in - by the software dispatch driver prior to - invoking this dispatch function. - The dispatch function will only be called - for input values for which it is registere= d. - - @return None - -**/ -VOID -EFIAPI -FrameworkDispatchFunction ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext - ) -{ - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT *ThunkContext; - EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction; - EFI_SMM_SW_REGISTER_CONTEXT RegisterContext; - EFI_SMM_SW_CONTEXT SwContext; - UINTN Size; - UINTN Index; - EFI_SMM_SAVE_STATE_IO_INFO IoInfo; - EFI_STATUS Status; - - // - // Search context - // - ThunkContext =3D FindSmmSwDispatch2ContextBySwSmiInputValue (DispatchCon= text->SwSmiInputValue); - ASSERT (ThunkContext !=3D NULL); - if (ThunkContext =3D=3D NULL) { - return ; - } - - // - // Construct new context - // - RegisterContext.SwSmiInputValue =3D DispatchContext->SwSmiInputValue; - Size =3D sizeof(SwContext); - SwContext.CommandPort =3D IoRead8 (mSmiTriggerRegister); - SwContext.DataPort =3D IoRead8 (mSmiDataRegister); - - // - // Try to find which CPU trigger SWSMI - // - SwContext.SwSmiCpuIndex =3D 0; - for (Index =3D 0; Index < gSmst->NumberOfCpus; Index++) { - Status =3D mSmmCpuProtocol->ReadSaveState ( - mSmmCpuProtocol, - sizeof(IoInfo), - EFI_SMM_SAVE_STATE_REGISTER_IO, - Index, - &IoInfo - ); - if (EFI_ERROR (Status)) { - continue; - } - if (IoInfo.IoPort =3D=3D mSmiTriggerRegister) { - // - // Great! Find it. - // - SwContext.SwSmiCpuIndex =3D Index; - break; - } - } - - // - // Dispatch - // - DispatchFunction =3D (EFI_SMM_HANDLER_ENTRY_POINT2)ThunkContext->Dispatc= hFunction; - DispatchFunction ( - DispatchHandle, - &RegisterContext, - &SwContext, - &Size - ); - return ; -} - -/** - Register a child SMI source dispatch function for the specified software= SMI. - - This service registers a function (DispatchFunction) which will be calle= d when the software - SMI source specified by RegisterContext->SwSmiCpuIndex is detected. On r= eturn, - DispatchHandle contains a unique handle which may be used later to unreg= ister the function - using UnRegister(). - - @param[in] This Pointer to the EFI_SMM_SW_DISPATCH2_PR= OTOCOL instance. - @param[in] DispatchFunction Function to register for handler when = the specified software - SMI is generated. - @param[in, out] RegisterContext Pointer to the dispatch function's con= text. - The caller fills this context in befor= e calling - the register function to indicate to t= he register - function which Software SMI input valu= e the - dispatch function should be invoked fo= r. - @param[out] DispatchHandle Handle generated by the dispatcher to = track the - function instance. - - @retval EFI_SUCCESS The dispatch function has been successful= ly - registered and the SMI source has been en= abled. - @retval EFI_DEVICE_ERROR The SW driver was unable to enable the SM= I source. - @retval EFI_INVALID_PARAMETER RegisterContext is invalid. The SW SMI in= put value - is not within valid range. - @retval EFI_OUT_OF_RESOURCES There is not enough memory (system or SMM= ) to manage this - child. - @retval EFI_OUT_OF_RESOURCES A unique software SMI value could not be = assigned - for this dispatch. -**/ -EFI_STATUS -EFIAPI -SmmSwDispatch2Register ( - IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, - IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction, - IN OUT EFI_SMM_SW_REGISTER_CONTEXT *RegisterContext, - OUT EFI_HANDLE *DispatchHandle - ) -{ - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT *ThunkContext; - EFI_SMM_SW_DISPATCH_CONTEXT DispatchContext; - EFI_STATUS Status; - UINTN Index; - - if (RegisterContext->SwSmiInputValue =3D=3D (UINTN)-1) { - // - // If SwSmiInputValue is set to (UINTN) -1 then a unique value will be= assigned and returned in the structure. - // - Status =3D EFI_NOT_FOUND; - for (Index =3D 1; Index < gSmmSwDispatch2.MaximumSwiValue; Index++) { - DispatchContext.SwSmiInputValue =3D Index; - Status =3D mSmmSwDispatch->Register ( - mSmmSwDispatch, - FrameworkDispatchFunction, - &DispatchContext, - DispatchHandle - ); - if (!EFI_ERROR (Status)) { - RegisterContext->SwSmiInputValue =3D Index; - break; - } - } - if (RegisterContext->SwSmiInputValue =3D=3D (UINTN)-1) { - return EFI_OUT_OF_RESOURCES; - } - } else { - DispatchContext.SwSmiInputValue =3D RegisterContext->SwSmiInputValue; - Status =3D mSmmSwDispatch->Register ( - mSmmSwDispatch, - FrameworkDispatchFunction, - &DispatchContext, - DispatchHandle - ); - } - if (!EFI_ERROR (Status)) { - // - // Register - // - Status =3D gSmst->SmmAllocatePool ( - EfiRuntimeServicesData, - sizeof(*ThunkContext), - (VOID **)&ThunkContext - ); - ASSERT_EFI_ERROR (Status); - if (EFI_ERROR (Status)) { - mSmmSwDispatch->UnRegister (mSmmSwDispatch, *DispatchHandle); - return EFI_OUT_OF_RESOURCES; - } - - ThunkContext->SwSmiInputValue =3D RegisterContext->SwSmiInputValue; - ThunkContext->DispatchFunction =3D (UINTN)DispatchFunction; - ThunkContext->DispatchHandle =3D *DispatchHandle; - InsertTailList (&mSmmSwDispatch2ThunkQueue, &ThunkContext->Link); - } - - return Status; -} - -/** - Unregister a child SMI source dispatch function for the specified softwa= re SMI. - - This service removes the handler associated with DispatchHandle so that = it will no longer be - called in response to a software SMI. - - @param[in] This Pointer to the EFI_SMM_SW_DISPATCH2_PROTO= COL instance. - @param[in] DispatchHandle Handle of dispatch function to deregister. - - @retval EFI_SUCCESS The dispatch function has been successful= ly unregistered. - @retval EFI_INVALID_PARAMETER The DispatchHandle was not valid. -**/ -EFI_STATUS -EFIAPI -SmmSwDispatch2UnRegister ( - IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, - IN EFI_HANDLE DispatchHandle - ) -{ - EFI_SMM_SW_DISPATCH2_THUNK_CONTEXT *ThunkContext; - EFI_STATUS Status; - - Status =3D mSmmSwDispatch->UnRegister (mSmmSwDispatch, DispatchHandle); - if (!EFI_ERROR (Status)) { - // - // Unregister - // - ThunkContext =3D FindSmmSwDispatch2ContextByDispatchHandle (DispatchHa= ndle); - ASSERT (ThunkContext !=3D NULL); - if (ThunkContext !=3D NULL) { - RemoveEntryList (&ThunkContext->Link); - gSmst->SmmFreePool (ThunkContext); - } - } - - return Status; -} - -/** - Entry Point for this thunk driver. - - @param[in] ImageHandle Image handle of this driver. - @param[in] SystemTable A Pointer to the EFI System Table. - - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurred when executing this entry point. -**/ -EFI_STATUS -EFIAPI -SmmSwDispatch2ThunkMain ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - EFI_SMM_CONTROL_PROTOCOL *SmmControl; - EFI_SMM_CONTROL_REGISTER RegisterInfo; - - // - // Locate Framework SMM SwDispatch Protocol - // - Status =3D gBS->LocateProtocol ( - &gEfiSmmSwDispatchProtocolGuid, - NULL, - (VOID **)&mSmmSwDispatch - ); - ASSERT_EFI_ERROR (Status); - gSmmSwDispatch2.MaximumSwiValue =3D mSmmSwDispatch->MaximumSwiValue; - if (gSmmSwDispatch2.MaximumSwiValue =3D=3D 0x0) { - DEBUG ((EFI_D_ERROR, "BUGBUG: MaximumSwiValue is 0, work-around to mak= e it 0xFF\n")); - gSmmSwDispatch2.MaximumSwiValue =3D 0xFF; - } - - // - // Locate Framework SMM Control Protocol - // - Status =3D gBS->LocateProtocol ( - &gEfiSmmControlProtocolGuid, - NULL, - (VOID **)&SmmControl - ); - - ASSERT_EFI_ERROR (Status); - Status =3D SmmControl->GetRegisterInfo ( - SmmControl, - &RegisterInfo - ); - ASSERT_EFI_ERROR (Status); - mSmiTriggerRegister =3D RegisterInfo.SmiTriggerRegister; - mSmiDataRegister =3D RegisterInfo.SmiDataRegister; - - // - // Locate PI SMM CPU protocol - // - Status =3D gSmst->SmmLocateProtocol ( - &gEfiSmmCpuProtocolGuid, - NULL, - (VOID **)&mSmmCpuProtocol - ); - ASSERT_EFI_ERROR (Status); - - // - // Publish PI SMM SwDispatch2 Protocol - // - ImageHandle =3D NULL; - Status =3D gSmst->SmmInstallProtocolInterface ( - &ImageHandle, - &gEfiSmmSwDispatch2ProtocolGuid, - EFI_NATIVE_INTERFACE, - &gSmmSwDispatch2 - ); - ASSERT_EFI_ERROR (Status); - return Status; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatch= Thunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf b/Platform/Intel/Vlv2TbltDevic= ePkg/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.= inf deleted file mode 100644 index 4f95fc281e..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatchThunk/S= mmSwDispatch2OnSmmSwDispatchThunk.inf +++ /dev/null @@ -1,54 +0,0 @@ -## @file -# Component description file for SMM SwDispatch2 Protocol on SMM SwDispat= ch Protocol Thunk driver. -# -# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SmmSwDispatch2OnSmmSwDispatchThunk - FILE_GUID =3D 1410C6AC-9F4B-495b-9C23-8A5AEB0165E9 - MODULE_TYPE =3D DXE_SMM_DRIVER - VERSION_STRING =3D 1.0 - PI_SPECIFICATION_VERSION =3D 0x0001000A - ENTRY_POINT =3D SmmSwDispatch2ThunkMain - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -[Sources] - SmmSwDispatch2OnSmmSwDispatchThunk.c - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - -[LibraryClasses] - UefiDriverEntryPoint - UefiBootServicesTableLib - SmmServicesTableLib - BaseLib - IoLib - DebugLib - -[Protocols] - gEfiSmmControlProtocolGuid # PROTOCOL ALWAYS_CONSUMED - gEfiSmmSwDispatchProtocolGuid # PROTOCOL ALWAYS_CONSUMED - gEfiSmmCpuProtocolGuid # PROTOCOL ALWAYS_CONSUMED - gEfiSmmSwDispatch2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED - -[Depex] - gEfiSmmSwDispatchProtocolGuid AND - gEfiSmmControlProtocolGuid AND - gEfiSmmCpuProtocolGuid - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/Smram= SaveInfoHandlerSmm.c b/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandle= rSmm/SmramSaveInfoHandlerSmm.c deleted file mode 100644 index de257b35b5..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInf= oHandlerSmm.c +++ /dev/null @@ -1,164 +0,0 @@ -/** @file - A helper driver to save information to SMRAM after SMRR is enabled. - - This driver is for ECP platforms. - - Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SMM_FROM_SMBASE_DRIVER 0x55 -#define SMM_FROM_CPU_DRIVER_SAVE_INFO 0x81 - -#define EFI_SMRAM_CPU_NVS_HEADER_GUID \ - { \ - 0x429501d9, 0xe447, 0x40f4, 0x86, 0x7b, 0x75, 0xc9, 0x3a, 0x1d, 0xb5, = 0x4e \ - } - -UINT8 mSmiDataRegister; -BOOLEAN mLocked =3D FALSE; -EFI_GUID mSmramCpuNvsHeaderGuid =3D EFI_SMRAM_CPU_NVS_HEADER_GUID; - -/** - Dispatch function for a Software SMI handler. - - @param DispatchHandle The handle of this dispatch function. - @param DispatchContext The pointer to the dispatch function's con= text. - The SwSmiInputValue field is filled in - by the software dispatch driver prior to - invoking this dispatch function. - The dispatch function will only be called - for input values for which it is registere= d. - - @return None - -**/ -VOID -EFIAPI -SmramSaveInfoHandler ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext - ) -{ - ASSERT (DispatchContext !=3D NULL); - ASSERT (DispatchContext->SwSmiInputValue =3D=3D SMM_FROM_SMBASE_DRIVER); - - if (!mLocked && IoRead8 (mSmiDataRegister) =3D=3D SMM_FROM_CPU_DRIVER_SA= VE_INFO) { - CopyMem ( - (VOID *)(UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuLockBoxD= ataAddress)), - (VOID *)(UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuSmramCpu= DataAddress)), - (UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuLockBoxSize)) - ); - } -} - -/** - Smm Ready To Lock event notification handler. - - It sets a flag indicating that SMRAM has been locked. - - @param[in] Protocol Points to the protocol's unique identifier. - @param[in] Interface Points to the interface instance. - @param[in] Handle The handle on which the interface was installed. - - @retval EFI_SUCCESS Notification handler runs successfully. - **/ -EFI_STATUS -EFIAPI -SmmReadyToLockEventNotify ( - IN CONST EFI_GUID *Protocol, - IN VOID *Interface, - IN EFI_HANDLE Handle - ) -{ - mLocked =3D TRUE; - return EFI_SUCCESS; -} - -/** - Entry point function of this driver. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. - @param[in] 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 poin= t. -**/ -EFI_STATUS -EFIAPI -SmramSaveInfoHandlerSmmMain ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - EFI_SMM_SW_DISPATCH_PROTOCOL *SmmSwDispatch; - EFI_SMM_SW_DISPATCH_CONTEXT SmmSwDispatchContext; - EFI_HANDLE DispatchHandle; - EFI_SMM_CONTROL_PROTOCOL *SmmControl; - EFI_SMM_CONTROL_REGISTER SmmControlRegister; - VOID *Registration; - - // - // Get SMI data register - // - Status =3D SystemTable->BootServices->LocateProtocol ( - &gEfiSmmControlProtocolGuid, - NULL, - (VOID **)&SmmControl - ); - ASSERT_EFI_ERROR (Status); - Status =3D SmmControl->GetRegisterInfo (SmmControl, &SmmControlRegister); - ASSERT_EFI_ERROR (Status); - mSmiDataRegister =3D SmmControlRegister.SmiDataRegister; - - // - // Register software SMI handler - // - - Status =3D SystemTable->BootServices->LocateProtocol ( - &gEfiSmmSwDispatchProtocolGuid, - NULL, - (VOID **)&SmmSwDispatch - ); - ASSERT_EFI_ERROR (Status); - - SmmSwDispatchContext.SwSmiInputValue =3D SMM_FROM_SMBASE_DRIVER; - Status =3D SmmSwDispatch->Register ( - SmmSwDispatch, - &SmramSaveInfoHandler, - &SmmSwDispatchContext, - &DispatchHandle - ); - ASSERT_EFI_ERROR (Status); - - // - // Register SMM Ready To Lock Protocol notification - // - Status =3D gSmst->SmmRegisterProtocolNotify ( - &gEfiSmmReadyToLockProtocolGuid, - SmmReadyToLockEventNotify, - &Registration - ); - ASSERT_EFI_ERROR (Status); - - return Status; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/Smram= SaveInfoHandlerSmm.inf b/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHand= lerSmm/SmramSaveInfoHandlerSmm.inf deleted file mode 100644 index ec42c84472..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInf= oHandlerSmm.inf +++ /dev/null @@ -1,60 +0,0 @@ -## @file -# -# A helper driver to save information to SMRAM after SMRR is enabled. -# -# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SmramSaveInfoHandlerSmm - FILE_GUID =3D 63296C52-01CF-4eea-A47C-782A14DA6894 - MODULE_TYPE =3D DXE_SMM_DRIVER - VERSION_STRING =3D 1.0 - PI_SPECIFICATION_VERSION =3D 0x0001000A - - ENTRY_POINT =3D SmramSaveInfoHandlerSmmMain - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 -# - -[Sources.common] - SmramSaveInfoHandlerSmm.c - -[Packages] - MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - -[LibraryClasses] - UefiDriverEntryPoint - UefiRuntimeServicesTableLib - SmmServicesTableLib - BaseLib - BaseMemoryLib - IoLib - -[Protocols] - gEfiSmmSwDispatchProtocolGuid ## CONSUMED - gEfiSmmControlProtocolGuid ## CONSUMED - gEfiSmmReadyToLockProtocolGuid ## CONSUMED - -[Pcd.common] - gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress - gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress - gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize - =20 -[Depex] - gEfiSmmSwDispatchProtocolGuid AND - gEfiSmmControlProtocolGuid - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIHeader/Vacant.bin = b/Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIHeader/Vacant.bin deleted file mode 100644 index 12d359146014baad9277a951b237fd27e819db6e..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3928064 zcmeIuF#!Mo0K%aDspo45h(KY$fB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^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RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj rFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFz^EdVf>G} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat b/Platf= orm/Intel/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat deleted file mode 100644 index 200ca05a23..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat +++ /dev/null @@ -1,270 +0,0 @@ -@REM @file -@REM Windows batch file to build BIOS ROM -@REM -@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<= BR> -@REM=20 -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -SetLocal EnableDelayedExpansion EnableExtensions - -set PLATFORM_BIN_PACKAGE=3D%WORKSPACE%\Vlv2SocBinPkg -if not exist %PLATFORM_BIN_PACKAGE% ( - if defined PACKAGES_PATH ( - for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\Vlv2SocBinPkg ( - set PLATFORM_BIN_PACKAGE=3D%%~fi\Vlv2SocBinPkg - goto PlatformBinPackageFound - ) - ) - ) else ( - echo. - echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!! - echo. - goto BldFail - ) -) -:PlatformBinPackageFound - - -:: Set script defaults -set exitCode=3D0 -set BackupRom=3D1 -set UpdateVBios=3D1 -set SpiLock=3D0 -set Stitch_Config=3DStitch_Config.txt -copy /y nul Stitching.log >nul - -:: Set default Suffix as: YYYY_MM_DD_HHMM -set hour=3D%time: =3D0% -reg copy "HKCU\Control Panel\International" "HKCU\Control Panel\Internatio= nal_Temp" /f >nul -reg add "HKCU\Control Panel\International" /v sShortDate /d "yyyy_MM_dd" /= f >nul -for /f "tokens=3D1" %%i in ("%date%") do set today=3D%%i -reg copy "HKCU\Control Panel\International_Temp" "HKCU\Control Panel\Inter= national" /f >nul -reg delete "HKCU\Control Panel\International_Temp" /f >nul -set IFWI_Suffix=3D%today%_%hour:~0,2%%time:~3,2% - -:: Process input arguments -if "%~1"=3D=3D"?" goto Usage -if "%~1"=3D=3D"/?" goto Usage -if /i "%~1"=3D=3D"Help" goto Usage - -:OptLoop -if /i "%~1"=3D=3D"/nV" ( - set UpdateVBios=3D0 - shift - goto OptLoop -) -if /i "%~1"=3D=3D"/nB" ( - set BackupRom=3D0 - shift - goto OptLoop -) -if /i "%~1"=3D=3D"/yL" ( - set SpiLock=3D1 - shift - goto OptLoop -) - -if /i "%~1"=3D=3D"/B" ( - if "%~2"=3D=3D"" goto Usage - if not exist %~2 echo BIOS not found. & goto Usage - set BIOS_Names=3D%~2 - set BIOS_File_Name=3D%~n2 - shift & shift - goto OptLoop -) -if /i "%~1"=3D=3D"/C" ( - if "%~2"=3D=3D"" goto Usage - if not exist %~2 echo ConfigFile not found. & goto Usage - set Stitch_Config=3D%~2 - shift & shift - goto OptLoop -) -if /i "%~1"=3D=3D"/S" ( - if "%~2"=3D=3D"" goto Usage - set IFWI_Suffix=3D%~2 - shift & shift - goto OptLoop -) - -if "%BIOS_File_Name:~0,4%"=3D=3D"MNW2" ( - set Stitch_Config=3D MNW2_Stitch_Config.txt -) -if "%BIOS_File_Name:~3,4%"=3D=3D"MNW2" ( - set Stitch_Config=3D MNW2_Stitch_Config.txt -) - -:: if no rom specified by user, search in ./ for ROM files -if "%BIOS_Names%"=3D=3D"" ( - set "BIOS_Names=3D " - for /f "tokens=3D*" %%i in ('dir /b *.rom') do set BIOS_Names=3D!BIOS_= Names! %%i - if "!BIOS_Names!"=3D=3D" " ( - echo NO .ROM files found !!! - goto Usage - ) -) - -:: Parse the Stitch_Config File -if not exist %Stitch_Config% ( - echo Stitch Configuration File %Stitch_Config% not found. - goto ScriptFail -) -for /f "delims=3D=3D tokens=3D1,2" %%i in (%Stitch_Config%) do ( - if /i "%%i"=3D=3D"HEADER" set IFWI_HEADER=3D%%j - if /i "%%i"=3D=3D"SEC_VERSION" set SEC_VERSION=3D%%j - if /i "%%i"=3D=3D"Source" ( - if /i "%%j"=3D=3D"ALPHA" set Source_Prefix=3DA_ - if /i "%%j"=3D=3D"BF" set Source_Prefix=3DBF_ - if /i "%%j"=3D=3D"BE" set Source_Prefix=3DBE_ - if /i "%%j"=3D=3D"PV" set Source_Prefix=3DPV_ - if /i "%%j"=3D=3D"PR1" set Source_Prefix=3DPR1_ - ) -) - -if %SpiLock% EQU 1 ( - set IFWI_HEADER_FILE=3DIFWIHeader\!IFWI_HEADER!_SPILOCK.bin -) else ( - set IFWI_HEADER_FILE=3DIFWIHeader\!IFWI_HEADER!.bin -) - -:: ********************************************************************** -:: The Main Stitching Loop -:: ********************************************************************** -echo %date% %time% >>Stitching.log 2>&1 -echo %date% %time% -echo. -for %%i in (%BIOS_Names%) do ( - - REM ----- Do NOT use :: for comments Inside of code blocks() ------- - set BIOS_Rom=3D%%i - set BIOS_Name=3D%%~ni - set BIOS_Version=3D!BIOS_Name:~-7,7! - - REM extract PlatformType from BIOS filename - set Platform_Type=3D!BIOS_Name:~0,4! - - REM Special treat for BayLake FFD8 - set Temp_Name=3D!BIOS_Name:~0,7! - - - REM Capitalize and validate the Platform_Type - if /i "!Platform_Type!"=3D=3D"MNW2" ( - set Platform_Type=3DMNW2 - ) else ( - echo Error - Unsupported PlatformType: !Platform_Type! - goto Usage - ) - - - REM search BIOS_Name for Arch substring: either IA32 or X64 - if not "!BIOS_Name!"=3D=3D"!BIOS_Name:_IA32_=3D!" ( - set Arch=3DIA32 - ) else if not "!BIOS_Name!"=3D=3D"!BIOS_Name:_X64_=3D!" ( - set Arch=3DX64 - ) else ( - echo Error: Could not determine Architecture for !BIOS_Rom! - goto Usage - ) - set IFWI_Prefix=3D!Platform_Type!_IFWI_%Source_Prefix%!Arch!_!!BIOS_Ve= rsion! - - REM search BIOS_Name for Build_Target substring: either R or D - if not "!BIOS_Name!"=3D=3D"!BIOS_Name:_R_=3D!" ( - set Build_Target=3DRelease - set IFWI_Prefix=3D!IFWI_Prefix!_R - ) else if not "!BIOS_Name!"=3D=3D"!BIOS_Name:_D_=3D!" ( - set Build_Target=3DDebug - set IFWI_Prefix=3D!IFWI_Prefix!_D - ) else ( - echo Error: Could not determine Build Target for !BIOS_Rom! - goto Usage - ) - - REM Create a BIOS backup before Stitching - if %BackupRom% EQU 1 ( - echo Creating backup of original BIOS rom. - copy /y !BIOS_Rom! !BIOS_Rom!.orig >nul - ) - - echo. >>Stitching.log - echo ********** Stitching !BIOS_Rom! ********** >>Stitching.log - echo. >>Stitching.log - echo. - echo Stitching IFWI for !BIOS_Rom! ... - echo -----------------------------------------------------------------= ---------- - echo IFWI Header: !IFWI_HEADER_FILE!, SEC version: !SEC_VERSION!, =20 - echo BIOS Version: !BIOS_Version! - - echo Platform Type: !Platform_Type!, IFWI Prefix: %BIOS_ID% - echo -----------------------------------------------------------------= ---------- - - echo ----------------------------- - echo. - echo Generating IFWI... %BIOS_ID%.bin - echo. - - copy /b/y !IFWI_HEADER_FILE! + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION= !\VLV_SEC_REGION.bin + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\Vacant.bin = + !BIOS_Rom! %BIOS_ID%.bin - echo. - echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D -) -@echo off - -::********************************************************************** -:: end of main loop -::********************************************************************** - -echo. -echo -- All specified ROM files Stitched. -- -echo. -goto Exit - -:Usage -echo. -echo *********************************************************************= ***************************** -echo This Script is used to Stitch together BIOS, GOP Driver, Microcode Pa= tch and TXE FW -echo into a single Integrated Firmware Image (IFWI). -echo. -echo Usage: IFWIStitch.bat [flags] [/B BIOS.ROM] [/C Stitch_Config] [/S IF= WI_Suffix] -echo. -echo This script has NO Required arguments, so that the user can just d= ouble click from the GUI. -echo However, this requires that the BIOS.ROM file name is formatted co= rrectly. -echo. -echo /nG Do NOT update the GOP driver. (applies to all ROM= files for this run) -echo /nV Do NOT update the VBIOS. (applies to all ROM= files for this run) -echo /nM Do NOT update the Microcode. (applies to all ROM= files for this run) -echo /nB Do NOT backup BIOS.ROMs. (Default will backup to B= IOS.ROM.Orig) -echo. -echo BIOS.ROM: A single BIOS ROM file to use for stitching -echo (DEFAULT: ALL .ROM files inside the current direct= ory) -echo Stitch_Config: Text file containing version info of each FW compo= nent -echo (DEFAULT: Stitch_Config.txt) -echo IFWI_Suffix: Suffix to append to the end of the IFWI filename -echo (DEFAULT: YYYY_MM_DD_HHMM) -echo. -echo Examples: -echo IFIWStitch.bat : Stitch all R= OMs with defaults -echo IFIWStitch.bat /B C:/MyRoms/testBIOS.rom : Stitch singl= e ROM with defaults -echo IFIWStitch.bat /B ../testBIOS.rom /S test123 : Stitch singl= e ROM and add custom suffix -echo IFIWStitch.bat /nM /nB /B testBIOS.rom /S test456 : Stitch singl= e ROM, keep uCode from .rom, -echo don't create= backup, and add custom suffix. -echo *********************************************************************= ******************************* -pause -exit /b 1 - -:ScriptFail -set exitCode=3D1 - -:Exit -echo -- See Stitching.log for more info. -- -echo. -echo %date% %time% -echo. -if "%Platform_Type%"=3D=3D"MNW2" ( - echo . -) else ( - echo only support MNW2 for this project! -pause -) -exit /b %exitCode% -EndLocal diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Stitch/MNW2_Stitch_Config.txt= b/Platform/Intel/Vlv2TbltDevicePkg/Stitch/MNW2_Stitch_Config.txt deleted file mode 100644 index 82abe6548f..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Stitch/MNW2_Stitch_Config.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# - -HEADER=3DIFWI_HEADER -SEC_VERSION=3D1.0.2.1060v5 - --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43063): https://edk2.groups.io/g/devel/message/43063 Mute This Topic: https://groups.io/mt/32267619/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43064+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43064+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949764; cv=none; d=zoho.com; s=zohoarc; b=ekuoDPys1+KB2XVgkHmWu2dj+qpzmbf1aR69GeO9lQCNUUze62hlCI2VqCs47AL4jEWN1I+wO9EbPebK0U4h4M1mW+Ec+jGVVkq7P9CjrhMfSaDSD2vc5SyO+0OBcslYOcq8KdvGJ+EPx9WZXbC0bhziDkLpwhPV4UKFri7D2GM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949764; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=yYf0mrXlkCbwp02XVwS5i9TiZErFSCzIkXkTSFIz4W8=; b=bYMapIPXCtaOo5JmgVqpBQO2MKnbP2bBDWWU+rNBaw6fBqf+KFrck4G3ynq+415+QHulyuLrrjQBSZYblCcCmv/zvGq81uaFWas4yGHl2/RSVm4W5woZsEr+7TupGPD8coyxl4s3E/bLagZRbOjZ+aaaTgYv1bEkZOfmZ20fCRQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43064+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156194976431623.621896625520776; Sun, 30 Jun 2019 19:56:04 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480189" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:00 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 04/14] Vlv2TbltDevicePkg: Switch from ISA to SIO modules Date: Sun, 30 Jun 2019 19:55:43 -0700 Message-Id: <20190701025553.18596-5-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949763; bh=9wY+V/sPsQMbpuFvUOOM4ota/A1w3PuzyFBWbVKMfD4=; h=Cc:Date:From:Reply-To:Subject:To; b=Qhdme3HG/ZChMqYfuExWLgDt0X01IhMO9cJQmnFYKMeUEYRmxGTVDysFGmfs6K1O9Oi WWUygN//y0GlxCP/Hr9dNhnGMM5uaDhw4WFY5V/Cr5+dJyX+4Xo4dBOfwMTApbNIbJsZP ZjoKHV6E+0ald92IwubupQL/gMb1Tj/GSW4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Remove IntelFrameworkModulePkg ISA related modules and replace with MdeModulePkg SIO modules. * Retire Wpce791 module * Retire gEfiLpcWpce791PolicyProtocolGuid and include file * Retire gEfiLpcWpc83627PolicyProtocolGuid and include file * Remove production of gEfiLpcWpc83627PolicyProtocolGuid from PlatformDxe module * Add PcuSio module * Use PciSioSerialDxe module Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Include/Protocol/LpcWpc83627Policy.h | 92 -- .../Include/Protocol/LpcWpce791Policy.h | 55 - .../Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.c | 951 ++++++++++++++++++ .../Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.h | 363 +++++++ .../Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.inf | 38 + .../Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 4 - .../PlatformDxe/PlatformDxe.inf | 2 - .../PlatformDxe/SioPlatformPolicy.c | 82 -- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 2 +- .../Vlv2TbltDevicePkg/Wpce791/LpcDriver.c | 340 ------- .../Vlv2TbltDevicePkg/Wpce791/LpcDriver.h | 112 --- .../Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.c | 366 ------- .../Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.h | 103 -- .../Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.c | 126 --- .../Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.h | 101 -- .../Vlv2TbltDevicePkg/Wpce791/Wpce791.inf | 63 -- 18 files changed, 1354 insertions(+), 1449 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWp= c83627Policy.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWp= ce791Policy.h create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.c create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.h create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SioPlatfor= mPolicy.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Wpce791/Wpce791.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpc83627P= olicy.h b/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpc83627Poli= cy.h deleted file mode 100644 index 62d026f133..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpc83627Policy.h +++ /dev/null @@ -1,92 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - LpcWpc83667Policy.h - -Abstract: - - Protocol used for WPC83627 Policy definition. ---------------------------------------------------------------------------= ----- - Rev Date Name Description - ------------------------------------------------------------------------= ------- - R01 < 4/22/2011> LB Update driver for Sio83627UGH support. - ------------------------------------------------------------------------= ------- -**/ - -#ifndef _WPC83627_POLICY_PROTOCOL_H_ -#define _WPC83627_POLICY_PROTOCOL_H_ - -EFI_FORWARD_DECLARATION (EFI_WPC83627_POLICY_PROTOCOL); - -#define EFI_WPC83627_POLICY_PROTOCOL_GUID \ - { \ - 0xd3ecc567, 0x9fd5, 0x44c1, 0x86, 0xcf, 0x5d, 0xa7, 0xa2, 0x4f, 0x4b, = 0x5d \ - } - -#define EFI_WPC83627_COM1_ENABLE 0x01 -#define EFI_WPC83627_COM2_ENABLE 0x01 - -#define EFI_WPC83627_COM3_ENABLE 0x01 -#define EFI_WPC83627_COM4_ENABLE 0x01 - -#define EFI_WPC83627_LPT1_ENABLE 0x01 -#define EFI_WPC83627_LPT1_ENABLE 0x01 -#define EFI_WPC83627_FDD_ENABLE 0x01 -#define EFI_WPC83627_FDD_WRITE_ENABLE 0x01 -#define EFI_WPC83627_PS2_KBC_ENABLE 0x01 -#define EFI_WPC83627_ECIR_ENABLE 0x01 - -#define EFI_WPC83627_COM1_DISABLE 0x00 -#define EFI_WPC83627_COM2_DISABLE 0x00 - -#define EFI_WPC83627_COM3_DISABLE 0x00 -#define EFI_WPC83627_COM4_DISABLE 0x00 - -#define EFI_WPC83627_LPT1_DISABLE 0x00 -#define EFI_WPC83627_FDD_DISABLE 0x00 -#define EFI_WPC83627_FDD_WRITE_PROTECT 0x00 -#define EFI_WPC83627_PS2_KBC_DISABLE 0x00 -#define EFI_WPC83627_ECIR_DISABLE 0x00 -#define EFI_WPC83627_RESERVED_DEFAULT 0x00 - -typedef struct { - UINT16 Com1 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Lpt1 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Floppy :1; // 0 =3D Disable, 1 =3D Enable - UINT16 FloppyWriteProtect :1; // 0 =3D Write Protect, 1 =3D= Write Enable - UINT16 Port80 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 CIR :1; // CIR enable or disable - UINT16 Ps2Keyboard :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Ps2Mouse :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Com2 :1; // 0 =3D Disable, 1 =3D Enable - - UINT16 Com3 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Com4 :1; // 0 =3D Disable, 1 =3D Enable - - UINT16 Dac :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Rsvd :6; -} EFI_WPC83627_DEVICE_ENABLES; - -typedef enum { - LptModeOutput, - LptModeBiDirectional, - LptModeEpp, - LptModeEcp -} EFI_LPT_MODE; - -typedef struct _EFI_WPC83627_POLICY_PROTOCOL { - EFI_WPC83627_DEVICE_ENABLES DeviceEnables; - EFI_LPT_MODE LptMode; -} EFI_WPC83627_POLICY_PROTOCOL; - -extern EFI_GUID gEfiLpcWpc83627PolicyProtocolGuid; - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpce791Po= licy.h b/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpce791Policy= .h deleted file mode 100644 index 1b2459e54a..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Protocol/LpcWpce791Policy.h +++ /dev/null @@ -1,55 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - LpcWpce791Policy.h - -Abstract: - - Protocol used for WPCE791 Policy definition. - -**/ - -#ifndef _WPCE791_POLICY_PROTOCOL_H_ -#define _WPCE791_POLICY_PROTOCOL_H_ - - -#define EFI_WPCE791_POLICY_PROTOCOL_GUID \ - { \ - 0xab2bee2f, 0xc1a6, 0x4399, 0x85, 0x3d, 0xc0, 0x7c, 0x77, 0x4f, 0xfd, = 0xd \ - } - -#define EFI_WPCE791_PS2_KEYBOARD_ENABLE 0x01 -#define EFI_WPCE791_PS2_KEYBOARD_DISABLE 0x00 - -#define EFI_WPCE791_PS2_MOUSE_ENABLE 0x01 -#define EFI_WPCE791_PS2_MOUSE_DISABLE 0x00 - -typedef struct { - UINT16 Com1 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Lpt1 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Floppy :1; // 0 =3D Disable, 1 =3D Enable - UINT16 FloppyWriteProtect :1; // 0 =3D Write Protect, 1 =3D= Write Enable - UINT16 Port80 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 CIR :1; // CIR enable or disable - UINT16 Ps2Keyboard :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Ps2Mouse :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Com2 :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Dac :1; // 0 =3D Disable, 1 =3D Enable - UINT16 Rsvd :6; -} EFI_WPCE791_DEVICE_ENABLES; - -typedef struct _EFI_WPCE791_POLICY_PROTOCOL { - EFI_WPCE791_DEVICE_ENABLES DeviceEnables; -} EFI_WPCE791_POLICY_PROTOCOL; - -extern EFI_GUID gEfiLpcWpce791PolicyProtocolGuid; - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.c b/Platform/In= tel/Vlv2TbltDevicePkg/PcuSio/PcuSio.c new file mode 100644 index 0000000000..d16b1b0abd --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.c @@ -0,0 +1,951 @@ +/** @file + Produces the SIO Protocols for ISA devices integrated in the Platform + Controller Unit (PCU). + + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "PcuSio.h" + +// +// PCU SIO Driver Global Variables +// +EFI_DRIVER_BINDING_PROTOCOL gPcuSioDriverBinding =3D { + PcuSioDriverBindingSupported, + PcuSioDriverBindingStart, + PcuSioDriverBindingStop, + 0x10, + NULL, + NULL +}; + +// +// Super I/O Protocol interfaces +// +EFI_SIO_PROTOCOL mSioInterface =3D { + SioRegisterAccess, + SioGetResources, + SioSetResources, + SioPossibleResources, + SioModify +}; + +// +// COM 1 UART Controller +// +GLOBAL_REMOVE_IF_UNREFERENCED +SIO_RESOURCES_IO mCom1Resources =3D { + { { ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR }, 0x3F8, 8 }, + { ACPI_END_TAG_DESCRIPTOR, 0 } +}; + +// +// Table of SIO Controllers +// +GLOBAL_REMOVE_IF_UNREFERENCED +SIO_DEVICE_INFO mDevicesInfo[] =3D { + { + EISA_PNP_ID (0x501), + 0, + { (ACPI_SMALL_RESOURCE_HEADER *) &mCom1Resources } + } +}; + +// +// ACPI Device Path Node template +// +GLOBAL_REMOVE_IF_UNREFERENCED +ACPI_HID_DEVICE_PATH mAcpiDeviceNodeTemplate =3D { + { // Header + ACPI_DEVICE_PATH, + ACPI_DP, + { + (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), + (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) + } + }, + 0x0, // HID + 0x0 // UID +}; + +/** + Provides a low level access to the registers for the Super I/O. + + @param[in] This Indicates a pointer to the calling context. + @param[in] Write Specifies the type of the register operati= on. + If this parameter is TRUE, Value is interp= reted + as an input parameter and the operation is= a + register write. If this parameter is FALSE, + Value is interpreted as an output paramete= r and + the operation is a register read. + @param[in] ExitCfgMode Exit Configuration Mode Indicator. If this + parameter is set to TRUE, the Super I/O dr= iver + will turn off configuration mode of the Su= per + I/O prior to returning from this function.= If + this parameter is set to FALSE, the Super = I/O + driver will leave Super I/O in the + configuration mode. The Super I/O driver m= ust + track the current state of the Super I/O a= nd + enable the configuration mode of Super I/O= if + necessary prior to register access. + @param[in] Register Register number. + @param[in,out] Value If Write is TRUE, Value is a pointer to the + buffer containing the byte of data to be + written to the Super I/O register. If Writ= e is + FALSE, Value is a pointer to the destinati= on + buffer for the byte of data to be read fro= m the + Super I/O register. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER The Value is NULL. + @retval EFI_INVALID_PARAMETER Invalid Register number. + +**/ +EFI_STATUS +EFIAPI +SioRegisterAccess ( + IN CONST EFI_SIO_PROTOCOL *This, + IN BOOLEAN Write, + IN BOOLEAN ExitCfgMode, + IN UINT8 Register, + IN OUT UINT8 *Value + ) +{ + return EFI_SUCCESS; +} + +/** + Provides an interface to get a list of the current resources consumed by= the + device in the ACPI Resource Descriptor format. + + GetResources() returns a list of resources currently consumed by the dev= ice. + The ResourceList is a pointer to the buffer containing resource descript= ors + for the device. The descriptors are in the format of Small or Large ACPI + resource descriptor as defined by ACPI specification (2.0 & 3.0). The bu= ffer + of resource descriptors is terminated with the 'End tag' resource descri= ptor. + + @param[in] This Indicates a pointer to the calling context. + @param[out] ResourceList A pointer to an ACPI resource descriptor l= ist + that defines the current resources used by= the + device. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceList is NULL. + +**/ +EFI_STATUS +EFIAPI +SioGetResources ( + IN CONST EFI_SIO_PROTOCOL *This, + OUT ACPI_RESOURCE_HEADER_PTR *ResourceList + ) +{ + SIO_DEV *SioDevice; + + if (ResourceList =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + SioDevice =3D SIO_DEV_FROM_SIO (This); + if (SioDevice->DeviceIndex < ARRAY_SIZE (mDevicesInfo)) { + *ResourceList =3D mDevicesInfo[SioDevice->DeviceIndex].Resources; + } + + return EFI_SUCCESS; +} + +/** + Sets the resources for the device. + + @param[in] This Indicates a pointer to the calling context. + @param[in] ResourceList Pointer to the ACPI resource descriptor li= st. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceList is invalid. + @retval EFI_ACCESS_DENIED Some of the resources in ResourceList are = in + use. + +**/ +EFI_STATUS +EFIAPI +SioSetResources ( + IN CONST EFI_SIO_PROTOCOL *This, + IN ACPI_RESOURCE_HEADER_PTR ResourceList + ) +{ + return EFI_SUCCESS; +} + +/** + Provides a collection of resource descriptor lists. Each resource descri= ptor + list in the collection defines a combination of resources that can + potentially be used by the device. + + @param[in] This Indicates a pointer to the calling con= text. + @param[out] ResourceCollection Collection of the resource descriptor + lists. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceCollection is NULL. + +**/ +EFI_STATUS +EFIAPI +SioPossibleResources ( + IN CONST EFI_SIO_PROTOCOL *This, + OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection + ) +{ + return EFI_SUCCESS; +} + +/** + Provides an interface for a table based programming of the Super I/O + registers. + + The Modify() function provides an interface for table based programming = of + the Super I/O registers. This function can be used to perform programmin= g of + multiple Super I/O registers with a single function call. For each table + entry, the Register is read, its content is bitwise ANDed with AndMask, = and + then ORed with OrMask before being written back to the Register. The Sup= er + I/O driver must track the current state of the Super I/O and enable the + configuration mode of Super I/O if necessary prior to table processing. = Once + the table is processed, the Super I/O device has to be returned to the + original state. + + @param[in] This Indicates a pointer to the calling context. + @param[in] Command A pointer to an array of NumberOfCommands + EFI_SIO_REGISTER_MODIFY structures. Each + structure specifies a single Super I/O reg= ister + modify operation. + @param[in] NumberOfCommands Number of elements in the Command array. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER Command is NULL. + +**/ +EFI_STATUS +EFIAPI +SioModify ( + IN CONST EFI_SIO_PROTOCOL *This, + IN CONST EFI_SIO_REGISTER_MODIFY *Command, + IN UINTN NumberOfCommands + ) +{ + return EFI_SUCCESS; +} + +/** + Create the child device with a given device index. + + @param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance. + @param[in] Controller The handle of ISA bus controller. + @param[in] PciIo The pointer to the PCI protocol. + @param[in] ParentDevicePath Device path of the ISA bus controller. + @param[in] DeviceIndex Index of the device supported by this drive= r. + + @retval EFI_SUCCESS The child device has been created successfu= lly. + @retval Others Error occurred during the child device crea= tion. + +**/ +EFI_STATUS +SioCreateChildDevice ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_PCI_IO_PROTOCOL *PciIo, + IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, + IN UINT32 DeviceIndex + ) +{ + EFI_STATUS Status; + SIO_DEV *SioDevice; + + // + // Initialize the SIO_DEV structure + // + SioDevice =3D AllocateZeroPool (sizeof (SIO_DEV)); + if (SioDevice =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "SioCreateChildDevice(): Can not allocate SIO Dev= ice structure\n")); + return EFI_OUT_OF_RESOURCES; + } + + SioDevice->Signature =3D SIO_DEV_SIGNATURE; + SioDevice->Handle =3D NULL; + SioDevice->PciIo =3D PciIo; + CopyMem (&SioDevice->Sio, &mSioInterface, sizeof (EFI_SIO_PROTOCOL)); + SioDevice->DeviceIndex =3D DeviceIndex; + + // + // Construct the child device path + // + mAcpiDeviceNodeTemplate.HID =3D mDevicesInfo[DeviceIndex].Hid; + mAcpiDeviceNodeTemplate.UID =3D mDevicesInfo[DeviceIndex].Uid; + SioDevice->DevicePath =3D AppendDevicePathNode ( + ParentDevicePath, + (EFI_DEVICE_PATH_PROTOCOL *) &mAcpiDeviceNodeT= emplate + ); + if (SioDevice->DevicePath =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "SioCreateChildDevice(): Can not allocate SIO Dev= ice path\n")); + Status =3D EFI_OUT_OF_RESOURCES; + goto Done; + } + + // + // Create a child handle and install Device Path and Super I/O protocols + // + Status =3D gBS->InstallMultipleProtocolInterfaces ( + &SioDevice->Handle, + &gEfiDevicePathProtocolGuid, + SioDevice->DevicePath, + &gEfiSioProtocolGuid, + &SioDevice->Sio, + NULL + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "SioCreateChildDevice(): Can not install child pr= otocols %r\n", Status)); + goto Done; + } + + Status =3D gBS->OpenProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + (VOID **) &PciIo, + This->DriverBindingHandle, + SioDevice->Handle, + EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "SioCreateChildDevice(): Can not open parent PCI = I/O Protocol by child controller %r\n", Status)); + gBS->UninstallMultipleProtocolInterfaces ( + SioDevice->Handle, + &gEfiDevicePathProtocolGuid, + SioDevice->DevicePath, + &gEfiSioProtocolGuid, + &SioDevice->Sio, + NULL + ); + } + +Done: + if (EFI_ERROR (Status)) { + if (SioDevice->DevicePath !=3D NULL) { + FreePool (SioDevice->DevicePath); + } + FreePool (SioDevice); + } + + return Status; +} + +/** + Create all the ISA child devices on the ISA bus controller (PCI to ISA + bridge). + + @param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance. + @param[in] Controller The handle of ISA bus controller. + @param[in] PciIo The pointer to the PCI protocol. + @param[in] ParentDevicePath Device path of the ISA bus controller. + + @retval The number of child device that is successfully created. + +**/ +UINT32 +SioCreateAllChildDevices ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_PCI_IO_PROTOCOL *PciIo, + IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath + ) +{ + UINT32 Index; + UINT32 ChildDeviceNumber; + EFI_STATUS Status; + + ChildDeviceNumber =3D 0; + + for (Index =3D 0; Index < ARRAY_SIZE (mDevicesInfo); Index++) { + Status =3D SioCreateChildDevice ( + This, + Controller, + PciIo, + ParentDevicePath, + Index + ); + if (!EFI_ERROR (Status)) { + ChildDeviceNumber++; + } + } + + return ChildDeviceNumber; +} + +/** + Tests to see if this driver supports a given controller. If a child devi= ce is + provided, it further tests to see if this driver supports creating a han= dle + for the specified child device. + + This function checks to see if the driver specified by This supports the + device specified by ControllerHandle. Drivers will typically use the dev= ice + path attached to ControllerHandle and/or the services from the bus I/O + abstraction attached to ControllerHandle to determine if the driver supp= orts + ControllerHandle. This function may be called many times during platform + initialization. In order to reduce boot times, the tests performed by th= is + function must be very small, and take as little time as possible to exec= ute. + This function must not change the state of any hardware devices, and this + function must be aware that the device specified by ControllerHandle may + already be managed by the same driver or a different driver. This functi= on + must match its calls to AllocatePages() with FreePages(), AllocatePool()= with + FreePool(), and OpenProtocol() with CloseProtocol(). Since ControllerHan= dle + may have been previously started by the same driver, if a protocol is al= ready + in the opened state, then it must not be closed with CloseProtocol(). Th= is is + required to guarantee the state of ControllerHandle is not modified by t= his + function. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PRO= TOCOL + instance. + @param[in] ControllerHandle The handle of the controller to test. T= his + handle must support a protocol interface + that supplies an I/O abstraction to the + driver. + @param[in] RemainingDevicePath A pointer to the remaining portion of a + device path. This parameter is ignored= by + device drivers, and is optional for bus + drivers. For bus drivers, if this param= eter + is not NULL, then the bus driver must + determine if the bus controller specifi= ed by + ControllerHandle and the child controll= er + specified by RemainingDevicePath are bo= th + supported by this bus driver. + + @retval EFI_SUCCESS The device specified by ControllerHandl= e and + RemainingDevicePath is supported by the + driver specified by This. + @retval EFI_ALREADY_STARTED The device specified by ControllerHandl= e and + RemainingDevicePath is already being ma= naged + by the driver specified by This. + @retval EFI_ACCESS_DENIED The device specified by ControllerHandl= e and + RemainingDevicePath is already being ma= naged + by a different driver or an application= that + requires exclusive access. + @retval EFI_UNSUPPORTED The device specified by ControllerHandl= e and + RemainingDevicePath is not supported by= the + driver specified by This. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingSupported ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ) +{ + EFI_STATUS Status; + EFI_PCI_IO_PROTOCOL *PciIo; + PCI_TYPE00 Pci; + + // + // Get PciIo protocol instance + // + Status =3D gBS->OpenProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + (VOID **)&PciIo, + This->DriverBindingHandle, + Controller, + EFI_OPEN_PROTOCOL_BY_DRIVER + ); + + if (EFI_ERROR(Status)) { + return Status; + } + + Status =3D PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint32, + 0, + sizeof(Pci) / sizeof(UINT32), + &Pci + ); + + if (!EFI_ERROR (Status)) { + Status =3D EFI_UNSUPPORTED; + if ((Pci.Hdr.Command & 0x03) =3D=3D 0x03) { + if (Pci.Hdr.ClassCode[2] =3D=3D PCI_CLASS_BRIDGE) { + // + // See if this is a standard PCI to ISA Bridge from the Base Code + // and Class Code + // + if (Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA) { + Status =3D EFI_SUCCESS; + } + // + // See if this is an Intel PCI to ISA bridge in Positive Decode Mo= de + // + if (Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA_PDECODE && + Pci.Hdr.VendorId =3D=3D 0x8086 && Pci.Hdr.DeviceId =3D=3D 0x71= 10) { + Status =3D EFI_SUCCESS; + } + } + } + } + + gBS->CloseProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + This->DriverBindingHandle, + Controller + ); + + return Status; +} + +/** + Starts a device controller or a bus controller. + + The Start() function is designed to be invoked from the EFI boot service + ConnectController(). As a result, much of the error checking on the + parameters to Start() has been moved into this common boot service. It is + legal to call Start() from other locations, but the following calling + restrictions must be followed or the system behavior will not be + deterministic. + 1. ControllerHandle must be a valid EFI_HANDLE. + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a + naturally aligned EFI_DEVICE_PATH_PROTOCOL. + 3. Prior to calling Start(), the Supported() function for the driver + specified by This must have been called with the same calling paramet= ers, + and Supported() must have returned EFI_SUCCESS. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PRO= TOCOL + instance. + @param[in] ControllerHandle The handle of the controller to start. = This + handle must support a protocol interface + that supplies an I/O abstraction to the + driver. + @param[in] RemainingDevicePath A pointer to the remaining portion of a + device path. This parameter is ignored= by + device drivers, and is optional for bus + drivers. For a bus driver, if this para= meter + is NULL, then handles for all the child= ren + of Controller are created by this drive= r. If + this parameter is not NULL and the first + Device Path Node is not the End of Devi= ce + Path Node, then only the handle for the + child device specified by the first Dev= ice + Path Node of RemainingDevicePath is cre= ated + by this driver. If the first Device Path + Node of RemainingDevicePath is the End = of + Device Path Node, no child handle is cr= eated + by this driver. + + @retval EFI_SUCCESS The device was started. + @retval EFI_DEVICE_ERROR The device could not be started due to a + device error. + @retval EFI_OUT_OF_RESOURCES The request could not be completed due = to a + lack of resources. + @retval Others The driver failed to start the device. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingStart ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ) +{ + EFI_STATUS Status; + EFI_PCI_IO_PROTOCOL *PciIo; + EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; + UINT64 Supports; + UINT64 OriginalAttributes; + UINT64 Attributes; + BOOLEAN Enabled; + SIO_BUS_DRIVER_PRIVATE_DATA *Private; + UINT32 ChildDeviceNumber; + + Enabled =3D FALSE; + Supports =3D 0; + OriginalAttributes =3D 0; + Private =3D NULL; + + // + // Open the PCI I/O Protocol Interface + // + PciIo =3D NULL; + Status =3D gBS->OpenProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + (VOID**) &PciIo, + This->DriverBindingHandle, + Controller, + EFI_OPEN_PROTOCOL_BY_DRIVER + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): No PCI I/O Protocol = %r\n", Status)); + return Status; + } + + // + // Open Device Path Protocol + // + Status =3D gBS->OpenProtocol ( + Controller, + &gEfiDevicePathProtocolGuid, + (VOID **) &ParentDevicePath, + This->DriverBindingHandle, + Controller, + EFI_OPEN_PROTOCOL_BY_DRIVER + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): No Device Path Proto= col %r\n", Status)); + gBS->CloseProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + This->DriverBindingHandle, + Controller + ); + return Status; + } + + // + // Get supported PCI attributes + // + Status =3D PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationSupported, + 0, + &Supports + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error reading PCI I/= O Supported Attributes %r\n", Status)); + goto Done; + } + Supports &=3D (UINT64) (EFI_PCI_IO_ATTRIBUTE_ISA_IO | + EFI_PCI_IO_ATTRIBUTE_ISA_IO_16); + + Status =3D PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationGet, + 0, + &OriginalAttributes + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error reading PCI I/= O Attributes %r\n", Status)); + goto Done; + } + + Attributes =3D EFI_PCI_DEVICE_ENABLE | + Supports | + EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO; + + Status =3D PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationEnable, + Attributes, + NULL + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error enabling PCI I= /O Attributes %r\n", Status)); + goto Done; + } + + Enabled =3D TRUE; + + // + // Store the OriginalAttributes for the restore in BindingStop() + // + Private =3D AllocateZeroPool (sizeof (SIO_BUS_DRIVER_PRIVATE_DATA)); + if (Private =3D=3D NULL) { + Status =3D EFI_OUT_OF_RESOURCES; + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error allocating SIO= private data structure %r\n", Status)); + goto Done; + } + Private->PciIo =3D PciIo; + Private->OriginalAttributes =3D OriginalAttributes; + + Status =3D gBS->InstallProtocolInterface ( + &Controller, + &gEfiCallerIdGuid, + EFI_NATIVE_INTERFACE, + Private + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error installing gEf= iCallerIdGuid %r\n", Status)); + goto Done; + } + + // + // Report status code for the start of general controller initialization + // + REPORT_STATUS_CODE_WITH_DEVICE_PATH ( + EFI_PROGRESS_CODE, + (EFI_IO_BUS_LPC | EFI_IOB_PC_INIT), + ParentDevicePath + ); + + // + // Report status code for the start of enabling devices on the bus + // + REPORT_STATUS_CODE_WITH_DEVICE_PATH ( + EFI_PROGRESS_CODE, + (EFI_IO_BUS_LPC | EFI_IOB_PC_ENABLE), + ParentDevicePath + ); + + // + // Create all the children upon the first entrance + // + ChildDeviceNumber =3D SioCreateAllChildDevices ( + This, + Controller, + PciIo, + ParentDevicePath + ); + if (ChildDeviceNumber =3D=3D 0) { + Status =3D EFI_DEVICE_ERROR; + DEBUG ((DEBUG_ERROR, "PcuSioDriverBindingStart(): Error creating child= SIO devices %r\n", Status)); + goto Done; + } + +Done: + if (EFI_ERROR (Status)) { + if (PciIo !=3D NULL && Enabled) { + PciIo->Attributes ( + PciIo, + EfiPciIoAttributeOperationSet, + OriginalAttributes, + NULL + ); + } + + gBS->CloseProtocol ( + Controller, + &gEfiDevicePathProtocolGuid, + This->DriverBindingHandle, + Controller + ); + + gBS->CloseProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + This->DriverBindingHandle, + Controller + ); + + if (Private !=3D NULL) { + gBS->UninstallMultipleProtocolInterfaces ( + Controller, + &gEfiCallerIdGuid, + Private, + NULL + ); + FreePool (Private); + } + } + + return Status; +} + +/** + Stops a device controller or a bus controller. + + The Stop() function is designed to be invoked from the EFI boot service + DisconnectController(). As a result, much of the error checking on the + parameters to Stop() has been moved into this common boot service. It is + legal to call Stop() from other locations, but the following calling + restrictions must be followed or the system behavior will not be + deterministic. + 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previo= us + call to this same driver's Start() function. + 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a + valid EFI_HANDLE. In addition, all of these handles must have been cr= eated + in this driver's Start() function, and the Start() function must have + called OpenProtocol() on ControllerHandle with an Attribute of + EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTO= COL + instance. + @param[in] ControllerHandle A handle to the device being stopped. The + handle must support a bus specific I/O + protocol for the driver to use to stop the + device. + @param[in] NumberOfChildren The number of child device handles in + ChildHandleBuffer. + @param[in] ChildHandleBuffer An array of child handles to be freed. Ma= y be + NULL if NumberOfChildren is 0. + + @retval EFI_SUCCESS The device was stopped. + @retval EFI_DEVICE_ERROR The device could not be stopped due to a + device error. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingStop ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ) +{ + EFI_STATUS Status; + SIO_BUS_DRIVER_PRIVATE_DATA *Private; + UINTN Index; + BOOLEAN AllChildrenStopped; + EFI_SIO_PROTOCOL *Sio; + SIO_DEV *SioDevice; + EFI_PCI_IO_PROTOCOL *PciIo; + + if (NumberOfChildren =3D=3D 0) { + // + // Restore PCI attributes + // + Status =3D gBS->OpenProtocol ( + Controller, + &gEfiCallerIdGuid, + (VOID **) &Private, + This->DriverBindingHandle, + Controller, + EFI_OPEN_PROTOCOL_GET_PROTOCOL + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status =3D Private->PciIo->Attributes ( + Private->PciIo, + EfiPciIoAttributeOperationSet, + Private->OriginalAttributes, + NULL + ); + if (EFI_ERROR (Status)) { + return Status; + } + + gBS->UninstallProtocolInterface ( + Controller, + &gEfiCallerIdGuid, + Private + ); + FreePool (Private); + + // + // Close the bus driver + // + Status =3D gBS->CloseProtocol ( + Controller, + &gEfiDevicePathProtocolGuid, + This->DriverBindingHandle, + Controller + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status =3D gBS->CloseProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + This->DriverBindingHandle, + Controller + ); + if (EFI_ERROR (Status)) { + return Status; + } + + return EFI_SUCCESS; + } + + // + // Stop all the children + // + AllChildrenStopped =3D TRUE; + + for (Index =3D 0; Index < NumberOfChildren; Index++) { + Status =3D gBS->OpenProtocol ( + ChildHandleBuffer[Index], + &gEfiSioProtocolGuid, + (VOID **) &Sio, + This->DriverBindingHandle, + Controller, + EFI_OPEN_PROTOCOL_GET_PROTOCOL + ); + if (!EFI_ERROR (Status)) { + SioDevice =3D SIO_DEV_FROM_SIO (Sio); + + // + // Close the child handle + // + Status =3D gBS->CloseProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + This->DriverBindingHandle, + ChildHandleBuffer[Index] + ); + Status =3D gBS->UninstallMultipleProtocolInterfaces ( + ChildHandleBuffer[Index], + &gEfiDevicePathProtocolGuid, + SioDevice->DevicePath, + &gEfiSioProtocolGuid, + &SioDevice->Sio, + NULL + ); + + if (!EFI_ERROR (Status)) { + FreePool (SioDevice->DevicePath); + FreePool (SioDevice); + } else { + // + // Re-open PCI IO Protocol on behalf of the child device + // because of failure of destroying the child device handle + // + gBS->OpenProtocol ( + Controller, + &gEfiPciIoProtocolGuid, + (VOID **) &PciIo, + This->DriverBindingHandle, + ChildHandleBuffer[Index], + EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER + ); + } + } + + if (EFI_ERROR (Status)) { + AllChildrenStopped =3D FALSE; + } + } + + if (!AllChildrenStopped) { + return EFI_DEVICE_ERROR; + } + + return EFI_SUCCESS; +} + +/** + The entry point for the PCU SIO driver. + + @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. + @param[in] 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 po= int. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return EfiLibInstallDriverBinding ( + ImageHandle,=20 + SystemTable,=20 + &gPcuSioDriverBinding,=20 + ImageHandle + ); +} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.h b/Platform/In= tel/Vlv2TbltDevicePkg/PcuSio/PcuSio.h new file mode 100644 index 0000000000..3a47e2c5e2 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.h @@ -0,0 +1,363 @@ +/** @file + Produces the SIO Protocols for ISA devices integrated in the Platform + Controller Unit (PCU). + + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __PCU_SIO_H__ +#define __PCU_SIO_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#pragma pack(1) + +typedef struct { + EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR Io; + EFI_ACPI_END_TAG_DESCRIPTOR End; +} SIO_RESOURCES_IO; + +#pragma pack() + +typedef struct { + UINT32 Hid; + UINT32 Uid; + ACPI_RESOURCE_HEADER_PTR Resources; +} SIO_DEVICE_INFO; + +// +// SIO Bus driver private data structure +// +typedef struct { + EFI_PCI_IO_PROTOCOL *PciIo; + UINT64 OriginalAttributes; +} SIO_BUS_DRIVER_PRIVATE_DATA; + +// +// SIO device private data structure +// +typedef struct { + UINT32 Signature; + EFI_HANDLE Handle; + EFI_PCI_IO_PROTOCOL *PciIo; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_SIO_PROTOCOL Sio; + UINT32 DeviceIndex; +} SIO_DEV; +#define SIO_DEV_SIGNATURE SIGNATURE_32 ('S', 'I', 'O', 'D') +#define SIO_DEV_FROM_SIO(a) CR (a, SIO_DEV, Sio, SIO_DEV_SIGNATURE) + +/** + Tests to see if this driver supports a given controller. If a child devi= ce is + provided, it further tests to see if this driver supports creating a han= dle + for the specified child device. + + This function checks to see if the driver specified by This supports the + device specified by ControllerHandle. Drivers will typically use the dev= ice + path attached to ControllerHandle and/or the services from the bus I/O + abstraction attached to ControllerHandle to determine if the driver supp= orts + ControllerHandle. This function may be called many times during platform + initialization. In order to reduce boot times, the tests performed by th= is + function must be very small, and take as little time as possible to exec= ute. + This function must not change the state of any hardware devices, and this + function must be aware that the device specified by ControllerHandle may + already be managed by the same driver or a different driver. This functi= on + must match its calls to AllocatePages() with FreePages(), AllocatePool()= with + FreePool(), and OpenProtocol() with CloseProtocol(). Since ControllerHan= dle + may have been previously started by the same driver, if a protocol is al= ready + in the opened state, then it must not be closed with CloseProtocol(). Th= is is + required to guarantee the state of ControllerHandle is not modified by t= his + function. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PRO= TOCOL + instance. + @param[in] ControllerHandle The handle of the controller to test. T= his + handle must support a protocol interface + that supplies an I/O abstraction to the + driver. + @param[in] RemainingDevicePath A pointer to the remaining portion of a + device path. This parameter is ignored= by + device drivers, and is optional for bus + drivers. For bus drivers, if this param= eter + is not NULL, then the bus driver must + determine if the bus controller specifi= ed by + ControllerHandle and the child controll= er + specified by RemainingDevicePath are bo= th + supported by this bus driver. + + @retval EFI_SUCCESS The device specified by ControllerHandl= e and + RemainingDevicePath is supported by the + driver specified by This. + @retval EFI_ALREADY_STARTED The device specified by ControllerHandl= e and + RemainingDevicePath is already being ma= naged + by the driver specified by This. + @retval EFI_ACCESS_DENIED The device specified by ControllerHandl= e and + RemainingDevicePath is already being ma= naged + by a different driver or an application= that + requires exclusive access. + @retval EFI_UNSUPPORTED The device specified by ControllerHandl= e and + RemainingDevicePath is not supported by= the + driver specified by This. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingSupported ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ); + +/** + Starts a device controller or a bus controller. + + The Start() function is designed to be invoked from the EFI boot service + ConnectController(). As a result, much of the error checking on the + parameters to Start() has been moved into this common boot service. It is + legal to call Start() from other locations, but the following calling + restrictions must be followed or the system behavior will not be + deterministic. + 1. ControllerHandle must be a valid EFI_HANDLE. + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a + naturally aligned EFI_DEVICE_PATH_PROTOCOL. + 3. Prior to calling Start(), the Supported() function for the driver + specified by This must have been called with the same calling paramet= ers, + and Supported() must have returned EFI_SUCCESS. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PRO= TOCOL + instance. + @param[in] ControllerHandle The handle of the controller to start. = This + handle must support a protocol interface + that supplies an I/O abstraction to the + driver. + @param[in] RemainingDevicePath A pointer to the remaining portion of a + device path. This parameter is ignored= by + device drivers, and is optional for bus + drivers. For a bus driver, if this para= meter + is NULL, then handles for all the child= ren + of Controller are created by this drive= r. If + this parameter is not NULL and the first + Device Path Node is not the End of Devi= ce + Path Node, then only the handle for the + child device specified by the first Dev= ice + Path Node of RemainingDevicePath is cre= ated + by this driver. If the first Device Path + Node of RemainingDevicePath is the End = of + Device Path Node, no child handle is cr= eated + by this driver. + + @retval EFI_SUCCESS The device was started. + @retval EFI_DEVICE_ERROR The device could not be started due to a + device error. + @retval EFI_OUT_OF_RESOURCES The request could not be completed due = to a + lack of resources. + @retval Others The driver failded to start the device. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingStart ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + ); + +/** + Stops a device controller or a bus controller. + + The Stop() function is designed to be invoked from the EFI boot service + DisconnectController(). As a result, much of the error checking on the + parameters to Stop() has been moved into this common boot service. It is + legal to call Stop() from other locations, but the following calling + restrictions must be followed or the system behavior will not be + deterministic. + 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previo= us + call to this same driver's Start() function. + 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a + valid EFI_HANDLE. In addition, all of these handles must have been cr= eated + in this driver's Start() function, and the Start() function must have + called OpenProtocol() on ControllerHandle with an Attribute of + EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. + + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTO= COL + instance. + @param[in] ControllerHandle A handle to the device being stopped. The + handle must support a bus specific I/O + protocol for the driver to use to stop the + device. + @param[in] NumberOfChildren The number of child device handles in + ChildHandleBuffer. + @param[in] ChildHandleBuffer An array of child handles to be freed. Ma= y be + NULL if NumberOfChildren is 0. + + @retval EFI_SUCCESS The device was stopped. + @retval EFI_DEVICE_ERROR The device could not be stopped due to a + device error. + +**/ +EFI_STATUS +EFIAPI +PcuSioDriverBindingStop ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Controller, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ); + +/** + Provides a low level access to the registers for the Super I/O. + + @param[in] This Indicates a pointer to the calling context. + @param[in] Write Specifies the type of the register operati= on. + If this parameter is TRUE, Value is interp= reted + as an input parameter and the operation is= a + register write. If this parameter is FALSE, + Value is interpreted as an output paramete= r and + the operation is a register read. + @param[in] ExitCfgMode Exit Configuration Mode Indicator. If this + parameter is set to TRUE, the Super I/O dr= iver + will turn off configuration mode of the Su= per + I/O prior to returning from this function.= If + this parameter is set to FALSE, the Super = I/O + driver will leave Super I/O in the + configuration mode. The Super I/O driver m= ust + track the current state of the Super I/O a= nd + enable the configuration mode of Super I/O= if + necessary prior to register access. + @param[in] Register Register number. + @param[in,out] Value If Write is TRUE, Value is a pointer to the + buffer containing the byte of data to be + written to the Super I/O register. If Writ= e is + FALSE, Value is a pointer to the destinati= on + buffer for the byte of data to be read fro= m the + Super I/O register. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER The Value is NULL. + @retval EFI_INVALID_PARAMETER Invalid Register number. + +**/ +EFI_STATUS +EFIAPI +SioRegisterAccess ( + IN CONST EFI_SIO_PROTOCOL *This, + IN BOOLEAN Write, + IN BOOLEAN ExitCfgMode, + IN UINT8 Register, + IN OUT UINT8 *Value + ); + +/** + Provides an interface to get a list of the current resources consumed by= the + device in the ACPI Resource Descriptor format. + + GetResources() returns a list of resources currently consumed by the dev= ice. + The ResourceList is a pointer to the buffer containing resource descript= ors + for the device. The descriptors are in the format of Small or Large ACPI + resource descriptor as defined by ACPI specification (2.0 & 3.0). The bu= ffer + of resource descriptors is terminated with the 'End tag' resource descri= ptor. + + @param[in] This Indicates a pointer to the calling context. + @param[out] ResourceList A pointer to an ACPI resource descriptor l= ist + that defines the current resources used by= the + device. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceList is NULL. + +**/ +EFI_STATUS +EFIAPI +SioGetResources ( + IN CONST EFI_SIO_PROTOCOL *This, + OUT ACPI_RESOURCE_HEADER_PTR *ResourceList + ); + +/** + Sets the resources for the device. + + @param[in] This Indicates a pointer to the calling context. + @param[in] ResourceList Pointer to the ACPI resource descriptor li= st. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceList is invalid. + @retval EFI_ACCESS_DENIED Some of the resources in ResourceList are = in + use. + +**/ +EFI_STATUS +EFIAPI +SioSetResources ( + IN CONST EFI_SIO_PROTOCOL *This, + IN ACPI_RESOURCE_HEADER_PTR ResourceList + ); + +/** + Provides a collection of resource descriptor lists. Each resource descri= ptor + list in the collection defines a combination of resources that can + potentially be used by the device. + + @param[in] This Indicates a pointer to the calling con= text. + @param[out] ResourceCollection Collection of the resource descriptor + lists. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER ResourceCollection is NULL. + +**/ +EFI_STATUS +EFIAPI +SioPossibleResources ( + IN CONST EFI_SIO_PROTOCOL *This, + OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection + ); + +/** + Provides an interface for a table based programming of the Super I/O + registers. + + The Modify() function provides an interface for table based programming = of + the Super I/O registers. This function can be used to perform programmin= g of + multiple Super I/O registers with a single function call. For each table + entry, the Register is read, its content is bitwise ANDed with AndMask, = and + then ORed with OrMask before being written back to the Register. The Sup= er + I/O driver must track the current state of the Super I/O and enable the + configuration mode of Super I/O if necessary prior to table processing. = Once + the table is processed, the Super I/O device has to be returned to the + original state. + + @param[in] This Indicates a pointer to the calling context. + @param[in] Command A pointer to an array of NumberOfCommands + EFI_SIO_REGISTER_MODIFY structures. Each + structure specifies a single Super I/O reg= ister + modify operation. + @param[in] NumberOfCommands Number of elements in the Command array. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_INVALID_PARAMETER Command is NULL. + +**/ +EFI_STATUS +EFIAPI +SioModify ( + IN CONST EFI_SIO_PROTOCOL *This, + IN CONST EFI_SIO_REGISTER_MODIFY *Command, + IN UINTN NumberOfCommands + ); + +#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.inf b/Platform/= Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.inf new file mode 100644 index 0000000000..2379f93999 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/PcuSio/PcuSio.inf @@ -0,0 +1,38 @@ +## @file +# Produces the SIO Protocols for ISA devices integrated in the Platform +# Controller Unit (PCU). +# +# Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D PcuSio + FILE_GUID =3D F749DEBC-42E6-4F59-821E-1E94EE9FBBB1 + MODULE_TYPE =3D UEFI_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D PcuSioDriverEntryPoint + +[Sources] + PcuSio.h + PcuSio.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + UefiDriverEntryPoint + UefiBootServicesTableLib + DebugLib + ReportStatusCodeLib + BaseMemoryLib + MemoryAllocationLib + DevicePathLib + UefiLib + +[Protocols] + gEfiPciIoProtocolGuid ## TO_START + gEfiSioProtocolGuid ## BY_START diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index 1d90117af6..89923ffec6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -154,10 +154,6 @@ VOID InitVlvPlatformPolicy ( ); =20 -VOID -InitSioPlatformPolicy( - ); - VOID PchInitBeforeBoot( ); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index e8652f2a84..d3f8fa3833 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -36,7 +36,6 @@ [sources.common] Platform.c IchRegTable.c IdccInfo.c - SioPlatformPolicy.c IchPlatformPolicy.c PciDevice.c SlotConfig.c @@ -105,7 +104,6 @@ [Protocols] gEfiSmbiosSlotPopulationGuid gObservableProtocolGuid gEfiCk505ClockPlatformInfoGuid - gEfiLpcWpc83627PolicyProtocolGuid gEfiTcoResetProtocolGuid gEfiWatchdogTimerDriverProtocolGuid gEfiPlatformIdeInitProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SioPlatformPolicy= .c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SioPlatformPolicy.c deleted file mode 100644 index 32bee75f95..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SioPlatformPolicy.c +++ /dev/null @@ -1,82 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - - SioPlatformPolicy.c - -Abstract: - - Sio Platform Policy Setting. - - ---*/ - -#include "PlatformDxe.h" -#include - - -EFI_WPC83627_POLICY_PROTOCOL mSio83627PolicyData =3D { - { EFI_WPC83627_COM1_ENABLE, // Com1 - EFI_WPC83627_LPT1_ENABLE, // Lpt1 - EFI_WPC83627_FDD_DISABLE, // Floppy - EFI_WPC83627_FDD_WRITE_ENABLE, // FloppyWriteProtect - EFI_WPC83627_RESERVED_DEFAULT, // Port80 - EFI_WPC83627_ECIR_DISABLE, // CIR - EFI_WPC83627_PS2_KBC_ENABLE, // Ps2Keyboard - EFI_WPC83627_RESERVED_DEFAULT, // Ps2Mouse - EFI_WPC83627_COM2_ENABLE, // Com2 - EFI_WPC83627_COM3_ENABLE, // Com3 - EFI_WPC83627_COM4_ENABLE, // Com4 - EFI_WPC83627_RESERVED_DEFAULT, // Dac - 0x00 // Rsvd - }, - LptModeEcp, // LptMode -}; - -/** - - Publish the platform SIO policy setting. - - @retval EFI_SUCCESS - -**/ -VOID -InitSioPlatformPolicy( - ) -{ - - EFI_HANDLE Handle; - EFI_STATUS Status; - - Handle =3D NULL; - - if((mSystemConfiguration.Serial) || (mBoardFeatures & B_BOARD_FEATURES_S= IO_NO_COM1)) { - mSio83627PolicyData.DeviceEnables.Com1 =3D EFI_WPC83627_COM1_DISABLE; - } - - if((mSystemConfiguration.Serial2) || ((mBoardFeatures & B_BOARD_FEATURES= _SIO_COM2)=3D=3D0)) { - mSio83627PolicyData.DeviceEnables.Com2 =3D EFI_WPC83627_COM2_DISABLE; - } - - mSio83627PolicyData.LptMode =3D mSystemConfiguration.ParallelMode; - if((!mSystemConfiguration.Parallel) || (mBoardFeatures & B_BOARD_FEATURE= S_SIO_NO_PARALLEL)) { - mSio83627PolicyData.DeviceEnables.Lpt1 =3D EFI_WPC83627_LPT1_DISABLE; - } - - Status =3D gBS->InstallProtocolInterface ( - &Handle, - &gEfiLpcWpc83627PolicyProtocolGuid, - EFI_NATIVE_INTERFACE, - &mSio83627PolicyData - ); - ASSERT_EFI_ERROR(Status); - -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index 9951aa4a58..786b4f6e91 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -66,7 +66,6 @@ [Protocols] gEfiSmbiosSlotPopulationGuid =3D { 0xef7bf7d6, 0xf8ff, 0x4a76= , { 0x82, 0x47, 0xc0, 0xd0, 0xd1, 0xcc, 0x49, 0xc0 } } gObservableProtocolGuid =3D { 0xe227c522, 0xd5fe, 0x4a53= , { 0x87, 0xb1, 0x0f, 0xbe, 0x57, 0x0f, 0x98, 0xe9 } } gEfiCk505ClockPlatformInfoGuid =3D { 0x3c485ea4, 0x449a, 0x46ce= , { 0xbb, 0x08, 0x2a, 0x33, 0x6e, 0xa9, 0x6b, 0x4e } } - gEfiLpcWpc83627PolicyProtocolGuid =3D { 0xd3ecc567, 0x9fd5, 0x44c1= , { 0x86, 0xcf, 0x5d, 0xa7, 0xa2, 0x4f, 0x4b, 0x5d } } gEfiTcoResetProtocolGuid =3D { 0xa6a79162, 0xe325, 0x4c30= , { 0xbc, 0xc3, 0x59, 0x37, 0x30, 0x64, 0xef, 0xb3 } } gEfiWatchdogTimerDriverProtocolGuid =3D { 0xd5b06d16, 0x2ea1, 0x4def= , { 0x98, 0xd0, 0xa0, 0x5d, 0x40, 0x72, 0x84, 0x17 } } gEfiPlatformIdeInitProtocolGuid =3D { 0x377c66a3, 0x8fe7, 0x4ee8= , { 0x85, 0xb8, 0xf1, 0xa2, 0x82, 0x56, 0x9e, 0x3b } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index 87b905c95b..3165be1fca 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -535,7 +535,7 @@ [FV.FVMAIN] # INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf !if $(SOURCE_DEBUG_ENABLE) !=3D TRUE -INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf +INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf !endif =20 # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index 110efe28c3..03941dd23e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -481,7 +481,7 @@ [FV.FVMAIN] # INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf !if $(SOURCE_DEBUG_ENABLE) !=3D TRUE -INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf +INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf !endif =20 # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c b/Platfor= m/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c deleted file mode 100644 index f98265761b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c +++ /dev/null @@ -1,340 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - LpcDriver.c - -Abstract: - - EFI Lpc Driver for a Generic PC Platform - - - ---*/ - -#include "LpcDriver.h" -#include "IndustryStandard/Pci22.h" - -// -// This driver is for ACPI(PNP0A03,0)/PCI(0x1f,0) -// - -// -// Lpc Driver Global Variables -// - -EFI_DRIVER_BINDING_PROTOCOL gLpcDriver =3D { - LpcDriverSupported, - LpcDriverStart, - LpcDriverStop, - 0x10, - NULL, - NULL -}; - -LPC_DEV mLpc =3D { - LPC_DEV_SIGNATURE, - NULL, - { - IsaDeviceEnumerate, - IsaDeviceSetPower, - IsaGetCurrentResource, - IsaGetPossibleResource, - IsaSetResource, - IsaEnableDevice, - IsaInitDevice, - LpcInterfaceInit - }, - NULL -}; - -BOOLEAN InitExecuted =3D FALSE; - -/** - the entry point of the Lpc driver - -**/ -EFI_STATUS -EFIAPI -LpcDriverEntryPoint( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - - - return EfiLibInstallDriverBinding (ImageHandle, SystemTable, &gLpcDriver= , ImageHandle); -} - -/** - - ControllerDriver Protocol Method - -**/ -EFI_STATUS -EFIAPI -LpcDriverSupported ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ) -{ - EFI_STATUS Status; - EFI_PCI_IO_PROTOCOL *PciIo; - EFI_DEVICE_PATH_PROTOCOL *IsaBridgeDevicePath; - - ACPI_HID_DEVICE_PATH *AcpiNode; - PCI_DEVICE_PATH *PciNode; - PCI_TYPE00 Pci; - - // - // Get the ISA bridge's Device Path and test it - // the following code is specific - // - Status =3D gBS->OpenProtocol ( - Controller, - &gEfiDevicePathProtocolGuid, - (VOID **)&IsaBridgeDevicePath, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - - if (EFI_ERROR (Status)) { - return Status; - } - - Status =3D EFI_SUCCESS; - AcpiNode =3D (ACPI_HID_DEVICE_PATH *)IsaBridgeDevicePath; - if (AcpiNode->Header.Type !=3D ACPI_DEVICE_PATH || - AcpiNode->Header.SubType !=3D ACPI_DP || - DevicePathNodeLength (&AcpiNode->Header) !=3D sizeof(ACPI_HID_DEVICE= _PATH) || - AcpiNode -> HID !=3D EISA_PNP_ID(0x0A03) || - AcpiNode -> UID !=3D 0 ) { - Status =3D EFI_UNSUPPORTED; - } else { - // - // Get the next node - // - IsaBridgeDevicePath =3D NextDevicePathNode (IsaBridgeDevicePath); - PciNode =3D (PCI_DEVICE_PATH *)IsaBridgeDevicePath; - if (PciNode->Header.Type !=3D HARDWARE_DEVICE_PATH || - PciNode->Header.SubType !=3D HW_PCI_DP || - DevicePathNodeLength (&PciNode->Header) !=3D sizeof (PCI_DEVICE_PA= TH) || - PciNode -> Function !=3D 0x00 || - PciNode -> Device !=3D 0x1f ) { - Status =3D EFI_UNSUPPORTED; - } - } - - gBS->CloseProtocol ( - Controller, - &gEfiDevicePathProtocolGuid, - This->DriverBindingHandle, - Controller - ); - - if (EFI_ERROR (Status)) { - return EFI_UNSUPPORTED; - } - - // - // Get PciIo protocol instance - // - Status =3D gBS->OpenProtocol ( - Controller, - &gEfiPciIoProtocolGuid, - (VOID **)&PciIo, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - - if (EFI_ERROR(Status)) { - return Status; - } - - Status =3D PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint32, - 0, - sizeof(Pci) / sizeof(UINT32), - &Pci - ); - - if (!EFI_ERROR (Status)) { - Status =3D EFI_SUCCESS; //TODO: force return success as temp solution = EFI_UNSUPPORTED; - if ((Pci.Hdr.Command & 0x03) =3D=3D 0x03) { - if (Pci.Hdr.ClassCode[2] =3D=3D PCI_CLASS_BRIDGE) { - // - // See if this is a standard PCI to ISA Bridge from the Base Code - // and Class Code - // - if (Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA) { - Status =3D EFI_SUCCESS; - } else { - } - - // - // See if this is an Intel PCI to ISA bridge in Positive Decode Mo= de - // - if (Pci.Hdr.ClassCode[1] =3D=3D PCI_CLASS_BRIDGE_ISA_PDECODE && - Pci.Hdr.VendorId =3D=3D 0x8086 && - Pci.Hdr.DeviceId =3D=3D 0x7110) { - Status =3D EFI_SUCCESS; - } else { - } - } else { - } - } - else { - } - } - - gBS->CloseProtocol ( - Controller, - &gEfiPciIoProtocolGuid, - This->DriverBindingHandle, - Controller - ); - return Status; -} - - -/** - Install EFI_ISA_ACPI_PROTOCOL - -**/ -EFI_STATUS -EFIAPI -LpcDriverStart ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ) -{ - EFI_STATUS Status; - EFI_PCI_IO_PROTOCOL *PciIo; - - // - // Get Pci IO - // - Status =3D gBS->OpenProtocol ( - Controller, - &gEfiPciIoProtocolGuid, - (VOID **)&PciIo, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - - if (EFI_ERROR (Status) && Status !=3D EFI_ALREADY_STARTED) { - return Status; - } - - mLpc.PciIo =3D PciIo; - - // - // Install IsaAcpi interface, the Sio interface is not installed! - // - Status =3D gBS->InstallMultipleProtocolInterfaces ( - &Controller, - &gEfiIsaAcpiProtocolGuid, - &mLpc.IsaAcpi, - NULL - ); - return Status; -} - - -EFI_STATUS -EFIAPI -LpcDriverStop ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN UINTN NumberOfChildren, - IN EFI_HANDLE *ChildHandleBuffer - ) -{ - EFI_STATUS Status; - EFI_ISA_ACPI_PROTOCOL *IsaAcpi; - LPC_DEV *LpcDev; - - // - // Get EFI_ISA_ACPI_PROTOCOL interface - // - Status =3D gBS->OpenProtocol ( - Controller, - &gEfiIsaAcpiProtocolGuid, - (VOID **)&IsaAcpi, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); - if (EFI_ERROR (Status)) { - return Status; - } - - LpcDev =3D LPC_ISA_ACPI_FROM_THIS (IsaAcpi); - - // - // Uninstall protocol interface: EFI_ISA_ACPI_PROTOCOL - // - Status =3D gBS->UninstallProtocolInterface ( - Controller, - &gEfiIsaAcpiProtocolGuid, - &LpcDev->IsaAcpi - ); - if (EFI_ERROR (Status)) { - return Status; - } - - gBS->CloseProtocol ( - Controller, - &gEfiPciIoProtocolGuid, - This->DriverBindingHandle, - Controller - ); - - return EFI_SUCCESS; -} - -VOID -LpcIoRead8 ( - IN UINT16 Port, - OUT UINT8 *Data - ) -{ - mLpc.PciIo->Io.Read( - mLpc.PciIo, - EfiPciWidthUint8, - EFI_PCI_IO_PASS_THROUGH_BAR, - Port, - 1, - Data - ); -} - -VOID -LpcIoWrite8 ( - IN UINT16 Port, - IN UINT8 Data - ) -{ - mLpc.PciIo->Io.Write( - mLpc.PciIo, - EfiPciWidthUint8, - EFI_PCI_IO_PASS_THROUGH_BAR, - Port, - 1, - &Data - ); -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.h b/Platfor= m/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.h deleted file mode 100644 index 5e264485e7..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcDriver.h +++ /dev/null @@ -1,112 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - LpcDriver.h - -Abstract: - - EFI Lpc Driver for a Generic PC Platform - - - ---*/ - -#ifndef _LPC_DRIVER_H -#define _LPC_DRIVER_H - - #include "LpcSio.h" - #include "LpcIsaAcpi.h" - -#include "Protocol/IsaAcpi.h" -#include "Protocol/PciIo.h" -#include "Protocol/DriverBinding.h" -#include "Library/UefiBootServicesTableLib.h" -#include "IsaAcpiDxe/PcatIsaAcpi.h" -#include "IndustryStandard/Pci22.h" -#include "Protocol/LpcWpce791Policy.h" - -#include - -#define ICH_LPC_BRIDGE_BUS_DEV_FUNC 0x1F0000 - -// -// LPC device private data structure -// -//#define LPC_DEV_SIGNATURE 'W87X' -#define LPC_DEV_SIGNATURE SIGNATURE_32('X', '7', '8', 'W') //'W87X' -#define EFI_WPCE791_PS2_KEYBOARD_ENABLE 0x01 -#define EFI_WPCE791_PS2_KEYBOARD_DISABLE 0x00 - -#define EFI_WPCE791_PS2_MOUSE_ENABLE 0x01 -#define EFI_WPCE791_PS2_MOUSE_DISABLE 0x00 - - - -typedef struct { - UINTN Signature; - EFI_HANDLE Handle; - EFI_ISA_ACPI_PROTOCOL IsaAcpi; - EFI_PCI_IO_PROTOCOL *PciIo; - -} LPC_DEV; - -#define LPC_ISA_ACPI_FROM_THIS(a) BASE_CR (a, LPC_DEV, IsaAcpi) - -// -// Driver entry point -// -EFI_STATUS -EFIAPI -LpcDriverEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ); - -// -// Prototypes for Driver model protocol interface -// -EFI_STATUS -EFIAPI -LpcDriverSupported ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ); - -EFI_STATUS -EFIAPI -LpcDriverStart ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ); - -EFI_STATUS -EFIAPI -LpcDriverStop ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Controller, - IN UINTN NumberOfChildren, - IN EFI_HANDLE *ChildHandleBuffer - ); - -VOID -LpcIoRead8 ( - IN UINT16 Port, - OUT UINT8 *Data - ); - -VOID -LpcIoWrite8 ( - IN UINT16 Port, - IN UINT8 Data - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.c b/Platfo= rm/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.c deleted file mode 100644 index 9c0b79b15c..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.c +++ /dev/null @@ -1,366 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - LpcIsaAcpi.c - -Abstract: IsaAcpi implementation - - - ---*/ - -#include "LpcDriver.h" - -// -// PS/2 Keyboard Controller -// -static EFI_ISA_ACPI_RESOURCE mLpcWpce791Ps2KeyboardDeviceResources[] =3D { - {EfiIsaAcpiResourceIo, 0, 0x60, 0x64}, - {EfiIsaAcpiResourceInterrupt, 0, 1, 0}, - {EfiIsaAcpiResourceEndOfList, 0, 0, 0} -}; - -// -// PS/2 Mouse Controller -// -static EFI_ISA_ACPI_RESOURCE mLpcWpce791Ps2MouseDeviceResources[] =3D { - {EfiIsaAcpiResourceIo, 0, 0x60, 0x64}, - {EfiIsaAcpiResourceInterrupt, 0, 12, 0}, - {EfiIsaAcpiResourceEndOfList, 0, 0, 0} -}; - -// -// COM -// -static EFI_ISA_ACPI_RESOURCE mLpcWpce791ComDeviceResources[] =3D { - {EfiIsaAcpiResourceIo, 0, 0x3f8, 0x3ff}, - {EfiIsaAcpiResourceInterrupt, 0, 4, 0}, - {EfiIsaAcpiResourceEndOfList, 0, 0, 0} -}; - -// -// Table of ISA Controllers -// -EFI_ISA_ACPI_RESOURCE_LIST mLpcWpce791DeviceList[] =3D { - {{EISA_PNP_ID(0x303), 0}, mLpcWpce791Ps2KeyboardDeviceResources }, // PS= /2 Keyboard Controller - {{EISA_PNP_ID(0xF03), 0}, mLpcWpce791Ps2MouseDeviceResources }, // PS/= 2 Mouse Controller - {{EISA_PNP_ID(0x501), 0}, mLpcWpce791ComDeviceResources }, // COM - {{0, 0}, NULL } // End -}; - -static ICH_DMA_INIT mIchDmaInitTable [] =3D { -// -//Register OFFSET, Value -// - - 0x0D8, 0x000, // Reset DMA Controller 2 - 0x0D0, 0x000, // Enable DMA controller 2 - 0x00C, 0x000, // Reset DMA Controller 1 - 0x008, 0x000, // Enable DMA controller 1 - - // - // Channel 4 - // - 0x0D6, 0x0c0, // DMA contr. 2 Cascade mode, addr. = increment, disable auto init. - 0x0D2, 0x000, // Clear write request register - 0x0d4, 0x000, // Enable DREQs for channel - - // - // Channel 0 - // - 0x00B, 0x040, // DMA contr. 1 single mode, addr. i= ncrement, disable auto init. - 0x009, 0x000, // Clear write request register - 0x00A, 0x000, // Enable DREQs for channel - - // - // Channel 1 - // - 0x00B, 0x041, // DMA contr. 1 single mode, addr. i= ncrement, disable auto init. - 0x009, 0x001, // Clear write request register - 0x00A, 0x001, // Enable DREQs for channel - - // - // Channel 2 - // - 0x00B, 0x042, // DMA contr. 1 single mode, addr. i= ncrement, disable auto init. - 0x009, 0x002, // Clear write request register - 0x00A, 0x002, // Enable DREQs for channel - - // - // Channel 3 - // - 0x00B, 0x043, // DMA contr. 1 single mode, addr. i= ncrement, disable auto init. - 0x009, 0x003, // Clear write request register - 0x00A, 0x003, // Enable DREQs for channel - - // - // Channel 5 - // - 0x0D6, 0x041, // DMA contr. 2 single mode, addr. i= ncrement, disable auto init. - 0x0D2, 0x001, // Clear write request register - 0x0D4, 0x001, // Enable DREQs for channel - - // - // Channel 6 - // - 0x0D6, 0x042, // DMA contr. 2 single mode, addr. i= ncrement, disable auto init. - 0x0D2, 0x002, // Clear write request register - 0x0D4, 0x002, // Enable DREQs for channel - - // - // Channel 7 - // - 0x0D6, 0x043, // DMA contr. 2 single mode, addr. i= ncrement, disable auto init. - 0x0D2, 0x003, // Clear write request register - 0x0D4, 0x003 // Enable DREQs for channel - -}; - -// -// ISA ACPI Protocol Functions -// -/** - - Enumerate the ISA devices on the ISA bus - -**/ -VOID -IsaDeviceLookup ( - IN EFI_ISA_ACPI_DEVICE_ID *Device, - OUT EFI_ISA_ACPI_RESOURCE_LIST **IsaAcpiDevice, - OUT EFI_ISA_ACPI_RESOURCE_LIST **NextIsaAcpiDevice - ) -{ - UINTN Index; - - *IsaAcpiDevice =3D NULL; - if (NextIsaAcpiDevice !=3D NULL) { - *NextIsaAcpiDevice =3D NULL; - } - if (Device =3D=3D NULL) { - Index =3D 0; - } else { - for(Index =3D 0; mLpcWpce791DeviceList[Index].Device.HID !=3D 0; Index= ++) { - if (Device->HID =3D=3D mLpcWpce791DeviceList[Index].Device.HID && - Device->UID =3D=3D mLpcWpce791DeviceList[Index].Device.UID ) { - break; - } - } - if (mLpcWpce791DeviceList[Index].Device.HID =3D=3D 0) { - return; - } - *IsaAcpiDevice =3D &(mLpcWpce791DeviceList[Index]); - Index++; - } - if (NextIsaAcpiDevice !=3D NULL && mLpcWpce791DeviceList[Index].Device.H= ID !=3D 0){ - *NextIsaAcpiDevice =3D &(mLpcWpce791DeviceList[Index]); - } -} - - -/** - Enumerate the ISA devices on the ISA bus - It is hard code now and future it will get from ACPI table - -**/ -EFI_STATUS -EFIAPI -IsaDeviceEnumerate ( - IN EFI_ISA_ACPI_PROTOCOL *This, - OUT EFI_ISA_ACPI_DEVICE_ID **Device - ) -{ - EFI_ISA_ACPI_RESOURCE_LIST *IsaAcpiDevice; - EFI_ISA_ACPI_RESOURCE_LIST *NextIsaAcpiDevice; - - IsaDeviceLookup (*Device, &IsaAcpiDevice, &NextIsaAcpiDevice); - if (NextIsaAcpiDevice =3D=3D NULL) { - return EFI_NOT_FOUND; - } - *Device =3D &(NextIsaAcpiDevice->Device); - return EFI_SUCCESS; -} - -/** - Set ISA device power use sio - -**/ -EFI_STATUS -EFIAPI -IsaDeviceSetPower ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN BOOLEAN OnOff - ) -{ - return EFI_UNSUPPORTED; -} - - -/** - Get current Resource of the specific ISA device - It is hardcode now and future will get from ACPI table - -**/ -EFI_STATUS -EFIAPI -IsaGetCurrentResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList - ) -{ - IsaDeviceLookup (Device, ResourceList, NULL); - if (*ResourceList =3D=3D NULL || (*ResourceList)->ResourceItem =3D=3D NU= LL) { - return EFI_NOT_FOUND; - } - return EFI_SUCCESS; -} - -EFI_STATUS -EFIAPI -IsaGetPossibleResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList - ) -{ - // - // Not supported yet - // - return EFI_UNSUPPORTED; -} - - -EFI_STATUS -EFIAPI -IsaSetResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList - ) -{ - return EFI_UNSUPPORTED; -} - -EFI_STATUS -EFIAPI -IsaEnableDevice ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN BOOLEAN Enable - ) -{ - - return EFI_UNSUPPORTED; -} - -/** - - Clear out Resource List if device is set to disable by platform policy - -**/ -VOID -EmptyResourceList ( - IN UINT32 DeviceHid - ) -{ - UINT8 Index; - for (Index =3D 0; mLpcWpce791DeviceList[Index].Device.HID !=3D 0; Index+= +) { - if (DeviceHid =3D=3D mLpcWpce791DeviceList[Index].Device.HID) { - mLpcWpce791DeviceList[Index].ResourceItem =3D NULL; - } - } - return; -} - -/** - - Clear out Resource List if device is set to disable by platform policy - -**/ -VOID -EmptyResourceListHidUid ( - IN UINT32 DeviceHid, - IN UINT32 DeviceUid - ) -{ - UINT8 Index; - for (Index =3D 0; mLpcWpce791DeviceList[Index].Device.HID !=3D 0; Index+= +) { - if ((DeviceHid =3D=3D mLpcWpce791DeviceList[Index].Device.HID) && - (DeviceUid =3D=3D mLpcWpce791DeviceList[Index].Device.UID)) { - mLpcWpce791DeviceList[Index].ResourceItem =3D NULL; - } - } - return; -} - -EFI_STATUS -EFIAPI -IsaInitDevice ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device - ) -{ - EFI_WPCE791_POLICY_PROTOCOL *LpcWpce791Policy; - EFI_STATUS Status; - - // - // Disable configuration according to platform protocol - // - Status =3D gBS->LocateProtocol ( - &gEfiLpcWpce791PolicyProtocolGuid, - NULL, - (VOID **) &LpcWpce791Policy - ); - if (!EFI_ERROR(Status)) { - if (LpcWpce791Policy->DeviceEnables.Ps2Keyboard =3D=3D EFI_WPCE791_PS2= _KEYBOARD_DISABLE) { - EmptyResourceList(EISA_PNP_ID(0x303)); - DisableLogicalDevice (SIO_KEYBOARD); - EmptyResourceList(EISA_PNP_ID(0xF03)); - DisableLogicalDevice (SIO_KEYBOARD); - } - if (LpcWpce791Policy->DeviceEnables.Ps2Mouse =3D=3D EFI_WPCE791_PS2_MO= USE_DISABLE) { - EmptyResourceList(EISA_PNP_ID(0xF03)); - DisableLogicalDevice (SIO_MOUSE); - } - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EFIAPI -LpcInterfaceInit ( - IN EFI_ISA_ACPI_PROTOCOL *This - ) -{ - EFI_PCI_IO_PROTOCOL *PciIo; - UINTN Index; - - PciIo =3D (LPC_ISA_ACPI_FROM_THIS (This))->PciIo; - - // - // DMA controller initialize - // - for (Index=3D0; Index < (sizeof(mIchDmaInitTable)/sizeof(ICH_DMA_INIT));= Index++) { - PciIo->Io.Write ( - PciIo, - EfiPciIoWidthUint8, - EFI_PCI_IO_PASS_THROUGH_BAR, - mIchDmaInitTable[Index].Register, - 1, - &mIchDmaInitTable[Index].Value - ); - } - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.h b/Platfo= rm/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.h deleted file mode 100644 index 2291fd2c1d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcIsaAcpi.h +++ /dev/null @@ -1,103 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - LpcIsaAcpi.h - -Abstract: - - Isa Acpi interface - - - ---*/ - -#ifndef _LPC_ISA_ACPI_H -#define _LPC_ISA_ACPI_H - - - -#include "Protocol/IsaAcpi.h" -#include "Library/DevicePathLib.h" - - -typedef struct { - UINT8 Register; - UINT8 Value; -} ICH_DMA_INIT; - -// -// Prototypes for the ISA ACPI protocol interface -// -EFI_STATUS -EFIAPI -IsaDeviceEnumerate ( - IN EFI_ISA_ACPI_PROTOCOL *This, - OUT EFI_ISA_ACPI_DEVICE_ID **Device - ); - -EFI_STATUS -EFIAPI -IsaDeviceSetPower ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN BOOLEAN OnOff - ); - -EFI_STATUS -EFIAPI -IsaGetCurrentResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList - ); - -EFI_STATUS -EFIAPI -IsaGetPossibleResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList - ); - -EFI_STATUS -EFIAPI -IsaSetResource ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList - ); - -EFI_STATUS -EFIAPI -IsaEnableDevice ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device, - IN BOOLEAN Enable - ); - -EFI_STATUS -EFIAPI -IsaInitDevice ( - IN EFI_ISA_ACPI_PROTOCOL *This, - IN EFI_ISA_ACPI_DEVICE_ID *Device - ); - -EFI_STATUS -EFIAPI -LpcInterfaceInit ( - IN EFI_ISA_ACPI_PROTOCOL *This -); - -VOID -EmptyResourceList ( - IN UINT32 DeviceHid -); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.c b/Platform/I= ntel/Vlv2TbltDevicePkg/Wpce791/LpcSio.c deleted file mode 100644 index f23e48ccf2..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.c +++ /dev/null @@ -1,126 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - -Module Name: - - LpcSio.c - -Abstract: Sio implementation - -Revision History - ---*/ - -#include "LpcDriver.h" -#include - -VOID -WriteRegister ( - IN UINT8 Index, - IN UINT8 Data - ); - -typedef struct { - UINT8 Register; - UINT8 Value; -} EFI_SIO_TABLE; - -EFI_SIO_TABLE mSioTable[] =3D { - // - // Init keyboard controller - // - { REG_LOGICAL_DEVICE, SIO_KEYBOARD }, - { BASE_ADDRESS_HIGH, 0x00 }, - { BASE_ADDRESS_LOW, 0x60 }, - { BASE_ADDRESS_HIGH2, 0x00 }, - { BASE_ADDRESS_LOW2, 0x64 }, - { PRIMARY_INTERRUPT_SELECT, 0x01 }, - { ACTIVATE, 0x1 }, - - // - // Init Mouse controller - // - { REG_LOGICAL_DEVICE, SIO_MOUSE }, - { BASE_ADDRESS_HIGH, 0x00 }, - { BASE_ADDRESS_LOW, 0x60 }, - { BASE_ADDRESS_HIGH2, 0x00 }, - { BASE_ADDRESS_LOW2, 0x64 }, - { PRIMARY_INTERRUPT_SELECT, 0x0c }, - { ACTIVATE, 0x1 }, - - { REG_LOGICAL_DEVICE, SIO_COM }, - { BASE_ADDRESS_HIGH, 0x03 }, - { BASE_ADDRESS_LOW, 0xf8 }, - { PRIMARY_INTERRUPT_SELECT, 0x04 }, - { ACTIVATE, 0x1 }, - - -}; - -VOID -LPCWPCE791SetDefault () -{ - UINT8 Index; - - for (Index =3D 0; Index < sizeof(mSioTable)/sizeof(EFI_SIO_TABLE); Index= ++) { - WriteRegisterAndSaveToScript (mSioTable[Index].Register, mSioTable[Ind= ex].Value); - } - - return; -} - -VOID -DisableLogicalDevice ( - UINT8 DeviceId - ) -{ - WriteRegisterAndSaveToScript (REG_LOGICAL_DEVICE, DeviceId); - WriteRegisterAndSaveToScript (ACTIVATE, 0); - WriteRegisterAndSaveToScript (BASE_ADDRESS_HIGH, 0); - WriteRegisterAndSaveToScript (BASE_ADDRESS_LOW, 0); - - return; -} - -VOID -WriteRegister ( - IN UINT8 Index, - IN UINT8 Data - ) -{ - LpcIoWrite8(CONFIG_PORT, Index); - LpcIoWrite8(DATA_PORT, Data); - - return; -} - -VOID -WriteRegisterAndSaveToScript ( - IN UINT8 Index, - IN UINT8 Data - ) -{ - UINT8 Buffer[2]; - - LpcIoWrite8(CONFIG_PORT, Index); - LpcIoWrite8(DATA_PORT, Data); - - Buffer[0] =3D Index; - Buffer[1] =3D Data; - S3BootScriptSaveIoWrite ( - EfiBootScriptWidthUint8, - INDEX_PORT, - 2, - Buffer - ); - - return; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.h b/Platform/I= ntel/Vlv2TbltDevicePkg/Wpce791/LpcSio.h deleted file mode 100644 index 52c1499e3d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/LpcSio.h +++ /dev/null @@ -1,101 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - LpcSio.h - -Abstract: - - Lpc driver's sio interface - - - ---*/ - -#ifndef _LPC_SIO_H -#define _LPC_SIO_H - -#include "Protocol/PciRootBridgeIo.h" - -#define VARSIOINSTALLED L"VarSIOProcotolInstalled" - -// -// Port address -// -#define CONFIG_PORT 0x04E -#define INDEX_PORT 0x04E -#define DATA_PORT INDEX_PORT + 1 - -// -// Logical Device -// -#define SIO_COM 0x3 -#define SIO_MSWC 0x4 -#define SIO_MOUSE 0x5 -#define SIO_KEYBOARD 0x6 -#define SIO_SHM 0xF -#define SIO_PM1 0x11 -#define SIO_PM2 0x12 -#define SIO_PM3 0x17 -#define SIO_ESHM 0x1D - -// -// Global register -// -#define REG_LOGICAL_DEVICE 0x07 -#define REG_DEVICE_ID 0x20 -#define SIO_CONFIG_1 0x21 -#define REG_CHIP_REV 0x24 -#define SIO_CONFIG_5 0x25 -#define SIO_CONFIG_6 0x26 -#define REG_DEVICE_REV 0x27 -#define SIO_CONFIG_9 0x29 -#define SIO_CONFIG_D 0x2D - -#define ACTIVATE 0x30 -#define BASE_ADDRESS_HIGH 0x60 -#define BASE_ADDRESS_LOW 0x61 -#define BASE_ADDRESS_HIGH2 0x62 -#define BASE_ADDRESS_LOW2 0x63 -#define PRIMARY_INTERRUPT_SELECT 0x70 -#define DMA_CHANNEL_SELECT 0x74 - -EFI_STATUS -InitializeLpcSio ( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo - ); - -// -// Prototypes for the sio internal function -// -// -// Internal function -// -VOID -LPCWPCE791SetDefault ( - VOID - ); - -VOID -WriteRegisterAndSaveToScript ( - IN UINT8 Index, - IN UINT8 Data - ); - -VOID -FloppyWriteProtect ( - VOID - ); - -VOID -DisableLogicalDevice ( - UINT8 DeviceId - ); - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/Wpce791.inf b/Platfor= m/Intel/Vlv2TbltDevicePkg/Wpce791/Wpce791.inf deleted file mode 100644 index 5fd458e265..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Wpce791/Wpce791.inf +++ /dev/null @@ -1,63 +0,0 @@ -# -# -# Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved -# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -# Module Name: -# -# SiO791.inf -# -# Abstract: -# -# Component description file for SIO791 module. -# ---*/ - -[defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SIO791 - FILE_GUID =3D 04A76C80-06B9-445e-B73E-CB8C61A6A964 - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D LpcDriverEntryPoint - -[sources.common] - LpcIsaAcpi.h - LpcSio.h - LpcDriver.h - LpcIsaAcpi.c - LpcSio.c - LpcDriver.c - -[Packages] - MdePkg/MdePkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - PcAtChipsetPkg/PcAtChipsetPkg.dec - - -[LibraryClasses] - UefiDriverEntryPoint - UefiBootServicesTableLib - DevicePathLib - UefiLib - S3BootScriptLib - DebugLib - -[Ppis] - -[Protocols] - gEfiPciIoProtocolGuid - gEfiIsaAcpiProtocolGuid - gEfiLpcWpce791PolicyProtocolGuid - -[Guids] - -[Depex] - TRUE --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43064): https://edk2.groups.io/g/devel/message/43064 Mute This Topic: https://groups.io/mt/32267620/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43074+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43074+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949784; cv=none; d=zoho.com; s=zohoarc; b=f5O3SCAVzpWKKvr2nSp+cYhFUuLJcidVepOia8sOjD2aDtTo3P4HV2K/VU2iITRsfHt0pAJHpzX7ViiDlw11SqDiplhc6hjLD3Yqro1J2eI7XH/B7U7bWL3mn48trgDNFqZE0yHzaj+yTmMt4yGZvvwUaIuVpXBl2H5PHIEHlYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949784; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=kN95qK49VpoJ8Lm+4MK9DF5nO+CY3v/k/Fx4tMOwRYk=; b=Ypqr8eR/sIzldUgbV4ZXckUPtwKbzkBYfRpjikgT6n2q+E1VvUdMpav5EhnEeTGvrA7pUkIjORvVjs9WLMM3Lu03s34PDz7FGXlFVDB3yGczywtBN5v7kA7y0y/cARdGfxtzcCVF5kcuZMgCdWto1DG9Rg5+c378hqTlsJBILXY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43074+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949784221370.7131795647995; Sun, 30 Jun 2019 19:56:24 -0700 (PDT) Return-Path: X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:23 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480194" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:01 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 05/14] Vlv2TbltDevicePkg: Switch to CPU I/O 2 Protocol Date: Sun, 30 Jun 2019 19:55:44 -0700 Message-Id: <20190701025553.18596-6-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949783; bh=JgX99ILJGA/H31OE304S2dGWBHkzcY17BpLfrVFc/tU=; h=Cc:Date:From:Reply-To:Subject:To; b=i+yGhDNdCMUWgrnnGN1TILmDGCmD6u5vnYq3eZk/YNTCy6KZAbvrzsswG53CW9Ph9Ia 5PQ4T0OVxmBN6+Rlmu+BdNqTw+UuBSbRZl/DPGucOPs5bpyXzoqH0qp0C3nOjyFhuW1/C KgSVD0+CimDIL4E9s5QBkqVMYqDkdt05q2E= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Remove unused references to CPU I/O Protocol defined in IntelFrameworkPkg * Convert valid usage of CPU I/O Protocol to the CPU I/O 2 Protocol Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../AcpiPlatform/AcpiPlatform.c | 47 --------------- .../AcpiPlatform/AcpiPlatform.h | 1 - .../AcpiPlatform/AcpiPlatform.inf | 4 +- .../Include/Library/EfiRegTableLib.h | 40 ++----------- .../Library/EfiRegTableLib/EfiRegTableLib.c | 57 ++----------------- .../PciPlatform/PciPlatform.c | 7 +-- .../PciPlatform/PciPlatform.inf | 1 - .../PlatformCpuInfoDxe/PlatformCpuInfoDxe.c | 8 +-- .../PlatformDxe/IchRegTable.c | 8 +-- .../Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 4 +- .../PlatformDxe/PlatformDxe.h | 4 +- .../PlatformDxe/PlatformDxe.inf | 1 - .../PlatformGopPolicy/PlatformGopPolicy.inf | 3 +- .../PlatformInitPei/PchInitPeim.c | 10 +--- .../PlatformSetupDxe/PlatformSetupDxe.inf | 1 - .../PlatformSetupDxe/SetupInfoRecords.c | 1 - .../Vlv2TbltDevicePkg/PlatformSmm/Platform.c | 1 - .../PlatformSmm/PlatformSmm.inf | 1 - .../SmBiosMiscDxe/MiscOemType0x94Function.c | 2 - .../VlvPlatformInitDxe/IgdOpRegion.c | 6 +- .../VlvPlatformInitDxe/VlvPlatformInitDxe.inf | 4 +- 21 files changed, 30 insertions(+), 181 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 1f4d575b73..cb280764b3 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -34,7 +34,6 @@ Abstract: #include #include #include -#include #include #include #include @@ -54,7 +53,6 @@ CHAR16 gACPIOSFRModelStringVariableName[] =3D ACPI_OSF= R_MODEL_STRING_VARIABLE_N CHAR16 gACPIOSFRRefDataBlockVariableName[] =3D ACPI_OSFR_REF_DATA_BLOCK= _VARIABLE_NAME; CHAR16 gACPIOSFRMfgStringVariableName[] =3D ACPI_OSFR_MFG_STRING_VARIAB= LE_NAME; =20 -EFI_CPU_IO_PROTOCOL *mCpuIo; EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea; #ifndef __GNUC__ #pragma optimize("", off) @@ -776,7 +774,6 @@ AcpiPlatformEntryPoint ( EFI_HANDLE Handle; EFI_PS2_POLICY_PROTOCOL *Ps2Policy; EFI_PEI_HOB_POINTERS GuidHob; - UINT8 PortData; EFI_MP_SERVICES_PROTOCOL *MpService; UINTN MaximumNumberOfCPUs; UINTN NumberOfEnabledCPUs; @@ -1132,53 +1129,9 @@ AcpiPlatformEntryPoint ( // // SIO related option. // - Status =3D gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (void **)&= mCpuIo); - ASSERT_EFI_ERROR (Status); - mGlobalNvsArea.Area->WPCN381U =3D GLOBAL_NVS_DEVICE_DISABLE; - mGlobalNvsArea.Area->DockedSioPresent =3D GLOBAL_NVS_DEVICE_DISABLE; =20 - if (mGlobalNvsArea.Area->DockedSioPresent !=3D GLOBAL_NVS_DEVICE_ENABLE)= { - // - // Check ID for SIO WPCN381U. - // - Status =3D mCpuIo->Io.Read ( - mCpuIo, - EfiCpuIoWidthUint8, - WPCN381U_CONFIG_INDEX, - 1, - &PortData - ); - ASSERT_EFI_ERROR (Status); - if (PortData !=3D 0xFF) { - PortData =3D 0x20; - Status =3D mCpuIo->Io.Write ( - mCpuIo, - EfiCpuIoWidthUint8, - WPCN381U_CONFIG_INDEX, - 1, - &PortData - ); - ASSERT_EFI_ERROR (Status); - Status =3D mCpuIo->Io.Read ( - mCpuIo, - EfiCpuIoWidthUint8, - WPCN381U_CONFIG_DATA, - 1, - &PortData - ); - ASSERT_EFI_ERROR (Status); - if ((PortData =3D=3D WPCN381U_CHIP_ID) || (PortData =3D=3D WDCP376_C= HIP_ID)) { - mGlobalNvsArea.Area->WPCN381U =3D GLOBAL_NVS_DEVICE_ENABLE; - mGlobalNvsArea.Area->OnboardCom =3D GLOBAL_NVS_DEVICE_ENABLE; - mGlobalNvsArea.Area->OnboardComCir =3D GLOBAL_NVS_DEVICE_DISABLE; - } - } - } - - - // // Get Ps2 policy to set. Will be use if present. // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h index f45590ea24..b27ca661ff 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h @@ -36,7 +36,6 @@ Abstract: #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf= b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf index 817ad58a81..ce4db9fa85 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf @@ -79,6 +79,4 @@ [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND gEfiAcpiSupportProtocolGuid AND - gEfiMpServiceProtocolGuid AND - gEfiCpuIoProtocolGuid - + gEfiMpServiceProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLi= b.h b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h index 12e44efed0..b295cf46cc 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h @@ -13,7 +13,7 @@ Abstract: Definitions and macros for building register tables for chipset initialization.. =20 - Components linking this lib must include CpuIo, PciRootBridgeIo, and + Components linking this lib must include PciRootBridgeIo and BootScriptSave protocols in their DPX. =20 =20 @@ -129,10 +129,9 @@ typedef union { entries. =20 No parameter checking is done so the caller must be careful about omitti= ng - values for PciRootBridgeIo or CpuIo parameters. If the regtable does + values for PciRootBridgeIo parameters. If the regtable does not contain any PCI accesses, it is safe to omit the PciRootBridgeIo (su= pply - NULL). If the regtable does not contain any IO or Mem entries, it is sa= fe to - omit the CpuIo (supply NULL). + NULL). =20 The RegTableEntry parameter is not checked, but is required. =20 @@ -146,44 +145,13 @@ typedef union { @param[in] PciRootBridgeIo A pointer to the instance of PciRootBridgeIo= that is used when processing PCI table entries =20 - @param[in] CpuIo A pointer to the instance of CpuIo that is u= sed when processing IO and - MEM table entries - @retval Nothing. =20 **/ VOID ProcessRegTablePci ( EFI_REG_TABLE * RegTableEntry, - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * PciRootBridgeIo, - EFI_CPU_IO_PROTOCOL * CpuIo - ); - -/** - Processes register table assuming which may contain IO, MEM, and STALL - entries, but must NOT contain any PCI entries. Any PCI entries cause an - ASSERT in a DEBUG build and are skipped in a free build. - - No parameter checking is done. Both RegTableEntry and CpuIo parameters = are - required. - - gBS is assumed to have been defined and is used when processing stalls. - - The function processes each entry sequentially until an OP_TERMINATE_TAB= LE - entry is encountered. - - @param[in] RegTableEntry - A pointer to the register table to process - - @param[in] CpuIo - A pointer to the instance of CpuIo that is used when = processing IO and - MEM table entries - - @retval Nothing. - -**/ -VOID -ProcessRegTableCpu ( - EFI_REG_TABLE * RegTableEntry, - EFI_CPU_IO_PROTOCOL * CpuIo + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * PciRootBridgeIo ); =20 #endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiReg= TableLib.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiReg= TableLib.c index b7d896d9fd..d698f3ada9 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLi= b.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLi= b.c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved - = =20 +Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 EfiRegTableLib.c @@ -188,10 +185,9 @@ MemReadModifyWrite ( entries. =20 No parameter checking is done so the caller must be careful about omitti= ng - values for PciRootBridgeIo or CpuIo parameters. If the regtable does + values for PciRootBridgeIo parameters. If the regtable does not contain any PCI accesses, it is safe to omit the PciRootBridgeIo (su= pply - NULL). If the regtable does not contain any IO or Mem entries, it is sa= fe to - omit the CpuIo (supply NULL). + NULL). =20 The RegTableEntry parameter is not checked, but is required. =20 @@ -205,17 +201,13 @@ MemReadModifyWrite ( @param PciRootBridgeIo A pointer to the instance of PciRootBridgeIo tha= t is used when processing PCI table entries =20 - @param CpuIo A pointer to the instance of CpuIo that is used = when processing IO and - MEM table entries - @retval Nothing. =20 **/ VOID ProcessRegTablePci ( EFI_REG_TABLE *RegTableEntry, - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo, - EFI_CPU_IO_PROTOCOL *CpuIo + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo ) { while (OPCODE_BASE (RegTableEntry->Generic.OpCode) !=3D OP_TERMINATE_TAB= LE) { @@ -241,42 +233,3 @@ ProcessRegTablePci ( RegTableEntry++; } } - -/** - Processes register table assuming which may contain IO, MEM, and STALL - entries, but must NOT contain any PCI entries. Any PCI entries cause an - ASSERT in a DEBUG build and are skipped in a free build. - - No parameter checking is done. Both RegTableEntry and CpuIo parameters = are - required. - - gBS is assumed to have been defined and is used when processing stalls. - - The function processes each entry sequentially until an OP_TERMINATE_TAB= LE - entry is encountered. - - @param RegTableEntry A pointer to the register table to process - - @param CpuIo A pointer to the instance of CpuIo that is used = when processing IO and - MEM table entries - - @retval Nothing. - -**/ -VOID -ProcessRegTableCpu ( - EFI_REG_TABLE *RegTableEntry, - EFI_CPU_IO_PROTOCOL *CpuIo - ) -{ - while (OPCODE_BASE (RegTableEntry->Generic.OpCode) !=3D OP_TERMINATE_TAB= LE) { - switch (OPCODE_BASE (RegTableEntry->Generic.OpCode)) { - default: - DEBUG ((EFI_D_ERROR, "RegTable ERROR: Unknown RegTable OpCode (%x)\n= ", OPCODE_BASE (RegTableEntry->Generic.OpCode))); - ASSERT (0); - break; - } - - RegTableEntry++; - } -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c b/P= latform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c index b135e2646c..b1c01afc16 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -23,7 +21,6 @@ Abstract: =20 #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf index 18012a1d53..685c6103a9 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf @@ -33,7 +33,6 @@ [Guids] =20 [Protocols] gEfiPciPlatformProtocolGuid - gEfiCpuIoProtocolGuid gEfiFirmwareVolume2ProtocolGuid gEfiPciRootBridgeIoProtocolGuid gEfiPciIoProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCp= uInfoDxe.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCp= uInfoDxe.c index d35a158181..7f3f58e4d1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDx= e.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 PlatformCpuInfoDxe.c @@ -41,7 +39,7 @@ PlatformCpuInfoInit ( // // Write the Platform CPU Info to volatile memory for runtime purpos= es. // This must be done in its own driver because SetVariable protocol = is dependent on chipset, - // which is dependent on CpuIo, PlatformInfo, and Metronome. + // which is dependent on CpuIo2, PlatformInfo, and Metronome. // Status =3D gRT->SetVariable( EfiPlatformCpuInfoVariable, diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c index cac61bffd0..28883c166d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -129,6 +127,6 @@ InitializeSubsystemIds ( // // Program the SSVID/SSDID // - ProcessRegTablePci (mSubsystemIdRegs, mPciRootBridgeIo, NULL); + ProcessRegTablePci (mSubsystemIdRegs, mPciRootBridgeIo); =20 } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index 89923ffec6..7e083e3933 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -1260,7 +1260,7 @@ UpdateDVMTSetup( =20 UINT8 ReadCmosBank1Byte ( - IN EFI_CPU_IO_PROTOCOL *CpuIo, + IN EFI_CPU_IO2_PROTOCOL *CpuIo, IN UINT8 Index ) { @@ -1273,7 +1273,7 @@ ReadCmosBank1Byte ( =20 VOID WriteCmosBank1Byte ( - IN EFI_CPU_IO_PROTOCOL *CpuIo, + IN EFI_CPU_IO2_PROTOCOL *CpuIo, IN UINT8 Index, IN UINT8 Data ) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h index 621fb08274..5c60f823de 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h @@ -145,13 +145,13 @@ PciBusEvent ( =20 UINT8 ReadCmosBank1Byte ( - IN EFI_CPU_IO_PROTOCOL *CpuIo, + IN EFI_CPU_IO2_PROTOCOL *CpuIo, IN UINT8 Index ); =20 VOID WriteCmosBank1Byte ( - IN EFI_CPU_IO_PROTOCOL *CpuIo, + IN EFI_CPU_IO2_PROTOCOL *CpuIo, IN UINT8 Index, IN UINT8 Data ); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index d3f8fa3833..a81f102bac 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -108,7 +108,6 @@ [Protocols] gEfiWatchdogTimerDriverProtocolGuid gEfiPlatformIdeInitProtocolGuid gEfiGlobalNvsAreaProtocolGuid - gEfiCpuIo2ProtocolGuid gIgdOpRegionProtocolGuid gEdkiiVariableLockProtocolGuid =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGop= Policy.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGop= Policy.inf index c00553e224..584355291b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.= inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.= inf @@ -37,9 +37,8 @@ [Guids] gEfiNormalSetupGuid =20 [Protocols] - gEfiCpuIoProtocolGuid gEfiFirmwareVolume2ProtocolGuid gPlatformGOPPolicyGuid =20 [Depex] - gEfiCpuIoProtocolGuid AND gEfiVariableArchProtocolGuid + gEfiVariableArchProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c= b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c index 38b17156f4..4a51a47e36 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 PchInitPeim.c @@ -84,9 +81,6 @@ WriteCmosBank1Byte ( /** Turn off system if needed. =20 - @param PeiServices Pointer to PEI Services - @param CpuIo Pointer to CPU I/O Protocol - @retval None. =20 **/ diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupD= xe.inf index ae100df26d..1afd8a254e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf @@ -120,7 +120,6 @@ [Protocols] gEfiDiskInfoProtocolGuid ## CONSUMED gEfiMpServiceProtocolGuid gDxePchPlatformPolicyProtocolGuid - gEfiCpuIo2ProtocolGuid gEfiTdtOperationProtocolGuid gEfiSmbiosProtocolGuid ## PROTOCOL CONSUMES =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRec= ords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords= .c index fb82cdb984..c767021aed 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -23,7 +23,6 @@ Revision History: #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c index 14b9250e99..fb9d090ada 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c @@ -16,7 +16,6 @@ Abstract: --*/ =20 #include "SmmPlatform.h" -#include =20 =20 // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf index 3c4f55cf54..73c3b6f2d0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf @@ -56,7 +56,6 @@ [Protocols] gEfiSmmPowerButtonDispatchProtocolGuid gEfiSmmSxDispatchProtocolGuid gEfiSmmVariableProtocolGuid - gEfiCpuIo2ProtocolGuid =20 [Packages] MdePkg/MdePkg.dec diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c index 81b66ce9af..2f25ab802b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c @@ -19,7 +19,6 @@ Abstract: #include "MiscSubclassDriver.h" #include #include -#include #include #include #include @@ -28,7 +27,6 @@ Abstract: #include #include #include -#include #include =20 #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegio= n.c b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c index 8fe1482106..99db5490b6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c @@ -41,7 +41,7 @@ Abstract: #include #include #include -#include +#include #include #include #include @@ -631,7 +631,7 @@ IgdOpRegionInit ( EFI_STATUS Status; EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea; UINT32 DwordData; - EFI_CPU_IO_PROTOCOL *CpuIo; + EFI_CPU_IO2_PROTOCOL *CpuIo; UINT16 Data16; UINT16 AcpiBase; VOID *gConOutNotifyReg; @@ -879,7 +879,7 @@ IgdOpRegionInit ( // Find the CPU I/O Protocol. ASSERT if not found. // Status =3D gBS->LocateProtocol ( - &gEfiCpuIoProtocolGuid, + &gEfiCpuIo2ProtocolGuid, NULL, (void **)&CpuIo ); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatfor= mInitDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatf= ormInitDxe.inf index 1e86adadb3..fe81a6e3bd 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf @@ -59,12 +59,12 @@ [Protocols] gEfiGlobalNvsAreaProtocolGuid gEfiPciIoProtocolGuid gEfiFirmwareVolume2ProtocolGuid - gEfiCpuIoProtocolGuid + gEfiCpuIo2ProtocolGuid =20 [Depex] gDxeVlvPlatformPolicyGuid AND gEfiPciRootBridgeIoProtocolGuid AND - gEfiCpuIoProtocolGuid AND + gEfiCpuIo2ProtocolGuid AND gEfiDataHubProtocolGuid AND gEfiGlobalNvsAreaProtocolGuid AND gEfiFirmwareVolume2ProtocolGuid AND --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43074): https://edk2.groups.io/g/devel/message/43074 Mute This Topic: https://groups.io/mt/32267631/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43065+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43065+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949764; cv=none; d=zoho.com; s=zohoarc; b=L5z4NwG4kKSz4z4nKntY2a5OkKxWZLV07OZsR4wfUJ/eVlvtqp7J/DWUney/pxBsCNy0JsSnp21KHcLi3nH+Qxm/sxgtvbuZJNpsyCrBZodCk9VRxfbuZNvis+ZgnhAoiLxj0cE9j3qoiTQoVzDWy2z0lvpqGJocA4albJAVmkg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949764; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=AfjO8028pSv/UtGkCXthAsH7/4EMDNZCAcljOQSm4uE=; b=OB0xuawOgKodbigvajSeE5RIdFgGUlaXWNSAHrmmPXAdf8j9CgrvkbrCfBh006AIZdaKJyNoEDsHlmhjTSY4vVR6qdoFgwuz/Z0edD2Pz9I3K3lrDxvaZP4cK9TFoB2WiOVqvrKaa12VoXaaltLseh+Eri0Yq4DG4xjJltcxC1I= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43065+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949764056792.8629774273644; Sun, 30 Jun 2019 19:56:04 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480201" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:01 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 06/14] Vlv2TbltDevicePkg: Remove use of PS/2 Policy Protocol Date: Sun, 30 Jun 2019 19:55:45 -0700 Message-Id: <20190701025553.18596-7-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949763; bh=NGK9wToqKnMcQumT/rQdKn8DaiPpLoWi34Hwk8kEEQY=; h=Cc:Date:From:Reply-To:Subject:To; b=SV3ZAc2rbvKuZ0Yjk/XY28fNtRw8vTKM2oRYz+vGys/yFzbHOZafp6UZ0xucssBSUiA JntF5g883AAnPHMDgt7ydfupyecx+EHJl4GyX4AI4crgJSoQZhYTwbWV/eUl0Xur7BfCR O3eUQfaNjj7EwOS65kGFiho8FColr7iEFuU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This platform does not have a PS/2 controller, so remove all references to the PS/2 Policy Protocol. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index cb280764b3..13d904b834 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -37,7 +37,6 @@ Abstract: #include #include #include -#include #include #include #include @@ -772,7 +771,6 @@ AcpiPlatformEntryPoint ( UINTN VarSize; UINTN SysCfgSize; EFI_HANDLE Handle; - EFI_PS2_POLICY_PROTOCOL *Ps2Policy; EFI_PEI_HOB_POINTERS GuidHob; EFI_MP_SERVICES_PROTOCOL *MpService; UINTN MaximumNumberOfCPUs; @@ -1131,19 +1129,6 @@ AcpiPlatformEntryPoint ( // mGlobalNvsArea.Area->WPCN381U =3D GLOBAL_NVS_DEVICE_DISABLE; mGlobalNvsArea.Area->DockedSioPresent =3D GLOBAL_NVS_DEVICE_DISABLE; - - // - // Get Ps2 policy to set. Will be use if present. - // - Status =3D gBS->LocateProtocol ( - &gEfiPs2PolicyProtocolGuid, - NULL, - (VOID **)&Ps2Policy - ); - if (!EFI_ERROR (Status)) { - Status =3D Ps2Policy->Ps2InitHardware (ImageHandle); - } - mGlobalNvsArea.Area->SDIOMode =3D mSystemConfiguration.LpssSdioMode; =20 Handle =3D NULL; --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43065): https://edk2.groups.io/g/devel/message/43065 Mute This Topic: https://groups.io/mt/32267621/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43066+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43066+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949765; cv=none; d=zoho.com; s=zohoarc; b=c/Ujwk+wpqLwTIbnrRO8Q273F+an6L4WkR0mg9GWPbYgCXtI6gVewl34BV52s8FtA5m5bt940LG4BB6+fG2iGH1yUbTZ57ejVyPd1+FG1RHoLTLdQ60cz3p6BX3afpDU2Peq9aSzgOrhROInncT1OoqPFVJcMyCieXgwzZ9bxA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949765; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=85tNWfE7pzs1sMhPhnN+AZ5Qr21UOLUOcrwnGPCFjLo=; b=IzeMwTf17RThBdSaol8mSFNrKg3bU8TgYw4J2Hz6DVH9fKJMmk2sXj3lQt0I9MGzwHjuIg14gONXlLAJ8AL3TFkgscMZkaGO3LQaFgii6pLlhssg8qHPs8LUs+ZgpJuJtEZzkbOB9Xqrmfq4X6h/GDhBQHaCRkZniRStNrdROWQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43066+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156194976578943.45790843217287; Sun, 30 Jun 2019 19:56:05 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480214" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:02 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 07/14] Vlv2TbltDevicePkg: Remove use of BIOS ID tools Date: Sun, 30 Jun 2019 19:55:46 -0700 Message-Id: <20190701025553.18596-8-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949765; bh=KRiJQcZOvKVRgajqjqommK4gb7EySmqjB0kW5rgG+qI=; h=Cc:Date:From:Reply-To:Subject:To; b=UO6nHayzqYL7mTqDi4yjaNY/HZus+3fLqGw8x19bhxf2HpFUrZYkyI3f7tmp9tyn1ch EO3Tk8dzNSQt7ybK12HAAHIEfAw3Eh8W7KG50qFWAy7G+N3Gpw+TflSnRyESYBMJqmGUC 688691xOrL2/Dwzm2117V2Qe4MQwcpsFIMc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Remove the use of VLV2 specific BIOS ID tools. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- Platform/Intel/Vlv2TbltDevicePkg/BiosIdD.env | 25 -- Platform/Intel/Vlv2TbltDevicePkg/BiosIdR.env | 25 -- .../Intel/Vlv2TbltDevicePkg/BiosIdx64D.env | 25 -- .../Intel/Vlv2TbltDevicePkg/BiosIdx64R.env | 25 -- Platform/Intel/Vlv2TbltDevicePkg/GenBiosId | Bin 12236 -> 0 bytes .../Intel/Vlv2TbltDevicePkg/GenBiosId.exe | Bin 384000 -> 0 bytes .../Vlv2TbltDevicePkg/Include/Guid/BiosId.h | 30 -- .../Include/Library/BiosIdLib.h | 22 +- .../Library/BiosIdLib/BiosIdLib.c | 279 ++---------------- .../Library/BiosIdLib/BiosIdLib.inf | 21 +- .../PlatformDxe/PlatformDxe.inf | 2 +- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 4 - .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 4 - .../PlatformSetupDxe/PlatformSetupDxe.inf | 1 + .../SmBiosMiscDxe/MiscBiosVendorFunction.c | 9 +- Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 8 +- Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 52 +--- 18 files changed, 33 insertions(+), 500 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BiosIdD.env delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BiosIdR.env delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64D.env delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64R.env delete mode 100755 Platform/Intel/Vlv2TbltDevicePkg/GenBiosId delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/GenBiosId.exe delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/BiosId.h diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdD.env b/Platform/Intel/= Vlv2TbltDevicePkg/BiosIdD.env deleted file mode 100644 index 85313dfbd7..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdD.env +++ /dev/null @@ -1,25 +0,0 @@ -#/** @file -# This file is used to define the BIOS ID parameters of the build. -# This file is processed by GenBiosId. -# The BIOS ID format conforms to "BIOS Revision Identification Specificat= ion", Rev. 0.7, 6/27/2001. -# -# BIOS ID string format: -# $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VER= SION_MINOR).YYMMDDHHMM -# All fields must have a fixed length. -# Example: "TRFTCRB1.86C.0008.D03.0506081529" -# -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -#**/ - -BOARD_REV =3D 1 -OEM_ID =3D I32 -BUILD_TYPE =3D D - -BOARD_ID =3D BLAKCRB -VERSION_MAJOR =3D 0084 -VERSION_MINOR =3D 01 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdR.env b/Platform/Intel/= Vlv2TbltDevicePkg/BiosIdR.env deleted file mode 100644 index 4af249dc19..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdR.env +++ /dev/null @@ -1,25 +0,0 @@ -#/** @file -# This file is used to define the BIOS ID parameters of the build. -# This file is processed by GenBiosId. -# The BIOS ID format conforms to "BIOS Revision Identification Specificat= ion", Rev. 0.7, 6/27/2001. -# -# BIOS ID string format: -# $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VER= SION_MINOR).YYMMDDHHMM -# All fields must have a fixed length. -# Example: "TRFTCRB1.86C.0008.D03.0506081529" -# -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -#**/ - -BOARD_REV =3D 1 -OEM_ID =3D I32 -BUILD_TYPE =3D R - -BOARD_ID =3D BLAKCRB -VERSION_MAJOR =3D 0084 -VERSION_MINOR =3D 01 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64D.env b/Platform/Int= el/Vlv2TbltDevicePkg/BiosIdx64D.env deleted file mode 100644 index a2173b7e44..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64D.env +++ /dev/null @@ -1,25 +0,0 @@ -#/** @file -# This file is used to define the BIOS ID parameters of the build. -# This file is processed by GenBiosId. -# The BIOS ID format conforms to "BIOS Revision Identification Specificat= ion", Rev. 0.7, 6/27/2001. -# -# BIOS ID string format: -# $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VER= SION_MINOR).YYMMDDHHMM -# All fields must have a fixed length. -# Example: "TRFTCRB1.86C.0008.D03.0506081529" -# -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -#**/ - -BOARD_REV =3D 1 -OEM_ID =3D X64 -BUILD_TYPE =3D D - -VERSION_MAJOR =3D 0084 -VERSION_MINOR =3D 01 -BOARD_ID =3D BBAYCRB=20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64R.env b/Platform/Int= el/Vlv2TbltDevicePkg/BiosIdx64R.env deleted file mode 100644 index c235177e1b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/BiosIdx64R.env +++ /dev/null @@ -1,25 +0,0 @@ -#/** @file -# This file is used to define the BIOS ID parameters of the build. -# This file is processed by GenBiosId. -# The BIOS ID format conforms to "BIOS Revision Identification Specificat= ion", Rev. 0.7, 6/27/2001. -# -# BIOS ID string format: -# $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VER= SION_MINOR).YYMMDDHHMM -# All fields must have a fixed length. -# Example: "TRFTCRB1.86C.0008.D03.0506081529" -# -# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -#**/ - -BOARD_REV =3D 1 -OEM_ID =3D X64 -BUILD_TYPE =3D R - -VERSION_MAJOR =3D 0084 -VERSION_MINOR =3D 01 -BOARD_ID =3D BBAYCRB=20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/GenBiosId b/Platform/Intel/Vl= v2TbltDevicePkg/GenBiosId deleted file mode 100755 index ef1578f2bcb8922905e0693035245c4329809aa7..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12236 zcmeHNeQ;dWb-yb;!9rw7c0^*Z3a?>pY_Qjok&SGi=3Dxc3cj4fozCgtOKwfk1P@oHDI z`&L*K20LpRwnCr~k}^};!SRfT=3D{Sj#P!OLZu&@nv8)ZrpXvyGCpVN`j;D~K$o7THrE@7uKQ7(w4hBbF1=3Do^2mIE_LV z7l@_eQn5&!hbrx)M?1&$lbu*do(xm7lE0{L$%BxLZB^k%|${mv%RQM z{MyTesQtd?W_}Ef&Oj;cl3xb06#S*&F&_tJCZ9H#!)OzRZRU1hW}Dafo)vs*fe=3DqU zqPdwZ@R)7>E#L!wD%twGz<2t08j{Rx&;G59MtWC9gDawuSZbFy8TYPIJh(3T8#ec# zr20Xf3z6Bj7MZal|DnNuxgp}4_n&W_I9zeyZ+`j8zTg$-v){H387p1rsFHQxz3Ja3 zSazlc2S9g4v;-$g@Nfy6%pL||Y@BnJ|a zm=3DzMC_<$Kh<47_dSi9CpCIkLhNDQQ`Br2gSu+s>HcN!soB+A-A*q;!gJ`?OvAR14a zB6L?GVwoZu5BQ^2q~Am{+AcWK?~la9hD{x^&SB|X766XMG zDr8-moKG(BI4_u)z8s0n<7#>wW!BY7tcimKJYV8+akzkMBrX%r0W+P!nmX?S6b@_d z^D&4TDGa+wF+nRy5#$J~yLg&q&-g;=3DkoUl3wBX(h&w6rMJc zRteEWiecNDKJCuZk=3Dynh*?yG}Bk8mGe13Sss>ps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0=3D`S;xOnAhkU7h?kx))_V)l+e#`b}zIYheY5y;QJI7}2 z{{Yxd?9Yn;c7J$N?H_>cGm{G^xu2Ere*w((3<7@~2u^k;tALg5F#5Aj26XpL2nAfQMD3kwQ3E#QNQGUK-k0bT~YxuT{ zqKyACU_OtDsgK`f`8-wrREukXo#WL8ychGI-wr5$Bk*bX%fFcuZv(cIj>6Z7e+c~; z2lj8s!KXhD0`EZlHljQq@qUba_-DuCJHYn-wty$FK*CB|sZhupz)i-s?k!!$rjD)M zxKU{s?Q_t^HU}#hH~OOSUVqe(2U)|P+9hyE9f+D1zE-ViSiM$|VMKzvfYvk!brue$ z`um4$JHE~B(#-mwc^S9woB>Y2$84C)d{i~Z>ZtiG< z2?s~s5f#RUO#}nt=3DiJ3Lj9@Zug#EE#)D-ykh}S8rJ6?!a>HXZ|MOvpqM{pS5 zfla0#7kc})hY`4~1OCA8xOMAn?if`0f>v_fcUJTobsu=3DPqQSoOJ6lyR)YK}>qR@a5 zz6%or?`4GnmUn(JWun~}ovoI?e?S-;2aPVXFOtOTXj{~uOqxkC+b21-3Kx=3D{cGSn@ Oj(!g3>{OC7S^N)t{R~b3 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/GenBiosId.exe b/Platform/Inte= l/Vlv2TbltDevicePkg/GenBiosId.exe deleted file mode 100644 index 323b87c444915b173b7f32d5481c67e4471b047b..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 384000 zcmeFaeSB2awKsl}OkjWs6ExANh(UvI0U8@yL7)a?lv+|Vfx-8;ig<``RA&^uM4^+Z zOpeo1B`vo0Dpzl>ZS5^>siFlMUL;_#jgTWEh4If7z^IY`{1F)ye0le{`XE^ck;=3D zHr9`Lef)-kxv!6(Z!W&Ca>>2-+w=3DX@KL!!)yS4}4oLfUL*L^6h@{rqRB)*f>|NKK-NfeV;M*Q$Y4@E6yJi(AlC% zAF|fu=3Dxs}*DEZ+Y^oMk@uk4!VU!`H(Jo(;*w?uC-j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8- zzFDhZhkiIuwu6K`@j!pVe_j7Yfp#fCe)=3DhZ;hj_b`xS7{0IUR@26zeJrGQfb)SIpH zUB2TpSz@7DqN{z3qsWBxO>b9~02O2=3DWlWw@m8 zVrZe$zXC4vF8c4M;W~f{;7ouAAg(M2@i_`0&Nuq*O>pV|vjF4n zxWwlk0Q37GfZ=3D{0z%u=3Dz9If&$&?9pLhe}ng~fmTY1jn*BWyo*#}s*y zJT(Vk(TO)N@(^i!*F~@wgj<8ly4wer;g0QqT?*Wr;j&IraLH@Ea9;s;1zhs>Bd<*; zZuqzd?yKMy;r=3Dw-ZE(pmYv7&*_v_me>Sy5I0@r~%26r9Y%P)lf60X_?+Z;Gw- zJ#1*;;^-0e2;Ar4J`9({zaK6y(wmoYit6g3#DViFXfu}FQ)rwR@VPmzm!1) zsdf1^xH%UKEzR@Ean~+*Nq)|P*U7=3D>hn?!eholQ83m?+`!^ZUF<+mUUP{iO`kOds=3D z{U7D$-#IJX@=3Dxenm#G{!TZef)2q{H{`)Z;+VJzb&EH#QOb^rVnU}_yS)XdnPQ8U+6RO zjN;n$Y>>xuwZ>8kBiAYZWy;O|m^3{L?!|yB0UY!E3gDxF#{k~~yd0I#3m5@R156xl8sHdx7Vyh} z`v9K>d=3Ds!1;Whz=3D0Yv~W*6;VgyZ5~dHo$;;0UrX~1Go$DZonOYTLCu%<^V-N4sbaj z1sDSi0rmmnfIWa+fE|EsfL_2xKo`IPoDNt6SOH-8=3DiiAjIpFJnCjpNG9sxWEcmQxe z;9kI;fLj4C#bCupU-M)S%5gS$wpR@-32*i<@;K9AT$2`VbsOf|Hs9?#hJ7U;75?mb zUF-nPi%2)li`aubKYR9s{G)zMFPaATm|%OsWEpXzeoQ}$Wj8 - = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 BiosIdLib.h @@ -66,21 +63,6 @@ typedef struct { =20 #pragma pack() =20 -/** - This function returns BIOS ID by searching HOB or FV. - - @param[in] BiosIdImage The BIOS ID got from HOB or FV - - @retval EFI_SUCCESS All parameters were valid and BIOS ID ha= s been got. - @retval EFI_NOT_FOUND BiosId image is not found, and no parame= ter will be modified. - @retval EFI_INVALID_PARAMETER The parameter is NULL. - -**/ -EFI_STATUS -GetBiosId ( - OUT BIOS_ID_IMAGE *BiosIdImage - ); - /** This function returns the Version & Release Date and Time by getting and= converting BIOS ID. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c= b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c index 3f0e20c7a8..f6ab37313c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c @@ -1,11 +1,9 @@ /*++ =20 -Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved - = =20 +Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 BiosIdLib.c @@ -21,237 +19,8 @@ Abstract: =20 #include #include -#include -#include -#include -#include =20 #include -#include -#include -#include - - -EFI_STATUS -GetImageFromFv ( - IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv, - IN EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - OUT VOID **Buffer, - OUT UINTN *Size - ) -{ - EFI_STATUS Status; - EFI_FV_FILETYPE FileType; - EFI_FV_FILE_ATTRIBUTES Attributes; - UINT32 AuthenticationStatus; - - // - // Read desired section content in NameGuid file - // - *Buffer =3D NULL; - *Size =3D 0; - Status =3D Fv->ReadSection ( - Fv, - NameGuid, - SectionType, - 0, - Buffer, - Size, - &AuthenticationStatus - ); - - if (EFI_ERROR (Status) && (SectionType =3D=3D EFI_SECTION_TE)) { - // - // Try reading PE32 section, since the TE section does not exist - // - *Buffer =3D NULL; - *Size =3D 0; - Status =3D Fv->ReadSection ( - Fv, - NameGuid, - EFI_SECTION_PE32, - 0, - Buffer, - Size, - &AuthenticationStatus - ); - } - - if (EFI_ERROR (Status) && - ((SectionType =3D=3D EFI_SECTION_TE) || (SectionType =3D=3D EFI_SECT= ION_PE32))) { - // - // Try reading raw file, since the desired section does not exist - // - *Buffer =3D NULL; - *Size =3D 0; - Status =3D Fv->ReadFile ( - Fv, - NameGuid, - Buffer, - Size, - &FileType, - &Attributes, - &AuthenticationStatus - ); - } - - return Status; -} - - -EFI_STATUS -GetImageEx ( - IN EFI_HANDLE ImageHandle, - IN EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - OUT VOID **Buffer, - OUT UINTN *Size, - BOOLEAN WithinImageFv - ) -{ - EFI_STATUS Status; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; - - EFI_FIRMWARE_VOLUME2_PROTOCOL *ImageFv; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; - - - if (ImageHandle =3D=3D NULL && WithinImageFv) { - return EFI_INVALID_PARAMETER; - } - - Status =3D EFI_NOT_FOUND; - ImageFv =3D NULL; - if (ImageHandle !=3D NULL) { - Status =3D gBS->HandleProtocol ( - ImageHandle, - &gEfiLoadedImageProtocolGuid, - (VOID **) &LoadedImage - ); - if (EFI_ERROR (Status)) { - return Status; - } - Status =3D gBS->HandleProtocol ( - LoadedImage->DeviceHandle, - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &ImageFv - ); - if (!EFI_ERROR (Status)) { - Status =3D GetImageFromFv (ImageFv, NameGuid, SectionType, Buffer, S= ize); - } - } - - if (Status =3D=3D EFI_SUCCESS || WithinImageFv) { - return Status; - } - - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Find desired image in all Fvs - // - for (Index =3D 0; Index < HandleCount; ++Index) { - Status =3D gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID**)&Fv - ); - - if (EFI_ERROR (Status)) { - gBS->FreePool(HandleBuffer); - return Status; - } - - if (ImageFv !=3D NULL && Fv =3D=3D ImageFv) { - continue; - } - - Status =3D GetImageFromFv (Fv, NameGuid, SectionType, Buffer, Size); - - if (!EFI_ERROR (Status)) { - break; - } - } - gBS->FreePool(HandleBuffer); - - // - // Not found image - // - if (Index =3D=3D HandleCount) { - return EFI_NOT_FOUND; - } - - return EFI_SUCCESS; -} - -/** - This function returns BIOS ID by searching HOB or FV. - - @param BiosIdImage The BIOS ID got from HOB or FV. - - @retval EFI_SUCCESS All parameters were valid and BIOS ID has= been got. - @retval EFI_NOT_FOUND BiosId image is not found, and no paramet= er will be modified. - @retval EFI_INVALID_PARAMETER The parameter is NULL. - -**/ -EFI_STATUS -GetBiosId ( - OUT BIOS_ID_IMAGE *BiosIdImage - ) - -{ - EFI_STATUS Status; - VOID *Address =3D NULL; - UINTN Size =3D 0; - - DEBUG ((EFI_D_INFO, "Get BIOS ID from FV\n")); - - Status =3D GetImageEx ( - NULL, - &gEfiBiosIdGuid, - EFI_SECTION_RAW, - &Address, - &Size, - FALSE - ); - - if (Status =3D=3D EFI_SUCCESS) { - // - // BiosId image is present in FV - // - if (Address !=3D NULL) { - Size =3D sizeof (BIOS_ID_IMAGE); - gBS->CopyMem ( - (void *) BiosIdImage, - Address, - Size - ); - // - // GetImage () allocated buffer for Address, now clear it. - // - gBS->FreePool (Address); - - DEBUG ((EFI_D_INFO, "Get BIOS ID from FV successfully\n")); - DEBUG ((EFI_D_INFO, "BIOS ID: %s\n", (CHAR16 *) (&(BiosIdImage->Bi= osIdString)))); - - return EFI_SUCCESS; - } - } - return EFI_NOT_FOUND; -} =20 /** This function returns the Version & Release Date and Time by getting and= converting @@ -273,47 +42,39 @@ GetBiosVersionDateTime ( OUT CHAR16 *BiosReleaseTime OPTIONAL ) { - EFI_STATUS Status; - BIOS_ID_IMAGE BiosIdImage; - if ((BiosVersion =3D=3D NULL) && (BiosReleaseDate =3D=3D NULL) && (BiosR= eleaseTime =3D=3D NULL)) { return EFI_INVALID_PARAMETER; } =20 - Status =3D GetBiosId (&BiosIdImage); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - if (BiosVersion !=3D NULL) { // // Fill the BiosVersion data from the BIOS ID. // - StrCpy (BiosVersion, (CHAR16 *) (&(BiosIdImage.BiosIdString))); + StrCpy (BiosVersion, L"MNW2MAX1.X64.0084.D01"); } =20 if (BiosReleaseDate !=3D NULL) { // // Fill the build timestamp date from the BIOS ID in the "MM/DD/YY" fo= rmat. // - BiosReleaseDate[0] =3D BiosIdImage.BiosIdString.TimeStamp[2]; - BiosReleaseDate[1] =3D BiosIdImage.BiosIdString.TimeStamp[3]; - BiosReleaseDate[2] =3D (CHAR16) ((UINT8) ('/')); + BiosReleaseDate[0] =3D L'0'; + BiosReleaseDate[1] =3D L'1'; + BiosReleaseDate[2] =3D L'/'; =20 - BiosReleaseDate[3] =3D BiosIdImage.BiosIdString.TimeStamp[4]; - BiosReleaseDate[4] =3D BiosIdImage.BiosIdString.TimeStamp[5]; - BiosReleaseDate[5] =3D (CHAR16) ((UINT8) ('/')); + BiosReleaseDate[3] =3D L'0'; + BiosReleaseDate[4] =3D L'1'; + BiosReleaseDate[5] =3D L'/'; =20 // // Add 20 for SMBIOS table // Current Linux kernel will misjudge 09 as year 0, so using 2009 for = SMBIOS table // - BiosReleaseDate[6] =3D '2'; - BiosReleaseDate[7] =3D '0'; - BiosReleaseDate[8] =3D BiosIdImage.BiosIdString.TimeStamp[0]; - BiosReleaseDate[9] =3D BiosIdImage.BiosIdString.TimeStamp[1]; + BiosReleaseDate[6] =3D L'2'; + BiosReleaseDate[7] =3D L'0'; + BiosReleaseDate[8] =3D L'1'; + BiosReleaseDate[9] =3D L'9'; =20 - BiosReleaseDate[10] =3D (CHAR16) ((UINT8) ('\0')); + BiosReleaseDate[10] =3D L'\0'; } =20 if (BiosReleaseTime !=3D NULL) { @@ -322,14 +83,14 @@ GetBiosVersionDateTime ( // Fill the build timestamp time from the BIOS ID in the "HH:MM" forma= t. // =20 - BiosReleaseTime[0] =3D BiosIdImage.BiosIdString.TimeStamp[6]; - BiosReleaseTime[1] =3D BiosIdImage.BiosIdString.TimeStamp[7]; - BiosReleaseTime[2] =3D (CHAR16) ((UINT8) (':')); + BiosReleaseTime[0] =3D L'0'; + BiosReleaseTime[1] =3D L'0'; + BiosReleaseTime[2] =3D L':'; =20 - BiosReleaseTime[3] =3D BiosIdImage.BiosIdString.TimeStamp[8]; - BiosReleaseTime[4] =3D BiosIdImage.BiosIdString.TimeStamp[9]; + BiosReleaseTime[3] =3D L'0'; + BiosReleaseTime[4] =3D L'0'; =20 - BiosReleaseTime[5] =3D (CHAR16) ((UINT8) ('\0')); + BiosReleaseTime[5] =3D L'\0'; } =20 return EFI_SUCCESS; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf index 3e53680d08..0d38d73ada 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf @@ -1,11 +1,8 @@ #/*++ # -# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved -# = =20 +# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved +# # SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 - # # Module Name: # @@ -34,17 +31,3 @@ [Packages] MdeModulePkg/MdeModulePkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - -[LibraryClasses] - HobLib - -[Guids] - gEfiBiosIdGuid - -[Protocols] - gEfiLoadedImageProtocolGuid - gEfiFirmwareVolume2ProtocolGuid - -[Depex] - gEfiLoadedImageProtocolGuid AND - gEfiFirmwareVolume2ProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index a81f102bac..0c432642e4 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -73,9 +73,9 @@ [LibraryClasses] EfiRegTableLib BiosIdLib BaseCryptLib + HobLib =20 [Guids] - gEfiBiosIdGuid gEfiPlatformBootModeGuid gEfiBoardFeaturesGuid gItkDataVarGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index 786b4f6e91..bfde7be398 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -37,7 +37,6 @@ [Guids] gProcessorProducerGuid =3D { 0x1bf06aea, 0x5bec, 0x4a8d= , { 0x95, 0x76, 0x74, 0x9b, 0x09, 0x56, 0x2d, 0x30 } } gEfiPowerOnHobGuid =3D { 0x0468a601, 0xc535, 0x46fd= , { 0xa9, 0x5d, 0xbb, 0xab, 0x99, 0x1b, 0x17, 0x8c } } gEfiPlatformCpuInfoGuid =3D { 0xbb9c7ab7, 0xb8d9, 0x4bf3= , { 0x9c, 0x29, 0x9b, 0xf3, 0x41, 0xe2, 0x17, 0xbc } } - gEfiBiosIdGuid =3D { 0xC3E36D09, 0x8294, 0x4b97= , { 0xA8, 0x57, 0xD5, 0x28, 0x8F, 0xE3, 0x3E, 0x28 } } gEfiPlatformBootModeGuid =3D { 0xce845704, 0x1683, 0x4d38= , { 0xa4, 0xf9, 0x7d, 0x0b, 0x50, 0x77, 0x57, 0x93 } } gEfiBoardFeaturesGuid =3D { 0x94b9e8ae, 0x8877, 0x479a= , { 0x98, 0x42, 0xf5, 0x97, 0x4b, 0x82, 0xce, 0xd3 } } gItkDataVarGuid =3D { 0x3812723d, 0x7e48, 0x4e29= , { 0xbc, 0x27, 0xf5, 0xa3, 0x9a, 0xc9, 0x4e, 0xf1 } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index 3165be1fca..4c60d0a0f2 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -381,10 +381,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl= erRuntimeDxe.inf } =20 -FILE FREEFORM =3D C3E36D09-8294-4b97-A857-D5288FE33E28 { - SECTION RAW =3D $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/$(DXE_= ARCHITECTURE)/BiosId.bin - } - # # EDK II Related Platform codes # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index 03941dd23e..61e1adcd14 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -327,10 +327,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl= erRuntimeDxe.inf } =20 -FILE FREEFORM =3D C3E36D09-8294-4b97-A857-D5288FE33E28 { - SECTION RAW =3D $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/$(DXE_= ARCHITECTURE)/BiosId.bin - } - # # EDK II Related Platform codes # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupD= xe.inf index 1afd8a254e..b745574421 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf @@ -80,6 +80,7 @@ [LibraryClasses] BiosIdLib CpuIA32Lib IoLib + HobLib =20 [Guids] ## This GUID C Name is not required for build since it is from UefiLib = and not directly used by this module source. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorF= unction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFu= nction.c index 1817f456cb..fb4fa820a5 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunction= .c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunction= .c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscBiosVendorFunction.c @@ -166,7 +163,6 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) SMBIOS_TABLE_TYPE0 *SmbiosRecord; EFI_SMBIOS_HANDLE SmbiosHandle; EFI_MISC_BIOS_VENDOR *ForType0InputData; - BIOS_ID_IMAGE BiosIdImage; UINT16 UVerStr[32]; UINTN LoopIndex; UINTN CopyIndex; @@ -183,7 +179,6 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) if (RecordData =3D=3D NULL) { return EFI_INVALID_PARAMETER; } - GetBiosId (&BiosIdImage); =20 // // Add VLV2 BIOS Version and Release data diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat b/Platform/Intel/= Vlv2TbltDevicePkg/bld_vlv.bat index 8cf8938a4e..5cae78bb6d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat @@ -137,19 +137,15 @@ if /i "%~1"=3D=3D"/IA32" ( :: Required argument(s) if "%~1"=3D=3D"" goto Usage =20 -::Remove the values for Platform_Type and Build_Target from BiosIdX.env an= d stage in Conf\ if "%Arch%"=3D=3D"IA32" ( - findstr /b /v "BOARD_ID BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > = %WORKSPACE%\Conf\BiosId.env echo DEFINE X64_CONFIG =3D FALSE >> %auto_config_inc% ) else if "%Arch%"=3D=3D"X64" ( - findstr /b /v "BOARD_ID BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env= > %WORKSPACE%\Conf\BiosId.env echo DEFINE X64_CONFIG =3D TRUE >> %auto_config_inc% ) =20 :: -- Build flags settings for each Platform -- -echo Setting %1 platform configuration and BIOS ID... +echo Setting %1 platform configuration... if /i "%~1" =3D=3D "MNW2" ( - echo BOARD_ID =3D MNW2MAX >> %WORKSPACE%\Conf\BiosId.env echo DEFINE ENBDT_PF_BUILD =3D TRUE >> %auto_config_inc% =20 ) else ( @@ -160,10 +156,8 @@ set Platform_Type=3D%~1 =20 if /i "%~2" =3D=3D "RELEASE" ( set target=3DRELEASE - echo BUILD_TYPE =3D R >> %WORKSPACE%\Conf\BiosId.env ) else ( set target=3DDEBUG - echo BUILD_TYPE =3D D >> %WORKSPACE%\Conf\BiosId.env ) =20 ::********************************************************************** diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh b/Platform/Intel/V= lv2TbltDevicePkg/bld_vlv.sh index ec3a325db7..1eefa5de73 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh @@ -97,11 +97,6 @@ for (( i=3D1; i<=3D$#; )) rm -r Build fi shift - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/ECP" ]; then - ECP_SOURCE=3D$WORKSPACE/EdkCompatibilityPkgEcp - EDK_SOURCE=3D$WORKSPACE/EdkCompatibilityPkgEcp - echo DEFINE ECP_BUILD_ENABLE =3D TRUE >> $auto_config_inc - shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then Arch=3DX64 shift @@ -113,10 +108,6 @@ for (( i=3D1; i<=3D$#; )) fi done =20 - - - - ## Required argument(s) if [ "$2" =3D=3D "" ]; then Usage @@ -203,54 +194,19 @@ fi ##********************************************************************** ## Build BIOS ##********************************************************************** -echo Skip "Running UniTool..." -echo "Make GenBiosId Tool..." -BUILD_PATH=3DBuild/$PLATFORM_PACKAGE/"$TARGET"_"$TOOL_CHAIN_TAG" -if [ ! -d "$BUILD_PATH/$Arch" ]; then - mkdir -p $BUILD_PATH/$Arch -fi -if [ -e "$BUILD_PATH/$Arch/BiosId.bin" ]; then - rm -f $BUILD_PATH/$Arch/BiosId.bin -fi - - -./$PLATFORM_PACKAGE/GenBiosId -i Conf/BiosId.env -o $BUILD_PATH/$Arch/Bios= Id.bin - - echo "Invoking EDK2 build..." build =20 -if [ $SpiLock =3D=3D "1" ]; then - IFWI_HEADER_FILE=3D./$PLATFORM_PACKAGE/Stitch/IFWIHeader/IFWI_HEADER_SPI= LOCK.bin -else - IFWI_HEADER_FILE=3D./$PLATFORM_PACKAGE/Stitch/IFWIHeader/IFWI_HEADER.bin -fi - -echo $IFWI_HEADER_FILE - ##********************************************************************** ## Post Build processing and cleanup ##********************************************************************** - echo Skip "Running fce..." =20 -echo Skip "Running KeyEnroll..." +##********************************************************************** +## Build Capsules +##********************************************************************** +build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc =20 -## Set the Board_Id, Build_Type, Version_Major, and Version_Minor environm= ent variables -VERSION_MAJOR=3D$(grep '^VERSION_MAJOR' Conf/BiosId.env | cut -d ' ' -f 3 = | cut -c 1-4) -VERSION_MINOR=3D$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f 3 = | cut -c 1-2) -BOARD_ID=3D$(grep '^BOARD_ID' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1= -7) -BIOS_Name=3D"$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_M= INOR".ROM -BIOS_ID=3D"$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MIN= OR"_GCC.bin -SEC_VERSION=3D1.0.2.1060v5 -cat $IFWI_HEADER_FILE ../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/VLV_S= EC_REGION.bin ../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/Vacant.bin $BU= ILD_PATH/FV/VLV.fd > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID - - -echo Skip "Running BIOS_Signing ..." - -echo -echo Build location: $BUILD_PATH -echo BIOS ROM Created: $BIOS_Name echo echo -------------------- The EDKII BIOS build has successfully completed.= -------------------- echo --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43066): https://edk2.groups.io/g/devel/message/43066 Mute This Topic: https://groups.io/mt/32267622/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43067+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43067+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949766; cv=none; d=zoho.com; s=zohoarc; b=NjyehSG05T8kbG0bBmoDb8YchBQv5jxTbHlPiLH7t4V58UTmZsw31L5CEj+8sNMcZefCrMRMomOXQYdo7FBgu8GQh8JNa+hGe1UyG9+23yy89lSGjX+EzgxItcnDLA7u57HcNr4FOKe2+P/OPvWaNFMe+0mVOxC0UyprBQuqRj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949766; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ilgdara2TI3Rc2H/Zvnlod7/FWjd5LUdSZrfRjmK5dg=; b=exoDV5afAqLnMxLxV9i0nd2xQleKhtBT2tk8s6BkL10J9Ol59UrqzjQqxGkk9FeI51eOy0f9WWmckwUhMjHpvHntrulydzG4pc7rSHXJHudTBhf7UaRfP/7sYiDZKUTU/WQtEhmUYCyGF98VLm6eyOiOad3RsLMhzwhm1vPHD64= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43067+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949766601438.23751415596246; Sun, 30 Jun 2019 19:56:06 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480221" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:03 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 08/14] Vlv2TbltDevicePkg: Remove use of Data Hub Protocol Date: Sun, 30 Jun 2019 19:55:47 -0700 Message-Id: <20190701025553.18596-9-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949765; bh=FjEHODsYRu/ScpZbUX+quqYDbzL8EEHk4HPCvFRjajA=; h=Cc:Date:From:Reply-To:Subject:To; b=Qwg601dVGP7X/sQ92HM4wsJByik0afmZkcB0tbKOUjlVbwr9tNVOZV1HMiEAuNIGcRH mwEPQjBIdcGIM0gvZ5Jccl+1yIpW0Gf/o0CEC/RruSWsMAiRwMy8LO1c8KLMq+SkcpQht dp252kexRfbaUNOIEfCUXgshO6s06QUFbqI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Update all platform code to stop using the Data Hub Protocol from the IntelFrameworkPkg. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Vlv2TbltDevicePkg/Include/Guid/IdccData.h | 104 - .../Vlv2TbltDevicePkg/Include/Guid/ItkData.h | 18 +- .../Vlv2TbltDevicePkg/PlatformDxe/BoardId.c | 45 +- .../PlatformDxe/ClockControl.c | 80 +- .../Vlv2TbltDevicePkg/PlatformDxe/IdccInfo.c | 72 - .../Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 1 - .../PlatformDxe/PlatformDxe.h | 2 - .../PlatformDxe/PlatformDxe.inf | 2 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 6 - .../Vlv2TbltDevicePkg/PlatformPkgConfig.dsc | 1 - .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 6 - .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 7 - .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 7 - .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 7 - .../PlatformSetupDxe/PlatformSetupDxe.h | 2 - .../PlatformSetupDxe/SetupFunctions.c | 38 +- .../PlatformSetupDxe/SetupInfoRecords.c | 477 +-- .../SmBiosMiscDxe/CommonHeader.h | 10 +- .../SmBiosMiscDxe/DataHubRecords.h | 2934 +++++++++++++++++ .../SmBiosMiscDxe/MiscMemoryDeviceFunction.c | 318 +- .../SmBiosMiscDxe/MiscOemType0x94Function.c | 1 - .../SmBiosMiscDxe/MiscProcessorCacheData.c | 11 +- .../MiscProcessorCacheFunction.c | 273 +- .../MiscProcessorInformationFunction.c | 203 +- .../MiscSubclassDriverDataTable.c | 14 +- .../MiscSubclassDriverEntryPoint.c | 13 +- .../SmBiosMiscDxe/SmBiosMiscDxe.inf | 3 +- .../VlvPlatformInitDxe/IgdOpRegion.c | 3 - .../VlvPlatformInitDxe/VlvPlatformInitDxe.inf | 6 +- 30 files changed, 3458 insertions(+), 1207 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/IdccData.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IdccInfo.c create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/DataHubR= ecords.h diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/IdccData.h b/Pla= tform/Intel/Vlv2TbltDevicePkg/Include/Guid/IdccData.h deleted file mode 100644 index 7e3b965666..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/IdccData.h +++ /dev/null @@ -1,104 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - IdccData.h - -Abstract: - ---*/ - -#ifndef _IDCCDATAHUB_GUID_H_ -#define _IDCCDATAHUB_GUID_H_ - -// -// This GUID is for the IDCC related data found in the Data Hub. -// -#define IDCC_DATA_HUB_GUID \ - { 0x788e1d9f, 0x1eab, 0x47d2, 0xa2, 0xf3, 0x78, 0xca, 0xe8, 0x7d, 0x60, = 0x12 } - -extern EFI_GUID gIdccDataHubGuid; - -#pragma pack(1) - -typedef struct { - UINT32 Type; - UINT32 RecordLength; -} EFI_IDCC_DATA_HEADER; - -typedef struct { - EFI_IDCC_DATA_HEADER IdccHeader; - UINT32 Tcontrol; -} EFI_IDCC_TCONTROL; - -typedef struct { - UINT32 EntryCount; -} EFI_IDCC_CLOCK_COMMON; - -typedef struct { - UINT8 Polarity; - UINT8 Percent; - UINT32 FpValue; -} EFI_IDCC_TYPE_2_DATA; - -typedef struct { - UINT8 SetupVal; - UINT32 FpValue; -} EFI_IDCC_TYPE_3_4_DATA; - -typedef struct { - EFI_IDCC_DATA_HEADER IdccHeader; - UINT32 ProcessorRatio; -} EFI_IDCC_PROCESSOR_RATIO; - -typedef struct { - EFI_IDCC_DATA_HEADER IdccHeader; - UINT32 BoardFormFactor; -} EFI_IDCC_BOARD_FORM_FACTOR; - -typedef struct { - EFI_IDCC_DATA_HEADER IdccHeader; - UINT32 ProcessorInfo; -} EFI_IDCC_PROCESSOR_INFO; - -#define EFI_IDCC_PROCESSOR_UNCON (1 << 0) // Bit 0: UnCon CPU -#define EFI_IDCC_PROCESSOR_UNLOCK (1 << 1) // Bit 1: UnLock CPU -#define EFI_IDCC_PROCESSOR_CNR (1 << 2) // Bit 2: CNR CPU -#define EFI_IDCC_PROCESSOR_KNF (1 << 3) // Bit 3: KNF CPU - -typedef struct { - EFI_IDCC_DATA_HEADER IdccHeader; - UINT32 MinFSB; - UINT32 MaxFSB; - UINT8 StepFSB; -} EFI_IDCC_FSB_DATA; - -#pragma pack() - -#define EFI_IDCC_POSITIVE 0 -#define EFI_IDCC_NEGATIVE 1 - -// -// Board Form Factor equates. -// -#define ATX_FORM_FACTOR 0x00 -#define BTX_FORM_FACTOR 0x01 - - -#define EFI_IDCC_TCONTROL_TYPE 1 -#define EFI_IDCC_FSB_TYPE 2 -#define EFI_IDCC_PCI_TYPE 3 -#define EFI_IDCC_PCIE_TYPE 4 -#define EFI_IDCC_PROC_RATIO_TYPE 5 -#define EFI_IDCC_BOARD_FORM_FACTOR_TYPE 6 -#define EFI_IDCC_PROC_INFO_TYPE 7 -#define EFI_IDCC_FSB_DATA_TYPE 8 - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/ItkData.h b/Plat= form/Intel/Vlv2TbltDevicePkg/Include/Guid/ItkData.h index e7bd29e6e4..2dcaac15f3 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/ItkData.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/ItkData.h @@ -1,11 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 ItkData.h @@ -14,16 +12,8 @@ Abstract: =20 --*/ =20 -#ifndef _ITKDATAHUB_GUID_H_ -#define _ITKDATAHUB_GUID_H_ - -// -// This GUID is for the ITK related data found in the Data Hub {E7060843-A= 336-4d5b-9598-13402F5D7375} -// -#define ITK_DATA_HUB_GUID \ - { 0xe7060843, 0xa336, 0x4d5b, 0x95, 0x98, 0x13, 0x40, 0x2f, 0x5d, 0x73, = 0x75 } - -extern EFI_GUID gItkDataHubGuid; +#ifndef _ITKDATA_GUID_H_ +#define _ITKDATA_GUID_H_ =20 // // This GUID is for the ITK related data found in a Variable {3812723D-7E= 48-4e29-BC27-F5A39AC94EF1} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/BoardId.c b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformDxe/BoardId.c index 7d774568e3..66c76453a8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/BoardId.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/BoardId.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -23,13 +21,9 @@ Abstract: =20 #include "PchRegs.h" #include "PlatformDxe.h" -#include #include -#include =20 =20 -extern EFI_GUID mPlatformDriverGuid; - // // Global module data // @@ -52,8 +46,6 @@ InitializeBoardId ( { =20 UINT32 BoardIdBufferSize; - EFI_IDCC_BOARD_FORM_FACTOR IdccBoardFormFactor; - EFI_DATA_HUB_PROTOCOL *DataHub; EFI_STATUS Status; DMI_DATA DmiDataVariable; UINTN Size; @@ -186,38 +178,5 @@ InitializeBoardId ( BoardIdBufferSize, &mBoardFeatures ); - - // - // Get the Data Hub protocol - // - Status =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (VOID **) &DataHub - ); - if (!(EFI_ERROR(Status))) { - // - // Fill out data - // - IdccBoardFormFactor.IdccHeader.Type =3D EFI_IDCC_BOARD_FORM_FACTOR_TYP= E; - IdccBoardFormFactor.IdccHeader.RecordLength =3D sizeof(EFI_IDCC_BOARD_= FORM_FACTOR); - if ((mBoardFeatures & B_BOARD_FEATURES_FORM_FACTOR_ATX) || (mBoardFeat= ures & B_BOARD_FEATURES_FORM_FACTOR_MICRO_ATX)) { - IdccBoardFormFactor.BoardFormFactor =3D ATX_FORM_FACTOR; // ATX - } else { - IdccBoardFormFactor.BoardFormFactor =3D BTX_FORM_FACTOR; // BTX - } - - // - // Publish the Board Form Factor value for IDCC - // - Status =3D DataHub->LogData ( - DataHub, - &gIdccDataHubGuid, - &mPlatformDriverGuid, - EFI_DATA_RECORD_CLASS_DATA, - &IdccBoardFormFactor, - sizeof(EFI_IDCC_BOARD_FORM_FACTOR) - ); - } } =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/ClockControl.c b/= Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/ClockControl.c index 1669f0357f..596f55bcbe 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/ClockControl.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/ClockControl.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -75,71 +73,6 @@ EFI_CLOCK_PLATFORM_INFO mAtxClockSettings =3D { sizeof(mAtxSxClocks) / sizeof(mAtxSxClocks[0]) }; =20 -#if defined( RVP_SUPPORT ) && RVP_SUPPORT -// -// RVP Clock Settings -// -// Static clock table. -// This should be used to define any clock settings that are static -// (Always On or Always Off). Dynamic clocks should be set to enabled -// in this table. -// -//UPSD_TBD Check with Jan if any porting required. -// -EFI_STATIC_SIGNALS mRvpStaticClocks[] =3D { - {SrcClk11, Enabled, All}, // Not used/not present but leave coding= enabled - {SrcClk10, Enabled, All}, // Not used/not present but leave coding= enabled - {SrcClk9, Enabled, All}, // Not used/not present but leave coding= enabled - {SrcClk8, Enabled, All}, // ICHSATAII - {SrcClk7, Enabled, All}, // DPL_REFSSCLKIN - {SrcClk6, Enabled, All}, // 100M_MCH - {SrcClk5, Enabled, All}, // Mini-PCIe //TODO PNV: Need to check = ICH GPIO38: - // 0: turn on; 1: turn off - {SrcClk4, Enabled, All}, // ICHSATA - {SrcClk3, Enabled, All}, // 100M_ICH - {SrcClk2, Enabled, All}, // 100M_LAN - {SrcClk1, Enabled, All}, // 25M_LAN - {SrcClk0, Enabled, All}, // 96M_DREF - {Ref0, Enabled, All}, - {Dot96, Enabled, All}, - {Usb48, Enabled, All}, - {PciClkF5, Enabled, All}, // 33M_ICH - {PciClk0, Enabled, All}, // 33M_RISER - {PciClk1, Enabled, All}, // 33M_RISER - {PciClk2, Enabled, All}, // VDD_Clock - {PciClk3, Enabled, All}, // 33M_S1 - {PciClk4, Enabled, All}, // 33M_PA -}; - -// -// Dynamic clock table -// This is used to determine if a clock should be left on or turned off ba= sed -// on the presence of a device. The bridge information is used so the bus -// number for the device to be detected can be found. -// - -// -// ClockSxInfo Table -// This is a list of clocks that need to be set to a known state when the -// system enters S4 or S5. -// -EFI_STATIC_SIGNALS mRvpSxClocks[] =3D { - {SaveClockConfiguration, Disabled, All} -}; - -// -// RVP settings structure -// -EFI_CLOCK_PLATFORM_INFO mRvpClockSettings =3D { - mRvpStaticClocks, - sizeof(mRvpStaticClocks) / sizeof(mRvpStaticClocks[0]), - 0, // No clocks will be turned off mRvpDynamicClocks, - 0, // No clocks will be turned off sizeof(mRvpDynamicClocks) / sizeof(mR= vpDynamicClocks[0]), - mRvpSxClocks, - sizeof(mRvpSxClocks) / sizeof(mRvpSxClocks[0]) -}; -#endif - VOID InitializeClockRouting( ) @@ -165,12 +98,6 @@ InitializeClockRouting( ); if (!EFI_ERROR (Status)) { =20 -#if defined( RVP_SUPPORT ) && RVP_SUPPORT - if (BoardIdVar & B_BOARD_FEATURES_RVP) { - ClockPolicy =3D &mRvpClockSettings; - } -#else - // // Isolate board type information // @@ -183,9 +110,6 @@ InitializeClockRouting( BoardIdVar =3D=3D B_BOARD_FEATURES_FORM_FACTOR_MICRO_ATX) { ClockPolicy =3D &mAtxClockSettings; } - -#endif - } =20 Handle =3D NULL; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IdccInfo.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformDxe/IdccInfo.c deleted file mode 100644 index 3b3e4b4c82..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/IdccInfo.c +++ /dev/null @@ -1,72 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - - IdccInfo.c - -Abstract: - - Platform information used by IDCC. - -Revision History - ---*/ - -#include "PlatformDxe.h" - -#include - -extern EFI_GUID mPlatformDriverGuid; - - -EFI_STATUS -WriteIdccInfo ( - ) -{ - EFI_STATUS Status; - EFI_DATA_HUB_PROTOCOL *DataHub; - UINT8 Ratio; - EFI_IDCC_PROCESSOR_RATIO ProcRatio; - - // - // Locate the data hub protocol - // - Status =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (VOID **) &DataHub - ); - - // - // Find processor actual ratio - // - Ratio =3D 15; //Temporary - some dummy value. - - // - // Fill in IDCC Type 5 structure - // - ProcRatio.IdccHeader.Type =3D EFI_IDCC_PROC_RATIO_TYPE; - ProcRatio.IdccHeader.RecordLength =3D sizeof(EFI_IDCC_PROCESSOR_RATIO); - ProcRatio.ProcessorRatio =3D Ratio; - - // - // Write data to the data hub - // - Status =3D DataHub->LogData ( - DataHub, - &gIdccDataHubGuid, - &mPlatformDriverGuid, - EFI_DATA_RECORD_CLASS_DATA, - &ProcRatio, - sizeof(EFI_IDCC_PROCESSOR_RATIO) - ); - - return Status; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index 7e083e3933..0bc3f44c49 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -55,7 +55,6 @@ GPIO_CONF_PAD_INIT mTB_BL_GpioInitData_SC_TRI_Exit_boot_S= ervice[] =3D =20 =20 EFI_GUID mSystemHiiExportDatabase =3D EFI_HII_EXPORT_DATABASE_GUID; -EFI_GUID mPlatformDriverGuid =3D EFI_PLATFORM_DRIVER_GUID; SYSTEM_CONFIGURATION mSystemConfiguration; EFI_HANDLE mImageHandle; BOOLEAN mMfgMode =3D FALSE; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h index 5c60f823de..f2f0097efc 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h @@ -43,8 +43,6 @@ Abstract: #include #include #include -#include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index 0c432642e4..a9ef744ef7 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -35,7 +35,6 @@ [sources.common] ClockControl.c Platform.c IchRegTable.c - IdccInfo.c IchPlatformPolicy.c PciDevice.c SlotConfig.c @@ -80,7 +79,6 @@ [Guids] gEfiBoardFeaturesGuid gItkDataVarGuid gDmiDataGuid - gIdccDataHubGuid gEfiPciLanInfoGuid gEfiNormalSetupGuid gEfiGlobalVariableGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index bfde7be398..5b255f4b05 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -41,7 +41,6 @@ [Guids] gEfiBoardFeaturesGuid =3D { 0x94b9e8ae, 0x8877, 0x479a= , { 0x98, 0x42, 0xf5, 0x97, 0x4b, 0x82, 0xce, 0xd3 } } gItkDataVarGuid =3D { 0x3812723d, 0x7e48, 0x4e29= , { 0xbc, 0x27, 0xf5, 0xa3, 0x9a, 0xc9, 0x4e, 0xf1 } } gDmiDataGuid =3D { 0x70e56c5e, 0x280c, 0x44b0= , { 0xa4, 0x97, 0x09, 0x68, 0x1a, 0xbc, 0x37, 0x5e } } - gIdccDataHubGuid =3D { 0x788e1d9f, 0x1eab, 0x47d2= , { 0xa2, 0xf3, 0x78, 0xca, 0xe8, 0x7d, 0x60, 0x12 } } gEfiSetupVariableGuid =3D { 0xec87d643, 0xeba4, 0x4bb5= , { 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0x0d, 0xa9 } } gEfiPlatformInfoGuid =3D { 0x1e2acc41, 0xe26a, 0x483d= , { 0xaf, 0xc7, 0xa0, 0x56, 0xc3, 0x4e, 0x08, 0x7b } } gMfgModeVariableGuid =3D { 0xEF14FD78, 0x0793, 0x4e2b= , { 0xAC, 0x6D, 0x06, 0x28, 0x47, 0xE0, 0x17, 0x91 } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index 4c60d0a0f2..15a4251cf8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -430,9 +430,6 @@ [FV.FVMAIN] =20 INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 -!if $(DATAHUB_ENABLE) =3D=3D TRUE -INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf -!endif INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf =20 INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/Dptf.inf @@ -584,9 +581,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 -INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmbiosMemory.inf - - # # FAT file system # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc index d5068b514c..7b48d7b44e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc @@ -48,7 +48,6 @@ DEFINE MICOCODE_CAPSULE_ENABLE =3D TRUE =20 DEFINE GOP_DRIVER_ENABLE =3D TRUE -DEFINE DATAHUB_ENABLE =3D TRUE DEFINE USB_ENABLE =3D TRUE =20 DEFINE ISA_SERIAL_STATUS_CODE_ENABLE =3D TRUE diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index 61e1adcd14..b8ac61d710 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -376,9 +376,6 @@ [FV.FVMAIN] =20 INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 -!if $(DATAHUB_ENABLE) =3D=3D TRUE -INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf -!endif INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf =20 INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/Dptf.inf @@ -530,9 +527,6 @@ [FV.FVMAIN] INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 -INF RuleOverride =3D BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(D= XE_ARCHITECTURE)/SmbiosMemory.inf - - # # FAT file system # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index 25d1beb400..b16883e98c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -984,12 +984,6 @@ [Components.X64] =20 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 -!if $(DATAHUB_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 - } -!endif MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf @@ -1212,7 +1206,6 @@ [Components.X64] MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 8a5c42577d..c9335a98c8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -968,12 +968,6 @@ [Components.IA32] =20 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 -!if $(DATAHUB_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 - } -!endif MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf @@ -1196,7 +1190,6 @@ [Components.IA32] MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index c0fe0892ac..fd9ddebfd9 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -983,12 +983,6 @@ [Components.X64] =20 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf =20 -!if $(DATAHUB_ENABLE) =3D=3D TRUE - IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf { - - gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 - } -!endif MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3Supp= ortDxe.inf PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf @@ -1211,7 +1205,6 @@ [Components.X64] MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf =20 - Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMem= ory.inf # # CPU/FW Microde # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.h b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe= .h index 1ba75175e1..b4a30511ac 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h @@ -25,10 +25,8 @@ #include #include #include -#include #include #include -#include =20 #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctio= ns.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c index a84b425826..f3bc823056 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupFunctions.c @@ -1,12 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 SetupFunctions.c @@ -52,34 +49,3 @@ SwapEntries ( =20 return; } - -UINT32 -ConvertBase10ToRaw ( - IN EFI_EXP_BASE10_DATA *Data) -{ - UINTN Index; - UINT32 RawData; - - RawData =3D Data->Value; - for (Index =3D 0; Index < (UINTN) Data->Exponent; Index++) { - RawData *=3D 10; - } - - return RawData; -} - -UINT32 -ConvertBase2ToRaw ( - IN EFI_EXP_BASE2_DATA *Data) -{ - UINTN Index; - UINT32 RawData; - - RawData =3D Data->Value; - for (Index =3D 0; Index < (UINTN) Data->Exponent; Index++) { - RawData <<=3D 1; - } - - return RawData; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRec= ords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords= .c index c767021aed..efd4a723e1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -79,9 +79,6 @@ SB_REV SBRevisionTable[] =3D { =20 BOOLEAN mSetupInfoDone =3D FALSE; UINT8 mUseProductKey =3D 0; -EFI_EXP_BASE10_DATA mProcessorFrequency; -EFI_EXP_BASE10_DATA mProcessorFsbFrequency; - EFI_GUID mProcessorProducerGuid; EFI_HII_HANDLE mHiiHandle; EFI_PLATFORM_CPU_INFO mPlatformCpuInfo; @@ -91,50 +88,7 @@ EFI_PLATFORM_INFO_HOB *mPlatformInfo; =20 #define memset SetMem =20 -UINT16 mMemorySpeed =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelASlot0 =3D 0; -UINT16 mMemorySpeedChannelASlot0 =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelASlot1 =3D 0; -UINT16 mMemorySpeedChannelASlot1 =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelBSlot0 =3D 0; -UINT16 mMemorySpeedChannelBSlot0 =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelBSlot1 =3D 0; -UINT16 mMemorySpeedChannelBSlot1 =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelCSlot0 =3D 0; -UINT16 mMemorySpeedChannelCSlot0 =3D 0xffff; -EFI_PHYSICAL_ADDRESS mMemorySizeChannelCSlot1 =3D 0; -UINT16 mMemorySpeedChannelCSlot1 =3D 0xffff; -UINTN mMemoryMode =3D 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; - =20 typedef enum { PCH_SATA_MODE_IDE =3D 0, @@ -421,73 +375,6 @@ VOID UpdateLatestBootTime() { HiiSetString(mHiiHandle,STRING_TOKEN(STR_LOG_BOOT_TIME_VALUE), Buffer, N= ULL); } =20 -/** - Get Cache Type for the specified Cache. This function is invoked when th= ere is data records - available in the Data Hub. - - Get Cache Type function arguments: - - @param Instance The instance number of the subclass with the sam= e ProducerName.. - @param SubInstance The instance number of the RecordType for the sa= me Instance. - @param CacheType Cache type, see definition of EFI_CACHE_TYPE_DAT= A. - - @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 =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (void **)&DataHub - ); - ASSERT_EFI_ERROR(Status); - - // - // Get all available data records from data hub - // - MonotonicCount =3D 0; - Record =3D NULL; - - do { - Status =3D DataHub->GetNextRecord ( - DataHub, - &MonotonicCount, - NULL, - &Record - ); - if (!EFI_ERROR(Status)) { - if (Record->DataRecordClass =3D=3D EFI_DATA_RECORD_CLASS_DATA) { - DataHeader =3D (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); - - if(CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClassGuid) && - (DataHeader->RecordType =3D=3D CacheTypeRecordType) && - (DataHeader->Instance =3D=3D Instance) && - (DataHeader->SubInstance =3D=3D SubInstance)) { - CacheVariableRecord =3D (EFI_CACHE_VARIABLE_RECORD *)(DataH= eader + 1); - if(CacheType){ - *CacheType =3D CacheVariableRecord->CacheType; - return EFI_SUCCESS; - } - } - } - } - } while(!EFI_ERROR(Status) && (MonotonicCount !=3D 0)); - - return EFI_NOT_FOUND; -} - /** Setup data filter function. This function is invoked when there is data = records available in the Data Hub. @@ -504,230 +391,23 @@ VOID PrepareSetupInformation ( ) { - EFI_STATUS Status; - EFI_DATA_HUB_PROTOCOL *DataHub; - EFI_DATA_RECORD_HEADER *Record; - UINT8 *SrcData; - EFI_SUBCLASS_TYPE1_HEADER *DataHeader; CHAR16 *NewString; - CHAR16 *NewString2; - CHAR16 *NewStringToken; STRING_REF TokenToUpdate; - EFI_PROCESSOR_VERSION_DATA *ProcessorVersion; - UINTN Index; - 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 string= s are < 100 UCHAR CHAR16 ReleaseDate[100]; //Assuming that string= s are < 100 UCHAR CHAR16 ReleaseTime[100]; //Assuming that string= s are < 100 UCHAR =20 NewString =3D AllocateZeroPool (0x100); - NewString2 =3D AllocateZeroPool (0x100); SetMem(Version, sizeof(Version), 0); SetMem(ReleaseDate, sizeof(ReleaseDate), 0); SetMem(ReleaseTime, sizeof(ReleaseTime), 0); =20 - // - // Get the Data Hub Protocol. Assume only one instance - // - Status =3D gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (void **= )&DataHub); - ASSERT_EFI_ERROR(Status); - - // - // Get all available data records from data hub - // - MonotonicCount =3D 0; - Record =3D NULL; - - do { - Status =3D DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Re= cord); - if (!EFI_ERROR(Status)) { - if (Record->DataRecordClass =3D=3D EFI_DATA_RECORD_CLASS_DATA) { - DataHeader =3D (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); - SrcData =3D (UINT8 *)(DataHeader + 1); - - // - // Processor - // - if (CompareGuid(&Record->DataRecordGuid, &gEfiProcessorSubClassGui= d)) { - CopyMem (&mProcessorProducerGuid, &Record->ProducerName, sizeof(= EFI_GUID)); - switch (DataHeader->RecordType) { - case ProcessorCoreFrequencyRecordType: - CopyMem(&mProcessorFrequency, SrcData, sizeof(EFI_EXP_BASE10= _DATA)); - Index =3D 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)/1000= 0000), - PREFIX_ZERO, - 0 - ); - StrCat (NewString, L" GHz"); - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_SPEED_VALUE; - HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); - break; - - case ProcessorVersionRecordType: - ProcessorVersion =3D (EFI_PROCESSOR_VERSION_DATA *)SrcData; - NewStringToken =3D HiiGetPackageString(&mProcessorProducerGu= id, *ProcessorVersion, NULL); - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_VERSION_VALUE; - HiiSetString(mHiiHandle, TokenToUpdate, NewStringToken, NULL= ); - break; - case CpuUcodeRevisionDataRecordType: - CpuUcodeRevisionData =3D (EFI_PROCESSOR_MICROCODE_REVISION_D= ATA *) SrcData; - if (CpuUcodeRevisionData->ProcessorMicrocodeRevisionNumber != =3D 0) { - EfiValueToHexStr ( - NewString, - CpuUcodeRevisionData->ProcessorMicrocodeRevisionNumber, - PREFIX_ZERO, - 8 - ); - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_MICROCODE_VALU= E; - HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); - } - break; - default: - break; - } - - // - // Cache - // - } else if (CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClass= Guid) && - (DataHeader->RecordType =3D=3D CacheSizeRecordType)) { - if (DataHeader->SubInstance =3D=3D EFI_CACHE_L1) { - EFI_CACHE_TYPE_DATA CacheType; - if (EFI_SUCCESS =3D=3D GetCacheType(DataHeader->Instance, Data= Header->SubInstance,&CacheType)){ - if (CacheType =3D=3D EfiCacheTypeData) { - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_L1_DATA_CACHE_= VALUE; - } else if (CacheType =3D=3D EfiCacheTypeInstruction) { - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_L1_INSTR_CAC= HE_VALUE; - } else { - continue; - } - } else { - continue; - } - } - else if (DataHeader->SubInstance =3D=3D EFI_CACHE_L2) { - TokenToUpdate =3D (STRING_REF)STR_PROCESSOR_L2_CACHE_VALUE; - } else { - continue; - } - if (ConvertBase2ToRaw((EFI_EXP_BASE2_DATA *)SrcData)) { - DataOutput =3D ConvertBase2ToRaw((EFI_EXP_BASE2_DATA *)SrcData= ) >> 10; - EfiValueToString (NewString, DataOutput, PREFIX_ZERO, 0); - - StrCat (NewString, L" KB"); - if (DataHeader->SubInstance =3D=3D EFI_CACHE_L3) { - HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); - } else if(DataHeader->SubInstance =3D=3D EFI_CACHE_L2 && mPlat= formCpuInfo.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, &gEfiMemorySubClas= sGuid)) { - switch (DataHeader->RecordType) { - case EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER: - MemoryArrayLink =3D (EFI_MEMORY_ARRAY_LINK *)SrcData; - - if (MemoryArrayLink->MemorySpeed > 0) { - // - // Save the lowest speed memory module - // - if (MemoryArrayLink->MemorySpeed < mMemorySpeed) { - mMemorySpeed =3D MemoryArrayLink->MemorySpeed; - } - switch (DataHeader->SubInstance) { - case 1: - mMemorySpeedChannelASlot0 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelASlot0 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - case 2: - mMemorySpeedChannelASlot1 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelASlot1 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - case 3: - mMemorySpeedChannelBSlot0 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelBSlot0 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - case 4: - mMemorySpeedChannelBSlot1 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelBSlot1 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - case 5: - mMemorySpeedChannelCSlot0 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelCSlot0 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - case 6: - mMemorySpeedChannelCSlot1 =3D MemoryArrayLink->MemoryS= peed; - mMemorySizeChannelCSlot1 =3D MemoryArrayLink->MemoryDe= viceSize; - break; - default: - break; - } - } - break; - - case EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER: - MemoryArray =3D (EFI_MEMORY_ARRAY_START_ADDRESS *)SrcData; - if (MemoryArray->MemoryArrayEndAddress - MemoryArray->Memory= ArrayStartAddress) { - DataOutput =3D (UINTN)RShiftU64((MemoryArray->MemoryArrayEn= dAddress - MemoryArray->MemoryArrayStartAddress + 1), 20); - EfiValueToString (NewString, DataOutput / 1024, PREFIX_ZERO= , 0); - if(DataOutput % 1024) { - StrCat (NewString, L"."); - DataOutput =3D ((DataOutput % 1024) * 1000) / 1024; - while(!(DataOutput % 10)) - DataOutput =3D DataOutput / 10; - EfiValueToString (NewString2, DataOutput, PREFIX_ZERO, 0= ); - StrCat (NewString, NewString2); - } - StrCat (NewString, L" GB"); - TokenToUpdate =3D (STRING_REF)STR_TOTAL_MEMORY_SIZE_VALUE; - HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); - } - break; - - default: - break; - } - } - } - } - } while (!EFI_ERROR(Status) && (MonotonicCount !=3D 0)); - Status =3D GetBiosVersionDateTime ( Version, - ReleaseDate, - ReleaseTime - ); + ReleaseDate, + ReleaseTime + ); =20 DEBUG ((EFI_D_ERROR, "GetBiosVersionDateTime :%s %s %s \n", Version, Rel= easeDate, ReleaseTime)); if (!EFI_ERROR (Status)) { @@ -750,24 +430,7 @@ PrepareSetupInformation ( HiiSetString(mHiiHandle, TokenToUpdate, BuildDateTime, NULL); } =20 - // - // Calculate and update memory speed display in Main Page - // - // - // Update the overall memory speed - // - if (mMemorySpeed !=3D 0xffff) { - EfiValueToString (NewString, mMemorySpeed, PREFIX_ZERO, 0); - StrCat (NewString, L" MHz"); - - TokenToUpdate =3D (STRING_REF)STR_SYSTEM_MEMORY_SPEED_VALUE; - HiiSetString(mHiiHandle, TokenToUpdate, NewString, NULL); - } - gBS->FreePool(NewString); - gBS->FreePool(NewString2); - - return; } =20 /** @@ -782,65 +445,23 @@ UpdateAdditionalInformation ( ) { EFI_STATUS Status; - UINT64 MonotonicCount; - EFI_DATA_HUB_PROTOCOL *DataHub; - EFI_DATA_RECORD_HEADER *Record; - EFI_SUBCLASS_TYPE1_HEADER *DataHeader; EFI_SMBIOS_PROTOCOL *Smbios; EFI_SMBIOS_HANDLE SmbiosHandle; EFI_SMBIOS_TABLE_HEADER *SmbiosRecord; SMBIOS_TABLE_TYPE0 *Type0Record; + SMBIOS_TABLE_TYPE4 *Type4Record; + SMBIOS_TABLE_TYPE7 *Type7Record; + SMBIOS_TABLE_TYPE17 *Type17Record; UINT8 StrIndex; CHAR16 *BiosVersion =3D NULL; + CHAR16 *ProcessorVersion =3D NULL; CHAR16 *IfwiVersion =3D NULL; UINT16 SearchIndex; EFI_STRING_ID TokenToUpdate; -#if defined( RVP_SUPPORT ) && RVP_SUPPORT - EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer; -#endif - - Status =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (void **)&DataHub - ); - - ASSERT_EFI_ERROR(Status); - - MonotonicCount =3D 0; - Record =3D NULL; - do { - Status =3D DataHub->GetNextRecord ( - DataHub, - &MonotonicCount, - NULL, - &Record - ); - if (Record->DataRecordClass =3D=3D EFI_DATA_RECORD_CLASS_DATA) { - DataHeader =3D (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); - - if (CompareGuid(&Record->DataRecordGuid, &gEfiMiscSubClassGuid) && - (DataHeader->RecordType =3D=3D EFI_MISC_SYSTEM_MANUFACTURER_RECO= RD_NUMBER)) { -#if defined( RVP_SUPPORT ) && RVP_SUPPORT - // - // System Information - // - SystemManufacturer =3D (EFI_MISC_SYSTEM_MANUFACTURER *)(DataHeader= + 1); - - // - // UUID (System Information) - // - SMBIOSString =3D EfiLibAllocateZeroPool (0x100); - GuidToString ( &SystemManufacturer->SystemUuid, SMBIOSString, 0x00= ); - - TokenToUpdate =3D (STRING_REF)STR_SYSTEM_UUID_VALUE; - HiiSetString(mHiiHandle, TokenToUpdate, SMBIOSString, NULL); - - gBS->FreePool(SMBIOSString); -#endif - } - } - } while (!EFI_ERROR(Status) && (MonotonicCount !=3D 0)); + UINT32 MicrocodeRevision; + CHAR16 NewString[0x100]; + UINTN TotalMemorySize; + UINT16 MemorySpeed; =20 Status =3D gBS->LocateProtocol ( &gEfiSmbiosProtocolGuid, @@ -850,6 +471,8 @@ UpdateAdditionalInformation ( ASSERT_EFI_ERROR (Status); =20 SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; + TotalMemorySize =3D 0; + MemorySpeed =3D 0xffff; do { Status =3D Smbios->GetNext ( Smbios, @@ -858,6 +481,70 @@ UpdateAdditionalInformation ( &SmbiosRecord, NULL ); + + + if (SmbiosRecord->Type =3D=3D EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) { + Type4Record =3D (SMBIOS_TABLE_TYPE4 *) SmbiosRecord; + UnicodeSPrint (NewString, sizeof (NewString), L"%d.%d GHz", + Type4Record->CurrentSpeed / 1000, + Type4Record->CurrentSpeed % 1000 + ); + HiiSetString (mHiiHandle, STR_PROCESSOR_SPEED_VALUE, NewString, NULL= ); + + StrIndex =3D Type4Record->ProcessorVersion; + GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record= ->Hdr.Length), StrIndex, &ProcessorVersion); + HiiSetString (mHiiHandle, STR_PROCESSOR_VERSION_VALUE, ProcessorVers= ion, NULL); + + MicrocodeRevision =3D (UINT32) RShiftU64 (AsmReadMsr64 (EFI_MSR_IA32= _BIOS_SIGN_ID), 32); + UnicodeSPrint (NewString, sizeof (NewString), L"%8x", MicrocodeRevis= ion); + HiiSetString (mHiiHandle, STR_PROCESSOR_MICROCODE_VALUE, NewString, = NULL); + } + if (SmbiosRecord->Type =3D=3D SMBIOS_TYPE_CACHE_INFORMATION) { + Type7Record =3D (SMBIOS_TABLE_TYPE7 *) SmbiosRecord; + UnicodeSPrint (NewString, sizeof (NewString), L"%d KB", Type7Record-= >InstalledSize); + switch (Type7Record->CacheConfiguration & 0x03) { + case 0: + // + // Level 1 Cache + // + if (Type7Record->SystemCacheType =3D=3D CacheTypeInstruction) { + HiiSetString (mHiiHandle, STR_PROCESSOR_L1_INSTR_CACHE_VALUE, Ne= wString, NULL); + } + if (Type7Record->SystemCacheType =3D=3D CacheTypeData) { + HiiSetString (mHiiHandle, STR_PROCESSOR_L1_DATA_CACHE_VALUE, New= String, NULL); + } + break; + case 1: + // + // Level 2 Cache + // + HiiSetString (mHiiHandle, STR_PROCESSOR_L2_CACHE_VALUE, NewString,= NULL); + break; + default: + break; + } + HiiSetString (mHiiHandle, STR_PROCESSOR_MICROCODE_VALUE, NewString, = NULL); + } + if (SmbiosRecord->Type =3D=3D EFI_SMBIOS_TYPE_MEMORY_DEVICE) { + Type17Record =3D (SMBIOS_TABLE_TYPE17 *) SmbiosRecord; + if (Type17Record->Size > 0) { + if ((Type17Record->Size & BIT15) !=3D 0) { + // + // Size is in KB + // + TotalMemorySize =3D TotalMemorySize + Type17Record->Size; + } else { + // + // Size is in MB + // + TotalMemorySize =3D TotalMemorySize + (UINTN)LShiftU64 (Type17Re= cord->Size, 10); + } + if (Type17Record->Speed < MemorySpeed) { + MemorySpeed =3D Type17Record->Speed; + } + } + } + if (SmbiosRecord->Type =3D=3D EFI_SMBIOS_TYPE_BIOS_INFORMATION) { Type0Record =3D (SMBIOS_TABLE_TYPE0 *) SmbiosRecord; StrIndex =3D Type0Record->BiosVersion; @@ -884,6 +571,16 @@ UpdateAdditionalInformation ( } } while (!EFI_ERROR(Status)); =20 + if ((TotalMemorySize % 1024) !=3D 0) { + UnicodeSPrint (NewString, sizeof (NewString), L"%d.%d GB", TotalMemory= Size / 1024, ((TotalMemorySize % 1024) * 100) / 1024); + } else { + UnicodeSPrint (NewString, sizeof (NewString), L"%d GB", TotalMemorySiz= e / 1024); + } + HiiSetString (mHiiHandle, STR_TOTAL_MEMORY_SIZE_VALUE, NewString, NULL); + + UnicodeSPrint (NewString, sizeof (NewString), L"%d MHz", MemorySpeed); + HiiSetString(mHiiHandle, STR_SYSTEM_MEMORY_SPEED_VALUE, NewString, NULL); + UpdateLatestBootTime(); =20 return EFI_SUCCESS; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/CommonHeader.h = b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/CommonHeader.h index e339b31065..f95e6bbc2d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/CommonHeader.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/CommonHeader.h @@ -3,11 +3,10 @@ =20 This file includes package header files, library classes and protocol, P= PI & GUID definitions. =20 - Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 **/ =20 #ifndef __COMMON_HEADER_H_ @@ -15,11 +14,10 @@ =20 =20 =20 -#include +#include #include #include =20 -#include #include =20 #include @@ -36,4 +34,6 @@ #include #include =20 +#include "DataHubRecords.h" + #endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/DataHubRecords.= h b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/DataHubRecords.h new file mode 100644 index 0000000000..f57a5a8c0f --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/DataHubRecords.h @@ -0,0 +1,2934 @@ +/** @file + DataHubRecord.h includes all data hub subclass GUID definitions. + + This file includes all data hub sub class defitions from + Cache subclass specification 0.9, DataHub SubClass specification 0.9, Me= mory SubClass Spec 0.9, + Processor Subclass specification 0.9, and Misc SubClass specification 0.= 9. + +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef _DATAHUB_RECORDS_GUID_H_ +#define _DATAHUB_RECORDS_GUID_H_ + +// +// Local defintion of STRING_REF +// +typedef UINT16 STRING_REF; + +// +// The include is required to retrieve type EFI_EXP_BASE10_DATA +// +#include + +#define EFI_PROCESSOR_SUBCLASS_GUID \ + { 0x26fdeb7e, 0xb8af, 0x4ccf, {0xaa, 0x97, 0x02, 0x63, 0x3c, 0xe4, 0x8c,= 0xa7 } } + +extern EFI_GUID gEfiProcessorSubClassGuid; + + +#define EFI_CACHE_SUBCLASS_GUID \ + { 0x7f0013a7, 0xdc79, 0x4b22, {0x80, 0x99, 0x11, 0xf7, 0x5f, 0xdc, 0x82,= 0x9d } } + +extern EFI_GUID gEfiCacheSubClassGuid; + +/// +/// The memory subclass belongs to the data class and is identified as the= memory +/// subclass by the GUID. +/// +#define EFI_MEMORY_SUBCLASS_GUID \ + {0x4E8F4EBB, 0x64B9, 0x4e05, {0x9B, 0x18, 0x4C, 0xFE, 0x49, 0x23, 0x50, = 0x97} } + +extern EFI_GUID gEfiMemorySubClassGuid; + +#define EFI_MISC_SUBCLASS_GUID \ + { 0x772484B2, 0x7482, 0x4b91, {0x9F, 0x9A, 0xAD, 0x43, 0xF8, 0x1C, 0x58,= 0x81 } } + +extern EFI_GUID gEfiMiscSubClassGuid; + + +/// +/// Inconsistent with specification here: +/// In ProcSubclass specification 0.9, the value is 0x0100. +/// Keep it unchanged from the perspective of binary consistency. +/// +#define EFI_PROCESSOR_SUBCLASS_VERSION 0x00010000 + +#pragma pack(1) + +typedef struct _USB_PORT_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH PciBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} USB_PORT_DEVICE_PATH; + +// +// IDE +// +typedef struct _IDE_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH PciBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} IDE_DEVICE_PATH; + +// +// RMC Connector +// +typedef struct _RMC_CONN_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH PciBridgeDevicePath; + PCI_DEVICE_PATH PciBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} RMC_CONN_DEVICE_PATH; + +// +// RIDE +// +typedef struct _RIDE_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH PciBridgeDevicePath; + PCI_DEVICE_PATH PciBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} RIDE_DEVICE_PATH; + +// +// Gigabit NIC +// +typedef struct _GB_NIC_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH PciBridgeDevicePath; + PCI_DEVICE_PATH PciXBridgeDevicePath; + PCI_DEVICE_PATH PciXBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} GB_NIC_DEVICE_PATH; + +// +// P/S2 Connector +// +typedef struct _PS2_CONN_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH LpcBridgeDevicePath; + ACPI_HID_DEVICE_PATH LpcBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} PS2_CONN_DEVICE_PATH; + +// +// Serial Port Connector +// +typedef struct _SERIAL_CONN_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH LpcBridgeDevicePath; + ACPI_HID_DEVICE_PATH LpcBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} SERIAL_CONN_DEVICE_PATH; + +// +// Parallel Port Connector +// +typedef struct _PARALLEL_CONN_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH LpcBridgeDevicePath; + ACPI_HID_DEVICE_PATH LpcBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} PARALLEL_CONN_DEVICE_PATH; + +// +// Floopy Connector +// +typedef struct _FLOOPY_CONN_DEVICE_PATH { + ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath; + PCI_DEVICE_PATH LpcBridgeDevicePath; + ACPI_HID_DEVICE_PATH LpcBusDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} FLOOPY_CONN_DEVICE_PATH; + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, this data structure and corrspondin= g fields are NOT defined. +/// It's implementation-specific to simplify the code logic. +/// +typedef union _EFI_MISC_PORT_DEVICE_PATH { + USB_PORT_DEVICE_PATH UsbDevicePath; + IDE_DEVICE_PATH IdeDevicePath; + RMC_CONN_DEVICE_PATH RmcConnDevicePath; + RIDE_DEVICE_PATH RideDevicePath; + GB_NIC_DEVICE_PATH GbNicDevicePath; + PS2_CONN_DEVICE_PATH Ps2ConnDevicePath; + SERIAL_CONN_DEVICE_PATH SerialConnDevicePath; + PARALLEL_CONN_DEVICE_PATH ParallelConnDevicePath; + FLOOPY_CONN_DEVICE_PATH FloppyConnDevicePath; +} EFI_MISC_PORT_DEVICE_PATH; + +#pragma pack() + +/// +/// String Token Definition +/// +/// Inconsistent with specification here: +/// The macro isn't defined by any specification. +/// Keep it unchanged for backward compatibility. +/// +#define EFI_STRING_TOKEN UINT16 + +/// +/// Each data record that is a member of some subclass starts with a stand= ard +/// header of type EFI_SUBCLASS_TYPE1_HEADER. +/// This header is only a guideline and applicable only to a data +/// subclass that is producing SMBIOS data records. A subclass can start w= ith a +/// different header if needed. +/// +typedef struct { + /// + /// The version of the specification to which a specific subclass data r= ecord adheres. + /// + UINT32 Version; + /// + /// The size in bytes of this data class header. + /// + UINT32 HeaderSize; + /// + /// The instance number of the subclass with the same ProducerName. This= number is + /// applicable in cases where multiple subclass instances that were prod= uced by the same + /// driver exist in the system. This entry is 1 based; 0 means Reserved = and -1 means Not + /// Applicable. All data consumer drivers should be able to handle all t= he possible values + /// of Instance, including Not Applicable and Reserved. + /// + UINT16 Instance; + /// + /// The instance number of the RecordType for the same Instance. This nu= mber is + /// applicable in cases where multiple instances of the RecordType exist= for a specific + /// Instance. This entry is 1 based; 0 means Reserved and -1 means Not A= pplicable. + /// All data consumer drivers should be able to handle all the possible = values of + /// SubInstance, including Not Applicable and Reserved. + /// + UINT16 SubInstance; + /// + /// The record number for the data record being specified. The numbering= scheme and + /// definition is defined in the specific subclass specification. + /// + UINT32 RecordType; +} EFI_SUBCLASS_TYPE1_HEADER; + +/// +/// This structure is used to link data records in the same subclasses. A = data record is +/// defined as a link to another data record in the same subclass using th= is structure. +/// +typedef struct { + /// + /// An EFI_GUID that identifies the component that produced this data re= cord. Type + /// EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Sp= ecification. + /// + EFI_GUID ProducerName; + /// + /// The instance number of the subclass with the same ProducerName. This= number is + /// applicable in cases where multiple subclass instances that were prod= uced by the same + /// driver exist in the system. This entry is 1 based; 0 means Reserved = and -1 means Not + /// Applicable. All data consumer drivers should be able to handle all t= he possible values + /// of Instance, including Not Applicable and Reserved. + /// + UINT16 Instance; + /// The instance number of the RecordType for the same Instance. This nu= mber is + /// applicable in cases where multiple instances of the RecordType exist= for a specific + /// Instance. This entry is 1 based; 0 means Reserved and -1 means Not A= pplicable. + /// All data consumer drivers should be able to handle all the possible = values of + /// SubInstance, including Not Applicable and Reserved. + UINT16 SubInstance; +} EFI_INTER_LINK_DATA; + +// +// EXP data +// +/// +/// This macro provides a calculation for base-10 representations. Value a= nd Exponent are each +/// INT16. It is signed to cover negative values and is 16 bits wide (15 b= its for data and 1 bit +/// for the sign). +/// +typedef struct { + /// + /// The INT16 number by which to multiply the base-10 representation. + /// + UINT16 Value; + /// + /// The INT16 number by which to raise the base-10 calculation. + /// + UINT16 Exponent; +} EFI_EXP_BASE2_DATA; + +typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_MAX_CORE_FREQUENCY_DATA; +typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA; +typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_CORE_FREQUENCY_DATA; + +/// +/// This data record refers to the list of frequencies that the processor = core supports. The list of +/// supported frequencies is determined by the firmware based on hardware = capabilities--for example, +/// it could be a common subset of all processors and the chipset. The uni= t of measurement of this data +/// record is in Hertz. For asynchronous processors, the content of this d= ata record is zero. +/// The list is terminated by -1 in the Value field of the last element. A= Value field of zero means +/// that the processor/driver supports automatic frequency selection. +/// +/// Inconsistent with specification here: +/// According to MiscSubclass 0.9 specification, it should be a pointer si= nce it refers to a list of frequencies. +/// +typedef EFI_EXP_BASE10_DATA *EFI_PROCESSOR_CORE_FREQUENCY_LIST_DATA; + +/// +/// This data record refers to the list of supported frequencies of the pr= ocessor external bus. The list of +/// supported frequencies is determined by the firmware based on hardware = capabilities--for example, +/// it could be a common subset of all processors and the chipset. The uni= t of measurement of this data +/// record is in Hertz. For asynchronous processors, the content of this d= ata record is NULL. +/// The list is terminated by -1 in the Value field of the last element. A= Value field of zero means +/// that the processor/driver supports automatic frequency selection. +/// +typedef EFI_EXP_BASE10_DATA *EFI_PROCESSOR_FSB_FREQUENCY_LIST_DATA; +typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_FSB_FREQUENCY_DATA; +typedef STRING_REF EFI_PROCESSOR_VERSION_DATA; +typedef STRING_REF EFI_PROCESSOR_MANUFACTURER_DATA; +typedef STRING_REF EFI_PROCESSOR_SERIAL_NUMBER_DATA; +typedef STRING_REF EFI_PROCESSOR_ASSET_TAG_DATA; +typedef STRING_REF EFI_PROCESSOR_PART_NUMBER_DATA; + +typedef struct { + UINT32 ProcessorSteppingId:4; + UINT32 ProcessorModel: 4; + UINT32 ProcessorFamily: 4; + UINT32 ProcessorType: 2; + UINT32 ProcessorReserved1: 2; + UINT32 ProcessorXModel: 4; + UINT32 ProcessorXFamily: 8; + UINT32 ProcessorReserved2: 4; +} EFI_PROCESSOR_SIGNATURE; + + +/// +/// Inconsistent with specification here: +/// The name of third field in ProcSubClass specification 0.9 is LogicalPr= ocessorCount. +/// Keep it unchanged for backward compatibility. +/// +typedef struct { + UINT32 ProcessorBrandIndex :8; + UINT32 ProcessorClflush :8; + UINT32 ProcessorReserved :8; + UINT32 ProcessorDfltApicId :8; +} EFI_PROCESSOR_MISC_INFO; + +typedef struct { + UINT32 ProcessorFpu: 1; + UINT32 ProcessorVme: 1; + UINT32 ProcessorDe: 1; + UINT32 ProcessorPse: 1; + UINT32 ProcessorTsc: 1; + UINT32 ProcessorMsr: 1; + UINT32 ProcessorPae: 1; + UINT32 ProcessorMce: 1; + UINT32 ProcessorCx8: 1; + UINT32 ProcessorApic: 1; + UINT32 ProcessorReserved1: 1; + UINT32 ProcessorSep: 1; + UINT32 ProcessorMtrr: 1; + UINT32 ProcessorPge: 1; + UINT32 ProcessorMca: 1; + UINT32 ProcessorCmov: 1; + UINT32 ProcessorPat: 1; + UINT32 ProcessorPse36: 1; + UINT32 ProcessorPsn: 1; + UINT32 ProcessorClfsh: 1; + UINT32 ProcessorReserved2: 1; + UINT32 ProcessorDs: 1; + UINT32 ProcessorAcpi: 1; + UINT32 ProcessorMmx: 1; + UINT32 ProcessorFxsr: 1; + UINT32 ProcessorSse: 1; + UINT32 ProcessorSse2: 1; + UINT32 ProcessorSs: 1; + UINT32 ProcessorReserved3: 1; + UINT32 ProcessorTm: 1; + UINT32 ProcessorReserved4: 2; +} EFI_PROCESSOR_FEATURE_FLAGS; + +/// +/// This data record refers to the unique ID that identifies a set of proc= essors. This data record is 16 +/// bytes in length. The data in this structure is processor specific and = reserved values can be defined +/// for future use. The consumer of this data should not make any assumpti= on and should use this data +/// with respect to the processor family defined in the Family record numb= er. +/// +typedef struct { + /// + /// Identifies the processor. + /// + EFI_PROCESSOR_SIGNATURE Signature; + /// + /// Provides additional processor information. + /// + EFI_PROCESSOR_MISC_INFO MiscInfo; + /// + /// Reserved for future use. + /// + UINT32 Reserved; + /// + /// Provides additional processor information. + /// + EFI_PROCESSOR_FEATURE_FLAGS FeatureFlags; +} EFI_PROCESSOR_ID_DATA; + +/// +/// This data record refers to the general classification of the processor= . This data record is 4 bytes in +/// length. +/// +typedef enum { + EfiProcessorOther =3D 1, + EfiProcessorUnknown =3D 2, + EfiCentralProcessor =3D 3, + EfiMathProcessor =3D 4, + EfiDspProcessor =3D 5, + EfiVideoProcessor =3D 6 +} EFI_PROCESSOR_TYPE_DATA; + +/// +/// This data record refers to the family of the processor as defined by t= he DMTF. +/// This data record is 4 bytes in length. +/// +typedef enum { + EfiProcessorFamilyOther =3D 0x01, + EfiProcessorFamilyUnknown =3D 0x02, + EfiProcessorFamily8086 =3D 0x03, + EfiProcessorFamily80286 =3D 0x04, + EfiProcessorFamilyIntel386 =3D 0x05, + EfiProcessorFamilyIntel486 =3D 0x06, + EfiProcessorFamily8087 =3D 0x07, + EfiProcessorFamily80287 =3D 0x08, + EfiProcessorFamily80387 =3D 0x09, + EfiProcessorFamily80487 =3D 0x0A, + EfiProcessorFamilyPentium =3D 0x0B, + EfiProcessorFamilyPentiumPro =3D 0x0C, + EfiProcessorFamilyPentiumII =3D 0x0D, + EfiProcessorFamilyPentiumMMX =3D 0x0E, + EfiProcessorFamilyCeleron =3D 0x0F, + EfiProcessorFamilyPentiumIIXeon =3D 0x10, + EfiProcessorFamilyPentiumIII =3D 0x11, + EfiProcessorFamilyM1 =3D 0x12, + EfiProcessorFamilyM2 =3D 0x13, + EfiProcessorFamilyM1Reserved2 =3D 0x14, + EfiProcessorFamilyM1Reserved3 =3D 0x15, + EfiProcessorFamilyM1Reserved4 =3D 0x16, + EfiProcessorFamilyM1Reserved5 =3D 0x17, + EfiProcessorFamilyAmdDuron =3D 0x18, + EfiProcessorFamilyK5 =3D 0x19, + EfiProcessorFamilyK6 =3D 0x1A, + EfiProcessorFamilyK6_2 =3D 0x1B, + EfiProcessorFamilyK6_3 =3D 0x1C, + EfiProcessorFamilyAmdAthlon =3D 0x1D, + EfiProcessorFamilyAmd29000 =3D 0x1E, + EfiProcessorFamilyK6_2Plus =3D 0x1F, + EfiProcessorFamilyPowerPC =3D 0x20, + EfiProcessorFamilyPowerPC601 =3D 0x21, + EfiProcessorFamilyPowerPC603 =3D 0x22, + EfiProcessorFamilyPowerPC603Plus =3D 0x23, + EfiProcessorFamilyPowerPC604 =3D 0x24, + EfiProcessorFamilyPowerPC620 =3D 0x25, + EfiProcessorFamilyPowerPCx704 =3D 0x26, + EfiProcessorFamilyPowerPC750 =3D 0x27, + EfiProcessorFamilyAlpha3 =3D 0x30, + EfiProcessorFamilyAlpha21064 =3D 0x31, + EfiProcessorFamilyAlpha21066 =3D 0x32, + EfiProcessorFamilyAlpha21164 =3D 0x33, + EfiProcessorFamilyAlpha21164PC =3D 0x34, + EfiProcessorFamilyAlpha21164a =3D 0x35, + EfiProcessorFamilyAlpha21264 =3D 0x36, + EfiProcessorFamilyAlpha21364 =3D 0x37, + EfiProcessorFamilyMips =3D 0x40, + EfiProcessorFamilyMIPSR4000 =3D 0x41, + EfiProcessorFamilyMIPSR4200 =3D 0x42, + EfiProcessorFamilyMIPSR4400 =3D 0x43, + EfiProcessorFamilyMIPSR4600 =3D 0x44, + EfiProcessorFamilyMIPSR10000 =3D 0x45, + EfiProcessorFamilySparc =3D 0x50, + EfiProcessorFamilySuperSparc =3D 0x51, + EfiProcessorFamilymicroSparcII =3D 0x52, + EfiProcessorFamilymicroSparcIIep =3D 0x53, + EfiProcessorFamilyUltraSparc =3D 0x54, + EfiProcessorFamilyUltraSparcII =3D 0x55, + EfiProcessorFamilyUltraSparcIIi =3D 0x56, + EfiProcessorFamilyUltraSparcIII =3D 0x57, + /// + /// Inconsistent with specification here: + /// This field in ProcSubClass specification 0.9 is defined as EfiProces= sorFamilyUltraSparcIIi. + /// Change it to EfiProcessorFamilyUltraSparcIIIi to avoid build break. + /// + EfiProcessorFamilyUltraSparcIIIi =3D 0x58, + EfiProcessorFamily68040 =3D 0x60, + EfiProcessorFamily68xxx =3D 0x61, + EfiProcessorFamily68000 =3D 0x62, + EfiProcessorFamily68010 =3D 0x63, + EfiProcessorFamily68020 =3D 0x64, + EfiProcessorFamily68030 =3D 0x65, + EfiProcessorFamilyHobbit =3D 0x70, + EfiProcessorFamilyCrusoeTM5000 =3D 0x78, + EfiProcessorFamilyCrusoeTM3000 =3D 0x79, + EfiProcessorFamilyEfficeonTM8000 =3D 0x7A, + EfiProcessorFamilyWeitek =3D 0x80, + EfiProcessorFamilyItanium =3D 0x82, + EfiProcessorFamilyAmdAthlon64 =3D 0x83, + EfiProcessorFamilyAmdOpteron =3D 0x84, + EfiProcessorFamilyAmdSempron =3D 0x85, + EfiProcessorFamilyAmdTurion64Mobile =3D 0x86, + EfiProcessorFamilyDualCoreAmdOpteron =3D 0x87, + EfiProcessorFamilyAmdAthlon64X2DualCore =3D 0x88, + EfiProcessorFamilyAmdTurion64X2Mobile =3D 0x89, + EfiProcessorFamilyPARISC =3D 0x90, + EfiProcessorFamilyPaRisc8500 =3D 0x91, + EfiProcessorFamilyPaRisc8000 =3D 0x92, + EfiProcessorFamilyPaRisc7300LC =3D 0x93, + EfiProcessorFamilyPaRisc7200 =3D 0x94, + EfiProcessorFamilyPaRisc7100LC =3D 0x95, + EfiProcessorFamilyPaRisc7100 =3D 0x96, + EfiProcessorFamilyV30 =3D 0xA0, + EfiProcessorFamilyPentiumIIIXeon =3D 0xB0, + EfiProcessorFamilyPentiumIIISpeedStep =3D 0xB1, + EfiProcessorFamilyPentium4 =3D 0xB2, + EfiProcessorFamilyIntelXeon =3D 0xB3, + EfiProcessorFamilyAS400 =3D 0xB4, + EfiProcessorFamilyIntelXeonMP =3D 0xB5, + EfiProcessorFamilyAMDAthlonXP =3D 0xB6, + EfiProcessorFamilyAMDAthlonMP =3D 0xB7, + EfiProcessorFamilyIntelItanium2 =3D 0xB8, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelPentiumM =3D 0xB9, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelCeleronD =3D 0xBA, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelPentiumD =3D 0xBB, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelPentiumEx =3D 0xBC, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelCoreSolo =3D 0xBD, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyReserved =3D 0xBE, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIntelCore2 =3D 0xBF, + EfiProcessorFamilyIBM390 =3D 0xC8, + EfiProcessorFamilyG4 =3D 0xC9, + EfiProcessorFamilyG5 =3D 0xCA, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's i= ntroduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyG6 =3D 0xCB, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyzArchitectur =3D 0xCC, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyViaC7M =3D 0xD2, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyViaC7D =3D 0xD3, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyViaC7 =3D 0xD4, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyViaEden =3D 0xD5, + EfiProcessorFamilyi860 =3D 0xFA, + EfiProcessorFamilyi960 =3D 0xFB, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyIndicatorFamily2 =3D 0xFE, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorFamilyReserved1 =3D 0xFF +} EFI_PROCESSOR_FAMILY_DATA; + +typedef enum { + EfiProcessorFamilySh3 =3D 0x104, + EfiProcessorFamilySh4 =3D 0x105, + EfiProcessorFamilyArm =3D 0x118, + EfiProcessorFamilyStrongArm =3D 0x119, + EfiProcessorFamily6x86 =3D 0x12C, + EfiProcessorFamilyMediaGx =3D 0x12D, + EfiProcessorFamilyMii =3D 0x12E, + EfiProcessorFamilyWinChip =3D 0x140, + EfiProcessorFamilyDsp =3D 0x15E, + EfiProcessorFamilyVideo =3D 0x1F4 +} EFI_PROCESSOR_FAMILY2_DATA; + +/// +/// This data record refers to the core voltage of the processor being def= ined. The unit of measurement +/// of this data record is in volts. +/// +typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_VOLTAGE_DATA; + +/// +/// This data record refers to the base address of the APIC of the process= or being defined. This data +/// record is a physical address location. +/// +typedef EFI_PHYSICAL_ADDRESS EFI_PROCESSOR_APIC_BASE_ADDRESS_DATA; + +/// +/// This data record refers to the ID of the APIC of the processor being d= efined. This data record is a +/// 4-byte entry. +/// +typedef UINT32 EFI_PROCESSOR_APIC_ID_DATA; + +/// +/// This data record refers to the version number of the APIC of the proce= ssor being defined. This data +/// record is a 4-byte entry. +/// +typedef UINT32 EFI_PROCESSOR_APIC_VERSION_NUMBER_DATA; + +typedef enum { + EfiProcessorIa32Microcode =3D 1, + EfiProcessorIpfPalAMicrocode =3D 2, + EfiProcessorIpfPalBMicrocode =3D 3 +} EFI_PROCESSOR_MICROCODE_TYPE; + +/// +/// This data record refers to the revision of the processor microcode tha= t is loaded in the processor. +/// This data record is a 4-byte entry. +/// +typedef struct { + /// + /// Identifies what type of microcode the data is. + /// + EFI_PROCESSOR_MICROCODE_TYPE ProcessorMicrocodeType; + /// + /// Indicates the revision number of this microcode. + /// + UINT32 ProcessorMicrocodeRevisionNumber; +} EFI_PROCESSOR_MICROCODE_REVISION_DATA; + +/// +/// This data record refers to the status of the processor. +/// +typedef struct { + UINT32 CpuStatus :3; ///< Indicates the status of = the processor. + UINT32 Reserved1 :3; ///< Reserved for future use.= Should be set to zero. + UINT32 SocketPopulated :1; ///< Indicates if the process= or is socketed or not. + UINT32 Reserved2 :1; ///< Reserved for future use.= Should be set to zero. + UINT32 ApicEnable :1; ///< Indicates if the APIC is= enabled or not. + UINT32 BootApplicationProcessor :1; ///< Indicates if this proces= sor is the boot processor. + UINT32 Reserved3 :22;///< Reserved for future use.= Should be set to zero. +} EFI_PROCESSOR_STATUS_DATA; + +typedef enum { + EfiCpuStatusUnknown =3D 0, + EfiCpuStatusEnabled =3D 1, + EfiCpuStatusDisabledByUser =3D 2, + EfiCpuStatusDisabledbyBios =3D 3, + EfiCpuStatusIdle =3D 4, + EfiCpuStatusOther =3D 7 +} EFI_CPU_STATUS; + +typedef enum { + EfiProcessorSocketOther =3D 1, + EfiProcessorSocketUnknown =3D 2, + EfiProcessorSocketDaughterBoard =3D 3, + EfiProcessorSocketZIF =3D 4, + EfiProcessorSocketReplacePiggyBack =3D 5, + EfiProcessorSocketNone =3D 6, + EfiProcessorSocketLIF =3D 7, + EfiProcessorSocketSlot1 =3D 8, + EfiProcessorSocketSlot2 =3D 9, + EfiProcessorSocket370Pin =3D 0xA, + EfiProcessorSocketSlotA =3D 0xB, + EfiProcessorSocketSlotM =3D 0xC, + EfiProcessorSocket423 =3D 0xD, + EfiProcessorSocketA462 =3D 0xE, + EfiProcessorSocket478 =3D 0xF, + EfiProcessorSocket754 =3D 0x10, + EfiProcessorSocket940 =3D 0x11, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorSocket939 =3D 0x12, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorSocketmPGA604 =3D 0x13, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorSocketLGA771 =3D 0x14, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in ProcSubClass specification 0.9. It's in= troduced for SMBIOS2.6 specification. + /// + EfiProcessorSocketLGA775 =3D 0x15 + +} EFI_PROCESSOR_SOCKET_TYPE_DATA; + +typedef STRING_REF EFI_PROCESSOR_SOCKET_NAME_DATA; + +/// +/// Inconsistent with specification here: +/// In ProcSubclass specification 0.9, the naming is EFI_PROCESSOR_CACHE_A= SSOCIATION_DATA. +/// Keep it unchanged for backward compatibilty. +/// +typedef EFI_INTER_LINK_DATA EFI_CACHE_ASSOCIATION_DATA; + +/// +/// This data record refers to the health status of the processor. +/// +/// Inconsistent with specification here: +/// In ProcSubclass specification 0.9, the naming is EFI_PROCESSOR_HEALTH_= STATUS_DATA. +/// Keep it unchanged for backward compatibilty. +/// +typedef enum { + EfiProcessorHealthy =3D 1, + EfiProcessorPerfRestricted =3D 2, + EfiProcessorFuncRestricted =3D 3 +} EFI_PROCESSOR_HEALTH_STATUS; + +/// +/// This data record refers to the package number of this processor. Multi= ple logical processors can +/// exist in a system and each logical processor can be correlated to the = physical processor using this +/// record type. +/// +typedef UINTN EFI_PROCESSOR_PACKAGE_NUMBER_DATA; + +typedef UINT8 EFI_PROCESSOR_CORE_COUNT_DATA; +typedef UINT8 EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA; +typedef UINT8 EFI_PROCESSOR_THREAD_COUNT_DATA; + +typedef struct { + UINT16 Reserved :1; + UINT16 Unknown :1; + UINT16 Capable64Bit :1; + UINT16 Reserved2 :13; +} EFI_PROCESSOR_CHARACTERISTICS_DATA; + +/// +/// Inconsistent with specification here: +/// In ProcSubclass specification 0.9, the enumeration type data structure= is NOT defined. +/// The equivalent in specification is +/// #define EFI_PROCESSOR_FREQUENCY_RECORD_NUMBER 0x00000001 +/// #define EFI_PROCESSOR_BUS_FREQUENCY_RECORD_NUMBER 0x00000002 +/// #define EFI_PROCESSOR_VERSION_RECORD_NUMBER 0x00000003 +/// #define EFI_PROCESSOR_MANUFACTURER_RECORD_NUMBER 0x00000004 +/// #define EFI_PROCESSOR_SERIAL_NUMBER_RECORD_NUMBER 0x00000005 +/// #define EFI_PROCESSOR_ID_RECORD_NUMBER 0x00000006 +/// #define EFI_PROCESSOR_TYPE_RECORD_NUMBER 0x00000007 +/// #define EFI_PROCESSOR_FAMILY_RECORD_NUMBER 0x00000008 +/// #define EFI_PROCESSOR_VOLTAGE_RECORD_NUMBER 0x00000009 +/// #define EFI_PROCESSOR_APIC_BASE_ADDRESS_RECORD_NUMBER 0x0000000A +/// #define EFI_PROCESSOR_APIC_ID_RECORD_NUMBER 0x0000000B +/// #define EFI_PROCESSOR_APIC_VER_NUMBER_RECORD_NUMBER 0x0000000C +/// #define EFI_PROCESSOR_MICROCODE_REVISION_RECORD_NUMBER 0x0000000D +/// #define EFI_PROCESSOR_STATUS_RECORD_NUMBER 0x0000000E +/// #define EFI_PROCESSOR_SOCKET_TYPE_RECORD_NUMBER 0x0000000F +/// #define EFI_PROCESSOR_SOCKET_NAME_RECORD_NUMBER 0x00000010 +/// #define EFI_PROCESSOR_CACHE_ASSOCIATION_RECORD_NUMBER 0x00000011 +/// #define EFI_PROCESSOR_MAX_FREQUENCY_RECORD_NUMBER 0x00000012 +/// #define EFI_PROCESSOR_ASSET_TAG_RECORD_NUMBER 0x00000013 +/// #define EFI_PROCESSOR_MAX_FSB_FREQUENCY_RECORD_NUMBER 0x00000014 +/// #define EFI_PROCESSOR_PACKAGE_NUMBER_RECORD_NUMBER 0x00000015 +/// #define EFI_PROCESSOR_FREQUENCY_LIST_RECORD_NUMBER 0x00000016 +/// #define EFI_PROCESSOR_FSB_FREQUENCY_LIST_RECORD_NUMBER 0x00000017 +/// #define EFI_PROCESSOR_HEALTH_STATUS_RECORD_NUMBER 0x00000018 +/// +/// Keep the definition unchanged for backward compatibility. +typedef enum { + ProcessorCoreFrequencyRecordType =3D 1, + ProcessorFsbFrequencyRecordType =3D 2, + ProcessorVersionRecordType =3D 3, + ProcessorManufacturerRecordType =3D 4, + ProcessorSerialNumberRecordType =3D 5, + ProcessorIdRecordType =3D 6, + ProcessorTypeRecordType =3D 7, + ProcessorFamilyRecordType =3D 8, + ProcessorVoltageRecordType =3D 9, + ProcessorApicBaseAddressRecordType =3D 10, + ProcessorApicIdRecordType =3D 11, + ProcessorApicVersionNumberRecordType =3D 12, + CpuUcodeRevisionDataRecordType =3D 13, + ProcessorStatusRecordType =3D 14, + ProcessorSocketTypeRecordType =3D 15, + ProcessorSocketNameRecordType =3D 16, + CacheAssociationRecordType =3D 17, + ProcessorMaxCoreFrequencyRecordType =3D 18, + ProcessorAssetTagRecordType =3D 19, + ProcessorMaxFsbFrequencyRecordType =3D 20, + ProcessorPackageNumberRecordType =3D 21, + ProcessorCoreFrequencyListRecordType =3D 22, + ProcessorFsbFrequencyListRecordType =3D 23, + ProcessorHealthStatusRecordType =3D 24, + ProcessorCoreCountRecordType =3D 25, + ProcessorEnabledCoreCountRecordType =3D 26, + ProcessorThreadCountRecordType =3D 27, + ProcessorCharacteristicsRecordType =3D 28, + ProcessorFamily2RecordType =3D 29, + ProcessorPartNumberRecordType =3D 30, +} EFI_CPU_VARIABLE_RECORD_TYPE; + +/// +/// Inconsistent with specification here: +/// In ProcSubclass specification 0.9, the union type data structure is NO= T defined. +/// It's implementation-specific to simplify the code logic. +/// +typedef union { + EFI_PROCESSOR_CORE_FREQUENCY_LIST_DATA ProcessorCoreFrequencyList; + EFI_PROCESSOR_FSB_FREQUENCY_LIST_DATA ProcessorFsbFrequencyList; + EFI_PROCESSOR_SERIAL_NUMBER_DATA ProcessorSerialNumber; + EFI_PROCESSOR_CORE_FREQUENCY_DATA ProcessorCoreFrequency; + EFI_PROCESSOR_FSB_FREQUENCY_DATA ProcessorFsbFrequency; + EFI_PROCESSOR_MAX_CORE_FREQUENCY_DATA ProcessorMaxCoreFrequency; + EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA ProcessorMaxFsbFrequency; + EFI_PROCESSOR_VERSION_DATA ProcessorVersion; + EFI_PROCESSOR_MANUFACTURER_DATA ProcessorManufacturer; + EFI_PROCESSOR_ID_DATA ProcessorId; + EFI_PROCESSOR_TYPE_DATA ProcessorType; + EFI_PROCESSOR_FAMILY_DATA ProcessorFamily; + EFI_PROCESSOR_VOLTAGE_DATA ProcessorVoltage; + EFI_PROCESSOR_APIC_BASE_ADDRESS_DATA ProcessorApicBase; + EFI_PROCESSOR_APIC_ID_DATA ProcessorApicId; + EFI_PROCESSOR_APIC_VERSION_NUMBER_DATA ProcessorApicVersionNumber; + EFI_PROCESSOR_MICROCODE_REVISION_DATA CpuUcodeRevisionData; + EFI_PROCESSOR_STATUS_DATA ProcessorStatus; + EFI_PROCESSOR_SOCKET_TYPE_DATA ProcessorSocketType; + EFI_PROCESSOR_SOCKET_NAME_DATA ProcessorSocketName; + EFI_PROCESSOR_ASSET_TAG_DATA ProcessorAssetTag; + EFI_PROCESSOR_PART_NUMBER_DATA ProcessorPartNumber; + EFI_PROCESSOR_HEALTH_STATUS ProcessorHealthStatus; + EFI_PROCESSOR_PACKAGE_NUMBER_DATA ProcessorPackageNumber; + EFI_PROCESSOR_CORE_COUNT_DATA ProcessorCoreCount; + EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA ProcessorEnabledCoreCount; + EFI_PROCESSOR_THREAD_COUNT_DATA ProcessorThreadCount; + EFI_PROCESSOR_CHARACTERISTICS_DATA ProcessorCharacteristics; + EFI_PROCESSOR_FAMILY2_DATA ProcessorFamily2; +} EFI_CPU_VARIABLE_RECORD; + +typedef struct { + EFI_SUBCLASS_TYPE1_HEADER DataRecordHeader; + EFI_CPU_VARIABLE_RECORD VariableRecord; +} EFI_CPU_DATA_RECORD; + +#define EFI_CACHE_SUBCLASS_VERSION 0x00010000 + +typedef EFI_EXP_BASE2_DATA EFI_CACHE_SIZE_DATA; +/// +/// Inconsistent with specification here: +/// In CacheSubclass specification 0.9, the naming is EFI_CACHE_MAXIMUM_SI= ZE_DATA. +/// Keep it unchanged for backward compatibilty. +/// +typedef EFI_EXP_BASE2_DATA EFI_MAXIMUM_CACHE_SIZE_DATA; +typedef EFI_EXP_BASE10_DATA EFI_CACHE_SPEED_DATA; +typedef STRING_REF EFI_CACHE_SOCKET_DATA; + +typedef struct { + UINT32 Other :1; + UINT32 Unknown :1; + UINT32 NonBurst :1; + UINT32 Burst :1; + UINT32 PipelineBurst :1; + /// + /// Inconsistent between CacheSubclass 0.9 and SMBIOS specifications her= e: + /// In CacheSubclass specification 0.9, the sequence of Asynchronous and= Synchronous fileds + /// are opposite to SMBIOS specification. + /// + UINT32 Asynchronous :1; + UINT32 Synchronous :1; + UINT32 Reserved :25; +} EFI_CACHE_SRAM_TYPE_DATA; + +typedef EFI_CACHE_SRAM_TYPE_DATA EFI_CACHE_SRAM_INSTALL_DATA; + +typedef enum { + EfiCacheErrorOther =3D 1, + EfiCacheErrorUnknown =3D 2, + EfiCacheErrorNone =3D 3, + EfiCacheErrorParity =3D 4, + EfiCacheErrorSingleBit =3D 5, + EfiCacheErrorMultiBit =3D 6 +} EFI_CACHE_ERROR_TYPE_DATA; + +typedef enum { + EfiCacheTypeOther =3D 1, + EfiCacheTypeUnknown =3D 2, + EfiCacheTypeInstruction =3D 3, + EfiCacheTypeData =3D 4, + EfiCacheTypeUnified =3D 5 +} EFI_CACHE_TYPE_DATA; + +typedef enum { + EfiCacheAssociativityOther =3D 1, + EfiCacheAssociativityUnknown =3D 2, + EfiCacheAssociativityDirectMapped =3D 3, + EfiCacheAssociativity2Way =3D 4, + EfiCacheAssociativity4Way =3D 5, + EfiCacheAssociativityFully =3D 6, + EfiCacheAssociativity8Way =3D 7, + EfiCacheAssociativity16Way =3D 8 +} EFI_CACHE_ASSOCIATIVITY_DATA; + +/// +/// Inconsistent with specification here: +/// In CacheSubclass 0.9 specification. It defines the field type as UINT1= 6. +/// In fact, it should be UINT32 type because it refers to a 32bit width d= ata. +/// +typedef struct { + UINT32 Level :3; + UINT32 Socketed :1; + UINT32 Reserved2 :1; + UINT32 Location :2; + UINT32 Enable :1; + UINT32 OperationalMode :2; + UINT32 Reserved1 :22; +} EFI_CACHE_CONFIGURATION_DATA; + +#define EFI_CACHE_L1 1 +#define EFI_CACHE_L2 2 +#define EFI_CACHE_L3 3 +#define EFI_CACHE_L4 4 +#define EFI_CACHE_LMAX EFI_CACHE_L4 + +#define EFI_CACHE_SOCKETED 1 +#define EFI_CACHE_NOT_SOCKETED 0 + +typedef enum { + EfiCacheInternal =3D 0, + EfiCacheExternal =3D 1, + EfiCacheReserved =3D 2, + EfiCacheUnknown =3D 3 +} EFI_CACHE_LOCATION; + +#define EFI_CACHE_ENABLED 1 +#define EFI_CACHE_DISABLED 0 + +typedef enum { + EfiCacheWriteThrough =3D 0, + EfiCacheWriteBack =3D 1, + EfiCacheDynamicMode =3D 2, + EfiCacheUnknownMode =3D 3 +} EFI_CACHE_OPERATIONAL_MODE; + + +/// +/// Inconsistent with specification here: +/// In CacheSubclass specification 0.9, the enumeration type data structur= e is NOT defined. +/// The equivalent in specification is +/// #define EFI_CACHE_SIZE_RECORD_NUMBER 0x00000001 +/// #define EFI_CACHE_MAXIMUM_SIZE_RECORD_NUMBER 0x00000002 +/// #define EFI_CACHE_SPEED_RECORD_NUMBER 0x00000003 +/// #define EFI_CACHE_SOCKET_RECORD_NUMBER 0x00000004 +/// #define EFI_CACHE_SRAM_SUPPORT_RECORD_NUMBER 0x00000005 +/// #define EFI_CACHE_SRAM_INSTALL_RECORD_NUMBER 0x00000006 +/// #define EFI_CACHE_ERROR_SUPPORT_RECORD_NUMBER 0x00000007 +/// #define EFI_CACHE_TYPE_RECORD_NUMBER 0x00000008 +/// #define EFI_CACHE_ASSOCIATIVITY_RECORD_NUMBER 0x00000009 +/// #define EFI_CACHE_CONFIGURATION_RECORD_NUMBER 0x0000000A +/// Keep the definition unchanged for backward compatibility. +/// +typedef enum { + CacheSizeRecordType =3D 1, + MaximumSizeCacheRecordType =3D 2, + CacheSpeedRecordType =3D 3, + CacheSocketRecordType =3D 4, + CacheSramTypeRecordType =3D 5, + CacheInstalledSramTypeRecordType =3D 6, + CacheErrorTypeRecordType =3D 7, + CacheTypeRecordType =3D 8, + CacheAssociativityRecordType =3D 9, + CacheConfigRecordType =3D 10 +} EFI_CACHE_VARIABLE_RECORD_TYPE; + +/// +/// Inconsistent with specification here: +/// In CacheSubclass specification 0.9, the union type data structure is N= OT defined. +/// It's implementation-specific to simplify the code logic. +/// +typedef union { + EFI_CACHE_SIZE_DATA CacheSize; + EFI_MAXIMUM_CACHE_SIZE_DATA MaximumCacheSize; + EFI_CACHE_SPEED_DATA CacheSpeed; + EFI_CACHE_SOCKET_DATA CacheSocket; + EFI_CACHE_SRAM_TYPE_DATA CacheSramType; + EFI_CACHE_SRAM_TYPE_DATA CacheInstalledSramType; + EFI_CACHE_ERROR_TYPE_DATA CacheErrorType; + EFI_CACHE_TYPE_DATA CacheType; + EFI_CACHE_ASSOCIATIVITY_DATA CacheAssociativity; + EFI_CACHE_CONFIGURATION_DATA CacheConfig; + EFI_CACHE_ASSOCIATION_DATA CacheAssociation; +} EFI_CACHE_VARIABLE_RECORD; + +typedef struct { + EFI_SUBCLASS_TYPE1_HEADER DataRecordHeader; + EFI_CACHE_VARIABLE_RECORD VariableRecord; +} EFI_CACHE_DATA_RECORD; + +#define EFI_MEMORY_SUBCLASS_VERSION 0x0100 +#define EFI_MEMORY_SIZE_RECORD_NUMBER 0x00000001 + +typedef enum _EFI_MEMORY_REGION_TYPE { + EfiMemoryRegionMemory =3D 0x01, + EfiMemoryRegionReserved =3D 0x02, + EfiMemoryRegionAcpi =3D 0x03, + EfiMemoryRegionNvs =3D 0x04 +} EFI_MEMORY_REGION_TYPE; + +/// +/// This data record refers to the size of a memory region. The regions th= at are +/// described can refer to physical memory, memory-mapped I/O, or reserved= BIOS memory regions. +/// The unit of measurement of this data record is in bytes. +/// +typedef struct { + /// + /// A zero-based value that indicates which processor(s) can access the = memory region. + /// A value of 0xFFFF indicates the region is accessible by all processo= rs. + /// + UINT32 ProcessorNumber; + /// + /// A zero-based value that indicates the starting bus that can access t= he memory region. + /// + UINT16 StartBusNumber; + /// + /// A zero-based value that indicates the ending bus that can access the= memory region. + /// A value of 0xFF for a PCI system indicates the region is accessible = by all buses and + /// is global in scope. An example of the EndBusNumber not being 0xFF is= a system + /// with two or more peer-to-host PCI bridges. + /// + UINT16 EndBusNumber; + /// + /// The type of memory region from the operating system's point of view. + /// MemoryRegionType values are equivalent to the legacy INT 15 AX =3D E= 820 BIOS + /// command values. + /// + EFI_MEMORY_REGION_TYPE MemoryRegionType; + /// + /// The size of the memory region in bytes. + /// + EFI_EXP_BASE2_DATA MemorySize; + /// + /// The starting physical address of the memory region. + /// + EFI_PHYSICAL_ADDRESS MemoryStartAddress; +} EFI_MEMORY_SIZE_DATA; + + +#define EFI_MEMORY_ARRAY_LOCATION_RECORD_NUMBER 0x00000002 + +typedef enum _EFI_MEMORY_ARRAY_LOCATION { + EfiMemoryArrayLocationOther =3D 0x01, + EfiMemoryArrayLocationUnknown =3D 0x02, + EfiMemoryArrayLocationSystemBoard =3D 0x03, + EfiMemoryArrayLocationIsaAddonCard =3D 0x04, + EfiMemoryArrayLocationEisaAddonCard =3D 0x05, + EfiMemoryArrayLocationPciAddonCard =3D 0x06, + EfiMemoryArrayLocationMcaAddonCard =3D 0x07, + EfiMemoryArrayLocationPcmciaAddonCard =3D 0x08, + EfiMemoryArrayLocationProprietaryAddonCard =3D 0x09, + EfiMemoryArrayLocationNuBus =3D 0x0A, + EfiMemoryArrayLocationPc98C20AddonCard =3D 0xA0, + EfiMemoryArrayLocationPc98C24AddonCard =3D 0xA1, + EfiMemoryArrayLocationPc98EAddonCard =3D 0xA2, + EfiMemoryArrayLocationPc98LocalBusAddonCard =3D 0xA3 +} EFI_MEMORY_ARRAY_LOCATION; + +typedef enum _EFI_MEMORY_ARRAY_USE { + EfiMemoryArrayUseOther =3D 0x01, + EfiMemoryArrayUseUnknown =3D 0x02, + EfiMemoryArrayUseSystemMemory =3D 0x03, + EfiMemoryArrayUseVideoMemory =3D 0x04, + EfiMemoryArrayUseFlashMemory =3D 0x05, + EfiMemoryArrayUseNonVolatileRam =3D 0x06, + EfiMemoryArrayUseCacheMemory =3D 0x07 +} EFI_MEMORY_ARRAY_USE; + +typedef enum _EFI_MEMORY_ERROR_CORRECTION { + EfiMemoryErrorCorrectionOther =3D 0x01, + EfiMemoryErrorCorrectionUnknown =3D 0x02, + EfiMemoryErrorCorrectionNone =3D 0x03, + EfiMemoryErrorCorrectionParity =3D 0x04, + EfiMemoryErrorCorrectionSingleBitEcc =3D 0x05, + EfiMemoryErrorCorrectionMultiBitEcc =3D 0x06, + EfiMemoryErrorCorrectionCrc =3D 0x07 +} EFI_MEMORY_ERROR_CORRECTION; + +/// +/// This data record refers to the physical memory array. This data record= is a structure. +/// The type definition structure for EFI_MEMORY_ARRAY_LOCATION_DATA is in= SMBIOS 2.3.4: +/// - Table 3.3.17.1, Type 16, Offset 0x4 +/// - Table 3.3.17.2, Type 16, Offset 0x5 +/// - Table 3.3.17.3, Type 16, with the following offsets: +/// -- Offset 0x6 +/// -- Offset 0x7 +/// -- Offset 0xB +/// -- Offset 0xD +/// +typedef struct { + /// + /// The physical location of the memory array. + /// + EFI_MEMORY_ARRAY_LOCATION MemoryArrayLocation; + /// + /// The memory array usage. + /// + EFI_MEMORY_ARRAY_USE MemoryArrayUse; + /// + /// The primary error correction or detection supported by this memory a= rray. + /// + EFI_MEMORY_ERROR_CORRECTION MemoryErrorCorrection; + /// + /// The maximum memory capacity size in kilobytes. If capacity is unknow= n, then + /// values of MaximumMemoryCapacity.Value =3D 0x00 and + /// MaximumMemoryCapacity.Exponent =3D 0x8000 are used. + /// + EFI_EXP_BASE2_DATA MaximumMemoryCapacity; + /// + /// The number of memory slots or sockets that are available for memory = devices + /// in this array. + /// + UINT16 NumberMemoryDevices; +} EFI_MEMORY_ARRAY_LOCATION_DATA; + + +#define EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER 0x00000003 + +typedef enum _EFI_MEMORY_FORM_FACTOR { + EfiMemoryFormFactorOther =3D 0x01, + EfiMemoryFormFactorUnknown =3D 0x02, + EfiMemoryFormFactorSimm =3D 0x03, + EfiMemoryFormFactorSip =3D 0x04, + EfiMemoryFormFactorChip =3D 0x05, + EfiMemoryFormFactorDip =3D 0x06, + EfiMemoryFormFactorZip =3D 0x07, + EfiMemoryFormFactorProprietaryCard =3D 0x08, + EfiMemoryFormFactorDimm =3D 0x09, + EfiMemoryFormFactorTsop =3D 0x0A, + EfiMemoryFormFactorRowOfChips =3D 0x0B, + EfiMemoryFormFactorRimm =3D 0x0C, + EfiMemoryFormFactorSodimm =3D 0x0D, + EfiMemoryFormFactorSrimm =3D 0x0E, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in MemSubClass specification 0.9. It's int= roduced for SMBIOS2.6 specification. + /// + EfiMemoryFormFactorFbDimm =3D 0x0F +} EFI_MEMORY_FORM_FACTOR; + +typedef enum _EFI_MEMORY_ARRAY_TYPE { + EfiMemoryTypeOther =3D 0x01, + EfiMemoryTypeUnknown =3D 0x02, + EfiMemoryTypeDram =3D 0x03, + EfiMemoryTypeEdram =3D 0x04, + EfiMemoryTypeVram =3D 0x05, + EfiMemoryTypeSram =3D 0x06, + EfiMemoryTypeRam =3D 0x07, + EfiMemoryTypeRom =3D 0x08, + EfiMemoryTypeFlash =3D 0x09, + EfiMemoryTypeEeprom =3D 0x0A, + EfiMemoryTypeFeprom =3D 0x0B, + EfiMemoryTypeEprom =3D 0x0C, + EfiMemoryTypeCdram =3D 0x0D, + EfiMemoryType3Dram =3D 0x0E, + EfiMemoryTypeSdram =3D 0x0F, + EfiMemoryTypeSgram =3D 0x10, + EfiMemoryTypeRdram =3D 0x11, + EfiMemoryTypeDdr =3D 0x12, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in MemSubClass specification 0.9. It's int= roduced for SMBIOS2.6 specification. + /// + EfiMemoryTypeDdr2 =3D 0x13, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in MemSubClass specification 0.9. It's int= roduced for SMBIOS2.6 specification. + /// + EfiMemoryTypeDdr2FbDimm =3D 0x14 +} EFI_MEMORY_ARRAY_TYPE; + +typedef struct { + UINT32 Reserved :1; + UINT32 Other :1; + UINT32 Unknown :1; + UINT32 FastPaged :1; + UINT32 StaticColumn :1; + UINT32 PseudoStatic :1; + UINT32 Rambus :1; + UINT32 Synchronous :1; + UINT32 Cmos :1; + UINT32 Edo :1; + UINT32 WindowDram :1; + UINT32 CacheDram :1; + UINT32 Nonvolatile :1; + UINT32 Reserved1 :19; +} EFI_MEMORY_TYPE_DETAIL; + +typedef enum { + EfiMemoryStateEnabled =3D 0, + EfiMemoryStateUnknown =3D 1, + EfiMemoryStateUnsupported =3D 2, + EfiMemoryStateError =3D 3, + EfiMemoryStateAbsent =3D 4, + EfiMemoryStateDisabled =3D 5, + /// + /// Inconsistent with specification here: + /// This field is NOT defined in MemSubClass specification 0.9. It's int= roduced for SMBIOS2.6 specification. + /// + EfiMemoryStatePartial =3D 6 +} EFI_MEMORY_STATE; + +/// +/// This data record describes a memory device. This data record is a stru= cture. +/// The type definition structure for EFI_MEMORY_ARRAY_LINK_DATA is in SMB= IOS 2.3.4. +/// +typedef struct { + /// + /// A string that identifies the physically labeled socket or board posi= tion where the + /// memory device is located. + /// + STRING_REF MemoryDeviceLocator; + /// + /// A string denoting the physically labeled bank where the memory devic= e is located. + /// + STRING_REF MemoryBankLocator; + /// + /// A string denoting the memory manufacturer. + /// + STRING_REF MemoryManufacturer; + /// + /// A string denoting the serial number of the memory device. + /// + STRING_REF MemorySerialNumber; + /// + /// The asset tag of the memory device. + /// + STRING_REF MemoryAssetTag; + /// + /// A string denoting the part number of the memory device. + /// + STRING_REF MemoryPartNumber; + /// + /// A link to a memory array structure set. + /// + EFI_INTER_LINK_DATA MemoryArrayLink; + /// + /// A link to a memory array structure set. + /// + EFI_INTER_LINK_DATA MemorySubArrayLink; + /// + /// The total width in bits of this memory device. If there are no error= correcting bits, + /// then the total width equals the data width. If the width is unknown,= then set the field + /// to 0xFFFF. + /// + UINT16 MemoryTotalWidth; + /// + /// The data width in bits of the memory device. A data width of 0x00 an= d a total width + /// of 0x08 indicate that the device is used solely for error correction. + /// + UINT16 MemoryDataWidth; + /// + /// The size in bytes of the memory device. A value of 0x00 denotes that= no device is + /// installed, while a value of all Fs denotes that the size is not know= n. + /// + EFI_EXP_BASE2_DATA MemoryDeviceSize; + /// + /// The form factor of the memory device. + /// + EFI_MEMORY_FORM_FACTOR MemoryFormFactor; + /// + /// A memory device set that must be populated with all devices of the s= ame type and + /// size. A value of 0x00 indicates that the device is not part of any s= et. A value of 0xFF + /// indicates that the attribute is unknown. Any other value denotes the= set number. + /// + UINT8 MemoryDeviceSet; + /// + /// The memory type in the socket. + /// + EFI_MEMORY_ARRAY_TYPE MemoryType; + /// + /// The memory type details. + /// + EFI_MEMORY_TYPE_DETAIL MemoryTypeDetail; + /// + /// The memory speed in megahertz (MHz). A value of 0x00 denotes that + /// the speed is unknown. + /// Inconsistent with specification here: + /// In MemSubclass specification 0.9, the naming is MemoryTypeSpeed. + /// Keep it unchanged for backward compatibilty. + /// + EFI_EXP_BASE10_DATA MemorySpeed; + /// + /// The memory state. + /// + EFI_MEMORY_STATE MemoryState; +} EFI_MEMORY_ARRAY_LINK_DATA; + + +#define EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER 0x00000004 + +/// +/// This data record refers to a specified physical memory array associate= d with +/// a given memory range. +/// +typedef struct { + /// + /// The starting physical address in bytes of memory mapped to a specifi= ed physical + /// memory array. + /// + EFI_PHYSICAL_ADDRESS MemoryArrayStartAddress; + /// + /// The last physical address in bytes of memory mapped to a specified p= hysical memory + /// array. + /// + EFI_PHYSICAL_ADDRESS MemoryArrayEndAddress; + /// + /// See Physical Memory Array (Type 16) for physical memory array struct= ures. + /// + EFI_INTER_LINK_DATA PhysicalMemoryArrayLink; + /// + /// The number of memory devices that form a single row of memory for th= e address + /// partition. + /// + UINT16 MemoryArrayPartitionWidth; +} EFI_MEMORY_ARRAY_START_ADDRESS_DATA; + + +#define EFI_MEMORY_DEVICE_START_ADDRESS_RECORD_NUMBER 0x00000005 + +/// +/// This data record refers to a physical memory device that is associated= with +/// a given memory range. +/// +typedef struct { + /// + /// The starting physical address that is associated with the device. + /// + EFI_PHYSICAL_ADDRESS MemoryDeviceStartAddress; + /// + /// The ending physical address that is associated with the device. + /// + EFI_PHYSICAL_ADDRESS MemoryDeviceEndAddress; + /// + /// A link to the memory device data structure. + /// + EFI_INTER_LINK_DATA PhysicalMemoryDeviceLink; + /// + /// A link to the memory array data structure. + /// + EFI_INTER_LINK_DATA PhysicalMemoryArrayLink; + /// + /// The position of the memory device in a row. A value of 0x00 is reser= ved and a value + /// of 0xFF indicates that the position is unknown. + /// + UINT8 MemoryDevicePartitionRowPosition; + /// + /// The position of the device in an interleave. + /// + UINT8 MemoryDeviceInterleavePosition; + /// + /// The maximum number of consecutive rows from the device that are acce= ssed in a + /// single interleave transfer. A value of 0x00 indicates that the devic= e is not interleaved + /// and a value of 0xFF indicates that the interleave configuration is u= nknown. + /// + UINT8 MemoryDeviceInterleaveDataDepth; +} EFI_MEMORY_DEVICE_START_ADDRESS_DATA; + + +// +// Memory. Channel Device Type - SMBIOS Type 37 +// + +#define EFI_MEMORY_CHANNEL_TYPE_RECORD_NUMBER 0x00000006 + +typedef enum _EFI_MEMORY_CHANNEL_TYPE { + EfiMemoryChannelTypeOther =3D 1, + EfiMemoryChannelTypeUnknown =3D 2, + EfiMemoryChannelTypeRambus =3D 3, + EfiMemoryChannelTypeSyncLink =3D 4 +} EFI_MEMORY_CHANNEL_TYPE; + +/// +/// This data record refers the type of memory that is associated with the= channel. This data record is a +/// structure. +/// The type definition structure for EFI_MEMORY_CHANNEL_TYPE_DATA is in S= MBIOS 2.3.4, +/// Table 3.3.38, Type 37, with the following offsets: +/// - Offset 0x4 +/// - Offset 0x5 +/// - Offset 0x6 +/// +typedef struct { + /// + /// The type of memory that is associated with the channel. + /// + EFI_MEMORY_CHANNEL_TYPE MemoryChannelType; + /// + /// The maximum load that is supported by the channel. + /// + UINT8 MemoryChannelMaximumLoad; + /// + /// The number of memory devices on this channel. + /// + UINT8 MemoryChannelDeviceCount; +} EFI_MEMORY_CHANNEL_TYPE_DATA; + +#define EFI_MEMORY_CHANNEL_DEVICE_RECORD_NUMBER 0x00000007 + +/// +/// This data record refers to the memory device that is associated with t= he memory channel. This data +/// record is a structure. +/// The type definition structure for EFI_MEMORY_CHANNEL_DEVICE_DATA is in= SMBIOS 2.3.4, +/// Table 3.3.38, Type 37, with the following offsets: +/// - Offset 0x7 +/// - Offset 0x8 +/// +typedef struct { + /// + /// A number between one and MemoryChannelDeviceCount plus an arbitrary = base. + /// + UINT8 DeviceId; + /// + /// The Link of the associated memory device. See Memory Device (Type 17= ) for + /// memory devices. + /// + EFI_INTER_LINK_DATA DeviceLink; + /// + /// The number of load units that this device consumes. + /// + UINT8 MemoryChannelDeviceLoad; +} EFI_MEMORY_CHANNEL_DEVICE_DATA; + +// +// Memory. Controller Information - SMBIOS Type 5 +// +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +#define EFI_MEMORY_CONTROLLER_INFORMATION_RECORD_NUMBER 0x00000008 + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef enum { + EfiErrorDetectingMethodOther =3D 1, + EfiErrorDetectingMethodUnknown =3D 2, + EfiErrorDetectingMethodNone =3D 3, + EfiErrorDetectingMethodParity =3D 4, + EfiErrorDetectingMethod32Ecc =3D 5, + EfiErrorDetectingMethod64Ecc =3D 6, + EfiErrorDetectingMethod128Ecc =3D 7, + EfiErrorDetectingMethodCrc =3D 8 +} EFI_MEMORY_ERROR_DETECT_METHOD_TYPE; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + UINT8 Other :1; + UINT8 Unknown :1; + UINT8 None :1; + UINT8 SingleBitErrorCorrect :1; + UINT8 DoubleBitErrorCorrect :1; + UINT8 ErrorScrubbing :1; + UINT8 Reserved :2; +} EFI_MEMORY_ERROR_CORRECT_CAPABILITY; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef enum { + EfiMemoryInterleaveOther =3D 1, + EfiMemoryInterleaveUnknown =3D 2, + EfiMemoryInterleaveOneWay =3D 3, + EfiMemoryInterleaveTwoWay =3D 4, + EfiMemoryInterleaveFourWay =3D 5, + EfiMemoryInterleaveEightWay =3D 6, + EfiMemoryInterleaveSixteenWay =3D 7 +} EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + UINT16 Other :1; + UINT16 Unknown :1; + UINT16 SeventyNs:1; + UINT16 SixtyNs :1; + UINT16 FiftyNs :1; + UINT16 Reserved :11; +} EFI_MEMORY_SPEED_TYPE; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + UINT16 Other :1; + UINT16 Unknown :1; + UINT16 Standard :1; + UINT16 FastPageMode:1; + UINT16 EDO :1; + UINT16 Parity :1; + UINT16 ECC :1; + UINT16 SIMM :1; + UINT16 DIMM :1; + UINT16 BurstEdo :1; + UINT16 SDRAM :1; + UINT16 Reserved :5; +} EFI_MEMORY_SUPPORTED_TYPE; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + UINT8 Five :1; + UINT8 Three :1; + UINT8 Two :1; + UINT8 Reserved:5; +} EFI_MEMORY_MODULE_VOLTAGE_TYPE; + +/// +/// EFI_MEMORY_CONTROLLER_INFORMATION is obsolete +/// Use EFI_MEMORY_CONTROLLER_INFORMATION_DATA instead +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + EFI_MEMORY_ERROR_DETECT_METHOD_TYPE ErrorDetectingMethod; + EFI_MEMORY_ERROR_CORRECT_CAPABILITY ErrorCorrectingCapability; + EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemorySupportedInterleave; + EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemoryCurrentInterleave; + UINT8 MaxMemoryModuleSize; + EFI_MEMORY_SPEED_TYPE MemorySpeedType; + EFI_MEMORY_SUPPORTED_TYPE MemorySupportedType; + EFI_MEMORY_MODULE_VOLTAGE_TYPE MemoryModuleVoltage; + UINT8 NumberofMemorySlot; + EFI_MEMORY_ERROR_CORRECT_CAPABILITY EnabledCorrectingCapability; + UINT16 *MemoryModuleConfigHandles; +} EFI_MEMORY_CONTROLLER_INFORMATION; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 5. +/// +typedef struct { + EFI_MEMORY_ERROR_DETECT_METHOD_TYPE ErrorDetectingMethod; + EFI_MEMORY_ERROR_CORRECT_CAPABILITY ErrorCorrectingCapability; + EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemorySupportedInterleave; + EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemoryCurrentInterleave; + UINT8 MaxMemoryModuleSize; + EFI_MEMORY_SPEED_TYPE MemorySpeedType; + EFI_MEMORY_SUPPORTED_TYPE MemorySupportedType; + EFI_MEMORY_MODULE_VOLTAGE_TYPE MemoryModuleVoltage; + UINT8 NumberofMemorySlot; + EFI_MEMORY_ERROR_CORRECT_CAPABILITY EnabledCorrectingCapability; + EFI_INTER_LINK_DATA MemoryModuleConfig[1]; +} EFI_MEMORY_CONTROLLER_INFORMATION_DATA; + +/// +/// Memory. Error Information - SMBIOS Type 18 +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 18. +/// +#define EFI_MEMORY_32BIT_ERROR_INFORMATION_RECORD_NUMBER 0x00000009 +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 18. +/// +typedef enum { + EfiMemoryErrorOther =3D 1, + EfiMemoryErrorUnknown =3D 2, + EfiMemoryErrorOk =3D 3, + EfiMemoryErrorBadRead =3D 4, + EfiMemoryErrorParity =3D 5, + EfiMemoryErrorSigleBit =3D 6, + EfiMemoryErrorDoubleBit =3D 7, + EfiMemoryErrorMultiBit =3D 8, + EfiMemoryErrorNibble =3D 9, + EfiMemoryErrorChecksum =3D 10, + EfiMemoryErrorCrc =3D 11, + EfiMemoryErrorCorrectSingleBit =3D 12, + EfiMemoryErrorCorrected =3D 13, + EfiMemoryErrorUnCorrectable =3D 14 +} EFI_MEMORY_ERROR_TYPE; +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 18. +/// +typedef enum { + EfiMemoryGranularityOther =3D 1, + EfiMemoryGranularityOtherUnknown =3D 2, + EfiMemoryGranularityDeviceLevel =3D 3, + EfiMemoryGranularityMemPartitionLevel =3D 4 +} EFI_MEMORY_ERROR_GRANULARITY_TYPE; +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 18. +/// +typedef enum { + EfiMemoryErrorOperationOther =3D 1, + EfiMemoryErrorOperationUnknown =3D 2, + EfiMemoryErrorOperationRead =3D 3, + EfiMemoryErrorOperationWrite =3D 4, + EfiMemoryErrorOperationPartialWrite =3D 5 +} EFI_MEMORY_ERROR_OPERATION_TYPE; +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 18. +/// +typedef struct { + EFI_MEMORY_ERROR_TYPE MemoryErrorType; + EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity; + EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation; + UINT32 VendorSyndrome; + UINT32 MemoryArrayErrorAddress; + UINT32 DeviceErrorAddress; + UINT32 DeviceErrorResolution; +} EFI_MEMORY_32BIT_ERROR_INFORMATION; + +/// +/// Memory. Error Information - SMBIOS Type 33. +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 33. +/// +#define EFI_MEMORY_64BIT_ERROR_INFORMATION_RECORD_NUMBER 0x0000000A + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It's introduced for SmBios 2.6 type 33. +/// +typedef struct { + EFI_MEMORY_ERROR_TYPE MemoryErrorType; + EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity; + EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation; + UINT32 VendorSyndrome; + UINT64 MemoryArrayErrorAddress; + UINT64 DeviceErrorAddress; + UINT32 DeviceErrorResolution; +} EFI_MEMORY_64BIT_ERROR_INFORMATION; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It is implementation-specific to simplify the code logic. +/// +typedef union _EFI_MEMORY_SUBCLASS_RECORDS { + EFI_MEMORY_SIZE_DATA SizeData; + EFI_MEMORY_ARRAY_LOCATION_DATA ArrayLocationData; + EFI_MEMORY_ARRAY_LINK_DATA ArrayLink; + EFI_MEMORY_ARRAY_START_ADDRESS_DATA ArrayStartAddress; + EFI_MEMORY_DEVICE_START_ADDRESS_DATA DeviceStartAddress; + EFI_MEMORY_CHANNEL_TYPE_DATA ChannelTypeData; + EFI_MEMORY_CHANNEL_DEVICE_DATA ChannelDeviceData; + EFI_MEMORY_CONTROLLER_INFORMATION MemoryControllerInfo; + EFI_MEMORY_32BIT_ERROR_INFORMATION Memory32bitErrorInfo; + EFI_MEMORY_64BIT_ERROR_INFORMATION Memory64bitErrorInfo; +} EFI_MEMORY_SUBCLASS_RECORDS; + +typedef struct { + EFI_SUBCLASS_TYPE1_HEADER Header; + EFI_MEMORY_SUBCLASS_RECORDS Record; +} EFI_MEMORY_SUBCLASS_DRIVER_DATA; + +#define EFI_MISC_SUBCLASS_VERSION 0x0100 + +#pragma pack(1) + +// +// Last PCI Bus Number +// +#define EFI_MISC_LAST_PCI_BUS_RECORD_NUMBER 0x00000001 + +typedef struct { + UINT8 LastPciBus; +} EFI_MISC_LAST_PCI_BUS_DATA; + +// +// Misc. BIOS Vendor - SMBIOS Type 0 +// +#define EFI_MISC_BIOS_VENDOR_RECORD_NUMBER 0x00000002 + +typedef struct { + UINT64 Reserved1 :2; + UINT64 Unknown :1; + UINT64 BiosCharacteristicsNotSupported :1; + UINT64 IsaIsSupported :1; + UINT64 McaIsSupported :1; + UINT64 EisaIsSupported :1; + UINT64 PciIsSupported :1; + UINT64 PcmciaIsSupported :1; + UINT64 PlugAndPlayIsSupported :1; + UINT64 ApmIsSupported :1; + UINT64 BiosIsUpgradable :1; + UINT64 BiosShadowingAllowed :1; + UINT64 VlVesaIsSupported :1; + UINT64 EscdSupportIsAvailable :1; + UINT64 BootFromCdIsSupported :1; + UINT64 SelectableBootIsSupported :1; + UINT64 RomBiosIsSocketed :1; + UINT64 BootFromPcmciaIsSupported :1; + UINT64 EDDSpecificationIsSupported :1; + UINT64 JapaneseNecFloppyIsSupported :1; + UINT64 JapaneseToshibaFloppyIsSupported :1; + UINT64 Floppy525_360IsSupported :1; + UINT64 Floppy525_12IsSupported :1; + UINT64 Floppy35_720IsSupported :1; + UINT64 Floppy35_288IsSupported :1; + UINT64 PrintScreenIsSupported :1; + UINT64 Keyboard8042IsSupported :1; + UINT64 SerialIsSupported :1; + UINT64 PrinterIsSupported :1; + UINT64 CgaMonoIsSupported :1; + UINT64 NecPc98 :1; + UINT64 AcpiIsSupported :1; + UINT64 UsbLegacyIsSupported :1; + UINT64 AgpIsSupported :1; + UINT64 I20BootIsSupported :1; + UINT64 Ls120BootIsSupported :1; + UINT64 AtapiZipDriveBootIsSupported :1; + UINT64 Boot1394IsSupported :1; + UINT64 SmartBatteryIsSupported :1; + UINT64 BiosBootSpecIsSupported :1; + UINT64 FunctionKeyNetworkBootIsSupported :1; + UINT64 Reserved :22; +} EFI_MISC_BIOS_CHARACTERISTICS; + +typedef struct { + UINT64 BiosReserved :16; + UINT64 SystemReserved:16; + UINT64 Reserved :32; +} EFI_MISC_BIOS_CHARACTERISTICS_EXTENSION; + +typedef struct { + STRING_REF BiosVendor; + STRING_REF BiosVersion; + STRING_REF BiosReleaseDate; + EFI_PHYSICAL_ADDRESS BiosStartingAddress; + EFI_EXP_BASE2_DATA BiosPhysicalDeviceSize; + EFI_MISC_BIOS_CHARACTERISTICS BiosCharacteristics1; + EFI_MISC_BIOS_CHARACTERISTICS_EXTENSION + BiosCharacteristics2; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 0. + /// + UINT8 BiosMajorRelease; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 0. + /// + UINT8 BiosMinorRelease; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 0. + /// + UINT8 BiosEmbeddedFirmwareMajorRelease; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 0. + /// + UINT8 BiosEmbeddedFirmwareMinorRelease; +} EFI_MISC_BIOS_VENDOR_DATA; + +// +// Misc. System Manufacturer - SMBIOS Type 1 +// +#define EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER 0x00000003 + +typedef enum { + EfiSystemWakeupTypeReserved =3D 0, + EfiSystemWakeupTypeOther =3D 1, + EfiSystemWakeupTypeUnknown =3D 2, + EfiSystemWakeupTypeApmTimer =3D 3, + EfiSystemWakeupTypeModemRing =3D 4, + EfiSystemWakeupTypeLanRemote =3D 5, + EfiSystemWakeupTypePowerSwitch =3D 6, + EfiSystemWakeupTypePciPme =3D 7, + EfiSystemWakeupTypeAcPowerRestored =3D 8 +} EFI_MISC_SYSTEM_WAKEUP_TYPE; + +typedef struct { + STRING_REF SystemManufacturer; + STRING_REF SystemProductName; + STRING_REF SystemVersion; + STRING_REF SystemSerialNumber; + EFI_GUID SystemUuid; + EFI_MISC_SYSTEM_WAKEUP_TYPE SystemWakeupType; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 1. + /// + STRING_REF SystemSKUNumber; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this data structure and corrspond= ing fields are NOT defined. + /// It's introduced for SmBios 2.6 specification type 1. + /// + STRING_REF SystemFamily; +} EFI_MISC_SYSTEM_MANUFACTURER_DATA; + +// +// Misc. Base Board Manufacturer - SMBIOS Type 2 +// +#define EFI_MISC_BASE_BOARD_MANUFACTURER_RECORD_NUMBER 0x00000004 + +typedef struct { + UINT32 Motherboard :1; + UINT32 RequiresDaughterCard :1; + UINT32 Removable :1; + UINT32 Replaceable :1; + UINT32 HotSwappable :1; + UINT32 Reserved :27; +} EFI_BASE_BOARD_FEATURE_FLAGS; + +typedef enum { + EfiBaseBoardTypeUnknown =3D 1, + EfiBaseBoardTypeOther =3D 2, + EfiBaseBoardTypeServerBlade =3D 3, + EfiBaseBoardTypeConnectivitySwitch =3D 4, + EfiBaseBoardTypeSystemManagementModule =3D 5, + EfiBaseBoardTypeProcessorModule =3D 6, + EfiBaseBoardTypeIOModule =3D 7, + EfiBaseBoardTypeMemoryModule =3D 8, + EfiBaseBoardTypeDaughterBoard =3D 9, + EfiBaseBoardTypeMotherBoard =3D 0xA, + EfiBaseBoardTypeProcessorMemoryModule =3D 0xB, + EfiBaseBoardTypeProcessorIOModule =3D 0xC, + EfiBaseBoardTypeInterconnectBoard =3D 0xD +} EFI_BASE_BOARD_TYPE; + +typedef struct { + STRING_REF BaseBoardManufacturer; + STRING_REF BaseBoardProductName; + STRING_REF BaseBoardVersion; + STRING_REF BaseBoardSerialNumber; + STRING_REF BaseBoardAssetTag; + STRING_REF BaseBoardChassisLocation; + EFI_BASE_BOARD_FEATURE_FLAGS BaseBoardFeatureFlags; + EFI_BASE_BOARD_TYPE BaseBoardType; + EFI_INTER_LINK_DATA BaseBoardChassisLink; + UINT32 BaseBoardNumberLinks; + EFI_INTER_LINK_DATA LinkN; +} EFI_MISC_BASE_BOARD_MANUFACTURER_DATA; + +// +// Misc. System/Chassis Enclosure - SMBIOS Type 3 +// +#define EFI_MISC_CHASSIS_MANUFACTURER_RECORD_NUMBER 0x00000005 + +typedef enum { + EfiMiscChassisTypeOther =3D 0x1, + EfiMiscChassisTypeUnknown =3D 0x2, + EfiMiscChassisTypeDeskTop =3D 0x3, + EfiMiscChassisTypeLowProfileDesktop =3D 0x4, + EfiMiscChassisTypePizzaBox =3D 0x5, + EfiMiscChassisTypeMiniTower =3D 0x6, + EfiMiscChassisTypeTower =3D 0x7, + EfiMiscChassisTypePortable =3D 0x8, + EfiMiscChassisTypeLapTop =3D 0x9, + EfiMiscChassisTypeNotebook =3D 0xA, + EfiMiscChassisTypeHandHeld =3D 0xB, + EfiMiscChassisTypeDockingStation =3D 0xC, + EfiMiscChassisTypeAllInOne =3D 0xD, + EfiMiscChassisTypeSubNotebook =3D 0xE, + EfiMiscChassisTypeSpaceSaving =3D 0xF, + EfiMiscChassisTypeLunchBox =3D 0x10, + EfiMiscChassisTypeMainServerChassis =3D 0x11, + EfiMiscChassisTypeExpansionChassis =3D 0x12, + EfiMiscChassisTypeSubChassis =3D 0x13, + EfiMiscChassisTypeBusExpansionChassis =3D 0x14, + EfiMiscChassisTypePeripheralChassis =3D 0x15, + EfiMiscChassisTypeRaidChassis =3D 0x16, + EfiMiscChassisTypeRackMountChassis =3D 0x17, + EfiMiscChassisTypeSealedCasePc =3D 0x18, + EfiMiscChassisMultiSystemChassis =3D 0x19 +} EFI_MISC_CHASSIS_TYPE; + +typedef struct { + /// + /// Inconsistent with specification here: + /// In MiscSubclass 0.9 specification, it has the incorrect field name "= EFI_MISC_CHASSIS_TYPE". + /// Change it to "ChassisType" to pass build. + /// + UINT32 ChassisType :16; + UINT32 ChassisLockPresent:1; + UINT32 Reserved :15; +} EFI_MISC_CHASSIS_STATUS; + +typedef enum { + EfiChassisStateOther =3D 0x01, + EfiChassisStateUnknown =3D 0x02, + EfiChassisStateSafe =3D 0x03, + EfiChassisStateWarning =3D 0x04, + EfiChassisStateCritical =3D 0x05, + EfiChassisStateNonRecoverable =3D 0x06 +} EFI_MISC_CHASSIS_STATE; + +typedef enum { + EfiChassisSecurityStatusOther =3D 0x01, + EfiChassisSecurityStatusUnknown =3D 0x02, + EfiChassisSecurityStatusNone =3D 0x03, + EfiChassisSecurityStatusExternalInterfaceLockedOut =3D 0x04, + EfiChassisSecurityStatusExternalInterfaceLockedEnabled =3D 0x05 +} EFI_MISC_CHASSIS_SECURITY_STATE; + +typedef struct { + UINT32 RecordType :1; + UINT32 Type :7; + UINT32 Reserved :24; +} EFI_MISC_ELEMENT_TYPE; + +typedef struct { + EFI_MISC_ELEMENT_TYPE ChassisElementType; + EFI_INTER_LINK_DATA ChassisElementStructure; + EFI_BASE_BOARD_TYPE ChassisBaseBoard; + UINT32 ChassisElementMinimum; + UINT32 ChassisElementMaximum; +} EFI_MISC_ELEMENTS; + +typedef struct { + STRING_REF ChassisManufacturer; + STRING_REF ChassisVersion; + STRING_REF ChassisSerialNumber; + STRING_REF ChassisAssetTag; + EFI_MISC_CHASSIS_STATUS ChassisType; + EFI_MISC_CHASSIS_STATE ChassisBootupState; + EFI_MISC_CHASSIS_STATE ChassisPowerSupplyState; + EFI_MISC_CHASSIS_STATE ChassisThermalState; + EFI_MISC_CHASSIS_SECURITY_STATE ChassisSecurityState; + UINT32 ChassisOemDefined; + UINT32 ChassisHeight; + UINT32 ChassisNumberPowerCords; + UINT32 ChassisElementCount; + UINT32 ChassisElementRecordLength; + EFI_MISC_ELEMENTS ChassisElements; +} EFI_MISC_CHASSIS_MANUFACTURER_DATA; + +// +// Misc. Port Connector Information - SMBIOS Type 8 +// +#define EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_RECORD_NUMBER 0x000= 00006 + +typedef enum { + EfiPortConnectorTypeNone =3D 0x00, + EfiPortConnectorTypeCentronics =3D 0x01, + EfiPortConnectorTypeMiniCentronics =3D 0x02, + EfiPortConnectorTypeProprietary =3D 0x03, + EfiPortConnectorTypeDB25Male =3D 0x04, + EfiPortConnectorTypeDB25Female =3D 0x05, + EfiPortConnectorTypeDB15Male =3D 0x06, + EfiPortConnectorTypeDB15Female =3D 0x07, + EfiPortConnectorTypeDB9Male =3D 0x08, + EfiPortConnectorTypeDB9Female =3D 0x09, + EfiPortConnectorTypeRJ11 =3D 0x0A, + EfiPortConnectorTypeRJ45 =3D 0x0B, + EfiPortConnectorType50PinMiniScsi =3D 0x0C, + EfiPortConnectorTypeMiniDin =3D 0x0D, + EfiPortConnectorTypeMicriDin =3D 0x0E, + EfiPortConnectorTypePS2 =3D 0x0F, + EfiPortConnectorTypeInfrared =3D 0x10, + EfiPortConnectorTypeHpHil =3D 0x11, + EfiPortConnectorTypeUsb =3D 0x12, + EfiPortConnectorTypeSsaScsi =3D 0x13, + EfiPortConnectorTypeCircularDin8Male =3D 0x14, + EfiPortConnectorTypeCircularDin8Female =3D 0x15, + EfiPortConnectorTypeOnboardIde =3D 0x16, + EfiPortConnectorTypeOnboardFloppy =3D 0x17, + EfiPortConnectorType9PinDualInline =3D 0x18, + EfiPortConnectorType25PinDualInline =3D 0x19, + EfiPortConnectorType50PinDualInline =3D 0x1A, + EfiPortConnectorType68PinDualInline =3D 0x1B, + EfiPortConnectorTypeOnboardSoundInput =3D 0x1C, + EfiPortConnectorTypeMiniCentronicsType14 =3D 0x1D, + EfiPortConnectorTypeMiniCentronicsType26 =3D 0x1E, + EfiPortConnectorTypeHeadPhoneMiniJack =3D 0x1F, + EfiPortConnectorTypeBNC =3D 0x20, + EfiPortConnectorType1394 =3D 0x21, + EfiPortConnectorTypePC98 =3D 0xA0, + EfiPortConnectorTypePC98Hireso =3D 0xA1, + EfiPortConnectorTypePCH98 =3D 0xA2, + EfiPortConnectorTypePC98Note =3D 0xA3, + EfiPortConnectorTypePC98Full =3D 0xA4, + EfiPortConnectorTypeOther =3D 0xFF +} EFI_MISC_PORT_CONNECTOR_TYPE; + +typedef enum { + EfiPortTypeNone =3D 0x00, + EfiPortTypeParallelXtAtCompatible =3D 0x01, + EfiPortTypeParallelPortPs2 =3D 0x02, + EfiPortTypeParallelPortEcp =3D 0x03, + EfiPortTypeParallelPortEpp =3D 0x04, + EfiPortTypeParallelPortEcpEpp =3D 0x05, + EfiPortTypeSerialXtAtCompatible =3D 0x06, + EfiPortTypeSerial16450Compatible =3D 0x07, + EfiPortTypeSerial16550Compatible =3D 0x08, + EfiPortTypeSerial16550ACompatible =3D 0x09, + EfiPortTypeScsi =3D 0x0A, + EfiPortTypeMidi =3D 0x0B, + EfiPortTypeJoyStick =3D 0x0C, + EfiPortTypeKeyboard =3D 0x0D, + EfiPortTypeMouse =3D 0x0E, + EfiPortTypeSsaScsi =3D 0x0F, + EfiPortTypeUsb =3D 0x10, + EfiPortTypeFireWire =3D 0x11, + EfiPortTypePcmciaTypeI =3D 0x12, + EfiPortTypePcmciaTypeII =3D 0x13, + EfiPortTypePcmciaTypeIII =3D 0x14, + EfiPortTypeCardBus =3D 0x15, + EfiPortTypeAccessBusPort =3D 0x16, + EfiPortTypeScsiII =3D 0x17, + EfiPortTypeScsiWide =3D 0x18, + EfiPortTypePC98 =3D 0x19, + EfiPortTypePC98Hireso =3D 0x1A, + EfiPortTypePCH98 =3D 0x1B, + EfiPortTypeVideoPort =3D 0x1C, + EfiPortTypeAudioPort =3D 0x1D, + EfiPortTypeModemPort =3D 0x1E, + EfiPortTypeNetworkPort =3D 0x1F, + EfiPortType8251Compatible =3D 0xA0, + EfiPortType8251FifoCompatible =3D 0xA1, + EfiPortTypeOther =3D 0xFF +} EFI_MISC_PORT_TYPE; + +typedef struct { + STRING_REF PortInternalConnectorDesignator; + STRING_REF PortExternalConnectorDesignator; + EFI_MISC_PORT_CONNECTOR_TYPE PortInternalConnectorType; + EFI_MISC_PORT_CONNECTOR_TYPE PortExternalConnectorType; + EFI_MISC_PORT_TYPE PortType; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this type of field is defined as = EFI_DEVICE_PATH_PROTOCOL, + /// which causes the implementation some complexity. Keep it unchanged f= or backward + /// compatibility. + /// + EFI_MISC_PORT_DEVICE_PATH PortPath; +} EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA; + +// +// Misc. System Slots - SMBIOS Type 9 +// +#define EFI_MISC_SYSTEM_SLOT_DESIGNATION_RECORD_NUMBER 0x00000007 + +typedef enum { + EfiSlotTypeOther =3D 0x01, + EfiSlotTypeUnknown =3D 0x02, + EfiSlotTypeIsa =3D 0x03, + EfiSlotTypeMca =3D 0x04, + EfiSlotTypeEisa =3D 0x05, + EfiSlotTypePci =3D 0x06, + EfiSlotTypePcmcia =3D 0x07, + EfiSlotTypeVlVesa =3D 0x08, + EfiSlotTypeProprietary =3D 0x09, + EfiSlotTypeProcessorCardSlot =3D 0x0A, + EfiSlotTypeProprietaryMemoryCardSlot =3D 0x0B, + EfiSlotTypeIORiserCardSlot =3D 0x0C, + EfiSlotTypeNuBus =3D 0x0D, + EfiSlotTypePci66MhzCapable =3D 0x0E, + EfiSlotTypeAgp =3D 0x0F, + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, its naming should be EfiSlotTypeA= gp2X + /// rather than EfiSlotTypeApg2X. + /// + EfiSlotTypeAgp2X =3D 0x10, + EfiSlotTypeAgp4X =3D 0x11, + EfiSlotTypePciX =3D 0x12, + EfiSlotTypeAgp8x =3D 0x13, + EfiSlotTypePC98C20 =3D 0xA0, + EfiSlotTypePC98C24 =3D 0xA1, + EfiSlotTypePC98E =3D 0xA2, + EfiSlotTypePC98LocalBus =3D 0xA3, + EfiSlotTypePC98Card =3D 0xA4, + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, these fields aren't defined. + /// They're introduced for SmBios 2.6 specification type 9. + /// + EfiSlotTypePciExpress =3D 0xA5, + EfiSlotTypePciExpressX1 =3D 0xA6, + EfiSlotTypePciExpressX2 =3D 0xA7, + EfiSlotTypePciExpressX4 =3D 0xA8, + EfiSlotTypePciExpressX8 =3D 0xA9, + EfiSlotTypePciExpressX16 =3D 0xAA +} EFI_MISC_SLOT_TYPE; + +typedef enum { + EfiSlotDataBusWidthOther =3D 0x01, + EfiSlotDataBusWidthUnknown =3D 0x02, + EfiSlotDataBusWidth8Bit =3D 0x03, + EfiSlotDataBusWidth16Bit =3D 0x04, + EfiSlotDataBusWidth32Bit =3D 0x05, + EfiSlotDataBusWidth64Bit =3D 0x06, + EfiSlotDataBusWidth128Bit =3D 0x07, + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, these fields aren't defined. + /// They're introduced for SmBios 2.6 specification type 9. + /// + EfiSlotDataBusWidth1xOrx1 =3D 0x8, + EfiSlotDataBusWidth2xOrx2 =3D 0x9, + EfiSlotDataBusWidth4xOrx4 =3D 0xA, + EfiSlotDataBusWidth8xOrx8 =3D 0xB, + EfiSlotDataBusWidth12xOrx12 =3D 0xC, + EfiSlotDataBusWidth16xOrx16 =3D 0xD, + EfiSlotDataBusWidth32xOrx32 =3D 0xE +} EFI_MISC_SLOT_DATA_BUS_WIDTH; + +typedef enum { + EfiSlotUsageOther =3D 1, + EfiSlotUsageUnknown =3D 2, + EfiSlotUsageAvailable =3D 3, + EfiSlotUsageInUse =3D 4 +} EFI_MISC_SLOT_USAGE; + +typedef enum { + EfiSlotLengthOther =3D 1, + EfiSlotLengthUnknown =3D 2, + EfiSlotLengthShort =3D 3, + EfiSlotLengthLong =3D 4 +} EFI_MISC_SLOT_LENGTH; + +typedef struct { + UINT32 CharacteristicsUnknown :1; + UINT32 Provides50Volts :1; + UINT32 Provides33Volts :1; + UINT32 SharedSlot :1; + UINT32 PcCard16Supported :1; + UINT32 CardBusSupported :1; + UINT32 ZoomVideoSupported :1; + UINT32 ModemRingResumeSupported:1; + UINT32 PmeSignalSupported :1; + UINT32 HotPlugDevicesSupported :1; + UINT32 SmbusSignalSupported :1; + UINT32 Reserved :21; +} EFI_MISC_SLOT_CHARACTERISTICS; + +typedef struct { + STRING_REF SlotDesignation; + EFI_MISC_SLOT_TYPE SlotType; + EFI_MISC_SLOT_DATA_BUS_WIDTH SlotDataBusWidth; + EFI_MISC_SLOT_USAGE SlotUsage; + EFI_MISC_SLOT_LENGTH SlotLength; + UINT16 SlotId; + EFI_MISC_SLOT_CHARACTERISTICS SlotCharacteristics; + EFI_DEVICE_PATH_PROTOCOL SlotDevicePath; +} EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA; + +// +// Misc. Onboard Device - SMBIOS Type 10 +// +#define EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER 0x00000008 + +typedef enum { + EfiOnBoardDeviceTypeOther =3D 1, + EfiOnBoardDeviceTypeUnknown =3D 2, + EfiOnBoardDeviceTypeVideo =3D 3, + EfiOnBoardDeviceTypeScsiController =3D 4, + EfiOnBoardDeviceTypeEthernet =3D 5, + EfiOnBoardDeviceTypeTokenRing =3D 6, + EfiOnBoardDeviceTypeSound =3D 7 +} EFI_MISC_ONBOARD_DEVICE_TYPE; + +typedef struct { + UINT32 DeviceType :16; + UINT32 DeviceEnabled :1; + UINT32 Reserved :15; +} EFI_MISC_ONBOARD_DEVICE_STATUS; + +typedef struct { + STRING_REF OnBoardDeviceDescription; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, the name is OnBoardDeviceType. + /// Keep it unchanged for backward compatibilty. + /// + EFI_MISC_ONBOARD_DEVICE_STATUS OnBoardDeviceStatus; + EFI_DEVICE_PATH_PROTOCOL OnBoardDevicePath; +} EFI_MISC_ONBOARD_DEVICE_DATA; + +// +// Misc. BIOS Language Information - SMBIOS Type 11 +// +#define EFI_MISC_OEM_STRING_RECORD_NUMBER 0x00000009 + +typedef struct { + STRING_REF OemStringRef[1]; +} EFI_MISC_OEM_STRING_DATA; + +// +// Misc. System Options - SMBIOS Type 12 +// +typedef struct { + STRING_REF SystemOptionStringRef[1]; +} EFI_MISC_SYSTEM_OPTION_STRING_DATA; + +#define EFI_MISC_SYSTEM_OPTION_STRING_RECORD_NUMBER 0x0000000A + +// +// Misc. Number of Installable Languages - SMBIOS Type 13 +// +#define EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_RECORD_NUMBER 0x000000= 0B + +typedef struct { + UINT32 AbbreviatedLanguageFormat :1; + UINT32 Reserved :31; +} EFI_MISC_LANGUAGE_FLAGS; + +typedef struct { + UINT16 NumberOfInstallableLanguages; + EFI_MISC_LANGUAGE_FLAGS LanguageFlags; + UINT16 CurrentLanguageNumber; +} EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA; + +// +// Misc. System Language String +// +#define EFI_MISC_SYSTEM_LANGUAGE_STRING_RECORD_NUMBER 0x0000000C + +typedef struct { + UINT16 LanguageId; + STRING_REF SystemLanguageString; +} EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA; + +// +// Group Associations - SMBIOS Type 14 +// +#define EFI_MISC_GROUP_NAME_RECORD_NUMBER 0x0000000D + +typedef struct { + STRING_REF GroupName; + UINT16 NumberGroupItems; + UINT16 GroupId; +} EFI_MISC_GROUP_NAME_DATA; + +// +// Group Item Set Element +// +#define EFI_MISC_GROUP_ITEM_SET_RECORD_NUMBER 0x0000000E + +typedef struct { + EFI_GUID SubClass; + EFI_INTER_LINK_DATA GroupLink; + UINT16 GroupId; + UINT16 GroupElementId; +} EFI_MISC_GROUP_ITEM_SET_DATA; + +// +// Misc. Pointing Device Type - SMBIOS Type 21 +// +#define EFI_MISC_POINTING_DEVICE_TYPE_RECORD_NUMBER 0x0000000F + +typedef enum { + EfiPointingDeviceTypeOther =3D 0x01, + EfiPointingDeviceTypeUnknown =3D 0x02, + EfiPointingDeviceTypeMouse =3D 0x03, + EfiPointingDeviceTypeTrackBall =3D 0x04, + EfiPointingDeviceTypeTrackPoint =3D 0x05, + EfiPointingDeviceTypeGlidePoint =3D 0x06, + EfiPointingDeviceTouchPad =3D 0x07, + EfiPointingDeviceTouchScreen =3D 0x08, + EfiPointingDeviceOpticalSensor =3D 0x09 +} EFI_MISC_POINTING_DEVICE_TYPE; + +typedef enum { + EfiPointingDeviceInterfaceOther =3D 0x01, + EfiPointingDeviceInterfaceUnknown =3D 0x02, + EfiPointingDeviceInterfaceSerial =3D 0x03, + EfiPointingDeviceInterfacePs2 =3D 0x04, + EfiPointingDeviceInterfaceInfrared =3D 0x05, + EfiPointingDeviceInterfaceHpHil =3D 0x06, + EfiPointingDeviceInterfaceBusMouse =3D 0x07, + EfiPointingDeviceInterfaceADB =3D 0x08, + EfiPointingDeviceInterfaceBusMouseDB9 =3D 0xA0, + EfiPointingDeviceInterfaceBusMouseMicroDin =3D 0xA1, + EfiPointingDeviceInterfaceUsb =3D 0xA2 +} EFI_MISC_POINTING_DEVICE_INTERFACE; + +typedef struct { + EFI_MISC_POINTING_DEVICE_TYPE PointingDeviceType; + EFI_MISC_POINTING_DEVICE_INTERFACE PointingDeviceInterface; + UINT16 NumberPointingDeviceButtons; + EFI_DEVICE_PATH_PROTOCOL PointingDevicePath; +} EFI_MISC_POINTING_DEVICE_TYPE_DATA; + +// +// Portable Battery - SMBIOS Type 22 +// +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the name is EFI_MISC_BATTERY_LOCATI= ON_RECORD_NUMBER. +/// Keep it unchanged for backward compatibilty. +/// +#define EFI_MISC_PORTABLE_BATTERY_RECORD_NUMBER 0x00000010 + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the structure name is EFI_MISC_BATT= ERY_DEVICE_CHEMISTRY. +/// And all field namings are also different with specification. +/// Keep it unchanged for backward compatibilty. +/// +typedef enum { + EfiPortableBatteryDeviceChemistryOther =3D 1, + EfiPortableBatteryDeviceChemistryUnknown =3D 2, + EfiPortableBatteryDeviceChemistryLeadAcid =3D 3, + EfiPortableBatteryDeviceChemistryNickelCadmium =3D 4, + EfiPortableBatteryDeviceChemistryNickelMetalHydride =3D 5, + EfiPortableBatteryDeviceChemistryLithiumIon =3D 6, + EfiPortableBatteryDeviceChemistryZincAir =3D 7, + EfiPortableBatteryDeviceChemistryLithiumPolymer =3D 8 +} EFI_MISC_PORTABLE_BATTERY_DEVICE_CHEMISTRY; + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the structure name is EFI_MISC_BATT= ERY_LOCATION_DATA. +/// Also, the name and the order of the fields vary with specifications. +/// Keep it unchanged for backward compatibilty. +/// +typedef struct { + STRING_REF Location; + STRING_REF Manufacturer; + STRING_REF ManufactureDate; + STRING_REF SerialNumber; + STRING_REF DeviceName; + EFI_MISC_PORTABLE_BATTERY_DEVICE_CHEMISTRY + DeviceChemistry; + UINT16 DesignCapacity; + UINT16 DesignVoltage; + STRING_REF SBDSVersionNumber; + UINT8 MaximumError; + UINT16 SBDSSerialNumber; + UINT16 SBDSManufactureDate; + STRING_REF SBDSDeviceChemistry; + UINT8 DesignCapacityMultiplier; + UINT32 OEMSpecific; + UINT8 BatteryNumber; // Temporary + BOOLEAN Valid; // Is entry valid - Temporary +} EFI_MISC_PORTABLE_BATTERY; + + +// +// Misc. Reset Capabilities - SMBIOS Type 23 +// +#define EFI_MISC_RESET_CAPABILITIES_RECORD_NUMBER 0x00000011 + +typedef struct { + UINT32 Status :1; + UINT32 BootOption :2; + UINT32 BootOptionOnLimit :2; + UINT32 WatchdogTimerPresent:1; + UINT32 Reserved :26; +} EFI_MISC_RESET_CAPABILITIES_TYPE; + +typedef struct { + EFI_MISC_RESET_CAPABILITIES_TYPE ResetCapabilities; + UINT16 ResetCount; + UINT16 ResetLimit; + UINT16 ResetTimerInterval; + UINT16 ResetTimeout; +} EFI_MISC_RESET_CAPABILITIES; + +typedef struct { + EFI_MISC_RESET_CAPABILITIES ResetCapabilities; + UINT16 ResetCount; + UINT16 ResetLimit; + UINT16 ResetTimerInterval; + UINT16 ResetTimeout; +} EFI_MISC_RESET_CAPABILITIES_DATA; + +// +// Misc. Hardware Security - SMBIOS Type 24 +// +#define EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA_RECORD_NUMBER 0x000000= 12 + +/// +/// Inconsistent with specification here: +/// The MiscSubclass specification 0.9 only mentions the possible value of= each field in +/// EFI_MISC_HARDWARE_SECURITY_SETTINGS. +/// It's implementation-specific in order to to simplify the code logic. +/// +typedef enum { + EfiHardwareSecurityStatusDisabled =3D 0, + EfiHardwareSecurityStatusEnabled =3D 1, + EfiHardwareSecurityStatusNotImplemented =3D 2, + EfiHardwareSecurityStatusUnknown =3D 3 +} EFI_MISC_HARDWARE_SECURITY_STATUS; + +typedef struct { + UINT32 FrontPanelResetStatus :2; + UINT32 AdministratorPasswordStatus :2; + UINT32 KeyboardPasswordStatus :2; + UINT32 PowerOnPasswordStatus :2; + UINT32 Reserved :24; +} EFI_MISC_HARDWARE_SECURITY_SETTINGS; + +typedef struct { + EFI_MISC_HARDWARE_SECURITY_SETTINGS HardwareSecuritySettings; +} EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA; + +// +// System Power Controls - SMBIOS Type 25 +// +#define EFI_MISC_SCHEDULED_POWER_ON_MONTH_RECORD_NUMBER 0x00000013 + +typedef struct { + UINT16 ScheduledPoweronMonth; + UINT16 ScheduledPoweronDayOfMonth; + UINT16 ScheduledPoweronHour; + UINT16 ScheduledPoweronMinute; + UINT16 ScheduledPoweronSecond; +} EFI_MISC_SCHEDULED_POWER_ON_MONTH_DATA; + +// +// Voltage Probe - SMBIOS Type 26 +// +#define EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_RECORD_NUMBER 0x00000014 + +typedef struct { + UINT32 VoltageProbeSite :5; + UINT32 VoltageProbeStatus :3; + UINT32 Reserved :24; +} EFI_MISC_VOLTAGE_PROBE_LOCATION; + +typedef struct { + STRING_REF VoltageProbeDescription; + EFI_MISC_VOLTAGE_PROBE_LOCATION VoltageProbeLocation; + EFI_EXP_BASE10_DATA VoltageProbeMaximumValue; + EFI_EXP_BASE10_DATA VoltageProbeMinimumValue; + EFI_EXP_BASE10_DATA VoltageProbeResolution; + EFI_EXP_BASE10_DATA VoltageProbeTolerance; + EFI_EXP_BASE10_DATA VoltageProbeAccuracy; + EFI_EXP_BASE10_DATA VoltageProbeNominalValue; + EFI_EXP_BASE10_DATA MDLowerNoncriticalThreshold; + EFI_EXP_BASE10_DATA MDUpperNoncriticalThreshold; + EFI_EXP_BASE10_DATA MDLowerCriticalThreshold; + EFI_EXP_BASE10_DATA MDUpperCriticalThreshold; + EFI_EXP_BASE10_DATA MDLowerNonrecoverableThreshold; + EFI_EXP_BASE10_DATA MDUpperNonrecoverableThreshold; + UINT32 VoltageProbeOemDefined; +} EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_DATA; + +// +// Cooling Device - SMBIOS Type 27 +// +#define EFI_MISC_COOLING_DEVICE_TEMP_LINK_RECORD_NUMBER 0x00000015 + +typedef struct { + UINT32 CoolingDevice :5; + UINT32 CoolingDeviceStatus :3; + UINT32 Reserved :24; +} EFI_MISC_COOLING_DEVICE_TYPE; + +typedef struct { + EFI_MISC_COOLING_DEVICE_TYPE CoolingDeviceType; + EFI_INTER_LINK_DATA CoolingDeviceTemperatureLink; + UINT8 CoolingDeviceUnitGroup; + UINT16 CoolingDeviceNominalSpeed; + UINT32 CoolingDeviceOemDefined; +} EFI_MISC_COOLING_DEVICE_TEMP_LINK_DATA; + +// +// Temperature Probe - SMBIOS Type 28 +// +#define EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_RECORD_NUMBER 0x00000016 + +typedef struct { + UINT32 TemperatureProbeSite :5; + UINT32 TemperatureProbeStatus :3; + UINT32 Reserved :24; +} EFI_MISC_TEMPERATURE_PROBE_LOCATION; + +typedef struct { + STRING_REF TemperatureProbeDescription; + EFI_MISC_TEMPERATURE_PROBE_LOCATION + TemperatureProbeLocation; + /// + /// Inconsistent with specification here: + /// MiscSubclass 0.9 specification defines the fields type as EFI_EXP_BA= SE10_DATA. + /// In fact, they should be UINT16 type because they refer to 16bit widt= h data. + /// Keeping this inconsistency for backward compatibility. + /// + UINT16 TemperatureProbeMaximumValue; + UINT16 TemperatureProbeMinimumValue; + UINT16 TemperatureProbeResolution; + UINT16 TemperatureProbeTolerance; + UINT16 TemperatureProbeAccuracy; + UINT16 TemperatureProbeNominalValue; + UINT16 MDLowerNoncriticalThreshold; + UINT16 MDUpperNoncriticalThreshold; + UINT16 MDLowerCriticalThreshold; + UINT16 MDUpperCriticalThreshold; + UINT16 MDLowerNonrecoverableThreshold; + UINT16 MDUpperNonrecoverableThreshold; + UINT32 TemperatureProbeOemDefined; +} EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_DATA; + +// +// Electrical Current Probe - SMBIOS Type 29 +// + +#define EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_RECORD_NUMBER 0x0= 0000017 + +typedef struct { + UINT32 ElectricalCurrentProbeSite :5; + UINT32 ElectricalCurrentProbeStatus :3; + UINT32 Reserved :24; +} EFI_MISC_ELECTRICAL_CURRENT_PROBE_LOCATION; + +typedef struct { + STRING_REF ElectricalCurrentProbeDescription; + EFI_MISC_ELECTRICAL_CURRENT_PROBE_LOCATION + ElectricalCurrentProbeLocation; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeMaximumValue; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeMinimumValue; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeResolution; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeTolerance; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeAccuracy; + EFI_EXP_BASE10_DATA ElectricalCurrentProbeNominalValue; + EFI_EXP_BASE10_DATA MDLowerNoncriticalThreshold; + EFI_EXP_BASE10_DATA MDUpperNoncriticalThreshold; + EFI_EXP_BASE10_DATA MDLowerCriticalThreshold; + EFI_EXP_BASE10_DATA MDUpperCriticalThreshold; + EFI_EXP_BASE10_DATA MDLowerNonrecoverableThreshold; + EFI_EXP_BASE10_DATA MDUpperNonrecoverableThreshold; + UINT32 ElectricalCurrentProbeOemDefined; +} EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_DATA; + +// +// Out-of-Band Remote Access - SMBIOS Type 30 +// + +#define EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_RECORD_NUMBER 0= x00000018 + +typedef struct { + UINT32 InboundConnectionEnabled :1; + UINT32 OutboundConnectionEnabled :1; + UINT32 Reserved :30; +} EFI_MISC_REMOTE_ACCESS_CONNECTIONS; + +typedef struct { + STRING_REF RemoteAccessManufacturerNameDescripti= on; + EFI_MISC_REMOTE_ACCESS_CONNECTIONS RemoteAccessConnections; +} EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_DATA; + +// +// Misc. BIS Entry Point - SMBIOS Type 31 +// +#define EFI_MISC_BIS_ENTRY_POINT_RECORD_NUMBER 0x00000019 + +typedef struct { + EFI_PHYSICAL_ADDRESS BisEntryPoint; +} EFI_MISC_BIS_ENTRY_POINT_DATA; + +// +// Misc. Boot Information - SMBIOS Type 32 +// +#define EFI_MISC_BOOT_INFORMATION_STATUS_RECORD_NUMBER 0x0000001A + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the structure name is EFI_MISC_BOOT= _INFORMATION_STATUS_TYPE. +/// Keep it unchanged for backward compatibilty. +/// +typedef enum { + EfiBootInformationStatusNoError =3D 0x00, + EfiBootInformationStatusNoBootableMedia =3D 0x01, + EfiBootInformationStatusNormalOSFailedLoading =3D 0x02, + EfiBootInformationStatusFirmwareDetectedFailure =3D 0x03, + EfiBootInformationStatusOSDetectedFailure =3D 0x04, + EfiBootInformationStatusUserRequestedBoot =3D 0x05, + EfiBootInformationStatusSystemSecurityViolation =3D 0x06, + EfiBootInformationStatusPreviousRequestedImage =3D 0x07, + EfiBootInformationStatusWatchdogTimerExpired =3D 0x08, + EfiBootInformationStatusStartReserved =3D 0x09, + EfiBootInformationStatusStartOemSpecific =3D 0x80, + EfiBootInformationStatusStartProductSpecific =3D 0xC0 +} EFI_MISC_BOOT_INFORMATION_STATUS_DATA_TYPE; + +typedef struct { + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, the field name is EFI_MISC_BOOT_I= NFORMATION_STATUS_TYPE. + /// Keep it unchanged for backward compatibilty. + /// + EFI_MISC_BOOT_INFORMATION_STATUS_DATA_TYPE BootInformationStatus; + UINT8 BootInformationData[9]; +} EFI_MISC_BOOT_INFORMATION_STATUS_DATA; + +// +// Management Device - SMBIOS Type 34 +// +#define EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_RECORD_NUMBER 0x0000001B + +typedef enum { + EfiManagementDeviceTypeOther =3D 0x01, + EfiManagementDeviceTypeUnknown =3D 0x02, + EfiManagementDeviceTypeLm75 =3D 0x03, + EfiManagementDeviceTypeLm78 =3D 0x04, + EfiManagementDeviceTypeLm79 =3D 0x05, + EfiManagementDeviceTypeLm80 =3D 0x06, + EfiManagementDeviceTypeLm81 =3D 0x07, + EfiManagementDeviceTypeAdm9240 =3D 0x08, + EfiManagementDeviceTypeDs1780 =3D 0x09, + EfiManagementDeviceTypeMaxim1617 =3D 0x0A, + EfiManagementDeviceTypeGl518Sm =3D 0x0B, + EfiManagementDeviceTypeW83781D =3D 0x0C, + EfiManagementDeviceTypeHt82H791 =3D 0x0D +} EFI_MISC_MANAGEMENT_DEVICE_TYPE; + +typedef enum { + EfiManagementDeviceAddressTypeOther =3D 1, + EfiManagementDeviceAddressTypeUnknown =3D 2, + EfiManagementDeviceAddressTypeIOPort =3D 3, + EfiManagementDeviceAddressTypeMemory =3D 4, + EfiManagementDeviceAddressTypeSmbus =3D 5 +} EFI_MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE; + +typedef struct { + STRING_REF ManagementDeviceDescription; + EFI_MISC_MANAGEMENT_DEVICE_TYPE ManagementDeviceType; + UINTN ManagementDeviceAddress; + EFI_MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE + ManagementDeviceAddressType; +} EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_DATA; + +// +// Management Device Component - SMBIOS Type 35 +// + +#define EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_RECORD_NUMBER = 0x0000001C + +typedef struct { + STRING_REF ManagementDeviceComponentDescription; + EFI_INTER_LINK_DATA ManagementDeviceLink; + EFI_INTER_LINK_DATA ManagementDeviceComponentLink; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this field is NOT defined. + /// It's introduced for SmBios 2.6 specification type 35. + /// + EFI_INTER_LINK_DATA ManagementDeviceThresholdLink; + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, this field is NOT defined. + /// It's implementation-specific to simplify the code logic. + /// + UINT8 ComponentType; +} EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_DATA; + +// +// IPMI Data Record - SMBIOS Type 38 +// +typedef enum { + EfiIpmiOther =3D 0, + EfiIpmiKcs =3D 1, + EfiIpmiSmic =3D 2, + EfiIpmiBt =3D 3 +} EFI_MISC_IPMI_INTERFACE_TYPE; + +typedef struct { + UINT16 IpmiSpecLeastSignificantDigit:4; + UINT16 IpmiSpecMostSignificantDigit: 4; + UINT16 Reserved: 8; +} EFI_MISC_IPMI_SPECIFICATION_REVISION; + +typedef struct { + EFI_MISC_IPMI_INTERFACE_TYPE IpmiInterfaceType; + EFI_MISC_IPMI_SPECIFICATION_REVISION + IpmiSpecificationRevision; + UINT16 IpmiI2CSlaveAddress; + UINT16 IpmiNvDeviceAddress; + UINT64 IpmiBaseAddress; + EFI_DEVICE_PATH_PROTOCOL IpmiDevicePath; +} EFI_MISC_IPMI_INTERFACE_TYPE_DATA; + +#define EFI_MISC_IPMI_INTERFACE_TYPE_RECORD_NUMBER 0x0000001D +/// +/// The definition above is *NOT* defined in MiscSubclass specifications 0= .9. +/// It's defined for backward compatibility. +/// +#define EFI_MISC_IPMI_INTERFACE_TYPE_DATA_RECORD_NUMBER EFI_MISC_IPMI_INTE= RFACE_TYPE_RECORD_NUMBER + +/// +/// System Power supply Record - SMBIOS Type 39 +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the type of all fields are UINT32. +/// Keep it unchanged for backward compatibilty. +/// +typedef struct { + UINT16 PowerSupplyHotReplaceable:1; + UINT16 PowerSupplyPresent :1; + UINT16 PowerSupplyUnplugged :1; + UINT16 InputVoltageRangeSwitch :4; + UINT16 PowerSupplyStatus :3; + UINT16 PowerSupplyType :4; + UINT16 Reserved :2; +} EFI_MISC_POWER_SUPPLY_CHARACTERISTICS; + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the structure name is EFI_MISC_POWE= R_SUPPLY_UNIT_GROUP_DATA. +/// Keep it unchanged for backward compatibilty. +/// +typedef struct { + UINT16 PowerUnitGroup; + STRING_REF PowerSupplyLocation; + STRING_REF PowerSupplyDeviceName; + STRING_REF PowerSupplyManufacturer; + STRING_REF PowerSupplySerialNumber; + STRING_REF PowerSupplyAssetTagNumber; + STRING_REF PowerSupplyModelPartNumber; + STRING_REF PowerSupplyRevisionLevel; + UINT16 PowerSupplyMaxPowerCapacity; + EFI_MISC_POWER_SUPPLY_CHARACTERISTICS PowerSupplyCharacteristics; + EFI_INTER_LINK_DATA PowerSupplyInputVoltageProbeLink; + EFI_INTER_LINK_DATA PowerSupplyCoolingDeviceLink; + EFI_INTER_LINK_DATA PowerSupplyInputCurrentProbeLink; +} EFI_MISC_SYSTEM_POWER_SUPPLY_DATA; + +#define EFI_MISC_SYSTEM_POWER_SUPPLY_RECORD_NUMBER 0x0000001E + +/// +/// OEM Data Record - SMBIOS Type 0x80-0xFF +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the structure name is EFI_SMBIOS_ST= RUCTURE_HDR. +/// Due to this, the structure is commonly used by vendors to construct Sm= Bios type 0x80~0xFF table, +/// Keep it unchanged for backward compatibilty. +/// +typedef struct { + UINT8 Type; + UINT8 Length; + UINT16 Handle; +} SMBIOS_STRUCTURE_HDR; + +typedef struct { + /// + /// Inconsistent with specification here: + /// In MiscSubclass specification 0.9, the field name is EFI_SMBIOS_STRU= CTURE_HDR. + /// Keep it unchanged for backward compatibilty. + /// + SMBIOS_STRUCTURE_HDR Header; + UINT8 RawData[1]; +} EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION_DATA; + +#define EFI_MISC_SMBIOS_STRUCT_ENCAP_RECORD_NUMBER 0x0000001F + +/// +/// Misc. System Event Log - SMBIOS Type 15 +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the following data structures are N= OT defined. +/// It's introduced for SmBios 2.6 specification type 15. +/// +#define EFI_MISC_SYSTEM_EVENT_LOG_RECORD_NUMBER 0x00000020 + +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the following data structures are N= OT defined. +/// It's introduced for SmBios 2.6 specification type 15. +/// +typedef struct { + UINT16 LogAreaLength; + UINT16 LogHeaderStartOffset; + UINT16 LogDataStartOffset; + UINT8 AccessMethod; + UINT8 LogStatus; + UINT32 LogChangeToken; + UINT32 AccessMethodAddress; + UINT8 LogHeaderFormat; + UINT8 NumberOfSupportedLogType; + UINT8 LengthOfLogDescriptor; +} EFI_MISC_SYSTEM_EVENT_LOG_DATA; + +// +// Access Method. +// 0x00~0x04: as following definition +// 0x05~0x7f: Available for future assignment. +// 0x80~0xff: BIOS Vendor/OEM-specific. +// +#define ACCESS_INDEXIO_1INDEX8BIT_DATA8BIT 0x00 +#define ACCESS_INDEXIO_2INDEX8BIT_DATA8BIT 0X01 +#define ACCESS_INDEXIO_1INDEX16BIT_DATA8BIT 0X02 +#define ACCESS_MEMORY_MAPPED 0x03 +#define ACCESS_GPNV 0x04 + +/// +/// Management Device Threshold Data Record - SMBIOS Type 36 +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the following data structures are N= OT defined. +/// It's introduced for SmBios 2.6 specification type 36. +/// +#define EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD_RECORD_NUMBER 0x00000021 +/// +/// Inconsistent with specification here: +/// In MiscSubclass specification 0.9, the following data structures are N= OT defined. +/// It's introduced for SmBios 2.6 specification type 36. +/// +typedef struct { + UINT16 LowerThresNonCritical; + UINT16 UpperThresNonCritical; + UINT16 LowerThresCritical; + UINT16 UpperThresCritical; + UINT16 LowerThresNonRecover; + UINT16 UpperThresNonRecover; +} EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD; + +// +// Declare the following strutures alias to use them more conviniently. +// +typedef EFI_MISC_LAST_PCI_BUS_DATA EFI_MISC_LAST_PC= I_BUS; +typedef EFI_MISC_BIOS_VENDOR_DATA EFI_MISC_BIOS_VE= NDOR; +typedef EFI_MISC_SYSTEM_MANUFACTURER_DATA EFI_MISC_SYSTEM_= MANUFACTURER; +typedef EFI_MISC_BASE_BOARD_MANUFACTURER_DATA EFI_MISC_BASE_BO= ARD_MANUFACTURER; +typedef EFI_MISC_CHASSIS_MANUFACTURER_DATA EFI_MISC_CHASSIS= _MANUFACTURER; +typedef EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA EFI_MISC_PORT_IN= TERNAL_CONNECTOR_DESIGNATOR; +typedef EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA EFI_MISC_SYSTEM_= SLOT_DESIGNATION; +typedef EFI_MISC_ONBOARD_DEVICE_DATA EFI_MISC_ONBOARD= _DEVICE; +typedef EFI_MISC_POINTING_DEVICE_TYPE_DATA EFI_MISC_ONBOARD= _DEVICE_TYPE_DATA; +typedef EFI_MISC_OEM_STRING_DATA EFI_MISC_OEM_STR= ING; +typedef EFI_MISC_SYSTEM_OPTION_STRING_DATA EFI_MISC_SYSTEM_= OPTION_STRING; +typedef EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA EFI_MISC_NUMBER_= OF_INSTALLABLE_LANGUAGES; +typedef EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA EFI_MISC_SYSTEM_= LANGUAGE_STRING; +typedef EFI_MISC_SYSTEM_EVENT_LOG_DATA EFI_MISC_SYSTEM_= EVENT_LOG; +typedef EFI_MISC_BIS_ENTRY_POINT_DATA EFI_MISC_BIS_ENT= RY_POINT; +typedef EFI_MISC_BOOT_INFORMATION_STATUS_DATA EFI_MISC_BOOT_IN= FORMATION_STATUS; +typedef EFI_MISC_SYSTEM_POWER_SUPPLY_DATA EFI_MISC_SYSTEM_= POWER_SUPPLY; +typedef EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION_DATA EFI_MISC_SMBIOS_= STRUCT_ENCAPSULATION; +typedef EFI_MISC_SCHEDULED_POWER_ON_MONTH_DATA EFI_MISC_SCHEDUL= ED_POWER_ON_MONTH; +typedef EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_DATA EFI_MISC_VOLTAGE= _PROBE_DESCRIPTION; +typedef EFI_MISC_COOLING_DEVICE_TEMP_LINK_DATA EFI_MISC_COOLING= _DEVICE_TEMP_LINK; +typedef EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_DATA EFI_MISC_TEMPERA= TURE_PROBE_DESCRIPTION; +typedef EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_DATA + EFI_MISC_REMOTE_= ACCESS_MANUFACTURER_DESCRIPTION; +typedef EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_DATA EFI_MISC_MANAGEM= ENT_DEVICE_DESCRIPTION; +typedef EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_DATA EFI_MISC_ELECTR= ICAL_CURRENT_PROBE_DESCRIPTION; +typedef EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_DATA + EFI_MISC_MANAGEM= ENT_DEVICE_COMPONENT_DESCRIPTION; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It is implementation-specific to simplify the code logic. +/// +typedef union { + EFI_MISC_LAST_PCI_BUS_DATA LastPciBus; + EFI_MISC_BIOS_VENDOR_DATA MiscBiosVendor; + EFI_MISC_SYSTEM_MANUFACTURER_DATA MiscSystemManufacture= r; + EFI_MISC_BASE_BOARD_MANUFACTURER_DATA MiscBaseBoardManufact= urer; + EFI_MISC_CHASSIS_MANUFACTURER_DATA MiscChassisManufactur= er; + EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA MiscPortInternalConne= ctorDesignator; + EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA MiscSystemSlotDesigna= tion; + EFI_MISC_ONBOARD_DEVICE_DATA MiscOnboardDevice; + EFI_MISC_OEM_STRING_DATA MiscOemString; + EFI_MISC_SYSTEM_OPTION_STRING_DATA MiscOptionString; + EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA NumberOfInstallableLa= nguages; + EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA MiscSystemLanguageStr= ing; + EFI_MISC_SYSTEM_EVENT_LOG_DATA MiscSystemEventLog; + EFI_MISC_GROUP_NAME_DATA MiscGroupNameData; + EFI_MISC_GROUP_ITEM_SET_DATA MiscGroupItemSetData; + EFI_MISC_POINTING_DEVICE_TYPE_DATA MiscPointingDeviceTyp= eData; + EFI_MISC_RESET_CAPABILITIES_DATA MiscResetCapablilitie= sData; + EFI_MISC_HARDWARE_SECURITY_SETTINGS_DATA MiscHardwareSecurityS= ettingsData; + EFI_MISC_SCHEDULED_POWER_ON_MONTH_DATA MiscScheduledPowerOnM= onthData; + EFI_MISC_VOLTAGE_PROBE_DESCRIPTION_DATA MiscVoltagePorbeDescr= iptionData; + EFI_MISC_COOLING_DEVICE_TEMP_LINK_DATA MiscCoolingDeviceTemp= LinkData; + EFI_MISC_TEMPERATURE_PROBE_DESCRIPTION_DATA MiscTemperatureProbeD= escriptionData; + EFI_MISC_ELECTRICAL_CURRENT_PROBE_DESCRIPTION_DATA MiscElectricalCurrent= ProbeDescriptionData; + EFI_MISC_REMOTE_ACCESS_MANUFACTURER_DESCRIPTION_DATA + MiscRemoteAccessManuf= acturerDescriptionData; + EFI_MISC_BIS_ENTRY_POINT_DATA MiscBisEntryPoint; + EFI_MISC_BOOT_INFORMATION_STATUS_DATA MiscBootInformationSt= atus; + EFI_MISC_MANAGEMENT_DEVICE_DESCRIPTION_DATA MiscMangementDeviceDe= scriptionData; + EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_DATA + MiscmangementDeviceCo= mponentDescriptionData; + EFI_MISC_IPMI_INTERFACE_TYPE_DATA MiscIpmiInterfaceType= Data; + EFI_MISC_SYSTEM_POWER_SUPPLY_DATA MiscPowerSupplyInfo; + EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION_DATA MiscSmbiosStructEncap= sulation; + EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD MiscManagementDeviceT= hreshold; +} EFI_MISC_SUBCLASS_RECORDS; + +/// +/// Inconsistent with specification here: +/// In MemSubclass specification 0.9, the following data structures are NO= T defined. +/// It is implementation-specific to simplify the code logic. +/// +typedef struct { + EFI_SUBCLASS_TYPE1_HEADER Header; + EFI_MISC_SUBCLASS_RECORDS Record; +} EFI_MISC_SUBCLASS_DRIVER_DATA; +#pragma pack() + +/// +/// Inconsistent with specification here: +/// In DataHubSubclass specification 0.9 page 16, the following symbol is = NOT defined. +/// But value is meaningful, 0 means Reserved. +/// +#define EFI_SUBCLASS_INSTANCE_RESERVED 0 +/// +/// Inconsistent with specification here: +/// In DataHubSubclass specification 0.9 page 16, the following symbol is = NOT defined. +/// But value is meaningful, -1 means Not Applicable. +/// +#define EFI_SUBCLASS_INSTANCE_NON_APPLICABLE 0xFFFF + +#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDevic= eFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDevi= ceFunction.c index 3872312c30..3e74ec31db 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDeviceFuncti= on.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDeviceFuncti= on.c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscMemoryDeviceFunction.c @@ -22,8 +19,6 @@ Abstract: =20 #include "CommonHeader.h" #include "MiscSubclassDriver.h" -#include -#include #include =20 =20 @@ -46,13 +41,6 @@ enum { }; =20 =20 -typedef struct { - EFI_PHYSICAL_ADDRESS MemoryArrayStartAddress; - EFI_PHYSICAL_ADDRESS MemoryArrayEndAddress; - EFI_INTER_LINK_DATA PhysicalMemoryArrayLink; - UINT16 MemoryArrayPartitionWidth; -} EFI_MEMORY_ARRAY_START_ADDRESS; - /** This function makes boot time changes to the contents of the MiscBiosVendor (Type 0). @@ -108,6 +96,7 @@ MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) EFI_STATUS Status; STRING_REF TokenToGet; SMBIOS_TABLE_TYPE17 *SmbiosRecord; + SMBIOS_TABLE_TYPE19 *SmbiosRecord19; EFI_SMBIOS_HANDLE SmbiosHandle; EFI_MEMORY_ARRAY_LINK_DATA *ForType17InputData; UINT16 DdrFreq=3D0; @@ -117,6 +106,7 @@ MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) =20 UINT8 Dimm; UINT8 NumSlots; + UINT64 TotalMemorySize; STRING_REF DevLocator[] =3D { STRING_TOKEN(STR_MISC_MEM_DEV_LOCATOR0), STRING_TOKEN(STR_MISC_MEM_D= EV_LOCATOR1) }; @@ -183,137 +173,193 @@ MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) break; } =20 - for (Dimm =3D 0; Dimm < NumSlots; Dimm++) { - // - // Memory Device Locator - // - TokenToGet =3D DevLocator[Dimm]; - MemDevice =3D SmbiosMiscGetString (TokenToGet); - MemDeviceStrLen =3D StrLen(MemDevice); - if (MemDeviceStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - TokenToGet =3D DevLocator[Dimm]; - MemDevice =3D SmbiosMiscGetString (TokenToGet); - MemDeviceStrLen =3D StrLen(MemDevice); - if (MemDeviceStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Memory Bank Locator - // - TokenToGet =3D BankLocator[Dimm]; - MemBankLocator =3D SmbiosMiscGetString (TokenToGet); - MemBankLocatorStrLen =3D StrLen(MemBankLocator); - if (MemBankLocatorStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Memory Manufacturer - // - TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_MANUFACTURER); - MemManufacturer =3D SmbiosMiscGetString (TokenToGet); - MemManufacturerStrLen =3D StrLen(MemManufacturer); - if (MemManufacturerStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Memory Serial Number - // - TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_SERIAL_NO); - MemSerialNumber =3D SmbiosMiscGetString (TokenToGet); - MemSerialNumberStrLen =3D StrLen(MemSerialNumber); - if (MemSerialNumberStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Memory Asset Tag Number - // - TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_ASSET_TAG); - MemAssetTag =3D SmbiosMiscGetString (TokenToGet); - MemAssetTagStrLen =3D StrLen(MemAssetTag); - if (MemAssetTagStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Memory Part Number - // - TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_PART_NUMBER); - MemPartNumber =3D SmbiosMiscGetString (TokenToGet); - MemPartNumberStrLen =3D StrLen(MemPartNumber); - if (MemPartNumberStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; - } - - // - // Two zeros following the last string. - // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE17) + MemDevice= StrLen + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSeri= alNumberStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE17) + MemDeviceStrLen = + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNumbe= rStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); - - SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_MEMORY_DEVICE; - SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE17); - - // - // Make handle chosen by smbios protocol.add automatically. - // - SmbiosRecord->Hdr.Handle =3D 0; - - // - // Memory Array Handle will be the 3rd optional string following the f= ormatted structure. - // GetType16Hndl( Smbios, &Type16Handle); - SmbiosRecord->MemoryArrayHandle =3D Type16Handle; + TotalMemorySize =3D 0; + for (Dimm =3D 0; Dimm < NumSlots; Dimm++) { + // + // Memory Device Locator + // + TokenToGet =3D DevLocator[Dimm]; + MemDevice =3D SmbiosMiscGetString (TokenToGet); + MemDeviceStrLen =3D StrLen(MemDevice); + if (MemDeviceStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } =20 - // - // Memory Size - // - if ((MemInfoHob->MemInfoData.dimmSize[Dimm])!=3D0){ - SmbiosRecord->TotalWidth =3D 32; - SmbiosRecord->DataWidth =3D 32; - SmbiosRecord->Size =3D MemInfoHob->MemInfoData.dimmSize[Dimm]; - SmbiosRecord->Speed =3D DdrFreq; - SmbiosRecord->ConfiguredMemoryClockSpeed =3D DdrFreq; - SmbiosRecord->FormFactor =3D EfiMemoryFormFactorDimm; - } + TokenToGet =3D DevLocator[Dimm]; + MemDevice =3D SmbiosMiscGetString (TokenToGet); + MemDeviceStrLen =3D StrLen(MemDevice); + if (MemDeviceStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Memory Bank Locator + // + TokenToGet =3D BankLocator[Dimm]; + MemBankLocator =3D SmbiosMiscGetString (TokenToGet); + MemBankLocatorStrLen =3D StrLen(MemBankLocator); + if (MemBankLocatorStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Memory Manufacturer + // + TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_MANUFACTURER); + MemManufacturer =3D SmbiosMiscGetString (TokenToGet); + MemManufacturerStrLen =3D StrLen(MemManufacturer); + if (MemManufacturerStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Memory Serial Number + // + TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_SERIAL_NO); + MemSerialNumber =3D SmbiosMiscGetString (TokenToGet); + MemSerialNumberStrLen =3D StrLen(MemSerialNumber); + if (MemSerialNumberStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Memory Asset Tag Number + // + TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_ASSET_TAG); + MemAssetTag =3D SmbiosMiscGetString (TokenToGet); + MemAssetTagStrLen =3D StrLen(MemAssetTag); + if (MemAssetTagStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Memory Part Number + // + TokenToGet =3D STRING_TOKEN (STR_MISC_MEM_PART_NUMBER); + MemPartNumber =3D SmbiosMiscGetString (TokenToGet); + MemPartNumberStrLen =3D StrLen(MemPartNumber); + if (MemPartNumberStrLen > SMBIOS_STRING_MAX_LENGTH) { + return EFI_UNSUPPORTED; + } + + // + // Two zeros following the last string. + // + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE17) + MemDevi= ceStrLen + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSe= rialNumberStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE17) + MemDeviceStrLe= n + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNum= berStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); + + SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_MEMORY_DEVICE; + SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE17); + + // + // Make handle chosen by smbios protocol.add automatically. + // + SmbiosRecord->Hdr.Handle =3D 0; + + // + // Memory Array Handle will be the 3rd optional string following the= formatted structure. + // + SmbiosRecord->MemoryArrayHandle =3D Type16Handle; + + // + // Memory Size + // + if ((MemInfoHob->MemInfoData.dimmSize[Dimm])!=3D0){ + SmbiosRecord->TotalWidth =3D 32; + SmbiosRecord->DataWidth =3D 32; + SmbiosRecord->Size =3D MemInfoHob->MemInfoData.dimmSize[Dimm]; + SmbiosRecord->Speed =3D DdrFreq; + SmbiosRecord->ConfiguredMemoryClockSpeed =3D DdrFreq; + SmbiosRecord->FormFactor =3D EfiMemoryFormFactorDimm; + } =20 - SmbiosRecord->DeviceSet =3D(UINT8) ForType17InputData->MemoryDeviceSet; - SmbiosRecord->DeviceLocator=3D 1; - SmbiosRecord->BankLocator =3D 2; + SmbiosRecord->DeviceSet =3D(UINT8) ForType17InputData->MemoryDeviceS= et; + SmbiosRecord->DeviceLocator=3D 1; + SmbiosRecord->BankLocator =3D 2; =20 =20 - SmbiosRecord->Manufacturer =3D 3; - SmbiosRecord->SerialNumber=3D 4; - SmbiosRecord->AssetTag=3D 5; - SmbiosRecord->PartNumber=3D 6; - SmbiosRecord->Attributes =3D (UINT8) ForType17InputData->MemoryState; - SmbiosRecord->MemoryType =3D MemoryType; + SmbiosRecord->Manufacturer =3D 3; + SmbiosRecord->SerialNumber=3D 4; + SmbiosRecord->AssetTag=3D 5; + SmbiosRecord->PartNumber=3D 6; + SmbiosRecord->Attributes =3D (UINT8) ForType17InputData->MemoryState; + SmbiosRecord->MemoryType =3D MemoryType; =20 - OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(MemDevice, OptionalStrStart); - UnicodeStrToAsciiStr(MemBankLocator, OptionalStrStart + MemDeviceStrLe= n + 1); - UnicodeStrToAsciiStr(MemManufacturer, OptionalStrStart + MemDeviceStrL= en + 1 + MemBankLocatorStrLen + 1); - UnicodeStrToAsciiStr(MemSerialNumber, OptionalStrStart + MemDeviceStrL= en + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1); - UnicodeStrToAsciiStr(MemAssetTag, OptionalStrStart + MemDeviceStrLen += 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNumber= StrLen + 1); - UnicodeStrToAsciiStr(MemPartNumber, OptionalStrStart + MemDeviceStrLen= + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNumb= erStrLen + 1+ MemAssetTagStrLen+1 ); + OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); + UnicodeStrToAsciiStr(MemDevice, OptionalStrStart); + UnicodeStrToAsciiStr(MemBankLocator, OptionalStrStart + MemDeviceStr= Len + 1); + UnicodeStrToAsciiStr(MemManufacturer, OptionalStrStart + MemDeviceSt= rLen + 1 + MemBankLocatorStrLen + 1); + UnicodeStrToAsciiStr(MemSerialNumber, OptionalStrStart + MemDeviceSt= rLen + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1); + UnicodeStrToAsciiStr(MemAssetTag, OptionalStrStart + MemDeviceStrLen= + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNumb= erStrLen + 1); + UnicodeStrToAsciiStr(MemPartNumber, OptionalStrStart + MemDeviceStrL= en + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNu= mberStrLen + 1+ MemAssetTagStrLen+1 ); + + // + // Now we have got the full smbios record, call smbios protocol to a= dd this record. + // + SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; + Status =3D Smbios-> Add( + Smbios, + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord + ); + + if ((SmbiosRecord->Size & BIT15) !=3D 0) { + // + // Size is in KB + // + TotalMemorySize =3D TotalMemorySize + LShiftU64 (SmbiosRecord->Siz= e, 10); + } else { + // + // Size is in MB + // + TotalMemorySize =3D TotalMemorySize + LShiftU64 (SmbiosRecord->Siz= e, 20); + } + + FreePool(SmbiosRecord); + } + + // + // Allocate and zero SMBIOS TYPE 19 Record + // + SmbiosRecord19 =3D AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE19)); + ASSERT (SmbiosRecord19 !=3D NULL); + + // + // Fill in SMBIOS type 19 information + // + SmbiosRecord19->Hdr.Type =3D SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS; + SmbiosRecord19->Hdr.Length =3D (UINT8) sizeof (SMBIOS_TABLE_TYPE19); + SmbiosRecord19->Hdr.Handle =3D 0; + + SmbiosRecord19->MemoryArrayHandle =3D Type16Handle; + SmbiosRecord19->PartitionWidth =3D NumSlots; + if (TotalMemorySize <=3D SIZE_4TB) { + SmbiosRecord19->StartingAddress =3D 0x0; + // + // Convert bytes to KB + // + SmbiosRecord19->EndingAddress =3D (UINT32)RShiftU64 (Total= MemorySize, 10) - 1; + SmbiosRecord19->ExtendedStartingAddress =3D 0; + SmbiosRecord19->ExtendedEndingAddress =3D 0; + } else { + SmbiosRecord19->StartingAddress =3D 0xffffffff; + SmbiosRecord19->EndingAddress =3D 0xffffffff; + SmbiosRecord19->ExtendedStartingAddress =3D 0; + SmbiosRecord19->ExtendedEndingAddress =3D TotalMemorySize - 1; + } =20 // - // Now we have got the full smbios record, call smbios protocol to add= this record. + // Add SMBIOS type 19 record to SMBIOS table. // SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; - Status =3D Smbios-> Add( - Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord - ); - FreePool(SmbiosRecord); - } + Smbios->Add( + Smbios, + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER *)SmbiosRecord19 + ); + return Status; } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c index 2f25ab802b..97a782e362 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c @@ -17,7 +17,6 @@ Abstract: #include "CommonHeader.h" =20 #include "MiscSubclassDriver.h" -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCa= cheData.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCac= heData.c index 6af7f56107..44f2530ac3 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheData= .c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheData= .c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscBiosProcessorCache.c @@ -28,6 +25,4 @@ Abstract: // // Static (possibly build generated) Processor cache data. // -MISC_SMBIOS_TABLE_DATA(EFI_CACHE_VARIABLE_RECORD, MiscProcessorCache) =3D { -0 -}; +MISC_SMBIOS_TABLE_DATA(UINTN, MiscProcessorCache) =3D 0; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCa= cheFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcesso= rCacheFunction.c index ca121525a0..c64e87e20b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunc= tion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunc= tion.c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscProcessorCacheFunction.c @@ -20,170 +17,144 @@ Abstract: --*/ #include "CommonHeader.h" #include "MiscSubclassDriver.h" -#include -#include - -UINT32 -ConvertBase2ToRaw ( - IN EFI_EXP_BASE2_DATA *Data) -{ - UINTN Index; - UINT32 RawData; - - RawData =3D Data->Value; - for (Index =3D 0; Index < (UINTN) Data->Exponent; Index++) { - RawData <<=3D 1; - } - - return RawData; -} - +#include =20 MISC_SMBIOS_TABLE_FUNCTION(MiscProcessorCache) { EFI_SMBIOS_HANDLE SmbiosHandle; - SMBIOS_TABLE_TYPE7 *SmbiosRecordL1; - SMBIOS_TABLE_TYPE7 *SmbiosRecordL2; + SMBIOS_TABLE_TYPE7 *SmbiosRecord; =20 EFI_CACHE_SRAM_TYPE_DATA CacheSramType; CHAR16 *SocketDesignation; CHAR8 *OptionalStrStart; UINTN SocketStrLen; STRING_REF TokenToGet; - EFI_DATA_HUB_PROTOCOL *DataHub; - UINT64 MonotonicCount; - EFI_DATA_RECORD_HEADER *Record; - EFI_SUBCLASS_TYPE1_HEADER *DataHeader; - UINT8 *SrcData; - EFI_STATUS Status; + UINT32 SubIndex; + CPUID_CACHE_PARAMS_EAX CacheParamsEax; + CPUID_CACHE_PARAMS_EBX CacheParamsEbx; + UINT32 RegisterEcx; + CPUID_CACHE_PARAMS_EDX CacheParamsEdx; + UINT8 SystemCacheType; + UINTN Size; =20 // - // Memory Device LOcator + // Memory Device Locator // - DEBUG ((EFI_D_ERROR, "type 7\n")); - TokenToGet =3D STRING_TOKEN (STR_SOCKET_DESIGNATION); SocketDesignation =3D SmbiosMiscGetString (TokenToGet); SocketStrLen =3D StrLen(SocketDesignation); if (SocketStrLen > SMBIOS_STRING_MAX_LENGTH) { - return EFI_UNSUPPORTED; + return EFI_UNSUPPORTED; } =20 - SmbiosRecordL1 =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE7) + 7 + 1 + 1); - ASSERT (SmbiosRecordL1 !=3D NULL); - ZeroMem(SmbiosRecordL1, sizeof (SMBIOS_TABLE_TYPE7) + 7 + 1 + 1); - - SmbiosRecordL2 =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE7) + 7 + 1 + 1); - ASSERT (SmbiosRecordL2 !=3D NULL); - ZeroMem(SmbiosRecordL2, sizeof (SMBIOS_TABLE_TYPE7) + 7 + 1 + 1); - - // - // Get the Data Hub Protocol. Assume only one instance - // - Status =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (VOID **)&DataHub - ); - ASSERT_EFI_ERROR(Status); - - MonotonicCount =3D 0; - Record =3D NULL; - - do { - Status =3D DataHub->GetNextRecord ( - DataHub, - &MonotonicCount, - NULL, - &Record - ); - if (!EFI_ERROR(Status)) { - if (Record->DataRecordClass =3D=3D EFI_DATA_RECORD_CLASS_DATA) { - DataHeader =3D (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); - SrcData =3D (UINT8 *)(DataHeader + 1); - if (CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClassGuid) && (D= ataHeader->RecordType =3D=3D CacheSizeRecordType)) { - if (DataHeader->SubInstance =3D=3D EFI_CACHE_L1) { - SmbiosRecordL1->InstalledSize +=3D (UINT16) (ConvertBase2ToRaw((EFI_= EXP_BASE2_DATA *)SrcData) >> 10); - SmbiosRecordL1->MaximumCacheSize =3D SmbiosRecordL1->InstalledSize; - } - else if (DataHeader->SubInstance =3D=3D EFI_CACHE_L2) { - SmbiosRecordL2->InstalledSize +=3D (UINT16) (ConvertBase2ToRaw((EFI_= EXP_BASE2_DATA *)SrcData) >> 10); - SmbiosRecordL2->MaximumCacheSize =3D SmbiosRecordL2->InstalledSize; - } else { - continue; - } - } - } - } - } while (!EFI_ERROR(Status) && (MonotonicCount !=3D 0)); - - // - //Filling SMBIOS type 7 information for different cache levels. - // - - SmbiosRecordL1->Hdr.Type =3D EFI_SMBIOS_TYPE_CACHE_INFORMATION; - SmbiosRecordL1->Hdr.Length =3D (UINT8) sizeof (SMBIOS_TABLE_TYPE7); - SmbiosRecordL1->Hdr.Handle =3D 0; - - SmbiosRecordL1->Associativity =3D CacheAssociativity8Way; - SmbiosRecordL1->SystemCacheType =3D CacheTypeUnknown; - SmbiosRecordL1->SocketDesignation =3D 0x01; - SmbiosRecordL1->CacheSpeed =3D 0; - SmbiosRecordL1->CacheConfiguration =3D 0x0180; - ZeroMem (&CacheSramType, sizeof (EFI_CACHE_SRAM_TYPE_DATA)); - CacheSramType.Synchronous =3D 1; - CopyMem(&SmbiosRecordL1->SupportedSRAMType, &CacheSramType, 2); - CopyMem(&SmbiosRecordL1->CurrentSRAMType, &CacheSramType, 2); - SmbiosRecordL1->ErrorCorrectionType =3D EfiCacheErrorSingleBit; - - - SmbiosRecordL2->Hdr.Type =3D EFI_SMBIOS_TYPE_CACHE_INFORMATION; - SmbiosRecordL2->Hdr.Length =3D (UINT8) sizeof (SMBIOS_TABLE_TYPE7); - SmbiosRecordL2->Hdr.Handle =3D 0; - - SmbiosRecordL2->Associativity =3D CacheAssociativity16Way; - SmbiosRecordL2->SystemCacheType =3D CacheTypeInstruction; - SmbiosRecordL2->SocketDesignation =3D 0x01; - SmbiosRecordL2->CacheSpeed =3D 0; - SmbiosRecordL2->CacheConfiguration =3D 0x0281; - ZeroMem (&CacheSramType, sizeof (EFI_CACHE_SRAM_TYPE_DATA)); - CacheSramType.Synchronous =3D 1; - CopyMem(&SmbiosRecordL2->SupportedSRAMType, &CacheSramType, 2); - CopyMem(&SmbiosRecordL2->CurrentSRAMType, &CacheSramType, 2); - SmbiosRecordL2->ErrorCorrectionType =3D EfiCacheErrorSingleBit; - - - - // - //Adding SMBIOS type 7 records to SMBIOS table. - // - SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; - OptionalStrStart =3D (CHAR8 *)(SmbiosRecordL1 + 1); - UnicodeStrToAsciiStr(SocketDesignation, OptionalStrStart); - - Smbios-> Add( - Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecordL1 - ); - - // - //VLV2 incorporates two SLM modules (quad cores) in the SoC. 2 cores shar= e BIU/L2 cache - // - SmbiosRecordL2->InstalledSize =3D (SmbiosRecordL2->InstalledSize)/2; - SmbiosRecordL2->MaximumCacheSize =3D SmbiosRecordL2->InstalledSize; - SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; - - OptionalStrStart =3D (CHAR8 *)(SmbiosRecordL2 + 1); - UnicodeStrToAsciiStr(SocketDesignation, OptionalStrStart); - - Smbios-> Add( - Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecordL2 - ); - + // + // Retrieve cache level information using CPUID + // + for (SubIndex =3D 0; ; SubIndex++) { + AsmCpuidEx ( + CPUID_CACHE_PARAMS, + SubIndex, + &CacheParamsEax.Uint32, + &CacheParamsEbx.Uint32, + &RegisterEcx, + &CacheParamsEdx.Uint32 + ); + // + // Terminate loop when CacheType is CPUID_CACHE_PARAMS_CACHE_TYPE_NULL + // + if (CacheParamsEax.Bits.CacheType =3D=3D CPUID_CACHE_PARAMS_CACHE_TYPE= _NULL) { + break; + } + + // + // Allocate and zero SMBIOS TYPE 7 Record + // + SmbiosRecord =3D AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE7) + 7 + 1 = + 1); + ASSERT (SmbiosRecord !=3D NULL); + + // + // Compute cache size in bytes + // + Size =3D (CacheParamsEbx.Bits.Ways + 1) * + (CacheParamsEbx.Bits.LinePartitions + 1) * + (CacheParamsEbx.Bits.LineSize + 1) * + (RegisterEcx + 1); + DEBUG ((DEBUG_INFO, "MiscProcessorCache(): Cache Type =3D %d Cache Le= vel =3D %d Size =3D %x\n", CacheParamsEax.Bits.CacheType, CacheParamsEax.B= its.CacheLevel, Size)); + + // + // Determine SMBIOS SystemCacheType + // + switch (CacheParamsEax.Bits.CacheType) { + case 1: + SystemCacheType =3D CacheTypeData; + break; + case 2: + SystemCacheType =3D CacheTypeInstruction; + break; + case 3: + SystemCacheType =3D CacheTypeUnified; + break; + default: + SystemCacheType =3D CacheTypeUnknown; + } + + // + // Update cache sizes in KB + // + switch (CacheParamsEax.Bits.CacheLevel) { + case 1: + SmbiosRecord->InstalledSize =3D (UINT16)(Size >> 10); + SmbiosRecord->MaximumCacheSize =3D SmbiosRecord->InstalledSize; + SmbiosRecord->SystemCacheType =3D SystemCacheType; + SmbiosRecord->Associativity =3D CacheAssociativity8Way; + SmbiosRecord->CacheConfiguration =3D 0x0180; + break; + case 2: + SmbiosRecord->InstalledSize =3D (UINT16)(Size >> 10); + SmbiosRecord->MaximumCacheSize =3D SmbiosRecord->InstalledSize; + SmbiosRecord->SystemCacheType =3D SystemCacheType; + SmbiosRecord->Associativity =3D CacheAssociativity16Way; + SmbiosRecord->CacheConfiguration =3D 0x0281; + // + //VLV2 incorporates two SLM modules (quad cores) in the SoC. + // 2 cores share BIU/L2 cache + // + SmbiosRecord->InstalledSize =3D SmbiosRecord->InstalledSize / 2; + SmbiosRecord->MaximumCacheSize =3D SmbiosRecord->InstalledSize; + break; + default: + DEBUG ((DEBUG_ERROR, "MiscProcessorCache(): Unexpected cache level %= d\n", CacheParamsEax.Bits.CacheLevel)); + break; + } + + // + //Filling SMBIOS type 7 information for different cache levels. + // + SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_CACHE_INFORMATION; + SmbiosRecord->Hdr.Length =3D (UINT8) sizeof (SMBIOS_TABLE_TYPE7); + SmbiosRecord->Hdr.Handle =3D 0; + + SmbiosRecord->SocketDesignation =3D 0x01; + SmbiosRecord->CacheSpeed =3D 0; + ZeroMem (&CacheSramType, sizeof (EFI_CACHE_SRAM_TYPE_DATA)); + CacheSramType.Synchronous =3D 1; + CopyMem(&SmbiosRecord->SupportedSRAMType, &CacheSramType, 2); + CopyMem(&SmbiosRecord->CurrentSRAMType, &CacheSramType, 2); + SmbiosRecord->ErrorCorrectionType =3D EfiCacheErrorSingleBit; + + // + // Adding SMBIOS type 7 records to SMBIOS table. + // + SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; + OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); + UnicodeStrToAsciiStr(SocketDesignation, OptionalStrStart); + + Smbios->Add( + Smbios, + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord + ); + } return EFI_SUCCESS; } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorIn= formationFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscPr= ocessorInformationFunction.c index e01693ede7..e71a03ceac 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformati= onFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformati= onFunction.c @@ -1,12 +1,9 @@ /*++ =20 -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscProcessorInformationFunction.c @@ -23,9 +20,9 @@ Abstract: #include "MiscSubclassDriver.h" =20 #include -#include -#include #include +#include +#include =20 #define EfiProcessorFamilyIntelAtomProcessor 0x2B =20 @@ -75,33 +72,6 @@ GetCacheHandle ( *Handle =3D 0xFFFF; } =20 - -/** - This function makes boot time changes to the contents of the - MiscProcessorInformation (Type 4). - - @param RecordData Pointer to copy of RecordData from th= e Data Table. - - @retval EFI_SUCCESS All parameters were valid. - @retval EFI_UNSUPPORTED Unexpected RecordType value. - @retval EFI_INVALID_PARAMETER Invalid parameter was found. - -**/ -UINT32 -ConvertBase10ToRaw ( - IN EFI_EXP_BASE10_DATA *Data) -{ - UINTN Index; - UINT32 RawData; - - RawData =3D Data->Value; - for (Index =3D 0; Index < (UINTN) Data->Exponent; Index++) { - RawData *=3D 10; - } - - return RawData; -} - #define BSEL_CR_OVERCLOCK_CONTROL 0xCD #define FUSE_BSEL_MASK 0x03 =20 @@ -137,6 +107,96 @@ DetermineiFsbFromMsr ( =20 } =20 +CHAR16 * +CpuidSocVendorBrandString ( + VOID + ) +{ + UINT32 MaximumExtendedFunction; + // + // Array to store brand string from 3 brand string leafs with + // 4 32-bit brand string values per leaf and an extra value to + // null terminate the string. + // + UINT32 BrandString[3 * 4 + 1]; + CHAR8 *AsciiBrandString; + CHAR16 *UnicodeBrandString; + UINTN Length; + + AsmCpuid (CPUID_EXTENDED_FUNCTION, &MaximumExtendedFunction, NULL, NULL,= NULL); + + ZeroMem (&BrandString, sizeof (BrandString)); + if (CPUID_BRAND_STRING1 <=3D MaximumExtendedFunction) { + AsmCpuid ( + CPUID_BRAND_STRING1, + &BrandString[0], + &BrandString[1], + &BrandString[2], + &BrandString[3] + ); + } + if (CPUID_BRAND_STRING2 <=3D MaximumExtendedFunction) { + AsmCpuid ( + CPUID_BRAND_STRING2, + &BrandString[4], + &BrandString[5], + &BrandString[6], + &BrandString[7] + ); + } + if (CPUID_BRAND_STRING3 <=3D MaximumExtendedFunction) { + AsmCpuid ( + CPUID_BRAND_STRING3, + &BrandString[8], + &BrandString[9], + &BrandString[10], + &BrandString[11] + ); + } + + // + // Skip spaces at the beginning of the brand string + // + for (AsciiBrandString =3D (CHAR8 *)BrandString; *AsciiBrandString =3D=3D= ' '; AsciiBrandString++); + + DEBUG ((DEBUG_INFO, "Processor Brand String =3D %a\n", AsciiBrandString)= ); + + // + // Convert ASCII brand string to an allocated Unicode brand string + // + Length =3D AsciiStrLen (AsciiBrandString) + 1; + UnicodeBrandString =3D AllocatePool (Length * sizeof (CHAR16)); + AsciiStrToUnicodeStrS (AsciiBrandString, UnicodeBrandString, Length); + + DEBUG ((DEBUG_INFO, "Processor Unicode Brand String =3D %s\n", UnicodeBr= andString)); + + return UnicodeBrandString; +} + +UINT64 +MeasureTscFrequency ( + VOID + ) +{ + EFI_TPL CurrentTpl; + UINT64 BeginValue; + UINT64 EndValue; + UINT64 Frequency; + + // + // Wait for 10000us =3D 10ms for the calculation + // It needs a precise timer to calculate the ticks + // + CurrentTpl =3D gBS->RaiseTPL (TPL_HIGH_LEVEL); + BeginValue =3D AsmReadTsc (); + MicroSecondDelay (10000); + EndValue =3D AsmReadTsc (); + gBS->RestoreTPL (CurrentTpl); + Frequency =3D MultU64x32 (EndValue - BeginValue, 1000); + Frequency =3D DivU64x32 (Frequency, 10); + return Frequency; +} + MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) { CHAR8 *OptionalStrStart; @@ -152,7 +212,7 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) UINTN SocketStrLen=3D0; UINTN AssetTagStrLen=3D0; UINTN PartNumberStrLen=3D0; - UINTN ProcessorVoltage=3D0xAE; + UINTN ProcessorVoltage=3D(BIT7 | 9); UINT32 Eax01; UINT32 Ebx01; UINT32 Ecx01; @@ -169,17 +229,8 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) UINTN NumberOfProcessors=3D0; UINT64 Frequency =3D 0; EFI_MP_SERVICES_PROTOCOL *MpService; - EFI_DATA_HUB_PROTOCOL *DataHub; - UINT64 MonotonicCount; - EFI_DATA_RECORD_HEADER *Record; - EFI_SUBCLASS_TYPE1_HEADER *DataHeader; - UINT8 *SrcData; - EFI_PROCESSOR_VERSION_DATA *ProcessorVersion; - CHAR16 *NewStringToken; - STRING_REF TokenToUpdate; PROCESSOR_ID_DATA *ProcessorId =3D NULL; =20 - // // First check for invalid parameters. // @@ -194,59 +245,6 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) return EFI_INVALID_PARAMETER; } =20 - // - // Get the Data Hub Protocol. Assume only one instance - // - Status =3D gBS->LocateProtocol ( - &gEfiDataHubProtocolGuid, - NULL, - (VOID **)&DataHub - ); - ASSERT_EFI_ERROR(Status); - - MonotonicCount =3D 0; - Record =3D NULL; - - do { - Status =3D DataHub->GetNextRecord ( - DataHub, - &MonotonicCount, - NULL, - &Record - ); - if (!EFI_ERROR(Status)) { - if (Record->DataRecordClass =3D=3D EFI_DATA_RECORD_CLASS_DATA) { - - DataHeader =3D (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); - SrcData =3D (UINT8 *)(DataHeader + 1); - - // - // Processor - // - if (CompareGuid(&Record->DataRecordGuid, &gEfiProcessorSubClas= sGuid)) { - CopyMem (&mProcessorProducerGuid, &Record->ProducerName, siz= eof(EFI_GUID)); - switch (DataHeader->RecordType) { - case ProcessorVoltageRecordType: - ProcessorVoltage =3D (((EFI_EXP_BASE10_DATA *)SrcData)->= Value)/100 + 0x80; - break; - case ProcessorCoreFrequencyRecordType: - DEBUG ((EFI_D_ERROR, "ProcessorCoreFrequencyRecordType S= rcData1 =3D%d\n", ConvertBase10ToRaw((EFI_EXP_BASE10_DATA *)SrcData)/100000= 0)); - Frequency =3D (ConvertBase10ToRaw((EFI_EXP_BASE10_DATA *= )SrcData)/1000000); - break; - case ProcessorVersionRecordType: - ProcessorVersion =3D (EFI_PROCESSOR_VERSION_DATA *)SrcDa= ta; - NewStringToken =3D HiiGetPackageString(&mProcessorProduc= erGuid, *ProcessorVersion, NULL); - TokenToUpdate =3D (STRING_REF)STR_MISC_PROCESSOR_VERSION; - HiiSetString(mHiiHandle, TokenToUpdate, NewStringToken, = NULL); - break; - default: - break; - } - } - } - } - } while (!EFI_ERROR(Status) && (MonotonicCount !=3D 0)); - // // Token to get for Socket Name // @@ -270,8 +268,7 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) // // Token to get for Processor Version // - TokenToGet =3D STRING_TOKEN (STR_MISC_PROCESSOR_VERSION); - Version =3D SmbiosMiscGetString (TokenToGet); + Version =3D CpuidSocVendorBrandString (); VersionStrLen =3D StrLen(Version); if (VersionStrLen > SMBIOS_STRING_MAX_LENGTH) { return EFI_UNSUPPORTED; @@ -372,10 +369,12 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) SmbiosRecord -> ProcessorFamily2 =3D ForType4InputData-> VariableRecor= d.ProcessorFamily; =20 // - // Processor speed + // Processor speed in MHz // - SmbiosRecord-> CurrentSpeed =3D *(UINT16*) & Frequency; - SmbiosRecord-> MaxSpeed =3D *(UINT16*) & Frequency; + Frequency =3D MeasureTscFrequency (); + Frequency =3D DivU64x32 (Frequency, 1000000); + SmbiosRecord-> CurrentSpeed =3D (UINT16)Frequency; + SmbiosRecord-> MaxSpeed =3D (UINT16)Frequency; =20 // // Processor Characteristics diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDri= verDataTable.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclas= sDriverDataTable.c index 93347a1a04..4c8e00801f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverData= Table.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverData= Table.c @@ -1,21 +1,17 @@ /** @file =20 -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscSubclassDriverDataTable.c =20 Abstract: =20 - Create the mMiscSubclassDataTable structure, and it is used to report - any generate data to the DataHub. - + Create the mMiscSubclassDataTable structure used to produce + SMBIOS records. =20 **/ =20 @@ -31,7 +27,7 @@ MISC_SMBIOS_TABLE_EXTERNS(EFI_MISC_BIOS_VENDOR_DATA, Misc= BiosVendor, MiscBiosVen MISC_SMBIOS_TABLE_EXTERNS(EFI_MISC_SYSTEM_MANUFACTURER_DATA, MiscSystemMan= ufacturer, MiscSystemManufacturer); MISC_SMBIOS_TABLE_EXTERNS(EFI_MISC_BASE_BOARD_MANUFACTURER_DATA, MiscBaseB= oardManufacturer, MiscBaseBoardManufacturer); MISC_SMBIOS_TABLE_EXTERNS(EFI_MISC_CHASSIS_MANUFACTURER_DATA, MiscChassisM= anufacturer, MiscChassisManufacturer); -MISC_SMBIOS_TABLE_EXTERNS(EFI_CACHE_VARIABLE_RECORD, MiscProcessorCache, M= iscProcessorCache); //type 7 +MISC_SMBIOS_TABLE_EXTERNS(UINTN, MiscProcessorCache, MiscProcessorCache); = //type 7 MISC_SMBIOS_TABLE_EXTERNS(EFI_CPU_DATA_RECORD, MiscProcessorInformation, M= iscProcessorInformation); //type 4 MISC_SMBIOS_TABLE_EXTERNS(EFI_MEMORY_ARRAY_LOCATION_DATA, MiscPhysicalMemo= ryArray,MiscPhysicalMemoryArray); MISC_SMBIOS_TABLE_EXTERNS(EFI_MEMORY_ARRAY_LINK_DATA, MiscMemoryDevice, Mi= scMemoryDevice); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDri= verEntryPoint.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubcla= ssDriverEntryPoint.c index e70732f5c2..cb677a0aa6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntr= yPoint.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntr= yPoint.c @@ -1,20 +1,17 @@ /** @file =20 -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - Module Name: =20 MiscSubclassDriverEntryPoint.c =20 Abstract: =20 - This driver parses the mMiscSubclassDataTable structure and reports - any generated data to the DataHub. + This driver parses the mMiscSubclassDataTable structure to + produce SMBIOS records. =20 =20 **/ @@ -99,7 +96,7 @@ Error: =20 /** Standard EFI driver point. This driver parses the mMiscSubclassDataTable - structure and reports any generated data to the DataHub. + structure to produce SMBIOS records. =20 @param ImageHandle - Handle for the image of this driver @param SystemTable - Pointer to the EFI System Table diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf index 99b1a18185..92b51b1743 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf @@ -86,6 +86,7 @@ [Packages] MdePkg/MdePkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec NetworkPkg/NetworkPkg.dec + UefiCpuPkg/UefiCpuPkg.dec =20 [LibraryClasses] HiiLib @@ -105,6 +106,7 @@ [LibraryClasses] PchPlatformLib NetLib HobLib + TimerLib =20 [Guids] gEfiNormalSetupGuid @@ -114,7 +116,6 @@ [Guids] [Protocols] gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL ALWAYS_CONSUMED - gEfiDataHubProtocolGuid gEfiMpServiceProtocolGuid gMemInfoProtocolGuid gEfiTdtOperationProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegio= n.c b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c index 99db5490b6..dad27f130d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c @@ -35,8 +35,6 @@ Abstract: #include #include =20 -#include - #include #include #include @@ -66,7 +64,6 @@ extern DXE_VLV_PLATFORM_POLICY_PROTOCOL *DxePlatformSaPo= licy; // =20 IGD_OPREGION_PROTOCOL mIgdOpRegion; -EFI_GUID mMiscSubClass =3D EFI_MISC_SUBCLASS_GUID; EFI_EVENT mConOutEvent; EFI_EVENT mSetGOPverEvent; VOID *mConOutReg; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatfor= mInitDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatf= ormInitDxe.inf index fe81a6e3bd..2aec0d1a9a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDx= e.inf @@ -3,9 +3,8 @@ #/*++ # # Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved -# = =20 - -# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# SPDX-License-Identifier: BSD-2-Clause-Patent # # Module Name: # @@ -65,7 +64,6 @@ [Depex] gDxeVlvPlatformPolicyGuid AND gEfiPciRootBridgeIoProtocolGuid AND gEfiCpuIo2ProtocolGuid AND - gEfiDataHubProtocolGuid AND gEfiGlobalNvsAreaProtocolGuid AND gEfiFirmwareVolume2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43067): https://edk2.groups.io/g/devel/message/43067 Mute This Topic: https://groups.io/mt/32267623/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43068+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43068+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949766; cv=none; d=zoho.com; s=zohoarc; b=CoChaz8MljP6r7Xfv5Pt3Mimhsne5oyRZEot/AKU2T+cenAiNSqwV3d0XCsJ9xzYdeJuuwcmVIFLHNiVeuf8NP80wKaN4NfMIjeqDYOrho7oakoSNWPGa2vPh9vPfPY+0yBTxferG1jKS51jeD5jAeerveb2skc1w21dULfnXII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949766; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=hm6eldio5njuSkpe25nb0nQUpmhBeLJ8GWS5lEMoqec=; b=QAac2p8DXLa1eSvbrSa+GgU/chKJWa98zy3VseV85ARWWLb4CnIpno4fGrUrq9nRl+c/7sjheTdxfXKt/avQlxLWNVcZq5M8/esTxCxZLPlzeXKozUW0ZNtHoJ6Iik20xnJhURFBGKjN2BP024GEwYsdrjkBEIBCIAkPyv2HK4s= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43068+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949766821849.481871782026; Sun, 30 Jun 2019 19:56:06 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480229" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:04 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 09/14] Vlv2TbltDevicePkg: Use PI Spec SMBUS2 PPI Date: Sun, 30 Jun 2019 19:55:48 -0700 Message-Id: <20190701025553.18596-10-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949766; bh=4b4sTd8XhhPQmCnxjKd+kQ//sY2GIhmn+aomf3hpNms=; h=Cc:Date:From:Reply-To:Subject:To; b=qKbjOmohGGwx29g7LudM4dARv1nvf7HE4qVhGJnqpu2WHdBnmeVvM3sWC317Ayo7YSY DuwhlAQMzZ/iGNH3pfoE/42iyIdyM5dECSDXjaokz0F8yunFdOqYaRcO/4RvwU6VltWjJ 8D8tJPCq/toyoleKu68KI9IUwwAytya/pC8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Switch from Intel Framework SMBUS PPI to the PI Spec SMBUS2 PPI. * Remove unused SmbusLib. Use SmbusLibNull instead. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Include/Guid/PlatformInfo.h | 9 +- .../BoardClkGens/BoardClkGens.c | 23 +- .../BoardClkGens/BoardClkGens.h | 8 +- .../MultiPlatformLib/BoardGpios/BoardGpios.c | 12 +- .../MultiPlatformLib/BoardGpios/BoardGpios.h | 7 +- .../MultiPlatformLib/MultiPlatformLib.h | 4 - .../MultiPlatformLib/MultiPlatformLib.inf | 2 +- .../Library/SmbusLib/CommonHeader.h | 26 - .../Library/SmbusLib/SmbusLib.c | 873 ------------------ .../Library/SmbusLib/SmbusLib.inf | 46 - .../Vlv2TbltDevicePkg/PlatformInitPei/Dimm.c | 319 ------- .../PlatformInitPei/PlatformEarlyInit.h | 10 +- .../PlatformPei/CommonHeader.h | 1 - .../PlatformPei/PlatformPei.inf | 1 - .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 +- 17 files changed, 24 insertions(+), 1323 deletions(-) delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/Commo= nHeader.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/Smbus= Lib.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/Smbus= Lib.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/Dimm.c diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h b= /Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h index cac31e2a40..afd4b6f4f0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h @@ -1,13 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - - Module Name: =20 PlatformInfo.h @@ -27,7 +23,6 @@ Abstract: #include #include #include -#include #include #endif =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Boar= dClkGens/BoardClkGens.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPla= tformLib/BoardClkGens/BoardClkGens.c index 919032c2df..4356f7b366 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGen= s/BoardClkGens.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGen= s/BoardClkGens.c @@ -1,12 +1,10 @@ /** @file Clock generator setting for multiplatform. =20 - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - **/ =20 #include @@ -44,7 +42,7 @@ CLOCK_GENERATOR_DETAILS mSupportedClockGeneratorTable[]= =3D EFI_STATUS ConfigureClockGenerator ( IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_SMBUS_PPI *SmbusPpi, + IN EFI_PEI_SMBUS2_PPI *SmbusPpi, IN CLOCK_GENERATOR_TYPE ClockType, IN UINT8 ClockAddress, IN UINTN ConfigurationTableLength, @@ -76,7 +74,6 @@ ConfigureClockGenerator ( Length =3D sizeof (Buffer); Command =3D 0; Status =3D SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -116,7 +113,6 @@ ConfigureClockGenerator ( Buffer[30] =3D 0x00; =20 Status =3D SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -127,7 +123,6 @@ ConfigureClockGenerator ( ); #else Status =3D SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -142,7 +137,6 @@ ConfigureClockGenerator ( Command =3D 4; Length =3D 1; Status =3D SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -164,7 +158,6 @@ ConfigureClockGenerator ( Length =3D sizeof (Buffer); Command =3D 0; Status =3D SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -201,7 +194,7 @@ ConfigureClockGenerator ( UINT8 ReadClockGeneratorID ( IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_SMBUS_PPI *SmbusPpi, + IN EFI_PEI_SMBUS2_PPI *SmbusPpi, IN UINT8 ClockAddress ) { @@ -217,7 +210,6 @@ ReadClockGeneratorID ( Length =3D sizeof (Buffer); Command =3D 0; SmbusPpi->Execute ( - PeiServices, SmbusPpi, SlaveAddress, Command, @@ -289,7 +281,7 @@ ConfigurePlatformClocks ( // Status =3D (**PeiServices).LocatePpi ( (CONST EFI_PEI_SERVICES **) PeiServices, - &gEfiPeiSmbusPpiGuid, + &gEfiPeiSmbus2PpiGuid, 0, NULL, &SmbusPpi @@ -300,8 +292,7 @@ ConfigurePlatformClocks ( SlaveAddress.SmbusDeviceAddress =3D ClockAddress >> 1; Length =3D 1; Command =3D 0x87; //Control Register 7 Vendor ID Check - Status =3D ((EFI_PEI_SMBUS_PPI *) SmbusPpi)->Execute ( - PeiServices, + Status =3D ((EFI_PEI_SMBUS2_PPI *) SmbusPpi)->Execute ( SmbusPpi, SlaveAddress, Command, @@ -405,7 +396,7 @@ ConfigurePlatformClocks ( static EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D { { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK| EFI_PEI_PPI_DESCRIPTOR_TERMINA= TE_LIST, - &gEfiPeiSmbusPpiGuid, + &gEfiPeiSmbus2PpiGuid, ConfigurePlatformClocks } }; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Boar= dClkGens/BoardClkGens.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPla= tformLib/BoardClkGens/BoardClkGens.h index e153933d72..fe0ed24af7 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGen= s/BoardClkGens.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGen= s/BoardClkGens.h @@ -3,11 +3,10 @@ =20 This file includes package header files, library classes. =20 - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 **/ =20 #ifndef _BOARD_CLK_GEN_H_ @@ -17,8 +16,7 @@ #include #include #include -#include -#include +#include #include #include =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Boar= dGpios/BoardGpios.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatfor= mLib/BoardGpios/BoardGpios.c index 5790d045fc..a9e2c8c060 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/= BoardGpios.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/= BoardGpios.c @@ -1,12 +1,10 @@ /** @file Gpio setting for multiplatform.. =20 - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2013 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - **/ =20 #include @@ -25,8 +23,6 @@ //AlpineValley platform code end // =20 -EFI_GUID gPeiSmbusPpiGuid =3D EFI_PEI_SMBUS_PPI_GUID; - /** @param None =20 @@ -66,7 +62,7 @@ ConfigurePlatformSysCtrlGpio ( =20 Status =3D (**PeiServices).LocatePpi ( (const EFI_PEI_SERVICES **)PeiServices, - &gPeiSmbusPpiGuid, + &gEfiPeiSmbus2PpiGuid, 0, NULL, (void **)&SmbusPpi @@ -92,7 +88,7 @@ ConfigurePlatformSysCtrlGpio ( static EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] =3D { { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK| EFI_PEI_PPI_DESCRIPTOR_TERMINA= TE_LIST, - &gEfiPeiSmbusPpiGuid, + &gEfiPeiSmbus2PpiGuid, ConfigurePlatformSysCtrlGpio } }; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Boar= dGpios/BoardGpios.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatfor= mLib/BoardGpios/BoardGpios.h index 0e19819b22..594616d63a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/= BoardGpios.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/= BoardGpios.h @@ -3,11 +3,10 @@ =20 This file includes package header files, library classes. =20 - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2013 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 **/ =20 #ifndef _BOARDGPIOS_H_ @@ -20,7 +19,7 @@ #include #include #include -#include +#include #include #include =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Mult= iPlatformLib.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/= MultiPlatformLib.h index 3fa9f7b129..13097fbc74 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.h @@ -26,7 +26,6 @@ =20 #include #include -#include =20 #include "PlatformBaseAddresses.h" #include "PchAccess.h" @@ -37,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -58,7 +55,6 @@ #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/Mult= iPlatformLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLi= b/MultiPlatformLib.inf index a4942a097c..7a084bea3c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatfo= rmLib.inf @@ -54,7 +54,6 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec =20 [LibraryClasses] @@ -64,6 +63,7 @@ [LibraryClasses] =20 [Ppis] gEfiPeiReadOnlyVariable2PpiGuid + gEfiPeiSmbus2PpiGuid =20 [Pcd.common] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/CommonHeader= .h b/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/CommonHeader.h deleted file mode 100644 index d34dd942d3..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/CommonHeader.h +++ /dev/null @@ -1,26 +0,0 @@ -/**@file - Common header file shared by all source files. - - This file includes package header files, library classes. - - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 -**/ - -#ifndef __COMMON_HEADER_H_ -#define __COMMON_HEADER_H_ - - -#include -#include - -#include -#include -#include -#include -#include - -#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.c b= /Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.c deleted file mode 100644 index 4052724812..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.c +++ /dev/null @@ -1,873 +0,0 @@ -/** @file - Intel ICH9 SMBUS library implementation built upon I/O library. - - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -**/ - -#include "CommonHeader.h" - -/** - Gets Io port base address of Smbus Host Controller. - - This internal function depends on a feature flag named PcdIchSmbusFixedI= oPortBaseAddress - to retrieve Smbus Io port base. If that feature flag is true, it will ge= t Smbus Io port base - address from a preset Pcd entry named PcdIchSmbusIoPortBaseAddress; othe= rwise, it will always - read Pci configuration space to get that value in each Smbus bus transac= tion. - - @return The Io port base address of Smbus host controller. - -**/ -UINTN -InternalGetSmbusIoPortBaseAddress ( - VOID - ) -{ - UINTN IoPortBaseAddress; - - IoPortBaseAddress =3D (UINTN) MmioRead32 (MmPciAddress (0, DEFAULT_PCI_B= US_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_SMBUS, PCI_FUNCTION_NUMBER_PCH_SMBUS, = R_PCH_SMBUS_BASE)) & B_PCH_SMBUS_BASE_BAR; - - // - // Make sure that the IO port base address has been properly set. - // - ASSERT (IoPortBaseAddress !=3D 0); - - return IoPortBaseAddress; -} - -/** - Acquires the ownership of SMBUS. - - This internal function reads the host state register. - If the SMBUS is not available, RETURN_TIMEOUT is returned; - Otherwise, it performs some basic initializations and returns - RETURN_SUCCESS. - - @param IoPortBaseAddress The Io port base address of Smbus Host control= ler. - - @retval RETURN_SUCCESS The SMBUS command was executed successfully. - @retval RETURN_TIMEOUT A timeout occurred while executing the SMBUS c= ommand. - -**/ -RETURN_STATUS -InternalSmBusAcquire ( - UINTN IoPortBaseAddress - ) -{ - UINT8 HostStatus; - - HostStatus =3D IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS); - if ((HostStatus & B_PCH_SMBUS_IUS) !=3D 0) { - return RETURN_TIMEOUT; - } else if ((HostStatus & B_PCH_SMBUS_HBSY) !=3D 0) { - // - // Clear host status register and exit. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS, B_PCH_SMBUS_HSTS_ALL); - return RETURN_TIMEOUT; - } - // - // Clear out any odd status information (Will Not Clear In Use). - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS, HostStatus); - - return RETURN_SUCCESS; -} - -/** - Starts the SMBUS transaction and waits until the end. - - This internal function start the SMBUS transaction and waits until the t= ransaction - of SMBUS is over by polling the INTR bit of Host status register. - If the SMBUS is not available, RETURN_TIMEOUT is returned; - Otherwise, it performs some basic initializations and returns - RETURN_SUCCESS. - - @param IoPortBaseAddress The Io port base address of Smbus Host contr= oller. - @param HostControl The Host control command to start SMBUS tran= saction. - - @retval RETURN_SUCCESS The SMBUS command was executed successfully. - @retval RETURN_CRC_ERROR The checksum is not correct (PEC is incorrec= t). - @retval RETURN_DEVICE_ERROR The request was not completed because a fail= ure reflected - in the Host Status Register bit. Device err= ors are - a result of a transaction collision, illegal= command field, - unclaimed cycle (host initiated), or bus err= ors (collisions). - -**/ -RETURN_STATUS -InternalSmBusStart ( - IN UINTN IoPortBaseAddress, - IN UINT8 HostControl - ) -{ - UINT8 HostStatus; - UINT8 AuxiliaryStatus; - - // - // Set Host Control Register (Initiate Operation, Interrupt disabled). - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCTL, (UINT8)(HostControl + B_= PCH_SMBUS_START)); - - do { - // - // Poll INTR bit of Host Status Register. - // - HostStatus =3D IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS); - } while ((HostStatus & (B_PCH_SMBUS_INTR | B_PCH_SMBUS_ERRORS | B_PCH_SM= BUS_BYTE_DONE_STS)) =3D=3D 0); - - if ((HostStatus & B_PCH_SMBUS_ERRORS) =3D=3D 0) { - return RETURN_SUCCESS; - } - - // - // Clear error bits of Host Status Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS, B_PCH_SMBUS_ERRORS); - - // - // Read Auxiliary Status Register to judge CRC error. - // - AuxiliaryStatus =3D IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_AUXS); - if ((AuxiliaryStatus & B_PCH_SMBUS_CRCE) !=3D 0) { - return RETURN_CRC_ERROR; - } - - return RETURN_DEVICE_ERROR; -} - -/** - Executes an SMBUS quick, byte or word command. - - This internal function executes an SMBUS quick, byte or word commond. - If Status is not NULL, then the status of the executed command is return= ed in Status. - - @param HostControl The value of Host Control Register to set. - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Value The byte/word write to the SMBUS. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The byte/word read from the SMBUS. - -**/ -UINT16 -InternalSmBusNonBlock ( - IN UINT8 HostControl, - IN UINTN SmBusAddress, - IN UINT16 Value, - OUT RETURN_STATUS *Status - ) -{ - RETURN_STATUS ReturnStatus; - UINTN IoPortBaseAddress; - UINT8 AuxiliaryControl; - - IoPortBaseAddress =3D InternalGetSmbusIoPortBaseAddress (); - - // - // Try to acquire the ownership of ICH SMBUS. - // - ReturnStatus =3D InternalSmBusAcquire (IoPortBaseAddress); - if (RETURN_ERROR (ReturnStatus)) { - goto Done; - } - - // - // Set the appropriate Host Control Register and auxiliary Control Regis= ter. - // - AuxiliaryControl =3D 0; - if (SMBUS_LIB_PEC (SmBusAddress)) { - AuxiliaryControl |=3D B_PCH_SMBUS_AAC; - HostControl |=3D B_PCH_SMBUS_PEC_EN; - } - - // - // Set Host Command Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMMAN= D (SmBusAddress)); - - // - // Write value to Host Data 0 and Host Data 1 Registers. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) Value); - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD1, (UINT8) (Value >> 8)); - - // - // Set Auxiliary Control Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_AUXC, AuxiliaryControl); - - // - // Set SMBUS slave address for the device to send/receive from. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_TSA, (UINT8) SmBusAddress); - - // - // Start the SMBUS transaction and wait for the end. - // - ReturnStatus =3D InternalSmBusStart (IoPortBaseAddress, HostControl); - - // - // Read value from Host Data 0 and Host Data 1 Registers. - // - Value =3D (UINT16)(IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HD1) << 8); - Value =3D (UINT16)(Value | IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HD0)= ); - - // - // Clear Host Status Register and Auxiliary Status Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS, B_PCH_SMBUS_HSTS_ALL); - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_AUXS, B_PCH_SMBUS_CRCE); - -Done: - if (Status !=3D NULL) { - *Status =3D ReturnStatus; - } - - return Value; -} - -/** - Executes an SMBUS quick read command. - - Executes an SMBUS quick read command on the SMBUS device specified by Sm= BusAddress. - Only the SMBUS slave address field of SmBusAddress is required. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If PEC is set in SmBusAddress, then ASSERT(). - If Command in SmBusAddress is not zero, then ASSERT(). - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - -**/ -VOID -EFIAPI -SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); - ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_QUICK, - SmBusAddress | B_PCH_SMBUS_RW_SEL_READ, - 0, - Status - ); -} - -/** - Executes an SMBUS quick write command. - - Executes an SMBUS quick write command on the SMBUS device specified by S= mBusAddress. - Only the SMBUS slave address field of SmBusAddress is required. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If PEC is set in SmBusAddress, then ASSERT(). - If Command in SmBusAddress is not zero, then ASSERT(). - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - -**/ -VOID -EFIAPI -SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); - ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_QUICK, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - 0, - Status - ); -} - -/** - Executes an SMBUS receive byte command. - - Executes an SMBUS receive byte command on the SMBUS device specified by = SmBusAddress. - Only the SMBUS slave address field of SmBusAddress is required. - The byte received from the SMBUS is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Command in SmBusAddress is not zero, then ASSERT(). - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The byte received from the SMBUS. - -**/ -UINT8 -EFIAPI -SmBusReceiveByte ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT8 ValueReturn =3D 0; - - ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D (UINT8) InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_BYTE, - SmBusAddress | B_PCH_SMBUS_RW_SEL_READ, - 0, - Status - ); - return ValueReturn; - - } - -/** - Executes an SMBUS send byte command. - - Executes an SMBUS send byte command on the SMBUS device specified by SmB= usAddress. - The byte specified by Value is sent. - Only the SMBUS slave address field of SmBusAddress is required. Value i= s returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Command in SmBusAddress is not zero, then ASSERT(). - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Value The 8-bit value to send. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The parameter of Value. - -**/ -UINT8 -EFIAPI -SmBusSendByte ( - IN UINTN SmBusAddress, - IN UINT8 Value, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT8 ValueReturn =3D 0; - - ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D (UINT8) InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_BYTE, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - Value, - Status - ); - return ValueReturn; - - } - -/** - Executes an SMBUS read data byte command. - - Executes an SMBUS read data byte command on the SMBUS device specified b= y SmBusAddress. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - The 8-bit value read from the SMBUS is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The byte read from the SMBUS. - -**/ -UINT8 -EFIAPI -SmBusReadDataByte ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT8 ValueReturn =3D 0; - - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - ValueReturn =3D (UINT8) InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_BYTE_DATA, - SmBusAddress | B_PCH_SMBUS_RW_SEL_READ, - 0, - Status - ); - return ValueReturn; -} - -/** - Executes an SMBUS write data byte command. - - Executes an SMBUS write data byte command on the SMBUS device specified = by SmBusAddress. - The 8-bit value specified by Value is written. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - Value is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Value The 8-bit value to write. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The parameter of Value. - -**/ -UINT8 -EFIAPI -SmBusWriteDataByte ( - IN UINTN SmBusAddress, - IN UINT8 Value, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT8 ValueReturn =3D 0; - - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D (UINT8) InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_BYTE_DATA, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - Value, - Status - ); - return ValueReturn; - -} - -/** - Executes an SMBUS read data word command. - - Executes an SMBUS read data word command on the SMBUS device specified b= y SmBusAddress. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - The 16-bit value read from the SMBUS is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The byte read from the SMBUS. - -**/ -UINT16 -EFIAPI -SmBusReadDataWord ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT16 ValueReturn =3D 0; - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_WORD_DATA, - SmBusAddress | B_PCH_SMBUS_RW_SEL_READ, - 0, - Status - ); - return ValueReturn; - -} - -/** - Executes an SMBUS write data word command. - - Executes an SMBUS write data word command on the SMBUS device specified = by SmBusAddress. - The 16-bit value specified by Value is written. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - Value is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Value The 16-bit value to write. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The parameter of Value. - -**/ -UINT16 -EFIAPI -SmBusWriteDataWord ( - IN UINTN SmBusAddress, - IN UINT16 Value, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT16 ValueReturn =3D 0; - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_WORD_DATA, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - Value, - Status - ); - return ValueReturn; -} - -/** - Executes an SMBUS process call command. - - Executes an SMBUS process call command on the SMBUS device specified by = SmBusAddress. - The 16-bit value specified by Value is written. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - The 16-bit value returned by the process call command is returned. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is not zero, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Value The 16-bit value to write. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The 16-bit value returned by the process call command. - -**/ -UINT16 -EFIAPI -SmBusProcessCall ( - IN UINTN SmBusAddress, - IN UINT16 Value, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINT16 ValueReturn =3D 0; - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - ValueReturn =3D InternalSmBusNonBlock ( - V_PCH_SMBUS_SMB_CMD_PROCESS_CALL, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - Value, - Status - ); - return ValueReturn; -} - -/** - Executes an SMBUS block command. - - Executes an SMBUS block read, block write and block write-block read com= mand - on the SMBUS device specified by SmBusAddress. - Bytes are read from the SMBUS and stored in Buffer. - The number of bytes read is returned, and will never return a value larg= er than 32-bytes. - If Status is not NULL, then the status of the executed command is return= ed in Status. - It is the caller's responsibility to make sure Buffer is large enough fo= r the total number of bytes read. - SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not n= eed to be any larger than 32 bytes. - - @param HostControl The value of Host Control Register to set. - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param WriteBuffer Pointer to the buffer of bytes to write to the S= MBUS. - @param ReadBuffer Pointer to the buffer of bytes to read from the = SMBUS. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The number of bytes read from the SMBUS. - -**/ -UINTN -InternalSmBusBlock ( - IN UINT8 HostControl, - IN UINTN SmBusAddress, - IN UINT8 *WriteBuffer, - OUT UINT8 *ReadBuffer, - OUT RETURN_STATUS *Status - ) -{ - RETURN_STATUS ReturnStatus; - UINTN Index; - UINTN BytesCount; - UINTN IoPortBaseAddress; - UINT8 AuxiliaryControl; - - IoPortBaseAddress =3D InternalGetSmbusIoPortBaseAddress (); - - BytesCount =3D SMBUS_LIB_LENGTH (SmBusAddress); - - // - // Try to acquire the ownership of ICH SMBUS. - // - ReturnStatus =3D InternalSmBusAcquire (IoPortBaseAddress); - if (RETURN_ERROR (ReturnStatus)) { - goto Done; - } - - // - // Set the appropriate Host Control Register and auxiliary Control Regis= ter. - // - AuxiliaryControl =3D B_PCH_SMBUS_E32B; - if (SMBUS_LIB_PEC (SmBusAddress)) { - AuxiliaryControl |=3D B_PCH_SMBUS_AAC; - HostControl |=3D B_PCH_SMBUS_PEC_EN; - } - - // - // Set Host Command Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMMAN= D (SmBusAddress)); - - // - // Set Auxiliary Control Regiester. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_AUXC, AuxiliaryControl); - - // - // Clear byte pointer of 32-byte buffer. - // - IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HCTL); - - if (WriteBuffer !=3D NULL) { - // - // Write the number of block to Host Block Data Byte Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) BytesCount); - - // - // Write data block to Host Block Data Register. - // - for (Index =3D 0; Index < BytesCount; Index++) { - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HBD, WriteBuffer[Index]); - } - } - - // - // Set SMBUS slave address for the device to send/receive from. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_TSA, (UINT8) SmBusAddress); - - // - // Start the SMBUS transaction and wait for the end. - // - ReturnStatus =3D InternalSmBusStart (IoPortBaseAddress, HostControl); - if (RETURN_ERROR (ReturnStatus)) { - goto Done; - } - - if (ReadBuffer !=3D NULL) { - // - // Read the number of block from host block data byte register. - // - BytesCount =3D IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HD0); - - // - // Write data block from Host Block Data Register. - // - for (Index =3D 0; Index < BytesCount; Index++) { - ReadBuffer[Index] =3D IoRead8 (IoPortBaseAddress + R_PCH_SMBUS_HBD); - } - } - -Done: - // - // Clear Host Status Register and Auxiliary Status Register. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HSTS, B_PCH_SMBUS_HSTS_ALL); - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_AUXS, B_PCH_SMBUS_CRCE); - - if (Status !=3D NULL) { - *Status =3D ReturnStatus; - } - - return BytesCount; -} - -/** - Executes an SMBUS read block command. - - Executes an SMBUS read block command on the SMBUS device specified by Sm= BusAddress. - Only the SMBUS slave address and SMBUS command fields of SmBusAddress ar= e required. - Bytes are read from the SMBUS and stored in Buffer. - The number of bytes read is returned, and will never return a value larg= er than 32-bytes. - If Status is not NULL, then the status of the executed command is return= ed in Status. - It is the caller's responsibility to make sure Buffer is large enough fo= r the total number of bytes read. - SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not n= eed to be any larger than 32 bytes. - If Length in SmBusAddress is not zero, then ASSERT(). - If Buffer is NULL, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Buffer Pointer to the buffer to store the bytes read fr= om the SMBUS. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The number of bytes read. - -**/ -UINTN -EFIAPI -SmBusReadBlock ( - IN UINTN SmBusAddress, - OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINTN BytesCount =3D 0; - - ASSERT (Buffer !=3D NULL); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) =3D=3D 0); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - - BytesCount =3D InternalSmBusBlock ( - V_PCH_SMBUS_SMB_CMD_BLOCK, - SmBusAddress | B_PCH_SMBUS_RW_SEL_READ, - NULL, - Buffer, - Status - ); - return BytesCount; - -} - -/** - Executes an SMBUS write block command. - - Executes an SMBUS write block command on the SMBUS device specified by S= mBusAddress. - The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBus= Address are required. - Bytes are written to the SMBUS from Buffer. - The number of bytes written is returned, and will never return a value l= arger than 32-bytes. - If Status is not NULL, then the status of the executed command is return= ed in Status. - If Length in SmBusAddress is zero or greater than 32, then ASSERT(). - If Buffer is NULL, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param Buffer Pointer to the buffer to store the bytes read fr= om the SMBUS. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The number of bytes written. - -**/ -UINTN -EFIAPI -SmBusWriteBlock ( - IN UINTN SmBusAddress, - OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINTN BytesCount =3D 0; - - ASSERT (Buffer !=3D NULL); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) >=3D 1); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) <=3D 32); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - - BytesCount =3D InternalSmBusBlock ( - - V_PCH_SMBUS_SMB_CMD_BLOCK, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - Buffer, - NULL, - Status - ); - - return BytesCount; -} - -/** - Executes an SMBUS block process call command. - - Executes an SMBUS block process call command on the SMBUS device specifi= ed by SmBusAddress. - The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBus= Address are required. - Bytes are written to the SMBUS from WriteBuffer. Bytes are then read fr= om the SMBUS into ReadBuffer. - If Status is not NULL, then the status of the executed command is return= ed in Status. - It is the caller's responsibility to make sure ReadBuffer is large enoug= h for the total number of bytes read. - SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not n= eed to be any larger than 32 bytes. - If Length in SmBusAddress is zero or greater than 32, then ASSERT(). - If WriteBuffer is NULL, then ASSERT(). - If ReadBuffer is NULL, then ASSERT(). - If any reserved bits of SmBusAddress are set, then ASSERT(). - - @param SmBusAddress Address that encodes the SMBUS Slave Address, - SMBUS Command, SMBUS Data Length, and PEC. - @param WriteBuffer Pointer to the buffer of bytes to write to the S= MBUS. - @param ReadBuffer Pointer to the buffer of bytes to read from the = SMBUS. - @param Status Return status for the executed command. - This is an optional parameter and may be NULL. - - @return The number of bytes written. - -**/ -UINTN -EFIAPI -SmBusBlockProcessCall ( - IN UINTN SmBusAddress, - IN VOID *WriteBuffer, - OUT VOID *ReadBuffer, - OUT RETURN_STATUS *Status OPTIONAL - ) -{ - UINTN BytesCount =3D 0; - - ASSERT (WriteBuffer !=3D NULL); - ASSERT (ReadBuffer !=3D NULL); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) >=3D 1); - ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) <=3D 32); - ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) =3D=3D 0); - - BytesCount =3D InternalSmBusBlock ( - V_PCH_SMBUS_SMB_CMD_BLOCK_PROCESS, - SmBusAddress | B_PCH_SMBUS_RW_SEL_WRITE, - WriteBuffer, - ReadBuffer, - Status - ); - return BytesCount; - - } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf= b/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf deleted file mode 100644 index b13e3de0cc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf +++ /dev/null @@ -1,46 +0,0 @@ -## @file -# Component description file for Intel Ich9 Smbus Library. -# -# SMBUS Library that layers on top of the I/O Library to directly -# access a standard SMBUS host controller. -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -# -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SmbusLib - FILE_GUID =3D 0558CAEA-FEF3-4b6d-915E-8742EFE6DEE1 - MODULE_TYPE =3D BASE - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D SmbusLib - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - SmbusLib.c - -[Packages] - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - MdePkg/MdePkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - -[LibraryClasses] - PcdLib - DebugLib - PciLib - IoLib - -[Pcd.common] - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/Dimm.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformInitPei/Dimm.c deleted file mode 100644 index 3fda6313d0..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/Dimm.c +++ /dev/null @@ -1,319 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - - Dimm.c - -Abstract: - - PPI for reading SPD modules on DIMMs. - ---*/ - - -// -// Header Files -// -#include "Platformearlyinit.h" - -#define DIMM_SOCKETS 4 // Total number of DIMM sockets allowed on - // the platform -#define DIMM_SEGMENTS 1 // Total number of Segments Per DIMM. -#define MEMORY_CHANNELS 2 // Total number of memory channels - // populated on the system board -// -// Prototypes -// - -EFI_STATUS -EFIAPI -GetDimmState ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - OUT PEI_PLATFORM_DIMM_STATE *State - ); - -EFI_STATUS -EFIAPI -SetDimmState ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - IN PEI_PLATFORM_DIMM_STATE *State - ); - -EFI_STATUS -EFIAPI -ReadSpd ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - IN UINT8 Offset, - IN UINTN Count, - IN OUT UINT8 *Buffer - ); - -static PEI_PLATFORM_DIMM_PPI mGchDimmPpi =3D { - DIMM_SOCKETS, - DIMM_SEGMENTS, - MEMORY_CHANNELS, - GetDimmState, - SetDimmState, - ReadSpd -}; - -static EFI_PEI_PPI_DESCRIPTOR mPpiPlatformDimm =3D { - (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), - &gPeiPlatformDimmPpiGuid, - &mGchDimmPpi -}; - - -// -// Functions -// - -/** - This function returns the current state of a single DIMM. Present indic= ates - that the DIMM slot is physically populated. Disabled indicates that the= DIMM - should not be used. - - @param PeiServices PEI services table pointer - @param This PPI pointer - @param Dimm DIMM to read from - @param State Pointer to a return buffer to be updated with the c= urrent state - of the DIMM - - @retval EFI_SUCCESS The function completed successfully. - -**/ -EFI_STATUS -EFIAPI -GetDimmState ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - OUT PEI_PLATFORM_DIMM_STATE *State - ) -{ - EFI_STATUS Status; - UINT8 Buffer; - - PEI_ASSERT (PeiServices, (Dimm < This->DimmSockets)); - - // - // A failure here does not necessarily mean that no DIMM is present. - // Read a single byte. All we care about is the return status. - // - Status =3D ReadSpd ( - PeiServices, - This, - Dimm, - 0, - 1, - &Buffer - ); - - if (EFI_ERROR (Status)) { - State->Present =3D 0; - } else { - State->Present =3D 1; - } - - // - // BUGBUG: Update to check platform variable when it is available - // - State->Disabled =3D 0; - State->Reserved =3D 0; - - return EFI_SUCCESS; -} - -/** - - This function updates the state of a single DIMM. - - @param PeiServices PEI services table pointer - @param This PPI pointer - @param Dimm DIMM to set state for - @param State Pointer to the state information to set. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_UNSUPPORTED The function is not supported. - -**/ -EFI_STATUS -EFIAPI -SetDimmState ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - IN PEI_PLATFORM_DIMM_STATE *State - ) -{ - return EFI_UNSUPPORTED; -} - -/** - This function reads SPD information from a DIMM. - - PeiServices PEI services table pointer - This PPI pointer - Dimm DIMM to read from - Offset Offset in DIMM - Count Number of bytes - Buffer Return buffer - - @param EFI_SUCCESS The function completed successfully. - @param EFI_DEVICE_ERROR The DIMM being accessed reported a devic= e error, - does not have an SPD module, or is not i= nstalled in - the system. - @retval EFI_TIMEOUT Time out trying to read the SPD module. - @retval EFI_INVALID_PARAMETER A parameter was outside the legal limits. - -**/ -EFI_STATUS -EFIAPI -ReadSpd ( - IN EFI_PEI_SERVICES **PeiServices, - IN PEI_PLATFORM_DIMM_PPI *This, - IN UINT8 Dimm, - IN UINT8 Offset, - IN UINTN Count, - IN OUT UINT8 *Buffer - ) -{ - EFI_STATUS Status; - PEI_SMBUS_PPI *Smbus; - UINTN Index; - UINTN Index1; - EFI_SMBUS_DEVICE_ADDRESS SlaveAddress; - EFI_SMBUS_DEVICE_COMMAND Command; - UINTN Length; - - Status =3D (**PeiServices).LocatePpi ( - PeiServices, - &gPeiSmbusPpiGuid, // GUID - 0, // INSTANCE - NULL, // EFI_PEI_PPI_DESCRIPTOR - &Smbus // PPI - ); - ASSERT_PEI_ERROR (PeiServices, Status); - - switch (Dimm) { - case 0: - SlaveAddress.SmbusDeviceAddress =3D SMBUS_ADDR_CH_A_1 >> 1; - break; - case 1: - SlaveAddress.SmbusDeviceAddress =3D SMBUS_ADDR_CH_A_2 >> 1; - break; - case 2: - SlaveAddress.SmbusDeviceAddress =3D SMBUS_ADDR_CH_B_1 >> 1; - break; - case 3: - SlaveAddress.SmbusDeviceAddress =3D SMBUS_ADDR_CH_B_2 >> 1; - break; - default: - return EFI_INVALID_PARAMETER; - } - - Index =3D Count % 4; - if (Index !=3D 0) { - // - // read the first serveral bytes to speed up following reading - // - for (Index1 =3D 0; Index1 < Index; Index1++) { - Length =3D 1; - Command =3D Offset + Index1; - Status =3D Smbus->Execute ( - PeiServices, - Smbus, - SlaveAddress, - Command, - EfiSmbusReadByte, - FALSE, - &Length, - &Buffer[Index1] - ); - if (EFI_ERROR(Status)) { - return Status; - } - } - } - - // - // Now collect all the remaining bytes on 4 bytes block - // - for (; Index < Count; Index +=3D 2) { - Command =3D Index + Offset; - Length =3D 2; - Status =3D Smbus->Execute ( - PeiServices, - Smbus, - SlaveAddress, - Command, - EfiSmbusReadWord, - FALSE, - &Length, - &Buffer[Index] - ); - if (EFI_ERROR(Status)) { - return Status; - } - - Index +=3D 2; - Command =3D Index + Offset; - Length =3D 2; - Status =3D Smbus->Execute ( - PeiServices, - Smbus, - SlaveAddress, - Command, - EfiSmbusReadWord, - FALSE, - &Length, - &Buffer[Index] - ); - if (EFI_ERROR(Status)) { - return Status; - } - } - return EFI_SUCCESS; -} - -/** - This function initializes the PEIM. It simply installs the DIMM PPI. - - @param FfsHeader Not used by this function - @param PeiServices Pointer to PEI services table - - @retval EFI_SUCCESS The function completed successfully. - -**/ -EFI_STATUS -EFIAPI -PeimInitializeDimm ( - IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, - IN VOID *SmbusPpi - ) -{ - EFI_STATUS Status; - - Status =3D (**PeiServices).InstallPpi ( - PeiServices, - &mPpiPlatformDimm - ); - ASSERT_PEI_ERROR (PeiServices, Status); - - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarly= Init.h b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit= .h index 9631d49a84..6a2ecf8fb4 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h @@ -59,7 +59,7 @@ Abstract: #include #include #include -#include +#include #include #include #include @@ -1454,14 +1454,6 @@ SetDxeCacheMode ( IN CONST EFI_PEI_SERVICES **PeiServices ); =20 -EFI_STATUS -GPIO_initialization ( - IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, - IN VOID *SmbusPpi - ); - - BOOLEAN IsRtcUipAlwaysSet ( IN CONST EFI_PEI_SERVICES **PeiServices diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h b/= Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h index a533f3918c..c18cabb2f2 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf index 28a5274c40..d3969f2344 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf @@ -72,7 +72,6 @@ [LibraryClasses] DebugLib HobLib IoLib - MultiPlatformLib MtrrLib PerformanceLib MonoStatusCodeLib diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index b16883e98c..3910281c49 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -171,7 +171,7 @@ [LibraryClasses.common] # # ICH # - SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index c9335a98c8..2ae594e5be 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -169,7 +169,7 @@ [LibraryClasses.common] # # ICH # - SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index fd9ddebfd9..5cdc9bebc8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -171,7 +171,7 @@ [LibraryClasses.common] # # ICH # - SmbusLib|Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf + SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf SmmLib|Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf =20 # --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43068): https://edk2.groups.io/g/devel/message/43068 Mute This Topic: https://groups.io/mt/32267624/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43069+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43069+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949769; cv=none; d=zoho.com; s=zohoarc; b=OJa6p/qGe/Ha9OreLEoT9yWn98TnPvKQfYl0QI5XwI7pqXDSOcqh/8CsmM520offRQ28eVN3Kx2RSsqeNl8EuEfCmqi2hhJCSBwmjVmjNpaSdw7BBA5wGL9YQB7BSFVkkqmlFDAnFabkASvQvhZDpzukPT+AqaWiVDPRWpOeSO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949769; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=NIEs+nQ4aVWcuD+8iz2NzIgKOaE3DXLhmRxWYlcm3cg=; b=J6N4yTGt87tQvqxmvDtz8b8QWJ3UloZO3pFaksLbGdVb9lTgxuGn6//ZczGgR59xOZ3cbNIyL2OaJWCmryYTeD1CfK1ayjZDLNd54c4V8Jqvs/3LmklLZXJ2OKi7XA1JHePjtdsNGrtMsuqO3xif6Ipie411Q53YDTRfKXhWiJ0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43069+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949769770236.39248380627782; Sun, 30 Jun 2019 19:56:09 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:08 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480239" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:05 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 10/14] Vlv2TbltDevicePkg: Switch to MdeModulePkg BdsDxe Date: Sun, 30 Jun 2019 19:55:49 -0700 Message-Id: <20190701025553.18596-11-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949769; bh=+v1AjApOPB8EJZtqm95NQqvXNhdFDQUBHOkZTC2pDqo=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=rQ2OmK+OO7Fu/BYx6Bxc33CNGoQBD982XQq3Rxmns986Z730awimWwAZV0b/bCB0j8p kjnFa5hXIvjx+QDDQNZpNdmf0ajK8OgIA0KMGF0xwB35bIry232SMrIxh3xI+9pL33HJF trACkyTaFTQdYYYtTzSzWZB9QRXXje2DAyc= X-ZohoMail-DKIM: pass (identity @groups.io) Switch from Intel Framework BDS module and libraries to the MdeModulePkg BdsDxe module and libraries. Update FLASH map for full 8MB FLASH size Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Library/FmpDeviceLib/FmpDeviceLib.c | 12 +- .../DxePlatformBootManagerLib/BdsPlatform.c | 1409 ++++++ .../DxePlatformBootManagerLib/BdsPlatform.h | 253 + .../DxePlatformBootManagerLib.inf | 95 + .../DxePlatformBootManagerLib/MemoryTest.c | 83 + .../PlatformBootOption.c | 559 ++ .../Library/PlatformBdsLib/BdsPlatform.c | 3092 ------------ .../Library/PlatformBdsLib/BdsPlatform.h | 516 -- .../Library/PlatformBdsLib/PlatformBdsLib.inf | 128 - .../PlatformBdsLib/PlatformBdsStrings.uni | 30 - .../Library/PlatformBdsLib/PlatformData.c | 306 -- .../Library/GenericBdsLib/BdsBoot.c | 4490 ----------------- .../Library/GenericBdsLib/BdsConnect.c | 429 -- .../Library/GenericBdsLib/BdsConsole.c | 1061 ---- .../Library/GenericBdsLib/BdsMisc.c | 1575 ------ .../Library/GenericBdsLib/DevicePath.c | 27 - .../Library/GenericBdsLib/GenericBdsLib.inf | 143 - .../Library/GenericBdsLib/GenericBdsLib.uni | 19 - .../GenericBdsLib/GenericBdsStrings.uni | 30 - .../Library/GenericBdsLib/InternalBdsLib.h | 173 - .../Library/GenericBdsLib/String.c | 26 - .../Library/GenericBdsLib/String.h | 42 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 26 +- .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 53 +- .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 22 +- .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 22 +- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 22 +- .../Intel/Vlv2TbltDevicePkg/UiApp/FrontPage.c | 33 - .../Intel/Vlv2TbltDevicePkg/UiApp/UiApp.inf | 32 - 29 files changed, 2477 insertions(+), 12231 deletions(-) create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/BdsPlatform.c create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/BdsPlatform.h create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/DxePlatformBootManagerLib.inf create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/MemoryTest.c create mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/PlatformBootOption.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib= /BdsPlatform.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib= /BdsPlatform.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib= /PlatformBdsLib.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib= /PlatformBdsStrings.uni delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib= /PlatformData.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/BdsBoot.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/BdsConnect.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/BdsConsole.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/BdsMisc.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/DevicePath.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/GenericBdsLib.inf delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/GenericBdsLib.uni delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/InternalBdsLib.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/String.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFramewor= kModulePkg/Library/GenericBdsLib/String.h delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/UiApp/FrontPage.c delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/UiApp/UiApp.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDe= viceLib/FmpDeviceLib.c b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/L= ibrary/FmpDeviceLib/FmpDeviceLib.c index a863d69381..57185d8d09 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib= /FmpDeviceLib.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib= /FmpDeviceLib.c @@ -32,11 +32,11 @@ typedef struct { } UPDATE_CONFIG_DATA; =20 UPDATE_CONFIG_DATA mUpdateConfigData[] =3D { - { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00000000, 0x00040000, 0x00000000 }, - { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x000C0000, 0x00050000, 0x000C0000 }, - { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00110000, 0x00210000, 0x00110000 }, - { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00320000, 0x00070000, 0x00320000 }, - { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00390000, 0x00070000, 0x00390000 } + { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00400000, 0x00040000, 0x00400000 }, + { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x004C0000, 0x00050000, 0x004C0000 }, + { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00510000, 0x00210000, 0x00510000 }, + { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00720000, 0x00070000, 0x00720000 }, + { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0= x00790000, 0x00070000, 0x00790000 } }; =20 /** @@ -95,7 +95,7 @@ FmpDeviceGetSize ( if (Size =3D=3D NULL) { return EFI_INVALID_PARAMETER; } - *Size =3D PcdGet32 (PcdBiosRomBase); + *Size =3D PcdGet32 (PcdBiosRomSize); return EFI_SUCCESS; } =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/BdsPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBo= otManagerLib/BdsPlatform.c new file mode 100644 index 0000000000..4dd3827a6e --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Bd= sPlatform.c @@ -0,0 +1,1409 @@ +/** @file + This file include all platform action which can be customized by IBV/OEM. + +Copyright (c) 2017, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "BdsPlatform.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_BOOT_MODE gBootMode; + +BOOLEAN gPPRequireUIConfirm; + +extern UINTN mBootMenuOptionNumber; + +GLOBAL_REMOVE_IF_UNREFERENCED USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboa= rdDevicePath =3D { + { + { + MESSAGING_DEVICE_PATH, + MSG_USB_CLASS_DP, + { + (UINT8) (sizeof (USB_CLASS_DEVICE_PATH)), + (UINT8) ((sizeof (USB_CLASS_DEVICE_PATH)) >> 8) + } + }, + 0xffff, // VendorId + 0xffff, // ProductId + CLASS_HID, // DeviceClass + SUBCLASS_BOOT, // DeviceSubClass + PROTOCOL_KEYBOARD // DeviceProtocol + }, + gEndEntire +}; + +// +// Platform specific ISA serial device path +// +GLOBAL_REMOVE_IF_UNREFERENCED PLATFORM_ISA_SERIAL_DEVICE_PATH gIsaSerialDe= vicePath =3D { + gPciRootBridge, + gPciIsaBridge, + gPnp16550ComPort, + gUart(115200, 8, 1, 1), + gPcAnsiTerminal, + gEndEntire +}; + +// +// Internal shell mode +// +GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellModeColumn; +GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellModeRow; +GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellHorizontalResolution; +GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mShellVerticalResolution; +// +// BDS Platform Functions +// + +BOOLEAN +IsMorBitSet ( + VOID + ) +{ + UINTN MorControl; + EFI_STATUS Status; + UINTN DataSize; + + // + // Check if the MOR bit is set. + // + DataSize =3D sizeof (MorControl); + Status =3D gRT->GetVariable ( + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + &gEfiMemoryOverwriteControlDataGuid, + NULL, + &DataSize, + &MorControl + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, " PlatformBootMangerLib: gEfiMemoryOverwriteContro= lDataGuid doesn't exist!!***\n")); + MorControl =3D 0; + } else { + DEBUG ((DEBUG_INFO, " PlatformBootMangerLib: Get the gEfiMemoryOverwri= teControlDataGuid =3D %x!!***\n", MorControl)); + } + + return (BOOLEAN) (MorControl & 0x01); +} + +VOID +DumpDevicePath ( + IN CHAR16 *Name, + IN EFI_DEVICE_PATH *DevicePath + ) +{ + CHAR16 *Str; + + Str =3D ConvertDevicePathToText(DevicePath, TRUE, TRUE); + DEBUG ((DEBUG_INFO, "%s: %s\n", Name, Str)); + if (Str !=3D NULL) { + FreePool (Str); + } +} + +/** + An empty function to pass error checking of CreateEventEx (). + + This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error + checked correctly since it is now mapped into CreateEventEx() in UEFI 2.= 0. + + @param Event Event whose notification function is being= invoked. + @param Context The pointer to the notification function's= context, + which is implementation-dependent. +**/ +VOID +EFIAPI +InternalBdsEmptyCallbackFuntion ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + return; +} + +VOID +ExitPmAuth ( + VOID + ) +{ + EFI_HANDLE Handle; + EFI_STATUS Status; + EFI_EVENT EndOfDxeEvent; + + DEBUG((DEBUG_INFO,"ExitPmAuth ()- Start\n")); + // + // Prepare S3 information, this MUST be done before ExitPmAuth/EndOfDxe + // + // + // Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth + // + Status =3D gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + InternalBdsEmptyCallbackFuntion, + NULL, + &gEfiEndOfDxeEventGroupGuid, + &EndOfDxeEvent + ); + ASSERT_EFI_ERROR (Status); + gBS->SignalEvent (EndOfDxeEvent); + gBS->CloseEvent (EndOfDxeEvent); + DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n")= ); + + // + // NOTE: We need install DxeSmmReadyToLock directly here because many bo= ot script is added via ExitPmAuth/EndOfDxe callback. + // If we install them at same callback, these boot script will be reject= ed because BootScript Driver runs first to lock them done. + // So we seperate them to be 2 different events, ExitPmAuth is last chan= ce to let platform add boot script. DxeSmmReadyToLock will + // make boot script save driver lock down the interface. + // + Handle =3D NULL; + Status =3D gBS->InstallProtocolInterface ( + &Handle, + &gEfiDxeSmmReadyToLockProtocolGuid, + EFI_NATIVE_INTERFACE, + NULL + ); + ASSERT_EFI_ERROR (Status); + DEBUG((DEBUG_INFO,"ExitPmAuth ()- End\n")); +} + +VOID +ConnectRootBridge ( + BOOLEAN Recursive + ) +{ + UINTN RootBridgeHandleCount; + EFI_HANDLE *RootBridgeHandleBuffer; + UINTN RootBridgeIndex; + + RootBridgeHandleCount =3D 0; + gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiPciRootBridgeIoProtocolGuid, + NULL, + &RootBridgeHandleCount, + &RootBridgeHandleBuffer + ); + for (RootBridgeIndex =3D 0; RootBridgeIndex < RootBridgeHandleCount; Roo= tBridgeIndex++) { + gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL,= NULL, Recursive); + } +} + + +/** + Return whether the device is trusted console. + + @param Device The device to be tested. + + @retval TRUE The device can be trusted. + @retval FALSE The device cannot be trusted. +**/ +BOOLEAN +IsTrustedConsole ( + IN CONSOLE_TYPE ConsoleType, + IN EFI_DEVICE_PATH_PROTOCOL *Device + ) +{ + VOID *TrustedConsoleDevicepath; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + EFI_DEVICE_PATH_PROTOCOL *Instance; + UINTN Size; + EFI_DEVICE_PATH_PROTOCOL *ConsoleDevice; + + if (Device =3D=3D NULL) { + return FALSE; + } + + ConsoleDevice =3D DuplicateDevicePath(Device); + + TrustedConsoleDevicepath =3D NULL; + + switch (ConsoleType) { + case ConIn: + TrustedConsoleDevicepath =3D PcdGetPtr (PcdTrustedConsoleInputDevicePa= th); + break; + case ConOut: + // + // Check GOP and remove last node + // + TempDevicePath =3D ConsoleDevice; + while (!IsDevicePathEndType (TempDevicePath)) { + if (DevicePathType (TempDevicePath) =3D=3D ACPI_DEVICE_PATH && + DevicePathSubType (TempDevicePath) =3D=3D ACPI_ADR_DP) { + SetDevicePathEndNode (TempDevicePath); + break; + } + TempDevicePath =3D NextDevicePathNode (TempDevicePath); + } + + TrustedConsoleDevicepath =3D PcdGetPtr (PcdTrustedConsoleOutputDeviceP= ath); + break; + default: + ASSERT(FALSE); + break; + } + + TempDevicePath =3D TrustedConsoleDevicepath; + do { + Instance =3D GetNextDevicePathInstance (&TempDevicePath, &Size); + if (Instance =3D=3D NULL) { + break; + } + + if (CompareMem (ConsoleDevice, Instance, Size - END_DEVICE_PATH_LENGTH= ) =3D=3D 0) { + FreePool (Instance); + FreePool (ConsoleDevice); + return TRUE; + } + + FreePool (Instance); + } while (TempDevicePath !=3D NULL); + + FreePool (ConsoleDevice); + + return FALSE; +} + +BOOLEAN +IsUsbShortForm ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + if ((DevicePathType (DevicePath) =3D=3D MESSAGING_DEVICE_PATH) && + ((DevicePathSubType (DevicePath) =3D=3D MSG_USB_CLASS_DP) || (Device= PathSubType (DevicePath) =3D=3D MSG_USB_WWID_DP)) ) { + return TRUE; + } + + return FALSE; +} + +/** + Connect the USB short form device path. + + @param DevicePath USB short form device path + + @retval EFI_SUCCESS Successfully connected the USB device + @retval EFI_NOT_FOUND Cannot connect the USB device + @retval EFI_INVALID_PARAMETER The device path is invalid. +**/ +EFI_STATUS +ConnectUsbShortFormDevicePath ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + EFI_STATUS Status; + EFI_HANDLE *Handles; + UINTN HandleCount; + UINTN Index; + EFI_PCI_IO_PROTOCOL *PciIo; + UINT8 Class[3]; + BOOLEAN AtLeastOneConnected; + + // + // Check the passed in parameters + // + if (DevicePath =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + if (!IsUsbShortForm (DevicePath)) { + return EFI_INVALID_PARAMETER; + } + + // + // Find the usb host controller firstly, then connect with the remaining= device path + // + AtLeastOneConnected =3D FALSE; + Status =3D gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiPciIoProtocolGuid, + NULL, + &HandleCount, + &Handles + ); + for (Index =3D 0; Index < HandleCount; Index++) { + Status =3D gBS->HandleProtocol ( + Handles[Index], + &gEfiPciIoProtocolGuid, + (VOID **) &PciIo + ); + if (!EFI_ERROR (Status)) { + // + // Check whether the Pci device is the wanted usb host controller + // + Status =3D PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Cla= ss); + if (!EFI_ERROR (Status) && + ((PCI_CLASS_SERIAL =3D=3D Class[2]) && (PCI_CLASS_SERIAL_USB =3D= =3D Class[1])) + ) { + Status =3D gBS->ConnectController ( + Handles[Index], + NULL, + DevicePath, + FALSE + ); + if (!EFI_ERROR(Status)) { + AtLeastOneConnected =3D TRUE; + } + } + } + } + + return AtLeastOneConnected ? EFI_SUCCESS : EFI_NOT_FOUND; +} + +/** + Update the ConIn/ConOut variable with ISA Serial device path,if its not = already exists in ConIn/ConOut +**/ +VOID +EnumIsaSerial ( + VOID + ) +{ + DEBUG ((DEBUG_INFO, "[EnumIsaSerial]\n")); + EfiBootManagerUpdateConsoleVariable (ConIn, (EFI_DEVICE_PATH_PROTOCOL *)= &gIsaSerialDevicePath, NULL); + EfiBootManagerUpdateConsoleVariable (ConOut, (EFI_DEVICE_PATH_PROTOCOL *= ) &gIsaSerialDevicePath, NULL); + + // + // Append ISA Serial DevicePath to "ConInDev" and "ConOutDev" + // + EfiBootManagerUpdateConsoleVariable (ConInDev, (EFI_DEVICE_PATH_PROTOCOL= *) &gIsaSerialDevicePath, NULL); + EfiBootManagerUpdateConsoleVariable (ConOutDev, (EFI_DEVICE_PATH_PROTOCO= L *) &gIsaSerialDevicePath, NULL); +} + +/** + Update the ConIn variable with USB Keyboard device path,if its not alrea= dy exists in ConIn +**/ +VOID +EnumUsbKeyboard ( + VOID + ) +{ + DEBUG ((DEBUG_INFO, "[EnumUsbKeyboard]\n")); + EfiBootManagerUpdateConsoleVariable (ConIn, (EFI_DEVICE_PATH_PROTOCOL *)= &gUsbClassKeyboardDevicePath, NULL); + + // + // Append Usb Keyboard short form DevicePath into "ConInDev" + // + EfiBootManagerUpdateConsoleVariable (ConInDev, (EFI_DEVICE_PATH_PROTOCOL= *) &gUsbClassKeyboardDevicePath, NULL); +} + +BOOLEAN +IsVgaHandle ( + IN EFI_HANDLE Handle + ) +{ + EFI_PCI_IO_PROTOCOL *PciIo; + PCI_TYPE00 Pci; + EFI_STATUS Status; + + Status =3D gBS->HandleProtocol ( + Handle, + &gEfiPciIoProtocolGuid, + (VOID **)&PciIo + ); + if (!EFI_ERROR (Status)) { + Status =3D PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint32, + 0, + sizeof (Pci) / sizeof (UINT32), + &Pci + ); + if (!EFI_ERROR (Status)) { + if (IS_PCI_VGA (&Pci) || IS_PCI_OLD_VGA (&Pci)) { + return TRUE; + } + } + } + return FALSE; +} + +EFI_HANDLE +IsVideoController ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + EFI_DEVICE_PATH_PROTOCOL *DupDevicePath; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + EFI_STATUS Status; + EFI_HANDLE DeviceHandle; + + DupDevicePath =3D DuplicateDevicePath (DevicePath); + ASSERT (DupDevicePath !=3D NULL); + if (DupDevicePath =3D=3D NULL) { + return NULL; + } + + TempDevicePath =3D DupDevicePath; + Status =3D gBS->LocateDevicePath ( + &gEfiDevicePathProtocolGuid, + &TempDevicePath, + &DeviceHandle + ); + FreePool (DupDevicePath); + if (EFI_ERROR (Status)) { + return NULL; + } + + if (IsVgaHandle (DeviceHandle)) { + return DeviceHandle; + } else { + return NULL; + } +} + +BOOLEAN +IsGopDevicePath ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + while (!IsDevicePathEndType (DevicePath)) { + if (DevicePathType (DevicePath) =3D=3D ACPI_DEVICE_PATH && + DevicePathSubType (DevicePath) =3D=3D ACPI_ADR_DP) { + return TRUE; + } + DevicePath =3D NextDevicePathNode (DevicePath); + } + return FALSE; +} + +/** + Remove all GOP device path instance from DevicePath and add the Gop to t= he DevicePath. +**/ +EFI_DEVICE_PATH_PROTOCOL * +UpdateGopDevicePath ( + EFI_DEVICE_PATH_PROTOCOL *DevicePath, + EFI_DEVICE_PATH_PROTOCOL *Gop + ) +{ + UINTN Size; + UINTN GopSize; + EFI_DEVICE_PATH_PROTOCOL *Temp; + EFI_DEVICE_PATH_PROTOCOL *Return; + EFI_DEVICE_PATH_PROTOCOL *Instance; + BOOLEAN Exist; + + Exist =3D FALSE; + Return =3D NULL; + GopSize =3D GetDevicePathSize (Gop); + do { + Instance =3D GetNextDevicePathInstance (&DevicePath, &Size); + if (Instance =3D=3D NULL) { + break; + } + if (!IsGopDevicePath (Instance) || + (Size =3D=3D GopSize && CompareMem (Instance, Gop, GopSize) =3D=3D= 0) + ) { + if (Size =3D=3D GopSize && CompareMem (Instance, Gop, GopSize) =3D= =3D 0) { + Exist =3D TRUE; + } + Temp =3D Return; + Return =3D AppendDevicePathInstance (Return, Instance); + if (Temp !=3D NULL) { + FreePool (Temp); + } + } + FreePool (Instance); + } while (DevicePath !=3D NULL); + + if (!Exist) { + Temp =3D Return; + Return =3D AppendDevicePathInstance (Return, Gop); + if (Temp !=3D NULL) { + FreePool (Temp); + } + } + return Return; +} + +/** + Get Graphics Controller Handle. + + @retval GraphicsController Successfully located + @retval NULL Failed to locate +**/ +EFI_HANDLE +EFIAPI +GetGraphicsController ( + IN BOOLEAN NeedTrustedConsole + ) +{ + EFI_STATUS Status; + UINTN Index; + EFI_HANDLE *PciHandles; + UINTN PciHandlesSize; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + + Status =3D gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiPciIoProtocolGuid, + NULL, + &PciHandlesSize, + &PciHandles + ); + if (EFI_ERROR (Status)) { + return NULL; + } + + for (Index =3D 0; Index < PciHandlesSize; Index++) { + Status =3D gBS->HandleProtocol ( + PciHandles[Index], + &gEfiDevicePathProtocolGuid, + (VOID **) &DevicePath + ); + if (EFI_ERROR(Status)) { + continue; + } + if (!IsVgaHandle (PciHandles[Index])) { + continue; + } + if ((NeedTrustedConsole && IsTrustedConsole (ConOut, DevicePath)) || + ((!NeedTrustedConsole) && (!IsTrustedConsole (ConOut, DevicePath))= )) { + return PciHandles[Index]; + } + } + + return NULL; +} + +VOID +UpdateGraphicConOut ( + IN BOOLEAN NeedTrustedConsole + ) +{ + EFI_HANDLE GraphicsControllerHandle; + EFI_DEVICE_PATH_PROTOCOL *GopDevicePath; + EFI_DEVICE_PATH_PROTOCOL *ConOutDevicePath; + EFI_DEVICE_PATH_PROTOCOL *UpdatedConOutDevicePath; + + // + // Update ConOut variable + // + GraphicsControllerHandle =3D GetGraphicsController (NeedTrustedConsole); + if (GraphicsControllerHandle !=3D NULL) { + // + // Connect the GOP driver + // + gBS->ConnectController (GraphicsControllerHandle, NULL, NULL, TRUE); + + // + // Get the GOP device path + // NOTE: We may get a device path that contains Controller node in it. + // + GopDevicePath =3D EfiBootManagerGetGopDevicePath (GraphicsControllerHa= ndle); + if (GopDevicePath !=3D NULL) { + GetEfiGlobalVariable2 (L"ConOut", (VOID **)&ConOutDevicePath, NULL); + UpdatedConOutDevicePath =3D UpdateGopDevicePath (ConOutDevicePath, G= opDevicePath); + if (ConOutDevicePath !=3D NULL) { + FreePool (ConOutDevicePath); + } + FreePool (GopDevicePath); + gRT->SetVariable ( + L"ConOut", + &gEfiGlobalVariableGuid, + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACC= ESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, + GetDevicePathSize (UpdatedConOutDevicePath), + UpdatedConOutDevicePath + ); + } + } +} + +VOID +AddConsoleVariable ( + IN CONSOLE_TYPE ConsoleType, + IN EFI_DEVICE_PATH *ConsoleDevicePath + ) +{ + EFI_DEVICE_PATH *TempDevicePath; + EFI_DEVICE_PATH *Instance; + UINTN Size; + EFI_HANDLE GraphicsControllerHandle; + EFI_DEVICE_PATH *GopDevicePath; + + TempDevicePath =3D ConsoleDevicePath; + do { + Instance =3D GetNextDevicePathInstance (&TempDevicePath, &Size); + if (Instance =3D=3D NULL) { + break; + } + + switch (ConsoleType) { + case ConIn: + if (IsUsbShortForm (Instance)) { + // + // Append Usb Keyboard short form DevicePath into "ConInDev" + // + EfiBootManagerUpdateConsoleVariable (ConInDev, Instance, NULL); + } + EfiBootManagerUpdateConsoleVariable (ConsoleType, Instance, NULL); + break; + case ConOut: + GraphicsControllerHandle =3D IsVideoController (Instance); + if (GraphicsControllerHandle =3D=3D NULL) { + EfiBootManagerUpdateConsoleVariable (ConsoleType, Instance, NULL); + } else { + // + // Connect the GOP driver + // + gBS->ConnectController (GraphicsControllerHandle, NULL, NULL, TRUE= ); + // + // Get the GOP device path + // NOTE: We may get a device path that contains Controller node in= it. + // + GopDevicePath =3D EfiBootManagerGetGopDevicePath (GraphicsControll= erHandle); + if (GopDevicePath !=3D NULL) { + EfiBootManagerUpdateConsoleVariable (ConsoleType, GopDevicePath,= NULL); + } + } + break; + default: + ASSERT(FALSE); + break; + } + + FreePool (Instance); + } while (TempDevicePath !=3D NULL); +} + +/** + The function connects the trusted consoles. +**/ +VOID +ConnectTrustedConsole ( + VOID + ) +{ + EFI_DEVICE_PATH_PROTOCOL *Consoles; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + EFI_DEVICE_PATH_PROTOCOL *Instance; + EFI_DEVICE_PATH_PROTOCOL *Next; + UINTN Size; + UINTN Index; + EFI_HANDLE Handle; + EFI_STATUS Status; + CHAR16 *ConsoleVar[] =3D {L"ConIn", L"ConOut"}; + VOID *TrustedConsoleDevicepath; + + TrustedConsoleDevicepath =3D PcdGetPtr (PcdTrustedConsoleInputDevicePath= ); + DumpDevicePath (L"TrustedConsoleIn", TrustedConsoleDevicepath); + TrustedConsoleDevicepath =3D PcdGetPtr (PcdTrustedConsoleOutputDevicePat= h); + DumpDevicePath (L"TrustedConsoleOut", TrustedConsoleDevicepath); + + for (Index =3D 0; Index < sizeof (ConsoleVar) / sizeof (ConsoleVar[0]); = Index++) { + + GetEfiGlobalVariable2 (ConsoleVar[Index], (VOID **)&Consoles, NULL); + + TempDevicePath =3D Consoles; + do { + Instance =3D GetNextDevicePathInstance (&TempDevicePath, &Size); + if (Instance =3D=3D NULL) { + break; + } + if (IsTrustedConsole (Index, Instance)) { + if (IsUsbShortForm (Instance)) { + ConnectUsbShortFormDevicePath (Instance); + } else { + for (Next =3D Instance; !IsDevicePathEnd (Next); Next =3D NextDe= vicePathNode (Next)) { + if (DevicePathType (Next) =3D=3D ACPI_DEVICE_PATH && DevicePat= hSubType (Next) =3D=3D ACPI_ADR_DP) { + break; + } else if (DevicePathType (Next) =3D=3D HARDWARE_DEVICE_PATH && + DevicePathSubType (Next) =3D=3D HW_CONTROLLER_DP && + DevicePathType (NextDevicePathNode (Next)) =3D=3D A= CPI_DEVICE_PATH && + DevicePathSubType (NextDevicePathNode (Next)) =3D= =3D ACPI_ADR_DP + ) { + break; + } + } + if (!IsDevicePathEnd (Next)) { + SetDevicePathEndNode (Next); + Status =3D EfiBootManagerConnectDevicePath (Instance, &Handle); + if (!EFI_ERROR (Status)) { + gBS->ConnectController (Handle, NULL, NULL, TRUE); + } + } else { + EfiBootManagerConnectDevicePath (Instance, NULL); + } + } + } + FreePool (Instance); + } while (TempDevicePath !=3D NULL); + + if (Consoles !=3D NULL) { + FreePool (Consoles); + } + } +} + +/** + The function connects the trusted Storages. +**/ +VOID +ConnectTrustedStorage ( + VOID + ) +{ + VOID *TrustedStorageDevicepath; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + EFI_DEVICE_PATH_PROTOCOL *Instance; + UINTN Size; + EFI_DEVICE_PATH_PROTOCOL *TempStorageDevicePath; + EFI_STATUS Status; + EFI_HANDLE DeviceHandle; + + TrustedStorageDevicepath =3D PcdGetPtr (PcdTrustedStorageDevicePath); + DumpDevicePath (L"TrustedStorage", TrustedStorageDevicepath); + + TempDevicePath =3D TrustedStorageDevicepath; + do { + Instance =3D GetNextDevicePathInstance (&TempDevicePath, &Size); + if (Instance =3D=3D NULL) { + break; + } + + EfiBootManagerConnectDevicePath (Instance, NULL); + + TempStorageDevicePath =3D Instance; + + Status =3D gBS->LocateDevicePath ( + &gEfiDevicePathProtocolGuid, + &TempStorageDevicePath, + &DeviceHandle + ); + if (!EFI_ERROR (Status)) { + gBS->ConnectController (DeviceHandle, NULL, NULL, FALSE); + } + + FreePool (Instance); + } while (TempDevicePath !=3D NULL); +} + +/** + The function connects the trusted consoles and then call the PP processi= ng library interface. +**/ +VOID +ProcessTcgPp ( + VOID + ) +{ + gPPRequireUIConfirm |=3D Tcg2PhysicalPresenceLibNeedUserConfirm(); + + if (gPPRequireUIConfirm) { + ConnectTrustedConsole (); + } + + Tcg2PhysicalPresenceLibProcessRequest (NULL); +} + +/** + The function connects the trusted storage to perform TPerReset. +**/ +VOID +ProcessTcgMor ( + VOID + ) +{ + if (IsMorBitSet ()) { + ConnectTrustedConsole(); + ConnectTrustedStorage(); + } +} + +/** + Check if current BootCurrent variable is internal shell boot option. + + @retval TRUE BootCurrent is internal shell. + @retval FALSE BootCurrent is not internal shell. +**/ +BOOLEAN +BootCurrentIsInternalShell ( + VOID + ) +{ + UINTN VarSize; + UINT16 BootCurrent; + CHAR16 BootOptionName[16]; + UINT8 *BootOption; + UINT8 *Ptr; + BOOLEAN Result; + EFI_STATUS Status; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; + EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode; + EFI_GUID *GuidPoint; + + BootOption =3D NULL; + Result =3D FALSE; + + // + // Get BootCurrent variable + // + VarSize =3D sizeof (UINT16); + Status =3D gRT->GetVariable ( + L"BootCurrent", + &gEfiGlobalVariableGuid, + NULL, + &VarSize, + &BootCurrent + ); + if (EFI_ERROR (Status)) { + return FALSE; + } + + // + // Create boot option Bootxxxx from BootCurrent + // + UnicodeSPrint (BootOptionName, sizeof(BootOptionName), L"Boot%04X", Boot= Current); + + GetEfiGlobalVariable2 (BootOptionName, (VOID **) &BootOption, &VarSize); + if (BootOption =3D=3D NULL || VarSize =3D=3D 0) { + return FALSE; + } + + Ptr =3D BootOption; + Ptr +=3D sizeof (UINT32); + Ptr +=3D sizeof (UINT16); + Ptr +=3D StrSize ((CHAR16 *) Ptr); + TempDevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) Ptr; + LastDeviceNode =3D TempDevicePath; + while (!IsDevicePathEnd (TempDevicePath)) { + LastDeviceNode =3D TempDevicePath; + TempDevicePath =3D NextDevicePathNode (TempDevicePath); + } + GuidPoint =3D EfiGetNameGuidFromFwVolDevicePathNode ( + (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) LastDeviceNode + ); + if ((GuidPoint !=3D NULL) && + ((CompareGuid (GuidPoint, &gUefiShellFileGuid))) + ) { + // + // if this option is internal shell, return TRUE + // + Result =3D TRUE; + } + + if (BootOption !=3D NULL) { + FreePool (BootOption); + BootOption =3D NULL; + } + + return Result; +} + +/** + This function will change video resolution and text mode + for internl shell when internal shell is launched. + + @param None. + + @retval EFI_SUCCESS Mode is changed successfully. + @retval Others Mode failed to changed. +**/ +EFI_STATUS +EFIAPI +ChangeModeForInternalShell ( + VOID + ) +{ + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut; + UINTN SizeOfInfo; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + UINT32 MaxGopMode; + UINT32 MaxTextMode; + UINT32 ModeNumber; + UINTN HandleCount; + EFI_HANDLE *HandleBuffer; + EFI_STATUS Status; + UINTN Index; + UINTN CurrentColumn; + UINTN CurrentRow; + + Status =3D gBS->HandleProtocol ( + gST->ConsoleOutHandle, + &gEfiGraphicsOutputProtocolGuid, + (VOID**)&GraphicsOutput + ); + if (EFI_ERROR (Status)) { + GraphicsOutput =3D NULL; + } + + Status =3D gBS->HandleProtocol ( + gST->ConsoleOutHandle, + &gEfiSimpleTextOutProtocolGuid, + (VOID**)&SimpleTextOut + ); + if (EFI_ERROR (Status)) { + SimpleTextOut =3D NULL; + } + + if ((GraphicsOutput =3D=3D NULL) || (SimpleTextOut =3D=3D NULL)) { + return EFI_UNSUPPORTED; + } + + MaxGopMode =3D GraphicsOutput->Mode->MaxMode; + MaxTextMode =3D SimpleTextOut->Mode->MaxMode; + + // + // 1. If current video resolution is same with new video resolution, + // video resolution need not be changed. + // 1.1. If current text mode is same with new text mode, text mode ne= ed not be change. + // 1.2. If current text mode is different with new text mode, text mo= de need be change to new text mode. + // 2. If current video resolution is different with new video resolution= , we need restart whole console drivers. + // + for (ModeNumber =3D 0; ModeNumber < MaxGopMode; ModeNumber++) { + Status =3D GraphicsOutput->QueryMode ( + GraphicsOutput, + ModeNumber, + &SizeOfInfo, + &Info + ); + if (!EFI_ERROR (Status)) { + if ((Info->HorizontalResolution =3D=3D mShellHorizontalResolution) && + (Info->VerticalResolution =3D=3D mShellVerticalResolution)) { + if ((GraphicsOutput->Mode->Info->HorizontalResolution =3D=3D mShel= lHorizontalResolution) && + (GraphicsOutput->Mode->Info->VerticalResolution =3D=3D mShellV= erticalResolution)) { + // + // If current video resolution is same with new resolution, + // then check if current text mode is same with new text mode. + // + Status =3D SimpleTextOut->QueryMode (SimpleTextOut, SimpleTextOu= t->Mode->Mode, &CurrentColumn, &CurrentRow); + ASSERT_EFI_ERROR (Status); + if (CurrentColumn =3D=3D mShellModeColumn && CurrentRow =3D=3D m= ShellModeRow) { + // + // Current text mode is same with new text mode, text mode nee= d not be change. + // + FreePool (Info); + return EFI_SUCCESS; + } else { + // + // Current text mode is different with new text mode, text mod= e need be change to new text mode. + // + for (Index =3D 0; Index < MaxTextMode; Index++) { + Status =3D SimpleTextOut->QueryMode (SimpleTextOut, Index, &= CurrentColumn, &CurrentRow); + if (!EFI_ERROR(Status)) { + if ((CurrentColumn =3D=3D mShellModeColumn) && (CurrentRow= =3D=3D mShellModeRow)) { + // + // New text mode is supported, set it. + // + Status =3D SimpleTextOut->SetMode (SimpleTextOut, Index); + ASSERT_EFI_ERROR (Status); + // + // Update text mode PCD. + // + Status =3D PcdSet32S (PcdConOutColumn, mShellModeColumn); + ASSERT_EFI_ERROR (Status); + + Status =3D PcdSet32S (PcdConOutRow, mShellModeRow); + ASSERT_EFI_ERROR (Status); + + FreePool (Info); + return EFI_SUCCESS; + } + } + } + if (Index =3D=3D MaxTextMode) { + // + // If new text mode is not supported, return error. + // + FreePool (Info); + return EFI_UNSUPPORTED; + } + } + } else { + FreePool (Info); + // + // If current video resolution is not same with the new one, set= new video resolution. + // In this case, the driver which produces simple text out need = be restarted. + // + Status =3D GraphicsOutput->SetMode (GraphicsOutput, ModeNumber); + if (!EFI_ERROR (Status)) { + // + // Set PCD to restart GraphicsConsole and Consplitter to chang= e video resolution + // and produce new text mode based on new resolution. + // + Status =3D PcdSet32S (PcdVideoHorizontalResolution, mShellHori= zontalResolution); + ASSERT_EFI_ERROR (Status); + + Status =3D PcdSet32S (PcdVideoVerticalResolution, mShellVertic= alResolution); + ASSERT_EFI_ERROR (Status); + + Status =3D PcdSet32S (PcdConOutColumn, mShellModeColumn); + ASSERT_EFI_ERROR (Status); + + Status =3D PcdSet32S (PcdConOutRow, mShellModeRow); + ASSERT_EFI_ERROR (Status); + + Status =3D gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiSimpleTextOutProtocolGuid, + NULL, + &HandleCount, + &HandleBuffer + ); + if (!EFI_ERROR (Status)) { + for (Index =3D 0; Index < HandleCount; Index++) { + gBS->DisconnectController (HandleBuffer[Index], NULL, NULL= ); + } + for (Index =3D 0; Index < HandleCount; Index++) { + gBS->ConnectController (HandleBuffer[Index], NULL, NULL, T= RUE); + } + if (HandleBuffer !=3D NULL) { + FreePool (HandleBuffer); + } + break; + } + } + } + } + FreePool (Info); + } + } + + if (ModeNumber =3D=3D MaxGopMode) { + // + // If the new resolution is not supported, return error. + // + return EFI_UNSUPPORTED; + } + + return EFI_SUCCESS; +} + +/** + ReadyToBoot callback to set video and text mode for internal shell boot. + That will not connect USB controller while CSM and FastBoot are disabled= , we need to connect them + before booting to Shell for showing USB devices in Shell. + + When FastBoot is enabled and Windows Console is the chosen Console behav= ior, input devices will not be connected + by default. Hence, when booting to EFI shell, connecting input consoles = are required. + + @param Event Pointer to this event + @param Context Event hanlder private data + + @retval None. +**/ +VOID +EFIAPI +OnReadyToBootCallBack ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + DEBUG ((DEBUG_INFO, "OnReadyToBootCallBack\n")); + + if (BootCurrentIsInternalShell ()) { + + ChangeModeForInternalShell (); + EfiBootManagerConnectAllDefaultConsoles(); + gDS->Dispatch (); + } +} + +/** + Platform Bds init. Incude the platform firmware vendor, revision + and so crc check. +**/ +VOID +EFIAPI +PlatformBootManagerBeforeConsole ( + VOID + ) +{ + EFI_STATUS Status; + EFI_DEVICE_PATH_PROTOCOL *VarConOut; + EFI_DEVICE_PATH_PROTOCOL *VarConIn; + EFI_EVENT Event; + + DEBUG ((DEBUG_INFO, "PlatformBootManagerBeforeConsole\n")); + + Status =3D EFI_SUCCESS; + + // + // Get user defined text mode for internal shell only once. + // + mShellHorizontalResolution =3D PcdGet32 (PcdSetupVideoHorizontalResoluti= on); + mShellVerticalResolution =3D PcdGet32 (PcdSetupVideoVerticalResolution= ); + mShellModeColumn =3D PcdGet32 (PcdSetupConOutColumn); + mShellModeRow =3D PcdGet32 (PcdSetupConOutRow); + + // + // Create event to set proper video resolution and text mode for interna= l shell. + // + Status =3D EfiCreateEventReadyToBootEx ( + TPL_CALLBACK, + OnReadyToBootCallBack, + NULL, + &Event + ); + ASSERT_EFI_ERROR (Status); + + // + // Connect Root Bridge to make PCI BAR resource allocated and all PciIo = created + // + ConnectRootBridge (FALSE); + + // + // Fill ConIn/ConOut in Full Configuration boot mode + // + gBootMode =3D GetBootModeHob(); + DEBUG ((DEBUG_INFO, "PlatformBootManagerInit - %x\n", gBootMode)); + + if (gBootMode =3D=3D BOOT_WITH_FULL_CONFIGURATION || + gBootMode =3D=3D BOOT_WITH_DEFAULT_SETTINGS || + gBootMode =3D=3D BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS || + gBootMode =3D=3D BOOT_IN_RECOVERY_MODE) { + + GetEfiGlobalVariable2 (L"ConOut", (VOID **)&VarConOut, NULL); if (Va= rConOut !=3D NULL) { FreePool (VarConOut); } + GetEfiGlobalVariable2 (L"ConIn", (VOID **)&VarConIn, NULL); if (Var= ConIn !=3D NULL) { FreePool (VarConIn); } + + // + // Only fill ConIn/ConOut when ConIn/ConOut is empty because we may dr= op to Full Configuration boot mode in non-first boot + // + if (VarConOut =3D=3D NULL || VarConIn =3D=3D NULL) { + if (PcdGetSize (PcdTrustedConsoleOutputDevicePath) >=3D sizeof(EFI_D= EVICE_PATH_PROTOCOL)) { + AddConsoleVariable (ConOut, PcdGetPtr (PcdTrustedConsoleOutputDevi= cePath)); + } + if (PcdGetSize (PcdTrustedConsoleInputDevicePath) >=3D sizeof(EFI_DE= VICE_PATH_PROTOCOL)) { + AddConsoleVariable (ConIn, PcdGetPtr (PcdTrustedConsoleInputDevice= Path)); + } + } + } + + EnumIsaSerial (); + + EnumUsbKeyboard (); + // + // For trusted console it must be handled here. + // + UpdateGraphicConOut (TRUE); + + if (gBootMode =3D=3D BOOT_ON_FLASH_UPDATE) { + // + // Logo show + // + BootLogoEnableLogo (); + + DEBUG((DEBUG_INFO, "ProcessCapsules Before EndOfDxe......\n")); + ProcessCapsules (); + DEBUG((DEBUG_INFO, "ProcessCapsules Done\n")); + } + + // + // Dynamically register hot key: F2/F7/Enter + // + RegisterDefaultBootOption (); + RegisterStaticHotkey (); + + PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7010); + if (PcdGetBool (PcdTpm2Enable)) { + ProcessTcgPp (); + ProcessTcgMor (); + } + PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7011); + + // + // We should make all UEFI memory and GCD information populated before E= xitPmAuth. + // SMM may consume these information. + // + MemoryTest((EXTENDMEM_COVERAGE_LEVEL) PcdGet32 (PcdPlatformMemoryCheckLe= vel)); + + PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7020); + ExitPmAuth (); + PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7021); + + // + // Dispatch the deferred 3rd party images. + // + EfiBootManagerDispatchDeferredImages (); + + // + // For non-trusted console it must be handled here. + // + UpdateGraphicConOut (FALSE); + + if (gBootMode =3D=3D BOOT_ON_FLASH_UPDATE) { + // + // Logo show + // + BootLogoEnableLogo (); + + DEBUG((DEBUG_INFO, "ProcessCapsules After ConnectAll......\n")); + ProcessCapsules(); + DEBUG((DEBUG_INFO, "ProcessCapsules Done\n")); + } +} + + +/** + Connect with predeined platform connect sequence, + the OEM/IBV can customize with their own connect sequence. + + @param[in] BootMode Boot mode of this boot. +**/ +VOID +ConnectSequence ( + IN EFI_BOOT_MODE BootMode + ) +{ + EfiBootManagerConnectAll (); +} + +/** + The function is to consider the boot order which is not in our expectati= on. + In the case that we need to re-sort the boot option. + + @retval TRUE Need to sort Boot Option. + @retval FALSE Don't need to sort Boot Option. +**/ +BOOLEAN +IsNeedSortBootOption ( + VOID + ) +{ + EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; + UINTN BootOptionCount; + + BootOptions =3D EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOpti= onTypeBoot); + + // + // If setup is the first priority in boot option, we need to sort boot o= ption. + // + if ((BootOptionCount > 1) && + (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"Ente= r Setup"))) =3D=3D 0) || + ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLen = (L"BootManagerMenuApp"))) =3D=3D 0))) { + return TRUE; + } + + return FALSE; +} + +/** + The function will excute with as the platform policy, current policy + is driven by boot mode. IBV/OEM can customize this code for their specif= ic + policy action. + + @param DriverOptionList - The header of the driver option link list + @param BootOptionList - The header of the boot option link list + @param ProcessCapsules - A pointer to ProcessCapsules() + @param BaseMemoryTest - A pointer to BaseMemoryTest() +**/ +VOID +EFIAPI +PlatformBootManagerAfterConsole ( + VOID + ) +{ + EFI_BOOT_MODE LocalBootMode; + + DEBUG ((DEBUG_INFO, "PlatformBootManagerAfterConsole\n")); + + // + // Get current Boot Mode + // + LocalBootMode =3D gBootMode; + DEBUG ((DEBUG_INFO, "Current local bootmode - %x\n", LocalBootMode)); + + // + // Logo show + // + BootLogoEnableLogo (); + + // + // Go the different platform policy with different boot mode + // Notes: this part code can be change with the table policy + // + switch (LocalBootMode) { + + + case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: + case BOOT_WITH_MINIMAL_CONFIGURATION: + case BOOT_ON_S4_RESUME: + // + // Perform some platform specific connect sequence + // + PERF_START_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7050); + ConnectSequence (LocalBootMode); + PERF_END_EX(NULL,"EventRec", NULL, AsmReadTsc(), 0x7051); + + break; + + case BOOT_WITH_FULL_CONFIGURATION: + case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: + case BOOT_WITH_DEFAULT_SETTINGS: + default: + // + // Perform some platform specific connect sequence + // + ConnectSequence (LocalBootMode); + + // + // Only in Full Configuration boot mode we do the enumeration of boot = device + // + // + // Dispatch all but Storage Oprom explicitly, because we assume Int13T= hunk driver is there. + // + EfiBootManagerRefreshAllBootOption (); + + if (IsNeedSortBootOption()) { + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBoo= tOption); + } + // + // PXE boot option may appear after boot option enumeration + // + + break; + } + + Print (L"Press F7 for BootMenu!\n"); + + EfiBootManagerRefreshAllBootOption (); + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOpt= ion); +} + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION BootDeviceList; + CHAR16 OptionName[sizeof ("Boot####")]; + + if (mBootMenuOptionNumber =3D=3D LoadOptionNumberUnassigned) { + return; + } + UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", mBootMenuOp= tionNumber); + Status =3D EfiBootManagerVariableToLoadOption (OptionName, &BootDeviceLi= st); + if (EFI_ERROR (Status)) { + return; + } + for (;;) { + EfiBootManagerBoot (&BootDeviceList); + } +} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/BdsPlatform.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBo= otManagerLib/BdsPlatform.h new file mode 100644 index 0000000000..0bdc11bdd8 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Bd= sPlatform.h @@ -0,0 +1,253 @@ +/** @file + Header file for BDS Platform specific code + +Copyright (c) 2017, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _BDS_PLATFORM_H +#define _BDS_PLATFORM_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 + +#include +#include + +/// +/// ConnectType +/// +#define CONSOLE_OUT 0x00000001 +#define STD_ERROR 0x00000002 +#define CONSOLE_IN 0x00000004 +#define CONSOLE_ALL (CONSOLE_OUT | CONSOLE_IN | STD_ERROR) + +extern EFI_GUID gUefiShellFileGuid; +extern EFI_BOOT_MODE gBootMode; + +#define PCI_DEVICE_PATH_NODE(Func, Dev) \ + { \ + HARDWARE_DEVICE_PATH, \ + HW_PCI_DP, \ + { \ + (UINT8) (sizeof (PCI_DEVICE_PATH)), \ + (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \ + }, \ + (Func), \ + (Dev) \ + } + +#define PNPID_DEVICE_PATH_NODE(PnpId) \ + { \ + { \ + ACPI_DEVICE_PATH, \ + ACPI_DP, \ + { \ + (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \ + (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \ + } \ + }, \ + EISA_PNP_ID((PnpId)), \ + 0 \ + } + +#define gPciRootBridge \ + { \ + { \ + ACPI_DEVICE_PATH, \ + ACPI_DP, \ + { \ + (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \ + (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \ + }, \ + }, \ + EISA_PNP_ID (0x0A03), \ + 0 \ + } + +#define gPciIsaBridge \ + PCI_DEVICE_PATH_NODE(0, 0x1f) + +#define gPnp16550ComPort \ + PNPID_DEVICE_PATH_NODE(0x0501) + +#define gUart(BaudRate, DataBits, Parity, StopBits) \ + { \ + { \ + MESSAGING_DEVICE_PATH, \ + MSG_UART_DP, \ + { \ + (UINT8) (sizeof (UART_DEVICE_PATH)), \ + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \ + } \ + }, \ + 0, \ + (BaudRate), \ + (DataBits), \ + (Parity), \ + (StopBits) \ + } + +#define gPcAnsiTerminal \ + { \ + { \ + MESSAGING_DEVICE_PATH, \ + MSG_VENDOR_DP, \ + { \ + (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \ + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \ + } \ + }, \ + DEVICE_PATH_MESSAGING_PC_ANSI \ + } + +#define gEndEntire \ + { \ + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, { END_DEVICE_PAT= H_LENGTH, 0 } \ + } + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + UINTN ConnectType; +} BDS_CONSOLE_CONNECT_ENTRY; + +// +// Platform Root Bridge +// +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_ROOT_BRIDGE_DEVICE_PATH; + +// +// Below is the platform console device path +// +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + PCI_DEVICE_PATH IsaBridge; + ACPI_HID_DEVICE_PATH Keyboard; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_KEYBOARD_DEVICE_PATH; + +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + PCI_DEVICE_PATH PciDevice; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_ONBOARD_CONTROLLER_DEVICE_PATH; + +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + PCI_DEVICE_PATH Pci0Device; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_PEG_ROOT_CONTROLLER_DEVICE_PATH; + +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + PCI_DEVICE_PATH PciBridge; + PCI_DEVICE_PATH PciDevice; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_PCI_CONTROLLER_DEVICE_PATH; + +// +// Below is the boot option device path +// + +#define CLASS_HID 3 +#define SUBCLASS_BOOT 1 +#define PROTOCOL_KEYBOARD 1 + +typedef struct { + USB_CLASS_DEVICE_PATH UsbClass; + EFI_DEVICE_PATH_PROTOCOL End; +} USB_CLASS_FORMAT_DEVICE_PATH; + +typedef struct { + ACPI_HID_DEVICE_PATH PciRootBridge; + PCI_DEVICE_PATH IsaBridge; + ACPI_HID_DEVICE_PATH IsaSerial; + UART_DEVICE_PATH Uart; + VENDOR_DEVICE_PATH TerminalType; + EFI_DEVICE_PATH_PROTOCOL End; +} PLATFORM_ISA_SERIAL_DEVICE_PATH; + +// +// Platform BDS Functions +// + + +/** + Perform the memory test base on the memory test intensive level, + and update the memory resource. + + @param Level The memory test intensive level. + + @retval EFI_STATUS Success test all the system memory and update + the memory resource + +**/ +EFI_STATUS +MemoryTest ( + IN EXTENDMEM_COVERAGE_LEVEL Level + ); + +VOID +ConnectSequence ( + IN EFI_BOOT_MODE BootMode + ); + + +INTN +EFIAPI +CompareBootOption ( + CONST VOID *Left, + CONST VOID *Right + ); + + +VOID +RegisterStaticHotkey ( + VOID + ); +VOID +RegisterDefaultBootOption ( + VOID + ); + +#endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/DxePlatformBootManagerLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Libra= ry/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf new file mode 100644 index 0000000000..b04169ad33 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Dx= ePlatformBootManagerLib.inf @@ -0,0 +1,95 @@ +### @file +# Component name for module DxePlatformBootManagerLib +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D DxePlatformBootManagerLib + FILE_GUID =3D A6BC385D-59E5-4B77-87D7-200ABAA83C15 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D DXE_DRIVER + UEFI_SPECIFICATION_VERSION =3D 2.10 + LIBRARY_CLASS =3D PlatformBootManagerLib|DXE_DRIVER +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 EBC +# + +[LibraryClasses] + BaseLib + MemoryAllocationLib + UefiBootServicesTableLib + UefiRuntimeServicesTableLib + BaseMemoryLib + DebugLib + PcdLib + PrintLib + DevicePathLib + UefiLib + HobLib + DxeServicesLib + DxeServicesTableLib + HiiLib + UefiBootManagerLib + PerformanceLib + TimerLib + Tcg2PhysicalPresenceLib + CapsuleLib + BootLogoLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + SecurityPkg/SecurityPkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Pcd] + gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable ## CONSUM= ES + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut ## PRO= DUCES + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## PRO= DUCES + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution ## PRO= DUCES + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow ## PRO= DUCES + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn ## PRO= DUCES + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## PRO= DUCES + gMinPlatformPkgTokenSpaceGuid.PcdPlatformMemoryCheckLevel ## CONSUM= ES + gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly ## CONSUM= ES + gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleInputDevicePath ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleOutputDevicePath ## CONSU= MES + gMinPlatformPkgTokenSpaceGuid.PcdTrustedStorageDevicePath ## CONSU= MES + +[Sources] + BdsPlatform.c + BdsPlatform.h + PlatformBootOption.c + MemoryTest.c + +[Protocols] + gEfiPciRootBridgeIoProtocolGuid ## CONSUMES + gEfiPciIoProtocolGuid ## CONSUMES + gEfiCpuIo2ProtocolGuid ## CONSUMES + gEfiDxeSmmReadyToLockProtocolGuid ## PRODUCES + gEfiGenericMemTestProtocolGuid ## CONSUMES + gEfiDiskInfoProtocolGuid ## CONSUMES + gEfiDevicePathToTextProtocolGuid ## CONSUMES + gEfiSimpleTextInputExProtocolGuid ## CONSUMES + gEfiFirmwareVolume2ProtocolGuid ## CONSUMES + gEfiFormBrowser2ProtocolGuid ## CONSUMES + gEfiGenericMemTestProtocolGuid ## CONSUMES + +[Guids] + gEfiGlobalVariableGuid ## PRODUCES + gEfiMemoryOverwriteControlDataGuid ## PRODUCES + gEfiEndOfDxeEventGroupGuid ## CONSUMES + +[Depex.common.DXE_DRIVER] + gEfiVariableArchProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/MemoryTest.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBoo= tManagerLib/MemoryTest.c new file mode 100644 index 0000000000..654845349a --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Me= moryTest.c @@ -0,0 +1,83 @@ +/** @file + Perform the platform memory test + +Copyright (c) 2017, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "BdsPlatform.h" +#include + +/** + Perform the memory test base on the memory test intensive level, + and update the memory resource. + + @param Level The memory test intensive level. + + @retval EFI_STATUS Success test all the system memory and update + the memory resource + +**/ +EFI_STATUS +MemoryTest ( + IN EXTENDMEM_COVERAGE_LEVEL Level + ) +{ + EFI_STATUS Status; + BOOLEAN RequireSoftECCInit; + EFI_GENERIC_MEMORY_TEST_PROTOCOL *GenMemoryTest; + UINT64 TestedMemorySize; + UINT64 TotalMemorySize; + BOOLEAN ErrorOut; + BOOLEAN TestAbort; + + TestedMemorySize =3D 0; + TotalMemorySize =3D 0; + ErrorOut =3D FALSE; + TestAbort =3D FALSE; + + RequireSoftECCInit =3D FALSE; + + Status =3D gBS->LocateProtocol ( + &gEfiGenericMemTestProtocolGuid, + NULL, + (VOID **) &GenMemoryTest + ); + if (EFI_ERROR (Status)) { + return EFI_SUCCESS; + } + + Status =3D GenMemoryTest->MemoryTestInit ( + GenMemoryTest, + Level, + &RequireSoftECCInit + ); + if (Status =3D=3D EFI_NO_MEDIA) { + // + // The PEI codes also have the relevant memory test code to check the = memory, + // it can select to test some range of the memory or all of them. If P= EI code + // checks all the memory, this BDS memory test will has no not-test me= mory to + // do the test, and then the status of EFI_NO_MEDIA will be returned by + // "MemoryTestInit". So it does not need to test memory again, just re= turn. + // + return EFI_SUCCESS; + } + + do { + Status =3D GenMemoryTest->PerformMemoryTest ( + GenMemoryTest, + &TestedMemorySize, + &TotalMemorySize, + &ErrorOut, + TestAbort + ); + if (ErrorOut && (Status =3D=3D EFI_DEVICE_ERROR)) { + ASSERT (0); + } + } while (Status !=3D EFI_NOT_FOUND); + + Status =3D GenMemoryTest->Finished (GenMemoryTest); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/PlatformBootOption.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePla= tformBootManagerLib/PlatformBootOption.c new file mode 100644 index 0000000000..84aa097d58 --- /dev/null +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Pl= atformBootOption.c @@ -0,0 +1,559 @@ +/** @file + Driver for Platform Boot Options support. + +Copyright (c) 2017, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "BdsPlatform.h" + +#include + +BOOLEAN mContinueBoot =3D FALSE; +BOOLEAN mBootMenuBoot =3D FALSE; +BOOLEAN mPxeBoot =3D FALSE; +BOOLEAN mHotKeypressed =3D FALSE; +EFI_EVENT HotKeyEvent =3D NULL; + +UINTN mBootMenuOptionNumber; + +EFI_DEVICE_PATH_PROTOCOL * +BdsCreateShellDevicePath ( + VOID + ) +/*++ + +Routine Description: + + This function will create a SHELL BootOption to boot. + +Arguments: + + None. + +Returns: + + Shell Device path for booting. + +--*/ +{ + UINTN FvHandleCount; + EFI_HANDLE *FvHandleBuffer; + UINTN Index; + EFI_STATUS Status; + EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; + UINTN Size; + UINT32 AuthenticationStatus; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + VOID *Buffer; + + DevicePath =3D NULL; + Status =3D EFI_SUCCESS; + + DEBUG ((DEBUG_INFO, "BdsCreateShellDevicePath\n")); + gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolume2ProtocolGuid, + NULL, + &FvHandleCount, + &FvHandleBuffer + ); + + for (Index =3D 0; Index < FvHandleCount; Index++) { + gBS->HandleProtocol ( + FvHandleBuffer[Index], + &gEfiFirmwareVolume2ProtocolGuid, + (VOID **) &Fv + ); + + Buffer =3D NULL; + Size =3D 0; + Status =3D Fv->ReadSection ( + Fv, + &gUefiShellFileGuid, + EFI_SECTION_PE32, + 0, + &Buffer, + &Size, + &AuthenticationStatus + ); + if (EFI_ERROR (Status)) { + // + // Skip if no shell file in the FV + // + continue; + } else { + // + // Found the shell + // + break; + } + } + + if (EFI_ERROR (Status)) { + // + // No shell present + // + if (FvHandleCount) { + FreePool (FvHandleBuffer); + } + return NULL; + } + // + // Build the shell boot option + // + DevicePath =3D DevicePathFromHandle (FvHandleBuffer[Index]); + + if (FvHandleCount) { + FreePool (FvHandleBuffer); + } + + return DevicePath; +} + + +EFI_STATUS +CreateFvBootOption ( + EFI_GUID *FileGuid, + CHAR16 *Description, + EFI_BOOT_MANAGER_LOAD_OPTION *BootOption, + UINT32 Attributes, + UINT8 *OptionalData, OPTIONAL + UINT32 OptionalDataSize + ) +{ + EFI_STATUS Status; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; + MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode; + EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; + UINT32 AuthenticationStatus; + VOID *Buffer; + UINTN Size; + + if ((BootOption =3D=3D NULL) || (FileGuid =3D=3D NULL) || (Description = =3D=3D NULL)) { + return EFI_INVALID_PARAMETER; + } + + EfiInitializeFwVolDevicepathNode (&FileNode, FileGuid); + + if (!CompareGuid (&gUefiShellFileGuid, FileGuid)) { + Status =3D gBS->HandleProtocol ( + gImageHandle, + &gEfiLoadedImageProtocolGuid, + (VOID **) &LoadedImage + ); + if (!EFI_ERROR (Status)) { + Status =3D gBS->HandleProtocol ( + LoadedImage->DeviceHandle, + &gEfiFirmwareVolume2ProtocolGuid, + (VOID **) &Fv + ); + if (!EFI_ERROR (Status)) { + Buffer =3D NULL; + Size =3D 0; + Status =3D Fv->ReadSection ( + Fv, + FileGuid, + EFI_SECTION_PE32, + 0, + &Buffer, + &Size, + &AuthenticationStatus + ); + if (Buffer !=3D NULL) { + FreePool (Buffer); + } + } + } + if (EFI_ERROR (Status)) { + return EFI_NOT_FOUND; + } + + DevicePath =3D AppendDevicePathNode ( + DevicePathFromHandle (LoadedImage->DeviceHandle), + (EFI_DEVICE_PATH_PROTOCOL *) &FileNode + ); + } else { + DevicePath =3D AppendDevicePathNode ( + BdsCreateShellDevicePath (), + (EFI_DEVICE_PATH_PROTOCOL *) &FileNode + ); + } + + Status =3D EfiBootManagerInitializeLoadOption ( + BootOption, + LoadOptionNumberUnassigned, + LoadOptionTypeBoot, + Attributes, + Description, + DevicePath, + OptionalData, + OptionalDataSize + ); + FreePool (DevicePath); + return Status; +} + +EFI_GUID mUiFile =3D { + 0x462CAA21, 0x7614, 0x4503, { 0x83, 0x6E, 0x8A, 0xB6, 0xF4, 0x66, 0x23, = 0x31 } +}; +EFI_GUID mBootMenuFile =3D { + 0xEEC25BDC, 0x67F2, 0x4D95, { 0xB1, 0xD5, 0xF8, 0x1B, 0x20, 0x39, 0xD1, = 0x1D } +}; + + +/** + Return the index of the load option in the load option array. + + The function consider two load options are equal when the + OptionType, Attributes, Description, FilePath and OptionalData are equal. + + @param Key Pointer to the load option to be found. + @param Array Pointer to the array of load options to be found. + @param Count Number of entries in the Array. + + @retval -1 Key wasn't found in the Array. + @retval 0 ~ Count-1 The index of the Key in the Array. +**/ +INTN +PlatformFindLoadOption ( + IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Key, + IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Array, + IN UINTN Count + ) +{ + UINTN Index; + + for (Index =3D 0; Index < Count; Index++) { + if ((Key->OptionType =3D=3D Array[Index].OptionType) && + (Key->Attributes =3D=3D Array[Index].Attributes) && + (StrCmp (Key->Description, Array[Index].Description) =3D=3D 0) && + (CompareMem (Key->FilePath, Array[Index].FilePath, GetDevicePathSi= ze (Key->FilePath)) =3D=3D 0) && + (Key->OptionalDataSize =3D=3D Array[Index].OptionalDataSize) && + (CompareMem (Key->OptionalData, Array[Index].OptionalData, Key->Op= tionalDataSize) =3D=3D 0)) { + return (INTN) Index; + } + } + + return -1; +} + +UINTN +RegisterFvBootOption ( + EFI_GUID *FileGuid, + CHAR16 *Description, + UINTN Position, + UINT32 Attributes, + UINT8 *OptionalData, OPTIONAL + UINT32 OptionalDataSize + ) +{ + EFI_STATUS Status; + UINTN OptionIndex; + EFI_BOOT_MANAGER_LOAD_OPTION NewOption; + EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; + UINTN BootOptionCount; + + NewOption.OptionNumber =3D LoadOptionNumberUnassigned; + Status =3D CreateFvBootOption (FileGuid, Description, &NewOption, Attrib= utes, OptionalData, OptionalDataSize); + if (!EFI_ERROR (Status)) { + BootOptions =3D EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOp= tionTypeBoot); + + OptionIndex =3D PlatformFindLoadOption (&NewOption, BootOptions, BootO= ptionCount); + + if (OptionIndex =3D=3D -1) { + Status =3D EfiBootManagerAddLoadOptionVariable (&NewOption, Position= ); + ASSERT_EFI_ERROR (Status); + } else { + NewOption.OptionNumber =3D BootOptions[OptionIndex].OptionNumber; + } + EfiBootManagerFreeLoadOption (&NewOption); + EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); + } + + return NewOption.OptionNumber; +} + + + +VOID +EFIAPI +PlatformBootManagerWaitCallback ( + UINT16 TimeoutRemain + ) +{ + EFI_STATUS Status; + EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TxtInEx; + EFI_KEY_DATA KeyData; + BOOLEAN PausePressed; + + // + // Pause on PAUSE key + // + Status =3D gBS->HandleProtocol (gST->ConsoleInHandle, &gEfiSimpleTextInp= utExProtocolGuid, (VOID **) &TxtInEx); + ASSERT_EFI_ERROR (Status); + + PausePressed =3D FALSE; + + while (TRUE) { + Status =3D TxtInEx->ReadKeyStrokeEx (TxtInEx, &KeyData); + if (EFI_ERROR (Status)) { + break; + } + + if (KeyData.Key.ScanCode =3D=3D SCAN_PAUSE) { + PausePressed =3D TRUE; + break; + } + } + + // + // Loop until non-PAUSE key pressed + // + while (PausePressed) { + Status =3D TxtInEx->ReadKeyStrokeEx (TxtInEx, &KeyData); + if (!EFI_ERROR (Status)) { + DEBUG (( + DEBUG_INFO, "[PauseCallback] %x/%x %x/%x\n", + KeyData.Key.ScanCode, KeyData.Key.UnicodeChar, + KeyData.KeyState.KeyShiftState, KeyData.KeyState.KeyToggleState + )); + PausePressed =3D (BOOLEAN) (KeyData.Key.ScanCode =3D=3D SCAN_PAUSE); + } + } +} + + +EFI_GUID gUefiShellFileGuid =3D { 0x7C04A583, 0x9E3E, 0x4f1c, { 0xAD, 0x65= , 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 } }; + +#define INTERNAL_UEFI_SHELL_NAME L"Internal UEFI Shell 2.0" +#define UEFI_HARD_DRIVE_NAME L"UEFI Hard Drive" + +VOID +RegisterDefaultBootOption ( + VOID + ) +{ +#if 0 + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; + MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode; +#endif + UINT16 *ShellData; + UINT32 ShellDataSize; + + ShellData =3D NULL; + ShellDataSize =3D 0; + RegisterFvBootOption (&gUefiShellFileGuid, INTERNAL_UEFI_SHELL_NA= ME, (UINTN) -1, LOAD_OPTION_ACTIVE, (UINT8 *)ShellData, ShellDataSize); + + // + // Boot Menu + // + mBootMenuOptionNumber =3D RegisterFvBootOption (&mBootMenuFile, L"Boot D= evice List", (UINTN) -1, LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | = LOAD_OPTION_HIDDEN, NULL, 0); + + if (mBootMenuOptionNumber =3D=3D LoadOptionNumberUnassigned) { + DEBUG ((DEBUG_INFO, "BootMenuOptionNumber (%d) should not be same to L= oadOptionNumberUnassigned(%d).\n", mBootMenuOptionNumber, LoadOptionNumberU= nassigned)); + } +#if 0 + // + // Boot Manager Menu + // + EfiInitializeFwVolDevicepathNode (&FileNode, &mUiFile); + + gBS->HandleProtocol ( + gImageHandle, + &gEfiLoadedImageProtocolGuid, + (VOID **) &LoadedImage + ); + DevicePath =3D AppendDevicePathNode (DevicePathFromHandle (LoadedImage->= DeviceHandle), (EFI_DEVICE_PATH_PROTOCOL *) &FileNode); +#endif + +} + +VOID +RegisterBootOptionHotkey ( + UINT16 OptionNumber, + EFI_INPUT_KEY *Key, + BOOLEAN Add + ) +{ + EFI_STATUS Status; + + if (!Add) { + // + // No enter hotkey when force to setup or there is no boot option + // + Status =3D EfiBootManagerDeleteKeyOptionVariable (NULL, 0, Key, NULL); + ASSERT (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_NOT_FOUND); + } else { + // + // Register enter hotkey for the first boot option + // + Status =3D EfiBootManagerAddKeyOptionVariable (NULL, OptionNumber, 0, = Key,NULL); + ASSERT (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_ALREADY_STARTED= ); + } +} + +EFI_STATUS +EFIAPI +DetectKeypressCallback ( + IN EFI_KEY_DATA *KeyData +) +{ + mHotKeypressed =3D TRUE; + + if (HotKeyEvent !=3D NULL) { + gBS->SignalEvent(HotKeyEvent); + } + + return EFI_SUCCESS; +} + +/** + This function is called after all the boot options are enumerated and or= dered properly. +**/ +VOID +RegisterStaticHotkey ( + VOID + ) +{ + + EFI_INPUT_KEY Enter; + EFI_KEY_DATA F2; + EFI_KEY_DATA F7; + BOOLEAN EnterSetup; + EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION BootOption; + + EnterSetup =3D FALSE; + + // + // [Enter] + // + mContinueBoot =3D !EnterSetup; + if (mContinueBoot) { + Enter.ScanCode =3D SCAN_NULL; + Enter.UnicodeChar =3D CHAR_CARRIAGE_RETURN; + EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL); + } + + + // + // [F2]/[F7] + // + F2.Key.ScanCode =3D SCAN_F2; + F2.Key.UnicodeChar =3D CHAR_NULL; + F2.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID; + F2.KeyState.KeyToggleState =3D 0; + Status =3D EfiBootManagerGetBootManagerMenu (&BootOption); + ASSERT_EFI_ERROR (Status); + RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, &F2.Key, TRU= E); + EfiBootManagerFreeLoadOption (&BootOption); + + F7.Key.ScanCode =3D SCAN_F7; + F7.Key.UnicodeChar =3D CHAR_NULL; + F7.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID; + F7.KeyState.KeyToggleState =3D 0; + mBootMenuBoot =3D !EnterSetup; + RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7.Key, mBoot= MenuBoot); + +} + +UINT8 +BootOptionType ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ) +{ + EFI_DEVICE_PATH_PROTOCOL *Node; + EFI_DEVICE_PATH_PROTOCOL *NextNode; + + for (Node =3D DevicePath; !IsDevicePathEndType (Node); Node =3D NextDevi= cePathNode (Node)) { + if (DevicePathType (Node) =3D=3D MESSAGING_DEVICE_PATH) { + // + // Make sure the device path points to the driver device. + // + NextNode =3D NextDevicePathNode (Node); + if (DevicePathSubType(NextNode) =3D=3D MSG_DEVICE_LOGICAL_UNIT_DP) { + // + // if the next node type is Device Logical Unit, which specify the= Logical Unit Number (LUN), + // skip it + // + NextNode =3D NextDevicePathNode (NextNode); + } + if (IsDevicePathEndType (NextNode)) { + if ((DevicePathType (Node) =3D=3D MESSAGING_DEVICE_PATH)) { + return DevicePathSubType (Node); + } else { + return MSG_SATA_DP; + } + } + } + } + + return (UINT8) -1; +} + +/** + Returns the priority number. + OptionType EFI + ------------------------------------ + PXE 2 + DVD 4 + USB 6 + NVME 7 + HDD 8 + EFI Shell 9 + Others 100 + + @param BootOption +**/ +UINTN +BootOptionPriority ( + CONST EFI_BOOT_MANAGER_LOAD_OPTION *BootOption + ) +{ + // + // EFI boot options + // + switch (BootOptionType (BootOption->FilePath)) { + case MSG_MAC_ADDR_DP: + case MSG_VLAN_DP: + case MSG_IPv4_DP: + case MSG_IPv6_DP: + return 2; + + case MSG_SATA_DP: + case MSG_ATAPI_DP: + case MSG_UFS_DP: + case MSG_NVME_NAMESPACE_DP: + return 4; + + case MSG_USB_DP: + return 6; + + } + if (StrCmp (BootOption->Description, INTERNAL_UEFI_SHELL_NAME) =3D=3D = 0) { + if (PcdGetBool (PcdBootToShellOnly)) { + return 0; + } + return 9; + } + if (StrCmp (BootOption->Description, UEFI_HARD_DRIVE_NAME) =3D=3D 0) { + return 8; + } + return 100; +} + +INTN +EFIAPI +CompareBootOption ( + CONST VOID *Left, + CONST VOID *Right + ) +{ + return BootOptionPriority ((EFI_BOOT_MANAGER_LOAD_OPTION *) Left) - + BootOptionPriority ((EFI_BOOT_MANAGER_LOAD_OPTION *) Right); +} + diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPla= tform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatfo= rm.c deleted file mode 100644 index 4adca1b465..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c +++ /dev/null @@ -1,3092 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - = =20 - - -Module Name: - - BdsPlatform.c - -Abstract: - - This file include all platform action which can be customized - by IBV/OEM. - ---*/ - -#include "BdsPlatform.h" -#include "SetupMode.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "PchAccess.h" -#include "PchRegs/PchRegsSata.h" -#include -#include - -#include -#include -#include - -#include -#include - -EFI_GUID *ConnectDriverTable[] =3D { - &gEfiMmioDeviceProtocolGuid, - &gEfiI2cMasterProtocolGuid, - &gEfiI2cHostProtocolGuid -}; - -#define SHELL_ENVIRONMENT_INTERFACE_PROTOCOL \ - { \ - 0x47c7b221, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ - } -VOID *mShellImageCallbackReg =3D NULL; - - - -EFI_USER_PROFILE_HANDLE mCurrentUser =3D NULL; -EFI_EVENT mHotKeyTimerEvent =3D NU= LL; -EFI_EVENT mHitHotkeyEvent =3D NULL; -EFI_EVENT mUsbKeyboardConnectEvent= =3D NULL; -BOOLEAN mHotKeyPressed =3D FALSE; -VOID *mHitHotkeyRegistration; -#define KEYBOARD_TIMER_INTERVAL 20000 // 0.02s - -VOID -ConnectUSBController ( - VOID - ); - -EFI_STATUS -PlatformBdsConnectSimpleConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole -); - -VOID=20 -BootIntoFirmwareInterface( - VOID - ); - =20 -VOID -EFIAPI -PlatformBdsInitHotKeyEvent ( - VOID - ); - -VOID -EFIAPI -DisableAhciCtlr ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - UINT32 PmcDisableAddress; - UINT8 SataStorageAmount; - UINT32 SataBase; - UINT16 SataPortStatus; - - - DEBUG ((EFI_D_INFO, "Disable AHCI event is signalled\n")); - SataStorageAmount =3D 0; - SataBase =3D *(UINT32*) Context; - - // - // BayTrail-M EDS chapter 16 ---- PCI IO Register Offset 92 (SATA Port C= ontrol and Status) - // - SataPortStatus =3D MmioRead16 (SataBase + R_PCH_SATA_PCS); - - // - // Bit 8 EN: Port 0 Present - // - if ((SataPortStatus & 0x100) =3D=3D 0x100) { - SataStorageAmount++; - } - - // - // Bit 9 EN: Port 1 Present - // - if ((SataPortStatus & 0x200) =3D=3D 0x200) { - SataStorageAmount++; - } - - // - // Disable SATA controller when it sets to AHCI mode without carrying an= y devices - // in order to prevent AHCI yellow bang under Win device manager. - // - if (SataStorageAmount =3D=3D 0) { - PmcDisableAddress =3D (MmioRead32 ((PCH_PCI_EXPRESS_BASE_ADDRESS + (UI= NT32) (31 << 15)) + R_PCH_LPC_PMC_BASE) & B_PCH_LPC_PMC_BASE_BAR) + R_PCH_P= MC_FUNC_DIS; - MmioOr32 (PmcDisableAddress, B_PCH_PMC_FUNC_DIS_SATA); - S3BootScriptSaveMemWrite ( - EfiBootScriptWidthUint32, - (UINTN) PmcDisableAddress, - 1, - (VOID *) (UINTN) PmcDisableAddress - ); - } -} - -VOID -InstallReadyToLock ( - VOID - ) -{ - EFI_STATUS Status; - EFI_HANDLE Handle; - EFI_SMM_ACCESS2_PROTOCOL *SmmAccess; - EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save; - - // - // Install DxeSmmReadyToLock protocol prior to the processing of boot op= tions - // - Status =3D gBS->LocateProtocol ( - &gEfiSmmAccess2ProtocolGuid, - NULL, - (VOID **) &SmmAccess - ); - if (!EFI_ERROR (Status)) { - - // - // Prepare S3 information, this MUST be done before DxeSmmReadyToLock - // - Status =3D gBS->LocateProtocol ( - &gEfiAcpiS3SaveProtocolGuid, - NULL, - (VOID **)&AcpiS3Save - ); - if (!EFI_ERROR (Status)) { - AcpiS3Save->S3Save (AcpiS3Save, NULL); - } - - Handle =3D NULL; - Status =3D gBS->InstallProtocolInterface ( - &Handle, - &gExitPmAuthProtocolGuid, - EFI_NATIVE_INTERFACE, - NULL - ); - ASSERT_EFI_ERROR (Status); - - // - // Signal EndOfDxe PI Event - // - EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); - - Handle =3D NULL; - Status =3D gBS->InstallProtocolInterface ( - &Handle, - &gEfiDxeSmmReadyToLockProtocolGuid, - EFI_NATIVE_INTERFACE, - NULL - ); - ASSERT_EFI_ERROR (Status); - } - - return ; -} - -VOID -EFIAPI -ShellImageCallback ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - BdsSetConsoleMode (TRUE); - DEBUG ((EFI_D_INFO, "BdsEntry ShellImageCallback \n")); -} - -// -// BDS Platform Functions -// -/** - Platform Bds init. Include the platform firmware vendor, revision - and so crc check. - - @param VOID - - @retval None. - -**/ -VOID -EFIAPI -PlatformBdsInit ( - VOID - ) -{ - EFI_STATUS Status; - EFI_EVENT ShellImageEvent; - EFI_GUID ShellEnvProtocol =3D SHELL_ENVIRONMENT_INTERFACE_PROTOCOL; - - #ifdef __GNUC__ - SerialPortWrite((UINT8 *)">>>>BdsEntry[GCC]\r\n", 19); - #else - SerialPortWrite((UINT8 *)">>>>BdsEntry\r\n", 14); - #endif - BdsLibSaveMemoryTypeInformation (); - - // - // Before user authentication, the user identification devices need be c= onnected - // from the platform customized device paths - // - PlatformBdsConnectAuthDevice (); - - // - // As console is not ready, the auto logon user will be identified. - // - BdsLibUserIdentify (&mCurrentUser); - - // - // Change Gop mode when boot into Shell - // - if (mShellImageCallbackReg =3D=3D NULL) { - Status =3D gBS->CreateEvent ( - EFI_EVENT_NOTIFY_SIGNAL, - EFI_TPL_CALLBACK, - ShellImageCallback, - NULL, - &ShellImageEvent - ); - if (!EFI_ERROR (Status)) { - Status =3D gBS->RegisterProtocolNotify ( - &ShellEnvProtocol, - ShellImageEvent, - &mShellImageCallbackReg - ); - - DEBUG ((EFI_D_INFO, "BdsEntry ShellImageCallback \n")); - } - } -} - -EFI_STATUS -GetGopDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *PciDevicePath, - OUT EFI_DEVICE_PATH_PROTOCOL **GopDevicePath - ) -{ - UINTN Index; - EFI_STATUS Status; - EFI_HANDLE PciDeviceHandle; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - EFI_DEVICE_PATH_PROTOCOL *TempPciDevicePath; - UINTN GopHandleCount; - EFI_HANDLE *GopHandleBuffer; - - UINTN VarSize; - SYSTEM_CONFIGURATION mSystemConfiguration; - - if (PciDevicePath =3D=3D NULL || GopDevicePath =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - // - // Initialize the GopDevicePath to be PciDevicePath - // - *GopDevicePath =3D PciDevicePath; - TempPciDevicePath =3D PciDevicePath; - - Status =3D gBS->LocateDevicePath ( - &gEfiDevicePathProtocolGuid, - &TempPciDevicePath, - &PciDeviceHandle - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Try to connect this handle, so that GOP driver could start on this - // device and create child handles with GraphicsOutput Protocol installed - // on them, then we get device paths of these child handles and select - // them as possible console device. - // - - // - // Select display devices - // - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"Setup", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); - if (EFI_ERROR (Status) || VarSize !=3D sizeof(SYSTEM_CONFIGURATION)) { - //The setup variable is corrupted - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"SetupRecovery", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); - ASSERT_EFI_ERROR (Status); - } =20 - - if(mSystemConfiguration.BootDisplayDevice !=3D 0x0) - { - ACPI_ADR_DEVICE_PATH AcpiAdr; - EFI_DEVICE_PATH_PROTOCOL *MyDevicePath =3D NULL; - - AcpiAdr.Header.Type =3D ACPI_DEVICE_PATH; - AcpiAdr.Header.SubType =3D ACPI_ADR_DP; - - switch (mSystemConfiguration.BootDisplayDevice) { - case 1: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_VGA, PORT_CRT, 0); //CRT Device - break; - case 2: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_EXTERNAL_DIGITAL, PORT_B_HDMI, 0); //HDMI Device Port B - break; - case 3: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_EXTERNAL_DIGITAL, PORT_B_DP, 0); //DP PortB - break; - case 4: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_EXTERNAL_DIGITAL, PORT_C_DP, 0); //DP PortC - break; - case 5: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_INTERNAL_DIGITAL, PORT_C_DP, 0); //eDP Port C - break; - case 6: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_INTERNAL_DIGITAL, PORT_MIPI_A, 0); //DSI Port A - break; - case 7: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_INTERNAL_DIGITAL, PORT_MIPI_C, 0); //DSI Port C - break; - default: - AcpiAdr.ADR=3D ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYP= E_VGA, PORT_CRT, 0); - break; - } - - SetDevicePathNodeLength (&AcpiAdr.Header, sizeof (ACPI_ADR_DEVICE_PATH= )); - - MyDevicePath =3D AppendDevicePathNode(MyDevicePath, (EFI_DEVICE_PATH_P= ROTOCOL*)&AcpiAdr); - - gBS->ConnectController ( - PciDeviceHandle, - NULL, - MyDevicePath, - FALSE - ); - - FreePool(MyDevicePath); - } - else - { - gBS->ConnectController ( - PciDeviceHandle, - NULL, - NULL, - FALSE - ); - } - - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiGraphicsOutputProtocolGuid, - NULL, - &GopHandleCount, - &GopHandleBuffer - ); - if (!EFI_ERROR (Status)) { - // - // Add all the child handles as possible Console Device - // - for (Index =3D 0; Index < GopHandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - GopHandleBuffer[Index], - &gEfiDevicePathProtocolGuid, - (VOID**)&TempDevicePath - ); - if (EFI_ERROR (Status)) { - continue; - } - if (CompareMem ( - PciDevicePath, - TempDevicePath, - GetDevicePathSize (PciDevicePath) - END_DEVICE_PATH_LENGTH - ) =3D=3D 0) { - // - // In current implementation, we only enable one of the child hand= les - // as console device, i.e. sotre one of the child handle's device - // path to variable "ConOut" - // In future, we could select all child handles to be console devi= ce - // - *GopDevicePath =3D TempDevicePath; - } - } - gBS->FreePool (GopHandleBuffer); - } - - return EFI_SUCCESS; -} - -/** - - Search out all the platform pci or agp video device. The function may wi= ll - find multiple video device, and return all enabled device path. - - @param PlugInPciVgaDevicePath Return the platform plug in pci video d= evice - path if the system have plug in pci vid= eo device. - @param OnboardPciVgaDevicePath Return the platform active agp video de= vice path - if the system have plug in agp video de= vice or on - chip agp device. - - @retval EFI_SUCCSS Get all platform active video device pa= th. - @retval EFI_STATUS Return the status of gBS->LocateDeviceP= ath (), - gBS->ConnectController (), - and gBS->LocateHandleBuffer (). - -**/ -EFI_STATUS -GetPlugInPciVgaDevicePath ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **PlugInPciVgaDevicePath, - IN OUT EFI_DEVICE_PATH_PROTOCOL **OnboardPciVgaDevicePath - ) -{ - EFI_STATUS Status; - EFI_HANDLE RootHandle; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - UINTN Index; - UINTN Index1; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - BOOLEAN PlugInPciVga; - EFI_PCI_IO_PROTOCOL *PciIo; - PCI_TYPE00 Pci; - - DevicePath =3D NULL; - PlugInPciVga =3D TRUE; - HandleCount =3D 0; - HandleBuffer =3D NULL; - - // - // Make all the PCI_IO protocols on PCI Seg 0 show up - // - BdsLibConnectDevicePath (gPlatformRootBridges[0]); - - Status =3D gBS->LocateDevicePath ( - &gEfiDevicePathProtocolGuid, - &gPlatformRootBridges[0], - &RootHandle - ); - if (EFI_ERROR (Status)) { - return Status; - } - - Status =3D gBS->ConnectController ( - RootHandle, - NULL, - NULL, - FALSE - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Start to check all the pci io to find all possible VGA device - // - HandleCount =3D 0; - HandleBuffer =3D NULL; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiPciIoProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiPciIoProtocolGuid, - (VOID**)&PciIo - ); - if (!EFI_ERROR (Status)) { - - // - // Check for all VGA device - // - Status =3D PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint32, - 0, - sizeof (Pci) / sizeof (UINT32), - &Pci - ); - if (EFI_ERROR (Status)) { - continue; - } - - // - // Here we decide which VGA device to enable in PCI bus - // - // The first plugin PCI VGA card device will be present as PCI VGA - // The onchip AGP or AGP card will be present as AGP VGA - // - if (!IS_PCI_VGA (&Pci)) { - continue; - } - - // - // Set the device as the possible console out device, - // - // Below code will make every VGA device to be one - // of the possibe console out device - // - PlugInPciVga =3D TRUE; - gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiDevicePathProtocolGuid, - (VOID**)&DevicePath - ); - - Index1 =3D 0; - - while (gPlatformAllPossiblePciVgaConsole[Index1] !=3D NULL) { - if (CompareMem ( - DevicePath, - gPlatformAllPossiblePciVgaConsole[Index1], - GetDevicePathSize (gPlatformAllPossiblePciVgaConsole[Index1]) - ) =3D=3D 0) { - - // - // This device is an AGP device - // - *OnboardPciVgaDevicePath =3D DevicePath; - PlugInPciVga =3D FALSE; - break; - } - - Index1 ++; - } - - if (PlugInPciVga) { - *PlugInPciVgaDevicePath =3D DevicePath; - } - } - } - - FreePool (HandleBuffer); - - return EFI_SUCCESS; -} - -/** - - Find the platform active vga, and base on the policy to enable the vga = as - the console out device. The policy is driven by one setup variable "VBIO= S". - - None. - - @param EFI_UNSUPPORTED There is no active vga device - - @retval EFI_STATUS Return the status of BdsLibGetVariableAnd= Size () - -**/ -EFI_STATUS -PlatformBdsForceActiveVga ( - VOID - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *PlugInPciVgaDevicePath; - EFI_DEVICE_PATH_PROTOCOL *OnboardPciVgaDevicePath; - EFI_DEVICE_PATH_PROTOCOL *DevicePathFirst; - EFI_DEVICE_PATH_PROTOCOL *DevicePathSecond; - EFI_DEVICE_PATH_PROTOCOL *GopDevicePath; - UINTN VarSize; - SYSTEM_CONFIGURATION mSystemConfiguration; - - Status =3D EFI_SUCCESS; - PlugInPciVgaDevicePath =3D NULL; - OnboardPciVgaDevicePath =3D NULL; - - // - // Check the policy which is the first enabled VGA - // - GetPlugInPciVgaDevicePath (&PlugInPciVgaDevicePath, &OnboardPciVgaDevice= Path); - - if (PlugInPciVgaDevicePath =3D=3D NULL && OnboardPciVgaDevicePath =3D=3D= NULL) { - return EFI_UNSUPPORTED; - } - - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"Setup", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); - if (EFI_ERROR (Status) || VarSize !=3D sizeof(SYSTEM_CONFIGURATION)) { - //The setup variable is corrupted - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"SetupRecovery", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); - ASSERT_EFI_ERROR (Status); - } =20 - - - if ((PlugInPciVgaDevicePath =3D=3D NULL && OnboardPciVgaDevicePath !=3D = NULL) ) { - DEBUG ((EFI_D_ERROR,"Update onboard PCI VGA ...\n")); - DevicePathFirst =3D OnboardPciVgaDevicePath; - DevicePathSecond =3D PlugInPciVgaDevicePath; - goto UpdateConOut; - } - if(OnboardPciVgaDevicePath !=3D NULL && mSystemConfiguration.PrimaryVide= oAdaptor =3D=3D 0) { - DEBUG ((EFI_D_ERROR,"Update onboard PCI VGA When set primary!!!...\n")= ); - DevicePathFirst =3D OnboardPciVgaDevicePath; - DevicePathSecond =3D PlugInPciVgaDevicePath; - goto UpdateConOut; - } - - DEBUG ((EFI_D_ERROR,"Update plug in PCI VGA ...\n")); - DevicePathFirst =3D PlugInPciVgaDevicePath; - DevicePathSecond =3D OnboardPciVgaDevicePath; - -UpdateConOut: - GetGopDevicePath (DevicePathFirst, &GopDevicePath); - DevicePathFirst =3D GopDevicePath; - - Status =3D BdsLibUpdateConsoleVariable ( - L"ConOut", - DevicePathFirst, - DevicePathSecond - ); - - return Status; -} - -VOID -UpdateConsoleResolution( - VOID - ) -{ - UINT32 HorizontalResolution; - UINT32 VerticalResolution; - SYSTEM_CONFIGURATION SystemConfiguration; - UINTN VarSize; - EFI_STATUS Status; - - - HorizontalResolution =3D PcdGet32 (PcdSetupVideoHorizontalResolution); - VerticalResolution =3D PcdGet32 (PcdSetupVideoVerticalResolution); - - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"Setup", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &SystemConfiguration - ); - if (EFI_ERROR (Status) || VarSize !=3D sizeof(SYSTEM_CONFIGURATION)) { - //The setup variable is corrupted - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"SetupRecovery", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &SystemConfiguration - ); - ASSERT_EFI_ERROR (Status); - } =20 - - switch (SystemConfiguration.IgdFlatPanel) { - - case 0: - // - // Use the detault PCD values. - // - break; - - case 1: - HorizontalResolution =3D 640; - VerticalResolution =3D 480; - break; - - case 2: - HorizontalResolution =3D 800; - VerticalResolution =3D 600; - break; - - case 3: - HorizontalResolution =3D 1024; - VerticalResolution =3D 768; - break; - - case 4: - HorizontalResolution =3D 1280; - VerticalResolution =3D 1024; - break; - - case 5: - HorizontalResolution =3D 1366; - VerticalResolution =3D 768; - break; - - case 6: - HorizontalResolution =3D 1680; - VerticalResolution =3D 1050; - break; - - case 7: - HorizontalResolution =3D 1920; - VerticalResolution =3D 1200; - break; - - case 8: - HorizontalResolution =3D 1280; - VerticalResolution =3D 800; - break; - } - - PcdSet32 (PcdSetupVideoHorizontalResolution, HorizontalResolution); - PcdSet32 (PcdSetupVideoVerticalResolution, VerticalResolution); - DEBUG ((EFI_D_ERROR, "HorizontalResolution =3D %x; VerticalResolution = =3D %x", HorizontalResolution, VerticalResolution)); - - return; -} - -/** - Connect the predefined platform default console device. Always try to fi= nd - and enable the vga device if have. - - @param PlatformConsole Predefined platform default console device arr= ay. - - @retval EFI_SUCCESS Success connect at least one ConIn and ConOut - device, there must have one ConOut device is - active vga device. - - @retval EFI_STATUS Return the status of - BdsLibConnectAllDefaultConsoles () - -**/ -EFI_STATUS -PlatformBdsConnectConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole -) -{ - EFI_STATUS Status; - UINTN Index; - EFI_DEVICE_PATH_PROTOCOL *VarConout; - EFI_DEVICE_PATH_PROTOCOL *VarConin; - UINTN DevicePathSize; - - UpdateConsoleResolution(); - - Index =3D 0; - Status =3D EFI_SUCCESS; - DevicePathSize =3D 0; - VarConout =3D BdsLibGetVariableAndSize ( - L"ConOut", - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - VarConin =3D BdsLibGetVariableAndSize ( - L"ConIn", - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - if (VarConout =3D=3D NULL || VarConin =3D=3D NULL) { - // - // Have chance to connect the platform default console, - // the platform default console is the minimum device group - // the platform should support - // - while (PlatformConsole[Index].DevicePath !=3D NULL) { - - // - // Update the console variable with the connect type - // - if ((PlatformConsole[Index].ConnectType & CONSOLE_IN) =3D=3D CONSOLE= _IN) { - BdsLibUpdateConsoleVariable (L"ConIn", PlatformConsole[Index].Devi= cePath, NULL); - } - - if ((PlatformConsole[Index].ConnectType & CONSOLE_OUT) =3D=3D CONSOL= E_OUT) { - BdsLibUpdateConsoleVariable (L"ConOut", PlatformConsole[Index].Dev= icePath, NULL); - } - - if ((PlatformConsole[Index].ConnectType & STD_ERROR) =3D=3D STD_ERRO= R) { - BdsLibUpdateConsoleVariable (L"ErrOut", PlatformConsole[Index].Dev= icePath, NULL); - } - - Index ++; - } - } - - // - // Make sure we have at least one active VGA, and have the right - // active VGA in console variable - // - Status =3D PlatformBdsForceActiveVga (); - if (EFI_ERROR (Status)) { - return Status; - } - - DEBUG ((EFI_D_INFO, "DISPLAY INIT DONE\n")); - - // - // Connect the all the default console with current console variable - // - Status =3D BdsLibConnectAllDefaultConsoles (); - if (EFI_ERROR (Status)) { - return Status; - } - - return EFI_SUCCESS; -} - -/** - Connect with predefined platform connect sequence, - the OEM/IBV can customize with their own connect sequence. - - @param None. - - @retval None. - -**/ -VOID -PlatformBdsConnectSequence ( - VOID - ) -{ - UINTN Index; - - Index =3D 0; - - // - // Here we can get the customized platform connect sequence - // Notes: we can connect with new variable which record the - // last time boots connect device path sequence - // - while (gPlatformConnectSequence[Index] !=3D NULL) { - - // - // Build the platform boot option - // - BdsLibConnectDevicePath (gPlatformConnectSequence[Index]); - Index ++; - } - - // - // Just use the simple policy to connect all devices - // There should be no difference between debug tip and release tip, or i= t will be extremely hard to debug. - // - // There is case that IdeController driver will write boot script in dri= ver model Start() function. It will be rejected by boot script save. - // It is only found when DEBUG disabled, because we are using BdsLibConn= ectAll() when DEBUG enabled. - // - // So we use BdsLibConnectAll() here to make sure IdeController.Start() = is invoked before InstallReadyToLock(). - // We may also consider to connect SataController only later if needed. - // - BdsLibConnectAll (); -} - -/** - - Load the predefined driver option, OEM/IBV can customize this - to load their own drivers - - @param BdsDriverLists The header of the driver option link list. - - @retval None. - -**/ -VOID -PlatformBdsGetDriverOption ( - IN OUT LIST_ENTRY *BdsDriverLists - ) -{ - UINTN Index; - - Index =3D 0; - - // - // Here we can get the customized platform driver option - // - while (gPlatformDriverOption[Index] !=3D NULL) { - - // - // Build the platform boot option - // - BdsLibRegisterNewOption (BdsDriverLists, gPlatformDriverOption[Index],= NULL, L"DriverOrder"); - Index ++; - } - -} - -/** - This function is used for some critical time if the the system - have no any boot option, and there is no time out for user to add - the new boot option. This can also treat as the platform default - boot option. - - @param BdsBootOptionList The header of the boot option link list. - - @retval None. - -**/ -VOID -PlatformBdsPredictBootOption ( - IN OUT LIST_ENTRY *BdsBootOptionList - ) -{ - UINTN Index; - - Index =3D 0; - - // - // Here give chance to get platform boot option data - // - while (gPlatformBootOption[Index] !=3D NULL) { - - // - // Build the platform boot option - // - BdsLibRegisterNewOption (BdsBootOptionList, gPlatformBootOption[Index]= , NULL, L"BootOrder"); - Index ++; - } -} - -/** - Perform the platform diagnostic, such like test memory. OEM/IBV also - can customize this fuction to support specific platform diagnostic. - - @param MemoryTestLevel The memory test intensive level - @param QuietBoot Indicate if need to enable the quiet boot - @param BaseMemoryTest A pointer to BdsMemoryTest() - - @retval None. - -**/ -VOID -PlatformBdsDiagnostics ( - IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel, - IN BOOLEAN QuietBoot, - IN BASEM_MEMORY_TEST BaseMemoryTest - ) -{ - EFI_STATUS Status; - - // - // Here we can decide if we need to show - // the diagnostics screen - // Notes: this quiet boot code should be remove - // from the graphic lib - // - if (QuietBoot) { - EnableQuietBoot (PcdGetPtr(PcdLogoFile)); - - // - // Perform system diagnostic - // - Status =3D BaseMemoryTest (MemoryTestLevel); - if (EFI_ERROR (Status)) { - DisableQuietBoot (); - } - - return; - } - - // - // Perform system diagnostic - // - Status =3D BaseMemoryTest (MemoryTestLevel); -} - - -/** - For EFI boot option, BDS separate them as six types: - 1. Network - The boot option points to the SimpleNetworkProtocol device. - Bds will try to automatically create this type boot option = when enumerate. - 2. Shell - The boot option points to internal flash shell. - Bds will try to automatically create this type boot option = when enumerate. - 3. Removable BlockIo - The boot option only points to the removable= media - device, like USB flash disk, DVD, Floppy etc. - These device should contain a *removable* bl= ockIo - protocol in their device handle. - Bds will try to automatically create this ty= pe boot option - when enumerate. - 4. Fixed BlockIo - The boot option only points to a Fixed block= Io device, - like HardDisk. - These device should contain a *fixed* blockIo - protocol in their device handle. - BDS will skip fixed blockIo devices, and NOT - automatically create boot option for them. B= ut BDS - will help to delete those fixed blockIo boot= option, - whose description rule conflict with other a= uto-created - boot options. - 5. Non-BlockIo Simplefile - The boot option points to a device whose han= dle - has SimpleFileSystem Protocol, but has no bl= ockio - protocol. These devices do not offer blockIo - protocol, but BDS still can get the - \EFI\BOOT\boot{machinename}.EFI by SimpleFil= eSystem - Protocol. - 6. File - The boot option points to a file. These boot options are us= ually - created by user manually or OS loader. BDS will not delete = or modify - these boot options. - - This function will enumerate all possible boot device in the system, and - automatically create boot options for Network, Shell, Removable BlockIo, - and Non-BlockIo Simplefile devices. - It will only execute once of every boot. - - @param BdsBootOptionList The header of the link list which indexed= all - current boot options - - @retval EFI_SUCCESS Finished all the boot device enumerate an= d create - the boot option base on that boot device - - @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and c= reate the boot option list -**/ -EFI_STATUS -EFIAPI -PlatformBdsLibEnumerateAllBootOption ( - IN OUT LIST_ENTRY *BdsBootOptionList - ) -{ - EFI_STATUS Status; - UINT16 FloppyNumber; - UINT16 HarddriveNumber; - UINT16 CdromNumber; - UINT16 UsbNumber; - UINT16 MiscNumber; - UINT16 ScsiNumber; - UINT16 NonBlockNumber; - UINTN NumberBlockIoHandles; - EFI_HANDLE *BlockIoHandles; - EFI_BLOCK_IO_PROTOCOL *BlkIo; - BOOLEAN Removable[2]; - UINTN RemovableIndex; - UINTN Index; - UINTN NumOfLoadFileHandles; - EFI_HANDLE *LoadFileHandles; - UINTN FvHandleCount; - EFI_HANDLE *FvHandleBuffer; - EFI_FV_FILETYPE Type; - UINTN Size; - EFI_FV_FILE_ATTRIBUTES Attributes; - UINT32 AuthenticationStatus; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - UINTN DevicePathType; - CHAR16 Buffer[40]; - EFI_HANDLE *FileSystemHandles; - UINTN NumberFileSystemHandles; - BOOLEAN NeedDelete; - EFI_IMAGE_DOS_HEADER DosHeader; - CHAR8 *PlatLang; - CHAR8 *LastLang; - EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - CHAR16 *MacStr; - CHAR16 *IPverStr; - EFI_HANDLE *NetworkHandles; - UINTN BufferSize; - - FloppyNumber =3D 0; - HarddriveNumber =3D 0; - CdromNumber =3D 0; - UsbNumber =3D 0; - MiscNumber =3D 0; - ScsiNumber =3D 0; - PlatLang =3D NULL; - LastLang =3D NULL; - ZeroMem (Buffer, sizeof (Buffer)); - - // - // If the boot device enumerate happened, just get the boot - // device from the boot order variable - // - if (mEnumBootDevice) { - GetVariable2 (LAST_ENUM_LANGUAGE_VARIABLE_NAME, &gLastEnumLangGuid, (V= OID**)&LastLang, NULL); - GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatLang, NULL); - ASSERT (PlatLang !=3D NULL); - if ((LastLang !=3D NULL) && (AsciiStrCmp (LastLang, PlatLang) =3D=3D 0= )) { - Status =3D BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder"= ); - FreePool (LastLang); - FreePool (PlatLang); - return Status; - } else { - Status =3D gRT->SetVariable ( - LAST_ENUM_LANGUAGE_VARIABLE_NAME, - &gLastEnumLangGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, - AsciiStrSize (PlatLang), - PlatLang - ); - // - // Failure to set the variable only impacts the performance next tim= e enumerating the boot options. - // - - if (LastLang !=3D NULL) { - FreePool (LastLang); - } - FreePool (PlatLang); - } - } - - // - // Notes: this dirty code is to get the legacy boot option from the - // BBS table and create to variable as the EFI boot option, it should - // be removed after the CSM can provide legacy boot option directly - // - REFRESH_LEGACY_BOOT_OPTIONS; - - // - // Delete invalid boot option - // - BdsDeleteAllInvalidEfiBootOption (); - - // - // Parse removable media followed by fixed media. - // The Removable[] array is used by the for-loop below to create removab= le media boot options=20 - // at first, and then to create fixed media boot options. - // - Removable[0] =3D FALSE; - Removable[1] =3D TRUE; - - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiBlockIoProtocolGuid, - NULL, - &NumberBlockIoHandles, - &BlockIoHandles - ); - - for (RemovableIndex =3D 0; RemovableIndex < 2; RemovableIndex++) { - for (Index =3D 0; Index < NumberBlockIoHandles; Index++) { - Status =3D gBS->HandleProtocol ( - BlockIoHandles[Index], - &gEfiBlockIoProtocolGuid, - (VOID **) &BlkIo - ); - // - // skip the logical partition - // - if (EFI_ERROR (Status) || BlkIo->Media->LogicalPartition) { - continue; - } - - // - // firstly fixed block io then the removable block io - // - if (BlkIo->Media->RemovableMedia =3D=3D Removable[RemovableIndex]) { - continue; - } - DevicePath =3D DevicePathFromHandle (BlockIoHandles[Index]); - DevicePathType =3D BdsGetBootTypeFromDevicePath (DevicePath); - - switch (DevicePathType) { - case BDS_EFI_ACPI_FLOPPY_BOOT: - if (FloppyNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)), FloppyNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_FLOPPY))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - FloppyNumber++; - break; - - // - // Assume a removable SATA device should be the DVD/CD device, a fix= ed SATA device should be the Hard Drive device. - // - case BDS_EFI_MESSAGE_ATAPI_BOOT: - case BDS_EFI_MESSAGE_SATA_BOOT: - if (BlkIo->Media->RemovableMedia) { - if (CdromNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStr= ingById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)), CdromNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetString= ById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD))); - } - CdromNumber++; - } else { - if (HarddriveNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStr= ingById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)), HarddriveNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetString= ById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE))); - } - HarddriveNumber++; - } - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Buffer: %S\n", Buffer)); - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - break; - - case BDS_EFI_MESSAGE_USB_DEVICE_BOOT: - if (UsbNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_USB)), UsbNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_USB))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - UsbNumber++; - break; - - case BDS_EFI_MESSAGE_SCSI_BOOT: - if (ScsiNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_SCSI)), ScsiNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_SCSI))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - ScsiNumber++; - break; - - case BDS_EFI_MESSAGE_MISC_BOOT: - default: - if (MiscNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_MISC)), MiscNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_MISC))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - MiscNumber++; - break; - } - } - } - - if (NumberBlockIoHandles !=3D 0) { - FreePool (BlockIoHandles); - } - - // - // If there is simple file protocol which does not consume block Io prot= ocol, create a boot option for it here. - // - NonBlockNumber =3D 0; - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiSimpleFileSystemProtocolGuid, - NULL, - &NumberFileSystemHandles, - &FileSystemHandles - ); - for (Index =3D 0; Index < NumberFileSystemHandles; Index++) { - Status =3D gBS->HandleProtocol ( - FileSystemHandles[Index], - &gEfiBlockIoProtocolGuid, - (VOID **) &BlkIo - ); - if (!EFI_ERROR (Status)) { - // - // Skip if the file system handle supports a BlkIo protocol, - // - continue; - } - - // - // Do the removable Media thing. \EFI\BOOT\boot{machinename}.EFI - // machinename is ia32, ia64, x64, ... - // - Hdr.Union =3D &HdrData; - NeedDelete =3D TRUE; - Status =3D BdsLibGetImageHeader ( - FileSystemHandles[Index], - EFI_REMOVABLE_MEDIA_FILE_NAME, - &DosHeader, - Hdr - ); - if (!EFI_ERROR (Status) && - EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Hdr.Pe32->FileHeader.Machine) && - Hdr.Pe32->OptionalHeader.Subsystem =3D=3D EFI_IMAGE_SUBSYSTEM_EFI_= APPLICATION) { - NeedDelete =3D FALSE; - } - - if (NeedDelete) { - // - // No such file or the file is not a EFI application, delete this bo= ot option - // - BdsLibDeleteOptionFromHandle (FileSystemHandles[Index]); - } else { - if (NonBlockNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringB= yId (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)), NonBlockNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById= (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK))); - } - BdsLibBuildOptionFromHandle (FileSystemHandles[Index], BdsBootOption= List, Buffer); - NonBlockNumber++; - } - } - - if (NumberFileSystemHandles !=3D 0) { - FreePool (FileSystemHandles); - } - - // - // Check if we have on flash shell - // - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &FvHandleCount, - &FvHandleBuffer - ); - for (Index =3D 0; Index < FvHandleCount; Index++) { - gBS->HandleProtocol ( - FvHandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - - Status =3D Fv->ReadFile ( - Fv, - &gUefiShellFileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (EFI_ERROR (Status)) { - // - // Skip if no shell file in the FV - // - continue; - } - // - // Build the shell boot option - // - BdsLibBuildOptionFromShell (FvHandleBuffer[Index], BdsBootOptionList); - } - - if (FvHandleCount !=3D 0) { - FreePool (FvHandleBuffer); - } - - // - // Parse Network Boot Device - // - NumOfLoadFileHandles =3D 0; - // - // Search Load File protocol for PXE boot option. - // - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiLoadFileProtocolGuid, - NULL, - &NumOfLoadFileHandles, - &LoadFileHandles - ); - - for (Index =3D 0; Index < NumOfLoadFileHandles; Index++) { - -// -//Locate EFI_DEVICE_PATH_PROTOCOL to dynamically get IPv4/IPv6 protocol in= formation. -// - - Status =3D gBS->HandleProtocol ( - LoadFileHandles[Index], - &gEfiDevicePathProtocolGuid, - (VOID **) &DevicePath - ); - =20 - ASSERT_EFI_ERROR (Status); - - while (!IsDevicePathEnd (DevicePath)) { - if ((DevicePath->Type =3D=3D MESSAGING_DEVICE_PATH) && - (DevicePath->SubType =3D=3D MSG_IPv4_DP)) { - - // - //Get handle infomation - // - BufferSize =3D 0; - NetworkHandles =3D NULL; - Status =3D gBS->LocateHandle ( - ByProtocol,=20 - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - NetworkHandles =3D AllocateZeroPool(BufferSize); - if (NetworkHandles =3D=3D NULL) { - return (EFI_OUT_OF_RESOURCES); - } - Status =3D gBS->LocateHandle( - ByProtocol, - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - } - =20 - // - //Get the MAC string - // - Status =3D NetLibGetMacString ( - *NetworkHandles, - NULL, - &MacStr - ); - if (EFI_ERROR (Status)) {=09 - return Status; - } - IPverStr =3D L" IPv4"; - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s%s%s", BdsLibGetStringById (= STRING_TOKEN (STR_DESCRIPTION_NETWORK)),MacStr,IPverStr); - break; - } - if((DevicePath->Type =3D=3D MESSAGING_DEVICE_PATH) && - (DevicePath->SubType =3D=3D MSG_IPv6_DP)) { - - // - //Get handle infomation - // - BufferSize =3D 0; - NetworkHandles =3D NULL; - Status =3D gBS->LocateHandle ( - ByProtocol,=20 - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - NetworkHandles =3D AllocateZeroPool(BufferSize); - if (NetworkHandles =3D=3D NULL) { - return (EFI_OUT_OF_RESOURCES); - } - Status =3D gBS->LocateHandle( - ByProtocol, - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - } - =20 - // - //Get the MAC string - // - Status =3D NetLibGetMacString ( - *NetworkHandles, - NULL, - &MacStr - ); - if (EFI_ERROR (Status)) {=09 - return Status; - } - IPverStr =3D L" IPv6"; - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s%s%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_NETWORK)),MacStr,IPverStr); - break; - } - DevicePath =3D NextDevicePathNode (DevicePath); - } - =20 - BdsLibBuildOptionFromHandle (LoadFileHandles[Index], BdsBootOptionList= , Buffer); - } - - if (NumOfLoadFileHandles !=3D 0) { - FreePool (LoadFileHandles); - } - - // - // Check if we have on flash shell - // - /* gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &FvHandleCount, - &FvHandleBuffer - ); - for (Index =3D 0; Index < FvHandleCount; Index++) { - gBS->HandleProtocol ( - FvHandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - - Status =3D Fv->ReadFile ( - Fv, - &gUefiShellFileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (EFI_ERROR (Status)) { - // - // Skip if no shell file in the FV - // - continue; - } - // - // Build the shell boot option - // - BdsLibBuildOptionFromShell (FvHandleBuffer[Index], BdsBootOptionList); - } - - if (FvHandleCount !=3D 0) { - FreePool (FvHandleBuffer); - } */ - =20 - // - // Make sure every boot only have one time - // boot device enumerate - // - Status =3D BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder"); - mEnumBootDevice =3D TRUE; - - return Status; -}=20 - - - -/** - - The function will execute with as the platform policy, current policy - is driven by boot mode. IBV/OEM can customize this code for their specif= ic - policy action. - - @param DriverOptionList - The header of the driver option link list - @param BootOptionList - The header of the boot option link list - @param ProcessCapsules - A pointer to ProcessCapsules() - @param BaseMemoryTest - A pointer to BaseMemoryTest() - - @retval None. - -**/ -VOID -EFIAPI -PlatformBdsPolicyBehavior ( - IN OUT LIST_ENTRY *DriverOptionList, - IN OUT LIST_ENTRY *BootOptionList, - IN PROCESS_CAPSULES BdsProcessCapsules, - IN BASEM_MEMORY_TEST BaseMemoryTest - ) -{ - EFI_STATUS Status; - UINT16 Timeout; - EFI_BOOT_MODE BootMode; - BOOLEAN DeferredImageExist; - UINTN Index; - SYSTEM_CONFIGURATION SystemConfiguration; - UINTN VarSize; - PLATFORM_PCI_DEVICE_PATH *EmmcBootDevPath; - EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea; - EFI_HANDLE FvProtocolHandle; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - UINTN Index1; - UINTN SataPciRegBase =3D 0; - UINT16 SataModeSelect =3D 0; - VOID *RegistrationExitPmAuth =3D NULL; - EFI_EVENT Event; - BOOLEAN IsFirstBoot; - UINT16 *BootOrder; - UINTN BootOrderSize; - ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; - - Timeout =3D PcdGet16 (PcdPlatformBootTimeOut); - if (Timeout > 10 ) { - //we think the Timeout variable is corrupted - Timeout =3D 10; - } - - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - NORMAL_SETUP_NAME, - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &SystemConfiguration - ); - - if (EFI_ERROR (Status) || VarSize !=3D sizeof(SYSTEM_CONFIGURATION)) { - //The setup variable is corrupted - VarSize =3D sizeof(SYSTEM_CONFIGURATION); - Status =3D gRT->GetVariable( - L"SetupRecovery", - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &SystemConfiguration - ); - ASSERT_EFI_ERROR (Status); - } - - // - // Load the driver option as the driver option list - // - PlatformBdsGetDriverOption (DriverOptionList); - - // - // Get current Boot Mode - // - BootMode =3D GetBootModeHob(); - - // - // No deferred images exist by default - // - DeferredImageExist =3D FALSE; - if ((BootMode !=3D BOOT_WITH_MINIMAL_CONFIGURATION) && (PcdGet32(PcdFlas= hFvShellSize) > 0)){ - gDS->ProcessFirmwareVolume ( - (VOID *)(UINTN)PcdGet32(PcdFlashFvShellBase), - PcdGet32(PcdFlashFvShellSize), - &FvProtocolHandle - ); - } - - if (SystemConfiguration.FastBoot =3D=3D 1) { - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - if ((BootOrder !=3D NULL) && (BootMode !=3D BOOT_ON_FLASH_UPDATE)) { - // - // BootOrder exist, it means system has boot before. We can do fast = boot. - // - BootMode =3D BOOT_WITH_MINIMAL_CONFIGURATION; - } - } - - - // - // Use eMMC to boot OS and turn on AHCI, when SATA HDD is diconnected, - // SATA AHCI CTLR device will show yellow bang, implement this solution = to solve it. - // - SataPciRegBase =3D MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, 0, 0= ); - SataModeSelect =3D MmioRead16 (SataPciRegBase + R_PCH_SATA_MAP) & B_PCH= _SATA_MAP_SMS_MASK; - Status =3D EFI_SUCCESS; - if (SataModeSelect !=3D V_PCH_SATA_MAP_SMS_IDE) { - Status =3D gBS->CreateEvent ( - EVT_NOTIFY_SIGNAL, - TPL_CALLBACK, - DisableAhciCtlr, - &SataPciRegBase, - &Event - ); - if (!EFI_ERROR (Status)) { - Status =3D gBS->RegisterProtocolNotify ( - &gExitPmAuthProtocolGuid, - Event, - &RegistrationExitPmAuth - ); - } - } - - Status =3D gBS->LocateProtocol(&gEsrtManagementProtocolGuid, NULL, (VOID= **)&EsrtManagement); - if (EFI_ERROR(Status)) { - EsrtManagement =3D NULL; - } - - DEBUG ((DEBUG_INFO, "BDS: BootMode=3D%02x\n", BootMode)); - - switch (BootMode) { - - case BOOT_WITH_MINIMAL_CONFIGURATION: - PlatformBdsInitHotKeyEvent (); - PlatformBdsConnectSimpleConsole (gPlatformSimpleConsole); - - - // - // Check to see if it's needed to dispatch more DXE drivers. - // - for (Index =3D 0; Index < sizeof(ConnectDriverTable)/sizeof(EFI_GUID *= ); Index++) { - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - ConnectDriverTable[Index], - NULL, - &HandleCount, - &HandleBuffer - ); - if (!EFI_ERROR (Status)) { - for (Index1 =3D 0; Index1 < HandleCount; Index1++) { - gBS->ConnectController ( - HandleBuffer[Index1], - NULL, - NULL, - TRUE - ); - } - } - - if (HandleBuffer !=3D NULL) { - FreePool (HandleBuffer); - } - - gDS->Dispatch (); - } - - // - // Locate the Global NVS Protocol. - // - Status =3D gBS->LocateProtocol ( - &gEfiGlobalNvsAreaProtocolGuid, - NULL, - (void **)&GlobalNvsArea - ); - if (GlobalNvsArea->Area->emmcVersion =3D=3D 0){ - EmmcBootDevPath =3D (PLATFORM_PCI_DEVICE_PATH *)gPlatformSimpleBootO= ption[0]; - EmmcBootDevPath->PciDevice.Device =3D 0x10; - } - - // - // Connect boot device here to give time to read keyboard. - // - BdsLibConnectDevicePath (gPlatformSimpleBootOption[0]); - - // - // This is a workround for dectecting hotkey from USB keyboard. - // - gBS->Stall(KEYBOARD_TIMER_INTERVAL); - - if (mHotKeyTimerEvent !=3D NULL) { - gBS->SetTimer ( - mHotKeyTimerEvent, - TimerCancel, - 0 - ); - gBS->CloseEvent (mHotKeyTimerEvent); - mHotKeyTimerEvent =3D NULL; - } - if (mHotKeyPressed) { - // - // Skip show progress count down - // - Timeout =3D 0xFFFF; - goto FULL_CONFIGURATION; - } - - EnableQuietBoot (PcdGetPtr(PcdLogoFile)); - if (!SystemConfiguration.QuietBoot) { - PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest); - } - - - #ifdef TPM_ENABLED - TcgPhysicalPresenceLibProcessRequest(); - #endif - - if (EsrtManagement !=3D NULL) { - EsrtManagement->LockEsrtRepository(); - } - - // - // Close boot script and install ready to lock - // - InstallReadyToLock (); - - // - // Give one chance to enter the setup if we - // select Gummiboot "Reboot Into Firmware Interface" and Fast Boot is = enabled. - // - BootIntoFirmwareInterface(); - break; - - case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: - - // - // In no-configuration boot mode, we can connect the - // console directly. - // - BdsLibConnectAllDefaultConsoles (); - PlatformBdsDiagnostics (IGNORE, TRUE, BaseMemoryTest); - - // - // Perform some platform specific connect sequence - // - PlatformBdsConnectSequence (); - - // - // As console is ready, perform user identification again. - // - if (mCurrentUser =3D=3D NULL) { - PlatformBdsUserIdentify (&mCurrentUser, &DeferredImageExist); - if (DeferredImageExist) { - // - // After user authentication, the deferred drivers was loaded agai= n. - // Here, need to ensure the deferred images are connected. - // - BdsLibConnectAllDefaultConsoles (); - PlatformBdsConnectSequence (); - } - } - - if (EsrtManagement !=3D NULL) { - EsrtManagement->LockEsrtRepository(); - } - - // - // Close boot script and install ready to lock - // - InstallReadyToLock (); - - // - // Notes: current time out =3D 0 can not enter the - // front page - // - PlatformBdsEnterFrontPageWithHotKey (Timeout, FALSE); - - // - // Check the boot option with the boot option list - // - BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); - break; - - case BOOT_ON_FLASH_UPDATE: - - // - // Boot with the specific configuration - // - PlatformBdsConnectConsole (gPlatformConsole); - PlatformBdsDiagnostics (EXTENSIVE, TRUE, BaseMemoryTest); - - DEBUG((DEBUG_INFO, "ProcessCapsules Before EndOfDxe......\n")); - ProcessCapsules (); - DEBUG((DEBUG_INFO, "ProcessCapsules Done\n")); - - // - // Close boot script and install ready to lock - // - InstallReadyToLock (); - - BdsLibConnectAll (); - - // - // Perform user identification - // - if (mCurrentUser =3D=3D NULL) { - PlatformBdsUserIdentify (&mCurrentUser, &DeferredImageExist); - if (DeferredImageExist) { - // - // After user authentication, the deferred drivers was loaded agai= n. - // Here, need to ensure the deferred images are connected. - // - BdsLibConnectAll (); - } - } - - if (EsrtManagement !=3D NULL) { - EsrtManagement->SyncEsrtFmp(); - } - - DEBUG((DEBUG_INFO, "ProcessCapsules After ConnectAll......\n")); - ProcessCapsules(); - DEBUG((DEBUG_INFO, "ProcessCapsules Done\n")); - break; - - case BOOT_IN_RECOVERY_MODE: - - // - // In recovery mode, just connect platform console - // and show up the front page - // - PlatformBdsConnectConsole (gPlatformConsole); - PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest); - BdsLibConnectAll (); - - // - // Perform user identification - // - if (mCurrentUser =3D=3D NULL) { - PlatformBdsUserIdentify (&mCurrentUser, &DeferredImageExist); - if (DeferredImageExist) { - // - // After user authentication, the deferred drivers was loaded agai= n. - // Here, need to ensure the deferred drivers are connected. - // - BdsLibConnectAll (); - } - } - - // - // Close boot script and install ready to lock - // - InstallReadyToLock (); - - // - // In recovery boot mode, we still enter to the - // frong page now - // - PlatformBdsEnterFrontPageWithHotKey (Timeout, FALSE); - break; - -FULL_CONFIGURATION: - case BOOT_WITH_FULL_CONFIGURATION: - case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: - case BOOT_WITH_DEFAULT_SETTINGS: - default: - - // - // Connect platform console - // - Status =3D PlatformBdsConnectConsole (gPlatformConsole); - if (EFI_ERROR (Status)) { - - // - // Here OEM/IBV can customize with defined action - // - PlatformBdsNoConsoleAction (); - } - - // - // Chenyunh[TODO]: This is Workgroud to show the fs for uSDcard, - // Need to root cause this issue. - // - DEBUG ((DEBUG_ERROR, "Start to reconnect all driver.\n")); - BdsLibDisconnectAllEfi(); - BdsLibConnectAll (); - DEBUG ((DEBUG_ERROR, "End to reconnect all driver.\n")); - - // - // Perform some platform specific connect sequence - // - PlatformBdsConnectSequence (); - EnableQuietBoot (PcdGetPtr(PcdLogoFile)); - if (!SystemConfiguration.QuietBoot) { - PlatformBdsDiagnostics (IGNORE, FALSE, BaseMemoryTest); - } - - // - // Do a pre-delay so Hard Disk can spin up and see more logo. - // - gBS->Stall(SystemConfiguration.HddPredelay * 1000000); - - // - // Perform user identification - // - if (mCurrentUser =3D=3D NULL) { - PlatformBdsUserIdentify (&mCurrentUser, &DeferredImageExist); - if (DeferredImageExist) { - // - // After user authentication, the deferred drivers was loaded agai= n. - // Here, need to ensure the deferred drivers are connected. - // - Status =3D PlatformBdsConnectConsole (gPlatformConsole); - if (EFI_ERROR (Status)) { - PlatformBdsNoConsoleAction (); - } - PlatformBdsConnectSequence (); - } - } - #ifdef TPM_ENABLED - TcgPhysicalPresenceLibProcessRequest(); - #endif - - if (EsrtManagement !=3D NULL) { - EsrtManagement->SyncEsrtFmp(); - } - // - // Close boot script and install ready to lock - // - InstallReadyToLock (); - - // - // Here we have enough time to do the enumeration of boot device - // - PlatformBdsLibEnumerateAllBootOption (BootOptionList); - - // - // Give one chance to enter the setup if we - // have the time out - // - PlatformBdsEnterFrontPageWithHotKey (Timeout, FALSE); - - // - // Give one chance to enter the setup if we - // select Gummiboot "Reboot Into Firmware Interface" - // - BootIntoFirmwareInterface(); - - // - // In default boot mode, always find all boot - // option and do enumerate all the default boot option - // - if (Timeout =3D=3D 0) { - BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); - if (IsListEmpty(BootOptionList)) { - PlatformBdsPredictBootOption (BootOptionList); - } - - return; - } - - - break; - } - - - IsFirstBoot =3D PcdGetBool(PcdBootState); - if (IsFirstBoot) { - PcdSetBool(PcdBootState, FALSE); - } - return; - -} - -/** - Hook point after a boot attempt succeeds. We don't expect a boot option = to - return, so the UEFI 2.0 specification defines that you will default to an - interactive mode and stop processing the BootOrder list in this case. Th= is - is alos a platform implementation and can be customized by IBV/OEM. - - @param Option Pointer to Boot Option that succeeded to boot. - - @retval None. - -**/ -VOID -EFIAPI -PlatformBdsBootSuccess ( - IN BDS_COMMON_OPTION *Option - ) -{ - CHAR16 *TmpStr; - - // - // If Boot returned with EFI_SUCCESS and there is not in the boot device - // select loop then we need to pop up a UI and wait for user input. - // - TmpStr =3D Option->StatusString; - if (TmpStr !=3D NULL) { - BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r"= , NULL); - FreePool(TmpStr); - } -} - -/** - Hook point after a boot attempt fails. - - @param Option - Pointer to Boot Option that failed to boot. - @param Status - Status returned from failed boot. - @param ExitData - Exit data returned from failed boot. - @param ExitDataSize - Exit data size returned from failed boot. - - @retval None. - -**/ -VOID -EFIAPI -PlatformBdsBootFail ( - IN BDS_COMMON_OPTION *Option, - IN EFI_STATUS Status, - IN CHAR16 *ExitData, - IN UINTN ExitDataSize - ) -{ - CHAR16 *TmpStr; - EFI_HANDLE FvProtocolHandle; - - // - // If Boot returned with failed status then we need to pop up a UI and w= ait - // for user input. - // - TmpStr =3D Option->StatusString; - if (TmpStr !=3D NULL) { - BdsLibOutputStrings (gST->ConOut, TmpStr, Option->Description, L"\n\r"= , NULL); - FreePool(TmpStr); - } - if (PcdGet32(PcdFlashFvShellSize) > 0){ - gDS->ProcessFirmwareVolume ( - (VOID *)(UINTN)PcdGet32(PcdFlashFvShellBase), - PcdGet32(PcdFlashFvShellSize), - &FvProtocolHandle - ); - } - PlatformBdsConnectSequence (); -} - -/** - This function is remained for IBV/OEM to do some platform action, - if there no console device can be connected. - - @param None. - - @retval EFI_SUCCESS Direct return success now. - -**/ -EFI_STATUS -PlatformBdsNoConsoleAction ( - VOID - ) -{ - return EFI_SUCCESS; -} - -/** - This function locks the block - - @param Base The base address flash region to be locked. - -**/ -VOID -BdsLockFv ( - IN EFI_PHYSICAL_ADDRESS Base - ) -{ - EFI_FV_BLOCK_MAP_ENTRY *BlockMap; - EFI_FIRMWARE_VOLUME_HEADER *FvHeader; - EFI_PHYSICAL_ADDRESS BaseAddress; - UINT32 BlockLength; - UINTN Index; - - BaseAddress =3D Base - 0x400000 + 2; - FvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *) ((UINTN) (Base)); - BlockMap =3D &(FvHeader->BlockMap[0]); - - while ((BlockMap->NumBlocks !=3D 0) && (BlockMap->Length !=3D 0)) { - BlockLength =3D BlockMap->Length; - for (Index =3D 0; Index < BlockMap->NumBlocks; Index++) { - MmioOr8 ((UINTN) BaseAddress, 0x03); - BaseAddress +=3D BlockLength; - } - BlockMap++; - } -} - -VOID -EFIAPI -PlatformBdsLockNonUpdatableFlash ( - VOID - ) -{ - EFI_PHYSICAL_ADDRESS Base; - - Base =3D (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashFvMainBase); - if (Base > 0) { - BdsLockFv (Base); - } - - Base =3D (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashFvRecoveryBase); - if (Base > 0) { - BdsLockFv (Base); - } -} - -/** - Lock the ConsoleIn device in system table. All key - presses will be ignored until the Password is typed in. The only way to - disable the password is to type it in to a ConIn device. - - @param Password Password used to lock ConIn device. - - @retval EFI_SUCCESS lock the Console In Spliter virtual handle succe= ssfully. - @retval EFI_UNSUPPORTED Password not found - -**/ -EFI_STATUS -EFIAPI -LockKeyboards ( - IN CHAR16 *Password - ) -{ - return EFI_UNSUPPORTED; -} - -/** - Connect the predefined platform default authentication devices. - - This function connects the predefined device path for authentication dev= ice, - and if the predefined device path has child device path, the child handl= e will - be connected too. But the child handle of the child will not be connecte= d. - -**/ -VOID -EFIAPI -PlatformBdsConnectAuthDevice ( - VOID - ) -{ - EFI_STATUS Status; - UINTN Index; - UINTN HandleIndex; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - EFI_DEVICE_PATH_PROTOCOL *ChildDevicePath; - EFI_USER_MANAGER_PROTOCOL *Manager; - - Status =3D gBS->LocateProtocol ( - &gEfiUserManagerProtocolGuid, - NULL, - (VOID **) &Manager - ); - if (EFI_ERROR (Status)) { - // - // As user manager protocol is not installed, the authentication devic= es - // should not be connected. - // - return ; - } - - Index =3D 0; - while (gUserAuthenticationDevice[Index] !=3D NULL) { - // - // Connect the platform customized device paths - // - BdsLibConnectDevicePath (gUserAuthenticationDevice[Index]); - Index++; - } - - // - // Find and connect the child device paths of the platform customized de= vice paths - // - HandleBuffer =3D NULL; - for (Index =3D 0; gUserAuthenticationDevice[Index] !=3D NULL; Index++) { - HandleCount =3D 0; - Status =3D gBS->LocateHandleBuffer ( - AllHandles, - NULL, - NULL, - &HandleCount, - &HandleBuffer - ); - ASSERT (!EFI_ERROR (Status)); - - // - // Find and connect the child device paths of gUserIdentificationDevic= e[Index] - // - for (HandleIndex =3D 0; HandleIndex < HandleCount; HandleIndex++) { - ChildDevicePath =3D NULL; - Status =3D gBS->HandleProtocol ( - HandleBuffer[HandleIndex], - &gEfiDevicePathProtocolGuid, - (VOID **) &ChildDevicePath - ); - if (EFI_ERROR (Status) || ChildDevicePath =3D=3D NULL) { - continue; - } - - if (CompareMem ( - ChildDevicePath, - gUserAuthenticationDevice[Index], - (GetDevicePathSize (gUserAuthenticationDevice[Index]) - sizeof= (EFI_DEVICE_PATH_PROTOCOL)) - ) !=3D 0) { - continue; - } - gBS->ConnectController ( - HandleBuffer[HandleIndex], - NULL, - NULL, - TRUE - ); - } - } - - if (HandleBuffer !=3D NULL) { - FreePool (HandleBuffer); - } -} - -/** - This function is to identify a user, and return whether deferred images = exist. - - @param[out] User Point to user profile handle. - @param[out] DeferredImageExist On return, points to TRUE if the deferre= d image - exist or FALSE if it did not exist. - -**/ -VOID -EFIAPI -PlatformBdsUserIdentify ( - OUT EFI_USER_PROFILE_HANDLE *User, - OUT BOOLEAN *DeferredImageExist - ) -{ - EFI_STATUS Status; - EFI_DEFERRED_IMAGE_LOAD_PROTOCOL *DeferredImage; - UINTN HandleCount; - EFI_HANDLE *HandleBuf; - UINTN Index; - UINTN DriverIndex; - EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath; - VOID *DriverImage; - UINTN ImageSize; - BOOLEAN BootOption; - - // - // Perform user identification - // - do { - Status =3D BdsLibUserIdentify (User); - } while (EFI_ERROR (Status)); - - // - // After user authentication now, try to find whether deferred image exi= sts - // - HandleCount =3D 0; - HandleBuf =3D NULL; - *DeferredImageExist =3D FALSE; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiDeferredImageLoadProtocolGuid, - NULL, - &HandleCount, - &HandleBuf - ); - if (EFI_ERROR (Status)) { - return ; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - HandleBuf[Index], - &gEfiDeferredImageLoadProtocolGuid, - (VOID **) &DeferredImage - ); - if (!EFI_ERROR (Status)) { - // - // Find whether deferred image exists in this instance. - // - DriverIndex =3D 0; - Status =3D DeferredImage->GetImageInfo( - DeferredImage, - DriverIndex, - &ImageDevicePath, - (VOID **) &DriverImage, - &ImageSize, - &BootOption - ); - if (!EFI_ERROR (Status)) { - // - // The deferred image is found. - // - FreePool (HandleBuf); - *DeferredImageExist =3D TRUE; - return ; - } - } - } - - FreePool (HandleBuf); -} - -UINTN gHotKey =3D 0; - - -EFI_STATUS -ShowProgressHotKey ( - IN UINT16 TimeoutDefault - ) -{ - CHAR16 *TmpStr; - UINT16 TimeoutRemain; - EFI_STATUS Status; - EFI_INPUT_KEY Key; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color; - UINT32 GpioValue; - CHAR16 *TmpStr1; - CHAR16 *TmpStr2; - CHAR16 *TmpStr3; - UINTN TmpStrSize; - VOID *Buffer; - UINTN Size; - - if (TimeoutDefault =3D=3D 0) { - return EFI_TIMEOUT; - } - - gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI= _BLACK)); - =20 - if (DebugAssertEnabled()) - { - DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key t= o stop it, or press or to enter setup page! ...Zzz....\n")); - } - else - { =20 - #ifdef __GNUC__ - SerialPortWrite((UINT8 *)"\n\n>>>>Start boot option, Press or to enter setup page(5 Sec)[GCC]", 76); - #else - SerialPortWrite((UINT8 *)"\n\n>>>>Start boot option, Press or to enter setup page(5 Sec)", 71); - #endif - }=20 - SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff); - SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0); - SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff); - - TmpStr2 =3D NULL; - TmpStr3 =3D NULL; - - // - // Check if the platform is using test key. - // - Status =3D GetSectionFromAnyFv( - PcdGetPtr(PcdEdkiiRsa2048Sha256TestPublicKeyFileGuid), - EFI_SECTION_RAW, - 0, - &Buffer, - &Size - ); - if (!EFI_ERROR(Status)) { - if ((Size =3D=3D PcdGetSize(PcdRsa2048Sha256PublicKeyBuffer)) && - (CompareMem(Buffer, PcdGetPtr(PcdRsa2048Sha256PublicKeyBuffer), Si= ze) =3D=3D 0)) { - TmpStr2 =3D L"WARNING: Recovery Test Key is used.\r\n"; - if (DebugAssertEnabled()) { - DEBUG ((DEBUG_INFO, "\n\nWARNING: Recovery Test Key is used.\n")); - } else { - SerialPortWrite((UINT8 *)"\n\nWARNING: Recovery Test Key is used."= , sizeof("\n\nWARNING: Recovery Test Key is used.")); - } - PcdSetBoolS(PcdTestKeyUsed, TRUE); - } - FreePool(Buffer); - } - Status =3D GetSectionFromAnyFv( - PcdGetPtr(PcdEdkiiPkcs7TestPublicKeyFileGuid), - EFI_SECTION_RAW, - 0, - &Buffer, - &Size - ); - if (!EFI_ERROR(Status)) { - if ((Size =3D=3D PcdGetSize(PcdPkcs7CertBuffer)) && - (CompareMem(Buffer, PcdGetPtr(PcdPkcs7CertBuffer), Size) =3D=3D 0)= ) { - TmpStr3 =3D L"WARNING: Capsule Test Key is used.\r\n"; - if (DebugAssertEnabled()) { - DEBUG ((DEBUG_INFO, "\n\nWARNING: Capsule Test Key is used.\r\n")); - } else { - SerialPortWrite((UINT8 *)"\n\nWARNING: Capsule Test Key is used.",= sizeof("\n\nWARNING: Capsule Test Key is used.")); - } - PcdSetBoolS(PcdTestKeyUsed, TRUE); - } - FreePool(Buffer); - } - - // - // Clear the progress status bar first - // - TmpStr1 =3D L"Start boot option, Press or to enter setup page= .\r\n"; - TmpStrSize =3D StrSize(TmpStr1); - if (TmpStr2 !=3D NULL) { - TmpStrSize +=3D StrSize(TmpStr2); - } - if (TmpStr3 !=3D NULL) { - TmpStrSize +=3D StrSize(TmpStr3); - } - TmpStr =3D AllocatePool (TmpStrSize); - if (TmpStr =3D=3D NULL) { - TmpStr =3D TmpStr1; - } else { - StrCpyS(TmpStr, TmpStrSize/sizeof(CHAR16), TmpStr1); - if (TmpStr2 !=3D NULL) { - StrCatS(TmpStr, TmpStrSize/sizeof(CHAR16), TmpStr2); - } - if (TmpStr3 !=3D NULL) { - StrCatS(TmpStr, TmpStrSize/sizeof(CHAR16), TmpStr3); - } - } - PlatformBdsShowProgress (Foreground, Background, TmpStr, Color, 0, 0); - - TimeoutRemain =3D TimeoutDefault; - while (TimeoutRemain !=3D 0) { - if (DebugAssertEnabled()) - { - DEBUG ((EFI_D_INFO, "Showing progress bar...Remaining %d second!\n", T= imeoutRemain)); - } - else - {=09 - SerialPortWrite ((UINT8 *)".", 1); - } - Status =3D WaitForSingleEvent (gST->ConIn->WaitForKey, ONE_SECOND); - if (Status !=3D EFI_TIMEOUT) { - break; - } - TimeoutRemain--; - - // - // Show progress - // - if (TmpStr !=3D NULL) { - PlatformBdsShowProgress ( - Foreground, - Background, - TmpStr, - Color, - ((TimeoutDefault - TimeoutRemain) * 100 / TimeoutDefault), - 0 - ); - } - } - - // - // Timeout expired - // - if (TimeoutRemain =3D=3D 0) { - if (DebugAssertEnabled()) - { - } - else - {=09 - SerialPortWrite ((UINT8 *)"\r\n", 2); - } - return EFI_TIMEOUT; - } - - // - // User pressed some key - // - Status =3D gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Check Volume Up Key to enter Setup - // - GpioValue =3D MmioRead32 (IO_BASE_ADDRESS + 0x0668); // The value of GP= IOC_5 - if (((GpioValue & BIT0) =3D=3D 0) && (Key.ScanCode =3D=3D SCAN_UP)) { - gHotKey =3D 0; - return EFI_SUCCESS; - } - - if (Key.UnicodeChar =3D=3D CHAR_CARRIAGE_RETURN) { - // - // User pressed enter, equivalent to select "continue" - // - return EFI_TIMEOUT; - } - - // - //F2 -- Front Page - //F5 -- Device Manager - //F7 -- Boot Manager - // do not use F8. generally people assume it is windows safe mode key. - //F9 -- Boot order - // - DEBUG ((EFI_D_INFO, "[Key Pressed]: ScanCode 0x%x\n", Key.ScanCode)); - switch(Key.ScanCode) { - case SCAN_F2: - gHotKey =3D 0; - break; - - case SCAN_DELETE: - gHotKey =3D 0; - break; - - case SCAN_F5: - gHotKey =3D FRONT_PAGE_KEY_DEVICE_MANAGER; - break; - - case SCAN_F7: - gHotKey =3D FRONT_PAGE_KEY_BOOT_MANAGER; - break; - - case SCAN_F9: - gHotKey =3D FRONT_PAGE_KEY_BOOT_MAINTAIN; - break; - - default: - //set gHotKey to continue so that flow will not go into CallFron= tPage - gHotKey =3D FRONT_PAGE_KEY_CONTINUE; - return EFI_TIMEOUT; - break; - } - - return EFI_SUCCESS; -} - - - -/** - This function is the main entry of the platform setup entry. - The function will present the main menu of the system setup, - this is the platform reference part and can be customize. - - - @param TimeoutDefault The fault time out value before the system - continue to boot. - @param ConnectAllHappened The indicater to check if the connect all have - already happened. - -**/ -VOID -PlatformBdsEnterFrontPageWithHotKey ( - IN UINT16 TimeoutDefault, - IN BOOLEAN ConnectAllHappened - ) -{ - EFI_STATUS Status; - - EFI_STATUS LogoStatus; - EFI_BOOT_LOGO_PROTOCOL *BootLogo; - EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut; - UINTN BootTextColumn; - UINTN BootTextRow; - - GraphicsOutput =3D NULL; - SimpleTextOut =3D NULL; - - PERF_START (NULL, "BdsTimeOut", "BDS", 0); - - // - // Indicate if we need connect all in the platform setup - // - if (ConnectAllHappened) { - gConnectAllHappened =3D TRUE; - } - - if (!mModeInitialized) { - // - // After the console is ready, get current video resolution - // and text mode before launching setup at first time. - // - Status =3D gBS->HandleProtocol ( - gST->ConsoleOutHandle, - &gEfiGraphicsOutputProtocolGuid, - (VOID**)&GraphicsOutput - ); - if (EFI_ERROR (Status)) { - GraphicsOutput =3D NULL; - } - - Status =3D gBS->HandleProtocol ( - gST->ConsoleOutHandle, - &gEfiSimpleTextOutProtocolGuid, - (VOID**)&SimpleTextOut - ); - if (EFI_ERROR (Status)) { - SimpleTextOut =3D NULL; - } - - if (GraphicsOutput !=3D NULL) { - // - // Get current video resolution and text mode. - // - mBootHorizontalResolution =3D GraphicsOutput->Mode->Info->Horizontal= Resolution; - mBootVerticalResolution =3D GraphicsOutput->Mode->Info->VerticalRe= solution; - } - - if (SimpleTextOut !=3D NULL) { - Status =3D SimpleTextOut->QueryMode ( - SimpleTextOut, - SimpleTextOut->Mode->Mode, - &BootTextColumn, - &BootTextRow - ); - mBootTextModeColumn =3D (UINT32)BootTextColumn; - mBootTextModeRow =3D (UINT32)BootTextRow; - } - - // - // Get user defined text mode for setup. - // - mSetupHorizontalResolution =3D PcdGet32 (PcdSetupVideoHorizontalResolu= tion); - mSetupVerticalResolution =3D PcdGet32 (PcdSetupVideoVerticalResoluti= on); - mSetupTextModeColumn =3D PcdGet32 (PcdSetupConOutColumn); - mSetupTextModeRow =3D PcdGet32 (PcdSetupConOutRow); - - mModeInitialized =3D TRUE; - } - - if (TimeoutDefault !=3D 0xffff) { - Status =3D ShowProgressHotKey (TimeoutDefault); - - // - // Ensure screen is clear when switch Console from Graphics mode to Te= xt mode - // - gST->ConOut->EnableCursor (gST->ConOut, TRUE); - gST->ConOut->ClearScreen (gST->ConOut); - - // - // Boot Logo is corrupted, report it using Boot Logo protocol. - // - LogoStatus =3D gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (= VOID **) &BootLogo); - if (!EFI_ERROR (LogoStatus) && (BootLogo !=3D NULL)) { - BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0); - } - - if (EFI_ERROR (Status)) { - // - // Timeout or user press enter to continue - // - goto Exit; - } - } - - // - // Install BM HiiPackages.=20 - // Keep BootMaint HiiPackage, so that it can be covered by global settin= g.=20 - // - InitBMPackage (); - do { - - BdsSetConsoleMode (TRUE); - - InitializeFrontPage (FALSE); - - // - // Update Front Page strings - // - UpdateFrontPageStrings (); - - Status =3D EFI_SUCCESS; - gCallbackKey =3D 0; - if (gHotKey =3D=3D 0) { - Status =3D CallFrontPage (); - } else { - gCallbackKey =3D gHotKey; - gHotKey =3D 0; - } - - // - // If gCallbackKey is greater than 1 and less or equal to 5, - // it will launch configuration utilities. - // 2 =3D set language - // 3 =3D boot manager - // 4 =3D device manager - // 5 =3D boot maintenance manager - // - if (gCallbackKey !=3D 0) { - REPORT_STATUS_CODE ( - EFI_PROGRESS_CODE, - (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP) - ); - } - - // - // Based on the key that was set, we can determine what to do - // - switch (gCallbackKey) { - // - // The first 4 entries in the Front Page are to be GUARANTEED to remai= n constant so IHV's can - // describe to their customers in documentation how to find their setu= p information (namely - // under the device manager and specific buckets) - // - // These entries consist of the Continue, Select language, Boot Manage= r, and Device Manager - // - case FRONT_PAGE_KEY_CONTINUE: - - // - // User hit continue - // - break; - - case FRONT_PAGE_KEY_LANGUAGE: - - // - // User made a language setting change - display front page again - // - break; - - case FRONT_PAGE_KEY_BOOT_MANAGER: - // - // Remove the installed BootMaint HiiPackages when exit. - // - FreeBMPackage (); - - // - // User chose to run the Boot Manager - // - CallBootManager (); - =20 - // - // Reinstall BootMaint HiiPackages after exiting from Boot Manager. - // - InitBMPackage (); - break; - - case FRONT_PAGE_KEY_DEVICE_MANAGER: - - // - // Display the Device Manager - // - do { - CallDeviceManager (); - } while (gCallbackKey =3D=3D FRONT_PAGE_KEY_DEVICE_MANAGER); - break; - - case FRONT_PAGE_KEY_BOOT_MAINTAIN: - - // - // Display the Boot Maintenance Manager - // - BdsStartBootMaint (); - break; - } - - } while (((UINTN)gCallbackKey) !=3D FRONT_PAGE_KEY_CONTINUE); - - // - //Will leave browser, check any reset required change is applied? if yes= , reset system - // - SetupResetReminder (); - // - // Remove the installed BootMaint HiiPackages when exit. - // - FreeBMPackage (); - -Exit: - // - // Automatically load current entry - // Note: The following lines of code only execute when Auto boot - // takes affect - // - PERF_END (NULL, "BdsTimeOut", "BDS", 0); -} - - -VOID=20 -BootIntoFirmwareInterface( -VOID -) -{ - EFI_STATUS Status; - UINTN DataSize; - UINT16 Timeout; =20 - UINT64 OsIndication; - - =20 - OsIndication =3D 0; - DataSize =3D sizeof(UINT64); - Status =3D gRT->GetVariable ( - L"OsIndications", - &gEfiGlobalVariableGuid, - NULL, - &DataSize, - &OsIndication - ); - =20 - DEBUG ((EFI_D_INFO, "OSIndication Variable Value %d\n", OsIndication)); - // - //Goto FrontPage directly when bit EFI_OS_INDICATIONS_BOOT_TO_FW_UI in O= SIndication Variable is setted. - // =20 - if (!EFI_ERROR(Status) && (OsIndication !=3D 0)) { =20 - Timeout =3D 0xffff; - PlatformBdsEnterFrontPage (Timeout, FALSE); - } -} - - -EFI_STATUS -PlatformBdsConnectSimpleConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole -) -{ - EFI_STATUS Status; - UINTN Index; - EFI_DEVICE_PATH_PROTOCOL *VarConout; - EFI_DEVICE_PATH_PROTOCOL *VarConin; - UINTN DevicePathSize; - - - Index =3D 0; - Status =3D EFI_SUCCESS; - DevicePathSize =3D 0; - VarConout =3D BdsLibGetVariableAndSize ( - L"ConOut", - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - VarConin =3D BdsLibGetVariableAndSize ( - L"ConIn", - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - if (VarConout =3D=3D NULL || VarConin =3D=3D NULL) { - // - // Have chance to connect the platform default console, - // the platform default console is the minimum device group - // the platform should support - // - while (PlatformConsole[Index].DevicePath !=3D NULL) { - - // - // Update the console variable with the connect type - // - if ((PlatformConsole[Index].ConnectType & CONSOLE_IN) =3D=3D CONSOLE= _IN) { - BdsLibUpdateConsoleVariable (L"ConIn", PlatformConsole[Index].Devi= cePath, NULL); - } - - if ((PlatformConsole[Index].ConnectType & CONSOLE_OUT) =3D=3D CONSOL= E_OUT) { - BdsLibUpdateConsoleVariable (L"ConOut", PlatformConsole[Index].Dev= icePath, NULL); - } - - if ((PlatformConsole[Index].ConnectType & STD_ERROR) =3D=3D STD_ERRO= R) { - BdsLibUpdateConsoleVariable (L"ErrOut", PlatformConsole[Index].Dev= icePath, NULL); - } - - Index ++; - } - } - - // - // Connect ConIn first to give keyboard time to parse hot key event. - // - Status =3D BdsLibConnectConsoleVariable (L"ConIn"); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Make sure we have at least one active VGA, and have the right - // active VGA in console variable - // - Status =3D PlatformBdsForceActiveVga (); - - // - // It seems impossible not to have any ConOut device on platform, - // so we check the status here. - // - Status =3D BdsLibConnectConsoleVariable (L"ConOut"); - if (EFI_ERROR (Status)) { - return Status; - } - - return EFI_SUCCESS; -} - - -/** - Timer handler to convert the key from USB. - - @param Event Indicates the event that invoke this fu= nction. - @param Context Indicates the calling context. -**/ -VOID -EFIAPI -HotKeyTimerHandler ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - EFI_STATUS Status; - EFI_INPUT_KEY Key; - - Status =3D gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - if (EFI_ERROR (Status)) { - return; - } - - switch(Key.ScanCode) { - case SCAN_F2: - gHotKey =3D 0; - mHotKeyPressed =3D TRUE; - break; - - case SCAN_F5: - gHotKey =3D FRONT_PAGE_KEY_DEVICE_MANAGER; - mHotKeyPressed =3D TRUE; - break; - - case SCAN_F7: - gHotKey =3D FRONT_PAGE_KEY_BOOT_MANAGER; - mHotKeyPressed =3D TRUE; - break; - - case SCAN_F9: - gHotKey =3D FRONT_PAGE_KEY_BOOT_MAINTAIN; - mHotKeyPressed =3D TRUE; - break; - } - - if (mHotKeyPressed) { - gBS->SetTimer ( - mHotKeyTimerEvent, - TimerCancel, - 0 - ); - gBS->CloseEvent (mHotKeyTimerEvent); - mHotKeyTimerEvent =3D NULL; - } - - return; -} - - -/** - Callback function for SimpleTextInEx protocol install events - - @param Event the event that is signaled. - @param Context not used here. - -**/ -VOID -EFIAPI -HitHotkeyEvent ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - EFI_STATUS Status; - - Status =3D gBS->CloseEvent(mHitHotkeyEvent); - if (EFI_ERROR (Status)) { - return; - } - Status =3D gBS->CreateEvent ( - EVT_TIMER | EVT_NOTIFY_SIGNAL, - TPL_NOTIFY, - HotKeyTimerHandler, - NULL, - &mHotKeyTimerEvent - ); - if (EFI_ERROR (Status)) { - return; - } - Status =3D gBS->SetTimer ( - mHotKeyTimerEvent, - TimerPeriodic, - KEYBOARD_TIMER_INTERVAL - ); - if (EFI_ERROR (Status)) { - return; - } - - return; -} - - -VOID -EFIAPI -PlatformBdsInitHotKeyEvent ( - VOID - ) -{ - EFI_STATUS Status; - - // - // Register Protocol notify for Hotkey service - // - Status =3D gBS->CreateEvent ( - EVT_NOTIFY_SIGNAL, - TPL_CALLBACK, - HitHotkeyEvent, - NULL, - &mHitHotkeyEvent - ); - ASSERT_EFI_ERROR (Status); - - // - // Register for protocol notifications on this event - // - Status =3D gBS->RegisterProtocolNotify ( - &gEfiSimpleTextInputExProtocolGuid, - mHitHotkeyEvent, - &mHitHotkeyRegistration - ); - ASSERT_EFI_ERROR (Status); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPla= tform.h b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatfo= rm.h deleted file mode 100644 index b5bb519747..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h +++ /dev/null @@ -1,516 +0,0 @@ -/*++ - - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - -Module Name: - - BdsPlatform.h - -Abstract: - - Head file for BDS Platform specific code - ---*/ - -#ifndef _BDS_PLATFORM_H -#define _BDS_PLATFORM_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 - -#include - -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformRootBridges []; -extern BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole []; -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformAllPossiblePciVgaConsole []; -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence []; -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformDriverOption []; -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformBootOption []; -extern EFI_DEVICE_PATH_PROTOCOL *gUserAuthenticationDevice[]; -extern BDS_CONSOLE_CONNECT_ENTRY gPlatformSimpleConsole []; -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformSimpleBootOption []; - -extern BOOLEAN mEnumBootDevice; - - -// -// the short form device path for Usb keyboard -// -#define CLASS_HID 3 -#define SUBCLASS_BOOT 1 -#define PROTOCOL_KEYBOARD 1 - -#define PCI_DEVICE_PATH_NODE(Func, Dev) \ - { \ - HARDWARE_DEVICE_PATH, \ - HW_PCI_DP, \ - { \ - (UINT8) (sizeof (PCI_DEVICE_PATH)), \ - (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \ - }, \ - (Func), \ - (Dev) \ - } - -#define PNPID_DEVICE_PATH_NODE(PnpId) \ - { \ - { \ - ACPI_DEVICE_PATH, \ - ACPI_DP, \ - { \ - (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \ - (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \ - } \ - }, \ - EISA_PNP_ID((PnpId)), \ - 0 \ - } - -#define gUart(BaudRate, DataBits, Parity, StopBits) \ - { \ - { \ - MESSAGING_DEVICE_PATH, \ - MSG_UART_DP, \ - { \ - (UINT8) (sizeof (UART_DEVICE_PATH)), \ - (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \ - } \ - }, \ - 0, \ - (BaudRate), \ - (DataBits), \ - (Parity), \ - (StopBits) \ - } - -#define gPcAnsiTerminal \ - { \ - { \ - MESSAGING_DEVICE_PATH, \ - MSG_VENDOR_DP, \ - { \ - (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \ - (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \ - } \ - }, \ - DEVICE_PATH_MESSAGING_PC_ANSI \ - } - -#define gUsbKeyboardMouse \ - { \ - { \ - MESSAGING_DEVICE_PATH, \ - MSG_USB_CLASS_DP, \ - (UINT8) (sizeof (USB_CLASS_DEVICE_PATH)), \ - (UINT8) ((sizeof (USB_CLASS_DEVICE_PATH)) >> 8) \ - }, \ - 0xffff, \ - 0xffff, \ - CLASS_HID, \ - SUBCLASS_BOOT, \ - PROTOCOL_KEYBOARD \ - } - -#define gEndEntire \ - { \ - END_DEVICE_PATH_TYPE, \ - END_ENTIRE_DEVICE_PATH_SUBTYPE, \ - { \ - END_DEVICE_PATH_LENGTH, \ - 0 \ - } \ - } - -#define gPciRootBridge \ - PNPID_DEVICE_PATH_NODE(0x0A03) - -#define gPnpPs2Keyboard \ - PNPID_DEVICE_PATH_NODE(0x0303) - -#define gPnp16550ComPort \ - PNPID_DEVICE_PATH_NODE(0x0501) - -#define gPciePort0Bridge \ - PCI_DEVICE_PATH_NODE(0, 0x1C) - -#define gPciePort1Bridge \ - PCI_DEVICE_PATH_NODE(1, 0x1C) - -#define gPciePort2Bridge \ - PCI_DEVICE_PATH_NODE(2, 0x1C) - -#define gPciePort3Bridge \ - PCI_DEVICE_PATH_NODE(3, 0x1C) - -#define gPciIsaBridge \ - PCI_DEVICE_PATH_NODE(0, 0x1f) - -// -// Platform Root Bridge -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_ROOT_BRIDGE_DEVICE_PATH; - -// -// Below is the platform console device path -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH IsaBridge; - ACPI_HID_DEVICE_PATH Keyboard; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_ISA_KEYBOARD_DEVICE_PATH; - -typedef struct { - VENDOR_DEVICE_PATH VendorDevicePath; - EFI_DEVICE_PATH_PROTOCOL End; -} HII_VENDOR_DEVICE_PATH; - -typedef struct { - USB_CLASS_DEVICE_PATH UsbClass; - EFI_DEVICE_PATH_PROTOCOL End; -} USB_CLASS_FORMAT_DEVICE_PATH; - -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH OnboardVga; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_ONBOARD_VGA_DEVICE_PATH; - -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH AgpBridge; - PCI_DEVICE_PATH AgpDevice; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_OFFBOARD_VGA_DEVICE_PATH; - -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH IsaBridge; - ACPI_HID_DEVICE_PATH IsaSerial; - UART_DEVICE_PATH Uart; - VENDOR_DEVICE_PATH TerminalType; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_ISA_SERIAL_DEVICE_PATH; - -// -// Below is the boot option device path -// -typedef struct { - BBS_BBS_DEVICE_PATH LegacyHD; - EFI_DEVICE_PATH_PROTOCOL End; -} LEGACY_HD_DEVICE_PATH; - -// -// Below is the platform IDE device path -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH IsaBridge; - ATAPI_DEVICE_PATH Ide; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_IDE_DEVICE_PATH; - -// -// Floppy device path definition -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH IsaBridge; - ACPI_HID_DEVICE_PATH Floppy; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_FLOPPY_DEVICE_PATH; - -// -// Below is the platform USB controller device path for -// USB disk as user authentication device. -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH PciDevice; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_USB_DEVICE_PATH; - -// -// Debug Agent UART Console device path definition -// -typedef struct { - VENDOR_DEVICE_PATH VendorHardware; - UART_DEVICE_PATH Uart; - VENDOR_DEVICE_PATH TerminalType; - EFI_DEVICE_PATH_PROTOCOL End; -} VENDOR_UART_DEVICE_PATH; - -// -// Below is the platform PCI device path -// -typedef struct { - ACPI_HID_DEVICE_PATH PciRootBridge; - PCI_DEVICE_PATH PciDevice; - EFI_DEVICE_PATH_PROTOCOL End; -} PLATFORM_PCI_DEVICE_PATH; - -typedef enum { - PMIC_Equal =3D 0, // =3D 0 - PMIC_Greater_Than, // > 1 - PMIC_Smaller_Than, // < 2 - PMIC_Greater_Equal, // >=3D 3 - PMIC_Smaller_Equal, // <=3D 4 - PMIC_Any // don't care 5 -} PMIC_Condition_list; - -typedef enum { - PMIC_White_List =3D 0, //White list - PMIC_Black_List =3D 1 //Black list -} PMIC_Compliance_mode; - -typedef struct { - UINT8 Cond_Choice; // PMIC_Condition_list - UINT8 Cond_Number; // the number -}PMIC_Condition_Item; - -typedef struct { - PMIC_Condition_Item PMIC_BoardID; - PMIC_Condition_Item PMIC_FabID; - PMIC_Condition_Item Soc_Stepping;//define PMIC type, 1:Dialog , 2= :Rohm - PMIC_Condition_Item PMIC_VendID; - PMIC_Condition_Item PMIC_RevID; - PMIC_Compliance_mode mode; //if 1, blacklist; if 0, w= hite list. -} PMIC_Compliance_Item; - -// -// Platform BDS Functions -// -VOID -PlatformBdsGetDriverOption ( - IN LIST_ENTRY *BdsDriverLists - ); - -VOID -PlatformBdsPredictBootOption ( - IN LIST_ENTRY *BdsBootOptionList - ); - -EFI_STATUS -PlatformBdsShowProgress ( - EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground, - EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground, - CHAR16 *Title, - EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor, - UINTN Progress, - UINTN PreviousValue - ); - -VOID -PlatformBdsConnectSequence ( - VOID - ); - -EFI_STATUS -PlatformBdsConnectConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole - ); - -EFI_STATUS -PlatformBdsNoConsoleAction ( - VOID - ); - -VOID -PlatformBdsEnterFrontPage ( - IN UINT16 TimeoutDefault, - IN BOOLEAN ConnectAllHappened - ); - -VOID -EFIAPI -PlatformBdsUserIdentify ( - OUT EFI_USER_PROFILE_HANDLE *User, - OUT BOOLEAN *DeferredImage - ); - -VOID -EFIAPI -PlatformBdsConnectAuthDevice ( - VOID - ); - -VOID -PlatformBdsEnterFrontPageWithHotKey ( - IN UINT16 TimeoutDefault, - IN BOOLEAN ConnectAllHappened - ); - - EFI_STATUS - ShowProgress ( - IN UINT16 TimeoutDefault - ); - - EFI_STATUS - InitializeFrontPage ( - IN BOOLEAN InitializeHiiData - ); - - VOID - UpdateFrontPageStrings ( - VOID - ); - =20 - =20 - EFI_STATUS - InitBMPackage ( - VOID - ); - =20 - =20 - VOID - FreeBMPackage ( - VOID - ); - =20 - =20 - EFI_STATUS - CallFrontPage ( - VOID - ); - - - VOID - CallBootManager ( - VOID - ); - -VOID -CallDeviceManager ( - VOID - ); - -VOID -BdsStartBootMaint ( - VOID - ); - -CHAR16 * -GetStringById ( - IN EFI_STRING_ID Id - ); - -EFI_STATUS -WaitForSingleEvent ( - IN EFI_EVENT Event, - IN UINT64 Timeout OPTIONAL - ); - -EFI_STATUS -BdsLibDeleteOptionFromHandle ( - IN EFI_HANDLE Handle - ); - -EFI_STATUS -BdsDeleteAllInvalidEfiBootOption ( - VOID - ); - - -#define ONE_SECOND 10000000 -#define FRONT_PAGE_KEY_CONTINUE 0x1000 -#define FRONT_PAGE_KEY_LANGUAGE 0x1234 -#define FRONT_PAGE_KEY_BOOT_MANAGER 0x1064 -#define FRONT_PAGE_KEY_DEVICE_MANAGER 0x8567 -#define FRONT_PAGE_KEY_BOOT_MAINTAIN 0x9876 - -#define PORT_A_DVO 0 // ; DVO A -#define PORT_B_DVO 1 // ; DVO B -#define PORT_C_DVO 2 // ; DVO C -#define PORT_D_DVO 3 // ; DVO D -#define PORT_LVDS 4 // ; Integrated LVDS po= rt -#define PORT_ANALOG_TV 5 // ; Integrated TV port -#define PORT_CRT 6 // ; integrated Analog = port -#define PORT_B_DP 7 // ; DisplayPort B -#define PORT_C_DP 8 // ; DisplayPort C -#define PORT_D_DP 9 // ; DisplayPort D -#define PORT_A_DP 10 // ; DisplayPort A (for= eDP on ILK) -#define PORT_B_HDMI 11 // ; HDMI B -#define PORT_C_HDMI 12 // ; HDMI C -#define PORT_D_HDMI 13 // ; HDMI D -#define PORT_B_DVI 14 // ; DVI B -#define PORT_C_DVI 15 // ; DVI C -#define PORT_D_DVI 16 // ; DVI D -#define PORT_MIPI_A 21 // ; MIPI -#define PORT_MIPI_B 22 -#define PORT_MIPI_C 23 - - -extern BOOLEAN gConnectAllHappened; -extern UINTN gCallbackKey; - -VOID -BdsBootDeviceSelect ( - VOID -); -VOID FastBoot(VOID); - -extern BOOLEAN mModeInitialized; - -// -// Boot video resolution and text mode. -// -extern UINT32 mBootHorizontalResolution ; -extern UINT32 mBootVerticalResolution ; -extern UINT32 mBootTextModeColumn ; -extern UINT32 mBootTextModeRow ; - -// -// BIOS setup video resolution and text mode. -// -extern UINT32 mSetupTextModeColumn ; -extern UINT32 mSetupTextModeRow ; -extern UINT32 mSetupHorizontalResolution ; -extern UINT32 mSetupVerticalResolution ; -extern EFI_STATUS BdsSetConsoleMode (BOOLEAN); -#endif // _BDS_PLATFORM_H diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/Platfo= rmBdsLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/Plat= formBdsLib.inf deleted file mode 100644 index 66d11c6cda..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLi= b.inf +++ /dev/null @@ -1,128 +0,0 @@ -#/** @file -# Component name for module PlatformBootManagerLib -# -# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.
-# - -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# - -# -# -# -#**/ - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D PlatformBdsLib - FILE_GUID =3D A6BC385D-59E5-4b77-87D7-200ABAA83C15 - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D PlatformBootManagerLib|DXE_DRIVER - EDK_RELEASE_VERSION =3D 0x00020000 - EFI_SPECIFICATION_VERSION =3D 0x0002000A - - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - BdsPlatform.c - BdsPlatform.h - PlatformData.c - PlatformBdsStrings.uni - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - Vlv2TbltDevicePkg/PlatformPkg.dec - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec - ShellPkg/ShellPkg.dec - CryptoPkg/CryptoPkg.dec - SecurityPkg/SecurityPkg.dec - SignedCapsulePkg/SignedCapsulePkg.dec - SourceLevelDebugPkg/SourceLevelDebugPkg.dec - NetworkPkg/NetworkPkg.dec - -[LibraryClasses] - DxeServicesTableLib - BaseLib - MemoryAllocationLib - UefiBootServicesTableLib - UefiRuntimeServicesTableLib - BaseMemoryLib - DebugLib - PcdLib - GenericBdsLib - DevicePathLib - NetLib - UefiLib - HobLib - PciLib - PrintLib - BaseCryptLib -# TcgPhysicalPresenceLib - Tcg2PhysicalPresenceLib =20 - FileHandleLib - S3BootScriptLib - SerialPortLib - CapsuleLib - -[Protocols] - gEfiFirmwareVolume2ProtocolGuid - gEfiSimpleNetworkProtocolGuid - gEfiLoadFileProtocolGuid - gEfiPciIoProtocolGuid - gEfiSmmAccess2ProtocolGuid - gEfiDxeSmmReadyToLockProtocolGuid - gEfiUserManagerProtocolGuid - gEfiDeferredImageLoadProtocolGuid - gEfiAcpiS3SaveProtocolGuid - gEfiSpiProtocolGuid ## PROTOCOL CONSUMES - gExitPmAuthProtocolGuid - gEfiTdtOperationProtocolGuid - gEfiGlobalNvsAreaProtocolGuid - gEfiMmioDeviceProtocolGuid - gEfiI2cMasterProtocolGuid - gEfiI2cHostProtocolGuid - gEsrtManagementProtocolGuid - -[Guids] - gEfiMemoryTypeInformationGuid - gEfiCapsuleVendorGuid - gEfiGlobalVariableGuid - gEfiNormalSetupGuid - gEfiPartTypeSystemPartGuid - gEfiEndOfDxeEventGroupGuid - gUefiShellFileGuid - -[Pcd] - gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKeyFil= eGuid - gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid - gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer - gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer - gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed - gPlatformModuleTokenSpaceGuid.PcdFlashFvRecovery2Base - gPlatformModuleTokenSpaceGuid.PcdFlashFvMainBase - gPlatformModuleTokenSpaceGuid.PcdFlashFvRecoveryBase - gPlatformModuleTokenSpaceGuid.PcdFlashFvShellBase - gPlatformModuleTokenSpaceGuid.PcdFlashFvShellSize - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile - gPlatformModuleTokenSpaceGuid.PcdIFWISigBaseAddress - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn - gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution - gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress - gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn - gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow - gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution - gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/Platfo= rmBdsStrings.uni b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/= PlatformBdsStrings.uni deleted file mode 100644 index 101106f9f4..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsSt= rings.uni +++ /dev/null @@ -1,30 +0,0 @@ -///** @file -// =20 -// String definitions for Boot Option description. -// =20 -// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
-// SPDX-License-Identifier: BSD-2-Clause-Patent -// =20 -//**/ - -/=3D# - -#langdef en-US "English" -#langdef fr-FR "Fran=C3=A7ais" - -#string STR_DESCRIPTION_FLOPPY #language en-US "EFI Floppy" - #language fr-FR "fr-FR: EFI Floppy" -#string STR_DESCRIPTION_CD_DVD #language en-US "EFI DVD/CDROM" - #language fr-FR "fr-FR: EFI DVD/CD= ROM" -#string STR_DESCRIPTION_HARDDRIVE #language en-US "EFI Hard Drive" - #language fr-FR "fr-FR: EFI Hard D= rive" -#string STR_DESCRIPTION_USB #language en-US "EFI USB Device" - #language fr-FR "fr-FR: EFI USB De= vice" -#string STR_DESCRIPTION_SCSI #language en-US "EFI SCSI Device" - #language fr-FR "fr-FR: EFI SCSI D= evice" -#string STR_DESCRIPTION_MISC #language en-US "EFI Misc Device" - #language fr-FR "fr-FR: EFI Misc D= evice" -#string STR_DESCRIPTION_NETWORK #language en-US "EFI Network" - #language fr-FR "fr-FR: EFI Networ= k" -#string STR_DESCRIPTION_NON_BLOCK #language en-US "EFI Non-Block Boo= t Device" - #language fr-FR "fr-FR: EFI Non-Bl= ock Boot Device" diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/Platfo= rmData.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/Platform= Data.c deleted file mode 100644 index 9dff93f52b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c +++ /dev/null @@ -1,306 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - -Module Name: - - PlatformData.c - -Abstract: - - Defined the platform specific device path which will be used by - platform Bbd to perform the platform policy connect. - ---*/ - -#include "BdsPlatform.h" - -// -// Predefined platform default time out value -// -UINT16 gPlatformBootTimeOutDefault =3D 10; - -// -// Predefined platform root bridge -// -PLATFORM_ROOT_BRIDGE_DEVICE_PATH gPlatformRootBridge0 =3D { - gPciRootBridge, - gEndEntire -}; - -EFI_DEVICE_PATH_PROTOCOL* gPlatformRootBridges [] =3D { - (EFI_DEVICE_PATH_PROTOCOL*)&gPlatformRootBridge0, - NULL -}; - -// -// Platform specific ISA keyboard device path -// -PLATFORM_ISA_KEYBOARD_DEVICE_PATH gIsaKeyboardDevicePath =3D { - gPciRootBridge, - gPciIsaBridge, - gPnpPs2Keyboard, - gEndEntire -}; - -// -// Platform specific on chip PCI VGA device path -// -PLATFORM_ONBOARD_VGA_DEVICE_PATH gOnChipPciVgaDevicePath =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(0, 0x2), - gEndEntire -}; - -// -// Platform specific plug in PCI VGA device path -// -PLATFORM_OFFBOARD_VGA_DEVICE_PATH gPlugInPciVgaDevicePath =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(0, 0x1), - PCI_DEVICE_PATH_NODE(0, 0x0), - gEndEntire -}; - -// -// Platform specific ISA serial device path -// -PLATFORM_ISA_SERIAL_DEVICE_PATH gIsaSerialDevicePath =3D { - gPciRootBridge, - gPciIsaBridge, - gPnp16550ComPort, - gUart(115200, 8, 1, 1), - gPcAnsiTerminal, - gEndEntire -}; - - -// -// Platform specific Button Array device path -// -HII_VENDOR_DEVICE_PATH gHiiVendorDevicePath0 =3D { - { - { - HARDWARE_DEVICE_PATH, - HW_VENDOR_DP, - { - (UINT8) (sizeof (VENDOR_DEVICE_PATH)), - (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) - } - }, - - // - // {C8752FDE-B5C8-4528-897D-6920FE771E38} - // - { 0xC8752FDE, 0xB5C8, 0x4528, { 0x89, 0x7D, 0x69, 0x20, 0xFE, 0x77, 0x= 1E, 0x38 } } - }, - { - END_DEVICE_PATH_TYPE, - END_ENTIRE_DEVICE_PATH_SUBTYPE, - { - (UINT8) (END_DEVICE_PATH_LENGTH), - (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) - } - } -}; - -USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath =3D { - gUsbKeyboardMouse, - gEndEntire -}; - -// -// Debug Agent UART Console device path=20 -// -VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath =3D { - { - { - HARDWARE_DEVICE_PATH, - HW_VENDOR_DP, - { - (UINT8) (sizeof (VENDOR_DEVICE_PATH)), - (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) - } - }, - EFI_DEBUG_AGENT_GUID, - }, - { - { - MESSAGING_DEVICE_PATH, - MSG_UART_DP, - { - (UINT8) (sizeof (UART_DEVICE_PATH)), - (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) - } - }, - 0, // Reserved - 0, // BaudRate - Default - 0, // DataBits - Default - 0, // Parity - Default - 0, // StopBits - Default - }, - { - { - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - { - (UINT8)(sizeof (VENDOR_DEVICE_PATH)), - (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8) - } - }, - DEVICE_PATH_MESSAGING_PC_ANSI - }, - gEndEntire -}; - -// -// Predefined platform default console device path -// -BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole [] =3D { - {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaKeyboardDevicePath, CONSOLE_IN}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gDebugAgentUartDevicePath, CONSOLE_ALL}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN}, - {NULL, 0} -}; - -// -// All the possible platform PCI VGA device path -// -EFI_DEVICE_PATH_PROTOCOL* gPlatformAllPossiblePciVgaConsole [] =3D { - (EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath, - (EFI_DEVICE_PATH_PROTOCOL*)&gPlugInPciVgaDevicePath, - NULL -}; - -// -// Legacy hard disk boot option -// -LEGACY_HD_DEVICE_PATH gLegacyHd =3D { - { - BBS_DEVICE_PATH, - BBS_BBS_DP, - (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)), - (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8), - BBS_TYPE_HARDDRIVE, - 0, - 0 - }, - gEndEntire -}; - -// -// Legacy cdrom boot option -// -LEGACY_HD_DEVICE_PATH gLegacyCdrom =3D { - { - BBS_DEVICE_PATH, - BBS_BBS_DP, - (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)), - (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8), - BBS_TYPE_CDROM, - 0, - 0 - }, - gEndEntire -}; - -// -// Predefined platform specific perdict boot option -// -EFI_DEVICE_PATH_PROTOCOL* gPlatformBootOption [] =3D { - (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyHd, - (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyCdrom, - NULL -}; - -// -// Predefined platform specific driver option -// -EFI_DEVICE_PATH_PROTOCOL* gPlatformDriverOption [] =3D { - NULL -}; - -// -// Predefined platform connect sequence -// -EFI_DEVICE_PATH_PROTOCOL* gPlatformConnectSequence [] =3D { - (EFI_DEVICE_PATH_PROTOCOL *)&gPlatformRootBridge0, // Force PCI enumer = before Legacy OpROM shadow - NULL -}; - -// -// Platform specific USB controller device path -// -PLATFORM_USB_DEVICE_PATH gUsbDevicePath0 =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(0, 0x1D), - gEndEntire -}; - -PLATFORM_USB_DEVICE_PATH gUsbDevicePath1 =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(1, 0x1D), - gEndEntire -}; - -PLATFORM_USB_DEVICE_PATH gUsbDevicePath2 =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(2, 0x1D), - gEndEntire -}; - -PLATFORM_USB_DEVICE_PATH gUsbDevicePath3 =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE(3, 0x1D), - gEndEntire -}; - -// -// Predefined platform device path for user authtication -// -EFI_DEVICE_PATH_PROTOCOL* gUserAuthenticationDevice[] =3D { - // - // Predefined device path for secure card (USB disk). - // - (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath0, - (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath1, - (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath2, - (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath3, - NULL -}; - -// -// Predefined platform console device path -// -BDS_CONSOLE_CONNECT_ENTRY gPlatformSimpleConsole [] =3D { - {(EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath, CONSOLE_OUT}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gDebugAgentUartDevicePath, CONSOLE_ALL}, - {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN}, - {NULL, 0} -}; - -// -// eMMC device at BDF(0x0, 0x17, 0x0) -// -PLATFORM_PCI_DEVICE_PATH gEmmcBootDevPath0 =3D { - gPciRootBridge, - PCI_DEVICE_PATH_NODE (0x00, 0x10), - gEndEntire -}; - -// -// Predefined platform specific perdict boot option -// -EFI_DEVICE_PATH_PROTOCOL* gPlatformSimpleBootOption [] =3D { - (EFI_DEVICE_PATH_PROTOCOL*)&gEmmcBootDevPath0, - NULL -}; - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/BdsBoot.c b/Platform/Intel/Vlv2TbltDevicePkg/Over= ride/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c deleted file mode 100644 index 3034853695..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/BdsBoot.c +++ /dev/null @@ -1,4490 +0,0 @@ -/** @file - BDS Lib functions which relate with create or process the boot option. - -Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalBdsLib.h" -#include "String.h" -#include -#include "Library/DebugLib.h" - -BOOLEAN mEnumBootDevice =3D FALSE; -EFI_HII_HANDLE gBdsLibStringPackHandle =3D NULL; - -/** - - End Perf entry of BDS - - @param Event The triggered event. - @param Context Context for this event. - -**/ -VOID -EFIAPI -BmEndOfBdsPerfCode ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - // - // Record the performance data for End of BDS - // - PERF_END(NULL, "BDS", NULL, 0); - - return ; -} - -/** - The constructor function register UNI strings into imageHandle. - =20 - It will ASSERT() if that operation fails and it will always return EFI_S= UCCESS.=20 - - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - =20 - @retval EFI_SUCCESS The constructor successfully added string package. - @retval Other value The constructor can't add string package. - -**/ -EFI_STATUS -EFIAPI -GenericBdsLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - - gBdsLibStringPackHandle =3D HiiAddPackages ( - &gBdsLibStringPackageGuid, - ImageHandle, - GenericBdsLibStrings, - NULL - ); - - ASSERT (gBdsLibStringPackHandle !=3D NULL); - - return EFI_SUCCESS; -} - -/** - Deletete the Boot Option from EFI Variable. The Boot Order Arrray - is also updated. - - @param OptionNumber The number of Boot option want to be deleted. - @param BootOrder The Boot Order array. - @param BootOrderSize The size of the Boot Order Array. - - @retval EFI_SUCCESS The Boot Option Variable was found and re= moved - @retval EFI_UNSUPPORTED The Boot Option Variable store was inacce= ssible - @retval EFI_NOT_FOUND The Boot Option Variable was not found -**/ -EFI_STATUS -EFIAPI -BdsDeleteBootOption ( - IN UINTN OptionNumber, - IN OUT UINT16 *BootOrder, - IN OUT UINTN *BootOrderSize - ) -{ - CHAR16 BootOption[9]; - UINTN Index; - EFI_STATUS Status; - - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", OptionNumbe= r); - Status =3D gRT->SetVariable ( - BootOption, - &gEfiGlobalVariableGuid, - 0, - 0, - NULL - ); - // - // Deleting variable with existing variable implementation shouldn't fai= l. - // - ASSERT_EFI_ERROR (Status); - - // - // adjust boot order array - // - for (Index =3D 0; Index < *BootOrderSize / sizeof (UINT16); Index++) { - if (BootOrder[Index] =3D=3D OptionNumber) { - CopyMem (&BootOrder[Index], &BootOrder[Index+1], *BootOrderSize - (I= ndex+1) * sizeof (UINT16)); - *BootOrderSize -=3D sizeof (UINT16); - break; - } - } - - return Status; -} -/** - - Translate the first n characters of an Ascii string to - Unicode characters. The count n is indicated by parameter - Size. If Size is greater than the length of string, then - the entire string is translated. - - - @param AStr Pointer to input Ascii string. - @param Size The number of characters to translate. - @param UStr Pointer to output Unicode string buffer. - -**/ -VOID -AsciiToUnicodeSize ( - IN UINT8 *AStr, - IN UINTN Size, - OUT UINT16 *UStr - ) -{ - UINTN Idx; - - Idx =3D 0; - while (AStr[Idx] !=3D 0) { - UStr[Idx] =3D (CHAR16) AStr[Idx]; - if (Idx =3D=3D Size) { - break; - } - - Idx++; - } - UStr[Idx] =3D 0; -} - -/** - Build Legacy Device Name String according. - - @param CurBBSEntry BBS Table. - @param Index Index. - @param BufSize The buffer size. - @param BootString The output string. - -**/ -VOID -BdsBuildLegacyDevNameString ( - IN BBS_TABLE *CurBBSEntry, - IN UINTN Index, - IN UINTN BufSize, - OUT CHAR16 *BootString - ) -{ - CHAR16 *Fmt; - CHAR16 *Type; - UINT8 *StringDesc; - CHAR16 Temp[80]; - - switch (Index) { - // - // Primary Master - // - case 1: - Fmt =3D L"Primary Master %s"; - break; - - // - // Primary Slave - // - case 2: - Fmt =3D L"Primary Slave %s"; - break; - - // - // Secondary Master - // - case 3: - Fmt =3D L"Secondary Master %s"; - break; - - // - // Secondary Slave - // - case 4: - Fmt =3D L"Secondary Slave %s"; - break; - - default: - Fmt =3D L"%s"; - break; - } - - switch (CurBBSEntry->DeviceType) { - case BBS_FLOPPY: - Type =3D L"Floppy"; - break; - - case BBS_HARDDISK: - Type =3D L"Harddisk"; - break; - - case BBS_CDROM: - Type =3D L"CDROM"; - break; - - case BBS_PCMCIA: - Type =3D L"PCMCIAe"; - break; - - case BBS_USB: - Type =3D L"USB"; - break; - - case BBS_EMBED_NETWORK: - Type =3D L"Network"; - break; - - case BBS_BEV_DEVICE: - Type =3D L"BEVe"; - break; - - case BBS_UNKNOWN: - default: - Type =3D L"Unknown"; - break; - } - // - // If current BBS entry has its description then use it. - // - StringDesc =3D (UINT8 *) (UINTN) ((CurBBSEntry->DescStringSegment << 4) = + CurBBSEntry->DescStringOffset); - if (NULL !=3D StringDesc) { - // - // Only get fisrt 32 characters, this is suggested by BBS spec - // - AsciiToUnicodeSize (StringDesc, 32, Temp); - Fmt =3D L"%s"; - Type =3D Temp; - } - - // - // BbsTable 16 entries are for onboard IDE. - // Set description string for SATA harddisks, Harddisk 0 ~ Harddisk 11 - // - if (Index >=3D 5 && Index <=3D 16 && (CurBBSEntry->DeviceType =3D=3D BBS= _HARDDISK || CurBBSEntry->DeviceType =3D=3D BBS_CDROM)) { - Fmt =3D L"%s %d"; - UnicodeSPrint (BootString, BufSize, Fmt, Type, Index - 5); - } else { - UnicodeSPrint (BootString, BufSize, Fmt, Type); - } -} - -/** - - Create a legacy boot option for the specified entry of - BBS table, save it as variable, and append it to the boot - order list. - - - @param CurrentBbsEntry Pointer to current BBS table. - @param CurrentBbsDevPath Pointer to the Device Path Protocol instance o= f BBS - @param Index Index of the specified entry in BBS table. - @param BootOrderList On input, the original boot order list. - On output, the new boot order list attached wi= th the - created node. - @param BootOrderListSize On input, the original size of boot order list. - On output, the size of new boot order list. - - @retval EFI_SUCCESS Boot Option successfully created. - @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory. - @retval Other Error occurs while setting variable. - -**/ -EFI_STATUS -BdsCreateLegacyBootOption ( - IN BBS_TABLE *CurrentBbsEntry, - IN EFI_DEVICE_PATH_PROTOCOL *CurrentBbsDevPath, - IN UINTN Index, - IN OUT UINT16 **BootOrderList, - IN OUT UINTN *BootOrderListSize - ) -{ - EFI_STATUS Status; - UINT16 CurrentBootOptionNo; - UINT16 BootString[10]; - CHAR16 BootDesc[100]; - CHAR8 HelpString[100]; - UINT16 *NewBootOrderList; - UINTN BufferSize; - UINTN StringLen; - VOID *Buffer; - UINT8 *Ptr; - UINT16 CurrentBbsDevPathSize; - UINTN BootOrderIndex; - UINTN BootOrderLastIndex; - UINTN ArrayIndex; - BOOLEAN IndexNotFound; - BBS_BBS_DEVICE_PATH *NewBbsDevPathNode; - - if ((*BootOrderList) =3D=3D NULL) { - CurrentBootOptionNo =3D 0; - } else { - for (ArrayIndex =3D 0; ArrayIndex < (UINTN) (*BootOrderListSize / size= of (UINT16)); ArrayIndex++) { - IndexNotFound =3D TRUE; - for (BootOrderIndex =3D 0; BootOrderIndex < (UINTN) (*BootOrderListS= ize / sizeof (UINT16)); BootOrderIndex++) { - if ((*BootOrderList)[BootOrderIndex] =3D=3D ArrayIndex) { - IndexNotFound =3D FALSE; - break; - } - } - - if (!IndexNotFound) { - continue; - } else { - break; - } - } - - CurrentBootOptionNo =3D (UINT16) ArrayIndex; - } - - UnicodeSPrint ( - BootString, - sizeof (BootString), - L"Boot%04x", - CurrentBootOptionNo - ); - - BdsBuildLegacyDevNameString (CurrentBbsEntry, Index, sizeof (BootDesc), = BootDesc); - - // - // Create new BBS device path node with description string - // - UnicodeStrToAsciiStr (BootDesc, HelpString); - - StringLen =3D AsciiStrLen (HelpString); - NewBbsDevPathNode =3D AllocateZeroPool (sizeof (BBS_BBS_DEVICE_PATH) + S= tringLen); - if (NewBbsDevPathNode =3D=3D NULL) { - return EFI_OUT_OF_RESOURCES; - } - CopyMem (NewBbsDevPathNode, CurrentBbsDevPath, sizeof (BBS_BBS_DEVICE_PA= TH)); - CopyMem (NewBbsDevPathNode->String, HelpString, StringLen + 1); - SetDevicePathNodeLength (&(NewBbsDevPathNode->Header), sizeof (BBS_BBS_D= EVICE_PATH) + StringLen); - - // - // Create entire new CurrentBbsDevPath with end node - // - CurrentBbsDevPath =3D AppendDevicePathNode ( - NULL, - (EFI_DEVICE_PATH_PROTOCOL *) NewBbsDevPathNode - ); - if (CurrentBbsDevPath =3D=3D NULL) { - FreePool (NewBbsDevPathNode); - return EFI_OUT_OF_RESOURCES; - } - - CurrentBbsDevPathSize =3D (UINT16) (GetDevicePathSize (CurrentBbsDevPath= )); - - BufferSize =3D sizeof (UINT32) + - sizeof (UINT16) + - StrSize (BootDesc) + - CurrentBbsDevPathSize + - sizeof (BBS_TABLE) + - sizeof (UINT16); - - Buffer =3D AllocateZeroPool (BufferSize); - if (Buffer =3D=3D NULL) { - FreePool (NewBbsDevPathNode); - FreePool (CurrentBbsDevPath); - return EFI_OUT_OF_RESOURCES; - } - - Ptr =3D (UINT8 *) Buffer; - - *((UINT32 *) Ptr) =3D LOAD_OPTION_ACTIVE; - Ptr +=3D sizeof (UINT32); - - *((UINT16 *) Ptr) =3D CurrentBbsDevPathSize; - Ptr +=3D sizeof (UINT16); - - CopyMem ( - Ptr, - BootDesc, - StrSize (BootDesc) - ); - Ptr +=3D StrSize (BootDesc); - - CopyMem ( - Ptr, - CurrentBbsDevPath, - CurrentBbsDevPathSize - ); - Ptr +=3D CurrentBbsDevPathSize; - - CopyMem ( - Ptr, - CurrentBbsEntry, - sizeof (BBS_TABLE) - ); - - Ptr +=3D sizeof (BBS_TABLE); - *((UINT16 *) Ptr) =3D (UINT16) Index; - - Status =3D gRT->SetVariable ( - BootString, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - BufferSize, - Buffer - ); - - FreePool (Buffer); - =20 - Buffer =3D NULL; - - NewBootOrderList =3D AllocateZeroPool (*BootOrderListSize + sizeof (UINT= 16)); - if (NULL =3D=3D NewBootOrderList) { - FreePool (NewBbsDevPathNode); - FreePool (CurrentBbsDevPath); - return EFI_OUT_OF_RESOURCES; - } - - if (*BootOrderList !=3D NULL) { - CopyMem (NewBootOrderList, *BootOrderList, *BootOrderListSize); - FreePool (*BootOrderList); - } - - BootOrderLastIndex =3D (UINTN) (*BootOrderListSize / = sizeof (UINT16)); - NewBootOrderList[BootOrderLastIndex] =3D CurrentBootOptionNo; - *BootOrderListSize +=3D sizeof (UINT16); - *BootOrderList =3D NewBootOrderList; - - FreePool (NewBbsDevPathNode); - FreePool (CurrentBbsDevPath); - return Status; -} - -/** - Check if the boot option is a legacy one. - - @param BootOptionVar The boot option data payload. - @param BbsEntry The BBS Table. - @param BbsIndex The table index. - - @retval TRUE It is a legacy boot option. - @retval FALSE It is not a legacy boot option. - -**/ -BOOLEAN -BdsIsLegacyBootOption ( - IN UINT8 *BootOptionVar, - OUT BBS_TABLE **BbsEntry, - OUT UINT16 *BbsIndex - ) -{ - UINT8 *Ptr; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - BOOLEAN Ret; - UINT16 DevPathLen; - - Ptr =3D BootOptionVar; - Ptr +=3D sizeof (UINT32); - DevPathLen =3D *(UINT16 *) Ptr; - Ptr +=3D sizeof (UINT16); - Ptr +=3D StrSize ((UINT16 *) Ptr); - DevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) Ptr; - if ((BBS_DEVICE_PATH =3D=3D DevicePath->Type) && (BBS_BBS_DP =3D=3D Devi= cePath->SubType)) { - Ptr +=3D DevPathLen; - *BbsEntry =3D (BBS_TABLE *) Ptr; - Ptr +=3D sizeof (BBS_TABLE); - *BbsIndex =3D *(UINT16 *) Ptr; - Ret =3D TRUE; - } else { - *BbsEntry =3D NULL; - Ret =3D FALSE; - } - - return Ret; -} - -/** - Delete all the invalid legacy boot options. - - @retval EFI_SUCCESS All invalide legacy boot options are del= eted. - @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory. - @retval EFI_NOT_FOUND Fail to retrive variable of boot order. -**/ -EFI_STATUS -EFIAPI -BdsDeleteAllInvalidLegacyBootOptions ( - VOID - ) -{ - UINT16 *BootOrder; - UINT8 *BootOptionVar; - UINTN BootOrderSize; - UINTN BootOptionSize; - EFI_STATUS Status; - UINT16 HddCount; - UINT16 BbsCount; - HDD_INFO *LocalHddInfo; - BBS_TABLE *LocalBbsTable; - BBS_TABLE *BbsEntry; - UINT16 BbsIndex; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios; - UINTN Index; - UINT16 BootOption[10]; - UINT16 BootDesc[100]; - BOOLEAN DescStringMatch; - - Status =3D EFI_SUCCESS; - BootOrder =3D NULL; - BootOrderSize =3D 0; - HddCount =3D 0; - BbsCount =3D 0; - LocalHddInfo =3D NULL; - LocalBbsTable =3D NULL; - BbsEntry =3D NULL; - - Status =3D gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL= , (VOID **) &LegacyBios); - if (EFI_ERROR (Status)) { - return Status; - } - - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - if (BootOrder =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - LegacyBios->GetBbsInfo ( - LegacyBios, - &HddCount, - &LocalHddInfo, - &BbsCount, - &LocalBbsTable - ); - - Index =3D 0; - while (Index < BootOrderSize / sizeof (UINT16)) { - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder= [Index]); - BootOptionVar =3D BdsLibGetVariableAndSize ( - BootOption, - &gEfiGlobalVariableGuid, - &BootOptionSize - ); - if (NULL =3D=3D BootOptionVar) { - BootOptionSize =3D 0; - Status =3D gRT->GetVariable ( - BootOption, - &gEfiGlobalVariableGuid, - NULL, - &BootOptionSize, - BootOptionVar - ); - if (Status =3D=3D EFI_NOT_FOUND) { - // - // Update BootOrder - // - BdsDeleteBootOption ( - BootOrder[Index], - BootOrder, - &BootOrderSize - ); - continue; - } else { - FreePool (BootOrder); - return EFI_OUT_OF_RESOURCES; - } - } - =20 - // - // Skip Non-Legacy boot option - //=20 - if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) { - if (BootOptionVar!=3D NULL) { - FreePool (BootOptionVar); - } - Index++; - continue; - } - - if (BbsIndex < BbsCount) { - // - // Check if BBS Description String is changed - // - DescStringMatch =3D FALSE; - BdsBuildLegacyDevNameString ( - &LocalBbsTable[BbsIndex], - BbsIndex, - sizeof (BootDesc), - BootDesc - ); - - if (StrCmp (BootDesc, (UINT16*)(BootOptionVar + sizeof (UINT32) + si= zeof (UINT16))) =3D=3D 0) { - DescStringMatch =3D TRUE; - } - - if (!((LocalBbsTable[BbsIndex].BootPriority =3D=3D BBS_IGNORE_ENTRY)= || - (LocalBbsTable[BbsIndex].BootPriority =3D=3D BBS_DO_NOT_BOOT_F= ROM)) && - (LocalBbsTable[BbsIndex].DeviceType =3D=3D BbsEntry->DeviceType)= && - DescStringMatch) { - Index++; - continue; - } - } - - if (BootOptionVar !=3D NULL) { - FreePool (BootOptionVar); - } - // - // should delete - // - BdsDeleteBootOption ( - BootOrder[Index], - BootOrder, - &BootOrderSize - ); - } - - // - // Adjust the number of boot options. - // - Status =3D gRT->SetVariable ( - L"BootOrder", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - BootOrderSize, - BootOrder - ); - // - // Shrinking variable with existing variable implementation shouldn't fa= il. - // - ASSERT_EFI_ERROR (Status); - FreePool (BootOrder); - - return Status; -} - -/** - Find all legacy boot option by device type. - - @param BootOrder The boot order array. - @param BootOptionNum The number of boot option. - @param DevType Device type. - @param DevName Device name. - @param Attribute The boot option attribute. - @param BbsIndex The BBS table index. - @param OptionNumber The boot option index. - - @retval TRUE The Legacy boot option is found. - @retval FALSE The legacy boot option is not found. - -**/ -BOOLEAN -BdsFindLegacyBootOptionByDevTypeAndName ( - IN UINT16 *BootOrder, - IN UINTN BootOptionNum, - IN UINT16 DevType, - IN CHAR16 *DevName, - OUT UINT32 *Attribute, - OUT UINT16 *BbsIndex, - OUT UINT16 *OptionNumber - ) -{ - UINTN Index; - CHAR16 BootOption[9]; - UINTN BootOptionSize; - UINT8 *BootOptionVar; - BBS_TABLE *BbsEntry; - BOOLEAN Found; - - BbsEntry =3D NULL; - Found =3D FALSE; - - if (NULL =3D=3D BootOrder) { - return Found; - } - - // - // Loop all boot option from variable - // - for (Index =3D 0; Index < BootOptionNum; Index++) { - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", (UINTN) B= ootOrder[Index]); - BootOptionVar =3D BdsLibGetVariableAndSize ( - BootOption, - &gEfiGlobalVariableGuid, - &BootOptionSize - ); - if (NULL =3D=3D BootOptionVar) { - continue; - } - - // - // Skip Non-legacy boot option - // - if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, BbsIndex)) { - FreePool (BootOptionVar); - continue; - } - - if ( - (BbsEntry->DeviceType !=3D DevType) || - (StrCmp (DevName, (CHAR16*)(BootOptionVar + sizeof (UINT32) + size= of (UINT16))) !=3D 0) - ) { - FreePool (BootOptionVar); - continue; - } - - *Attribute =3D *(UINT32 *) BootOptionVar; - *OptionNumber =3D BootOrder[Index]; - Found =3D TRUE; - FreePool (BootOptionVar); - break; - } - - return Found; -} - -/** - Create a legacy boot option. - - @param BbsItem The BBS Table entry. - @param Index Index of the specified entry in BBS table. - @param BootOrderList The boot order list. - @param BootOrderListSize The size of boot order list. - - @retval EFI_OUT_OF_RESOURCE No enough memory. - @retval EFI_SUCCESS The function complete successfully. - @return Other value if the legacy boot option is not created. - -**/ -EFI_STATUS -BdsCreateOneLegacyBootOption ( - IN BBS_TABLE *BbsItem, - IN UINTN Index, - IN OUT UINT16 **BootOrderList, - IN OUT UINTN *BootOrderListSize - ) -{ - BBS_BBS_DEVICE_PATH BbsDevPathNode; - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *DevPath; - - DevPath =3D NULL; - - // - // Create device path node. - // - BbsDevPathNode.Header.Type =3D BBS_DEVICE_PATH; - BbsDevPathNode.Header.SubType =3D BBS_BBS_DP; - SetDevicePathNodeLength (&BbsDevPathNode.Header, sizeof (BBS_BBS_DEVICE_= PATH)); - BbsDevPathNode.DeviceType =3D BbsItem->DeviceType; - CopyMem (&BbsDevPathNode.StatusFlag, &BbsItem->StatusFlags, sizeof (UINT= 16)); - - DevPath =3D AppendDevicePathNode ( - NULL, - (EFI_DEVICE_PATH_PROTOCOL *) &BbsDevPathNode - ); - if (NULL =3D=3D DevPath) { - return EFI_OUT_OF_RESOURCES; - } - - Status =3D BdsCreateLegacyBootOption ( - BbsItem, - DevPath, - Index, - BootOrderList, - BootOrderListSize - ); - BbsItem->BootPriority =3D 0x00; - - FreePool (DevPath); - - return Status; -} - -/** - Add the legacy boot options from BBS table if they do not exist. - - @retval EFI_SUCCESS The boot options are added successfully=20 - or they are already in boot options. - @retval EFI_NOT_FOUND No legacy boot options is found. - @retval EFI_OUT_OF_RESOURCE No enough memory. - @return Other value LegacyBoot options are not added. -**/ -EFI_STATUS -EFIAPI -BdsAddNonExistingLegacyBootOptions ( - VOID - ) -{ - UINT16 *BootOrder; - UINTN BootOrderSize; - EFI_STATUS Status; - CHAR16 Desc[100]; - UINT16 HddCount; - UINT16 BbsCount; - HDD_INFO *LocalHddInfo; - BBS_TABLE *LocalBbsTable; - UINT16 BbsIndex; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios; - UINT16 Index; - UINT32 Attribute; - UINT16 OptionNumber; - BOOLEAN Exist; - - HddCount =3D 0; - BbsCount =3D 0; - LocalHddInfo =3D NULL; - LocalBbsTable =3D NULL; - - Status =3D gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL= , (VOID **) &LegacyBios); - if (EFI_ERROR (Status)) { - return Status; - } - - LegacyBios->GetBbsInfo ( - LegacyBios, - &HddCount, - &LocalHddInfo, - &BbsCount, - &LocalBbsTable - ); - - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - if (BootOrder =3D=3D NULL) { - BootOrderSize =3D 0; - } - - for (Index =3D 0; Index < BbsCount; Index++) { - if ((LocalBbsTable[Index].BootPriority =3D=3D BBS_IGNORE_ENTRY) || - (LocalBbsTable[Index].BootPriority =3D=3D BBS_DO_NOT_BOOT_FROM) - ) { - continue; - } - - BdsBuildLegacyDevNameString (&LocalBbsTable[Index], Index, sizeof (Des= c), Desc); - - Exist =3D BdsFindLegacyBootOptionByDevTypeAndName ( - BootOrder, - BootOrderSize / sizeof (UINT16), - LocalBbsTable[Index].DeviceType, - Desc, - &Attribute, - &BbsIndex, - &OptionNumber - ); - if (!Exist) { - // - // Not found such type of legacy device in boot options or we found = but it's disabled - // so we have to create one and put it to the tail of boot order list - // - Status =3D BdsCreateOneLegacyBootOption ( - &LocalBbsTable[Index], - Index, - &BootOrder, - &BootOrderSize - ); - if (!EFI_ERROR (Status)) { - ASSERT (BootOrder !=3D NULL); - BbsIndex =3D Index; - OptionNumber =3D BootOrder[BootOrderSize / sizeof (UINT16) - 1]; - } - } - - ASSERT (BbsIndex =3D=3D Index); - } - - Status =3D gRT->SetVariable ( - L"BootOrder", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - BootOrderSize, - BootOrder - ); - if (BootOrder !=3D NULL) { - FreePool (BootOrder); - } - - return Status; -} - -/** - Fill the device order buffer. - - @param BbsTable The BBS table. - @param BbsType The BBS Type. - @param BbsCount The BBS Count. - @param Buf device order buffer. - - @return The device order buffer. - -**/ -UINT16 * -BdsFillDevOrderBuf ( - IN BBS_TABLE *BbsTable, - IN BBS_TYPE BbsType, - IN UINTN BbsCount, - OUT UINT16 *Buf - ) -{ - UINTN Index; - - for (Index =3D 0; Index < BbsCount; Index++) { - if (BbsTable[Index].BootPriority =3D=3D BBS_IGNORE_ENTRY) { - continue; - } - - if (BbsTable[Index].DeviceType !=3D BbsType) { - continue; - } - - *Buf =3D (UINT16) (Index & 0xFF); - Buf++; - } - - return Buf; -} - -/** - Create the device order buffer. - - @param BbsTable The BBS table. - @param BbsCount The BBS Count. - - @retval EFI_SUCCES The buffer is created and the EFI variabl= e named=20 - VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrd= erVariableGuid is - set correctly. - @retval EFI_OUT_OF_RESOURCES Memmory or storage is not enough. - @retval EFI_DEVICE_ERROR Fail to add the device order into EFI var= iable fail - because of hardware error. -**/ -EFI_STATUS -BdsCreateDevOrder ( - IN BBS_TABLE *BbsTable, - IN UINT16 BbsCount - ) -{ - UINTN Index; - UINTN FDCount; - UINTN HDCount; - UINTN CDCount; - UINTN NETCount; - UINTN BEVCount; - UINTN TotalSize; - UINTN HeaderSize; - LEGACY_DEV_ORDER_ENTRY *DevOrder; - LEGACY_DEV_ORDER_ENTRY *DevOrderPtr; - EFI_STATUS Status; - - FDCount =3D 0; - HDCount =3D 0; - CDCount =3D 0; - NETCount =3D 0; - BEVCount =3D 0; - TotalSize =3D 0; - HeaderSize =3D sizeof (BBS_TYPE) + sizeof (UINT16); - DevOrder =3D NULL; - Status =3D EFI_SUCCESS; - - // - // Count all boot devices - // - for (Index =3D 0; Index < BbsCount; Index++) { - if (BbsTable[Index].BootPriority =3D=3D BBS_IGNORE_ENTRY) { - continue; - } - - switch (BbsTable[Index].DeviceType) { - case BBS_FLOPPY: - FDCount++; - break; - - case BBS_HARDDISK: - HDCount++; - break; - - case BBS_CDROM: - CDCount++; - break; - - case BBS_EMBED_NETWORK: - NETCount++; - break; - - case BBS_BEV_DEVICE: - BEVCount++; - break; - - default: - break; - } - } - - TotalSize +=3D (HeaderSize + sizeof (UINT16) * FDCount); - TotalSize +=3D (HeaderSize + sizeof (UINT16) * HDCount); - TotalSize +=3D (HeaderSize + sizeof (UINT16) * CDCount); - TotalSize +=3D (HeaderSize + sizeof (UINT16) * NETCount); - TotalSize +=3D (HeaderSize + sizeof (UINT16) * BEVCount); - - // - // Create buffer to hold all boot device order - // - DevOrder =3D AllocateZeroPool (TotalSize); - if (NULL =3D=3D DevOrder) { - return EFI_OUT_OF_RESOURCES; - } - DevOrderPtr =3D DevOrder; - - DevOrderPtr->BbsType =3D BBS_FLOPPY; - DevOrderPtr->Length =3D (UINT16) (sizeof (DevOrderPtr->Length) + FDCoun= t * sizeof (UINT16)); - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (= BbsTable, BBS_FLOPPY, BbsCount, DevOrderPtr->Data); - - DevOrderPtr->BbsType =3D BBS_HARDDISK; - DevOrderPtr->Length =3D (UINT16) (sizeof (UINT16) + HDCount * sizeof (U= INT16)); - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (= BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data); - =20 - DevOrderPtr->BbsType =3D BBS_CDROM; - DevOrderPtr->Length =3D (UINT16) (sizeof (UINT16) + CDCount * sizeof (U= INT16)); - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (= BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data); - =20 - DevOrderPtr->BbsType =3D BBS_EMBED_NETWORK; - DevOrderPtr->Length =3D (UINT16) (sizeof (UINT16) + NETCount * sizeof (= UINT16)); - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (= BbsTable, BBS_EMBED_NETWORK, BbsCount, DevOrderPtr->Data); - - DevOrderPtr->BbsType =3D BBS_BEV_DEVICE; - DevOrderPtr->Length =3D (UINT16) (sizeof (UINT16) + BEVCount * sizeof (= UINT16)); - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (= BbsTable, BBS_BEV_DEVICE, BbsCount, DevOrderPtr->Data); - - ASSERT (TotalSize =3D=3D (UINTN) ((UINT8 *) DevOrderPtr - (UINT8 *) DevO= rder)); - - // - // Save device order for legacy boot device to variable. - // - Status =3D gRT->SetVariable ( - VAR_LEGACY_DEV_ORDER, - &gEfiLegacyDevOrderVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLAT= ILE, - TotalSize, - DevOrder - ); - FreePool (DevOrder); - - return Status; -} - -/** - Add the legacy boot devices from BBS table into=20 - the legacy device boot order. - - @retval EFI_SUCCESS The boot devices are added successfully. - @retval EFI_NOT_FOUND The legacy boot devices are not found. - @retval EFI_OUT_OF_RESOURCES Memmory or storage is not enough. - @retval EFI_DEVICE_ERROR Fail to add the legacy device boot order i= nto EFI variable - because of hardware error. -**/ -EFI_STATUS -EFIAPI -BdsUpdateLegacyDevOrder ( - VOID - ) -{ - LEGACY_DEV_ORDER_ENTRY *DevOrder; - LEGACY_DEV_ORDER_ENTRY *NewDevOrder; - LEGACY_DEV_ORDER_ENTRY *Ptr; - LEGACY_DEV_ORDER_ENTRY *NewPtr; - UINTN DevOrderSize; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios; - EFI_STATUS Status; - UINT16 HddCount; - UINT16 BbsCount; - HDD_INFO *LocalHddInfo; - BBS_TABLE *LocalBbsTable; - UINTN Index; - UINTN Index2; - UINTN *Idx; - UINTN FDCount; - UINTN HDCount; - UINTN CDCount; - UINTN NETCount; - UINTN BEVCount; - UINTN TotalSize; - UINTN HeaderSize; - UINT16 *NewFDPtr; - UINT16 *NewHDPtr; - UINT16 *NewCDPtr; - UINT16 *NewNETPtr; - UINT16 *NewBEVPtr; - UINT16 *NewDevPtr; - UINTN FDIndex; - UINTN HDIndex; - UINTN CDIndex; - UINTN NETIndex; - UINTN BEVIndex; - - Idx =3D NULL; - FDCount =3D 0; - HDCount =3D 0; - CDCount =3D 0; - NETCount =3D 0; - BEVCount =3D 0; - TotalSize =3D 0; - HeaderSize =3D sizeof (BBS_TYPE) + sizeof (UINT16); - FDIndex =3D 0; - HDIndex =3D 0; - CDIndex =3D 0; - NETIndex =3D 0; - BEVIndex =3D 0; - NewDevPtr =3D NULL; - - Status =3D gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL= , (VOID **) &LegacyBios); - if (EFI_ERROR (Status)) { - return Status; - } - - Status =3D LegacyBios->GetBbsInfo ( - LegacyBios, - &HddCount, - &LocalHddInfo, - &BbsCount, - &LocalBbsTable - ); - if (EFI_ERROR (Status)) { - return Status; - } - - DevOrder =3D BdsLibGetVariableAndSize ( - VAR_LEGACY_DEV_ORDER, - &gEfiLegacyDevOrderVariableGuid, - &DevOrderSize - ); - if (NULL =3D=3D DevOrder) { - return BdsCreateDevOrder (LocalBbsTable, BbsCount); - } - // - // First we figure out how many boot devices with same device type respe= ctively - // - for (Index =3D 0; Index < BbsCount; Index++) { - if ((LocalBbsTable[Index].BootPriority =3D=3D BBS_IGNORE_ENTRY) || - (LocalBbsTable[Index].BootPriority =3D=3D BBS_DO_NOT_BOOT_FROM) - ) { - continue; - } - - switch (LocalBbsTable[Index].DeviceType) { - case BBS_FLOPPY: - FDCount++; - break; - - case BBS_HARDDISK: - HDCount++; - break; - - case BBS_CDROM: - CDCount++; - break; - - case BBS_EMBED_NETWORK: - NETCount++; - break; - - case BBS_BEV_DEVICE: - BEVCount++; - break; - - default: - break; - } - } - - TotalSize +=3D (HeaderSize + FDCount * sizeof (UINT16)); - TotalSize +=3D (HeaderSize + HDCount * sizeof (UINT16)); - TotalSize +=3D (HeaderSize + CDCount * sizeof (UINT16)); - TotalSize +=3D (HeaderSize + NETCount * sizeof (UINT16)); - TotalSize +=3D (HeaderSize + BEVCount * sizeof (UINT16)); - - NewDevOrder =3D AllocateZeroPool (TotalSize); - if (NULL =3D=3D NewDevOrder) { - return EFI_OUT_OF_RESOURCES; - } - - - - // - // copy FD - // - Ptr =3D DevOrder; - NewPtr =3D NewDevOrder; - NewPtr->BbsType =3D Ptr->BbsType; - NewPtr->Length =3D (UINT16) (sizeof (UINT16) + FDCount * sizeof (UINT16= )); - for (Index =3D 0; Index < Ptr->Length / sizeof (UINT16) - 1; Index++) { - if (LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_IGN= ORE_ENTRY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_DO_= NOT_BOOT_FROM || - LocalBbsTable[Ptr->Data[Index] & 0xFF].DeviceType !=3D BBS_FLOPPY - ) { - continue; - } - - NewPtr->Data[FDIndex] =3D Ptr->Data[Index]; - FDIndex++; - } - NewFDPtr =3D NewPtr->Data; - - // - // copy HD - // - Ptr =3D (LEGACY_DEV_ORDER_ENTRY *) (&Ptr->Data[Ptr->Length /= sizeof (UINT16) - 1]); - NewPtr =3D (LEGACY_DEV_ORDER_ENTRY *) (&NewPtr->Data[NewPtr->Le= ngth / sizeof (UINT16) -1]); - NewPtr->BbsType =3D Ptr->BbsType; - NewPtr->Length =3D (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16= )); - for (Index =3D 0; Index < Ptr->Length / sizeof (UINT16) - 1; Index++) { - if (LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_IGN= ORE_ENTRY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_DO_= NOT_BOOT_FROM || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_LOW= EST_PRIORITY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].DeviceType !=3D BBS_HARDDISK - ) { - continue; - } - - NewPtr->Data[HDIndex] =3D Ptr->Data[Index]; - HDIndex++; - } - NewHDPtr =3D NewPtr->Data; - - // - // copy CD - // - Ptr =3D (LEGACY_DEV_ORDER_ENTRY *) (&Ptr->Data[Ptr->Length / sizeof (= UINT16) - 1]); - NewPtr =3D (LEGACY_DEV_ORDER_ENTRY *) (&NewPtr->Data[NewPtr->Length / si= zeof (UINT16) -1]); - NewPtr->BbsType =3D Ptr->BbsType; - NewPtr->Length =3D (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16= )); - for (Index =3D 0; Index < Ptr->Length / sizeof (UINT16) - 1; Index++) { - if (LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_IGN= ORE_ENTRY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_DO_= NOT_BOOT_FROM || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_LOW= EST_PRIORITY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].DeviceType !=3D BBS_CDROM - ) { - continue; - } - - NewPtr->Data[CDIndex] =3D Ptr->Data[Index]; - CDIndex++; - } - NewCDPtr =3D NewPtr->Data; - - // - // copy NET - // - Ptr =3D (LEGACY_DEV_ORDER_ENTRY *) (&Ptr->Data[Ptr->Length / sizeof (= UINT16) - 1]); - NewPtr =3D (LEGACY_DEV_ORDER_ENTRY *) (&NewPtr->Data[NewPtr->Length / si= zeof (UINT16) -1]); - NewPtr->BbsType =3D Ptr->BbsType; - NewPtr->Length =3D (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT1= 6)); - for (Index =3D 0; Index < Ptr->Length / sizeof (UINT16) - 1; Index++) { - if (LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_IGN= ORE_ENTRY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_DO_= NOT_BOOT_FROM || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_LOW= EST_PRIORITY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].DeviceType !=3D BBS_EMBED_N= ETWORK - ) { - continue; - } - - NewPtr->Data[NETIndex] =3D Ptr->Data[Index]; - NETIndex++; - } - NewNETPtr =3D NewPtr->Data; - =20 - // - // copy BEV - // - Ptr =3D (LEGACY_DEV_ORDER_ENTRY *) (&Ptr->Data[Ptr->Length / sizeof (= UINT16) - 1]); - NewPtr =3D (LEGACY_DEV_ORDER_ENTRY *) (&NewPtr->Data[NewPtr->Length / si= zeof (UINT16) -1]); - NewPtr->BbsType =3D Ptr->BbsType; - NewPtr->Length =3D (UINT16) (sizeof (UINT16) + BEVCount * sizeof (UINT1= 6)); - for (Index =3D 0; Index < Ptr->Length / sizeof (UINT16) - 1; Index++) { - if (LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_IGN= ORE_ENTRY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_DO_= NOT_BOOT_FROM || - LocalBbsTable[Ptr->Data[Index] & 0xFF].BootPriority =3D=3D BBS_LOW= EST_PRIORITY || - LocalBbsTable[Ptr->Data[Index] & 0xFF].DeviceType !=3D BBS_BEV_DEV= ICE - ) { - continue; - } - - NewPtr->Data[BEVIndex] =3D Ptr->Data[Index]; - BEVIndex++; - } - NewBEVPtr =3D NewPtr->Data; - - for (Index =3D 0; Index < BbsCount; Index++) { - if ((LocalBbsTable[Index].BootPriority =3D=3D BBS_IGNORE_ENTRY) || - (LocalBbsTable[Index].BootPriority =3D=3D BBS_DO_NOT_BOOT_FROM) - ) { - continue; - } - - switch (LocalBbsTable[Index].DeviceType) { - case BBS_FLOPPY: - Idx =3D &FDIndex; - NewDevPtr =3D NewFDPtr; - break; - - case BBS_HARDDISK: - Idx =3D &HDIndex; - NewDevPtr =3D NewHDPtr; - break; - - case BBS_CDROM: - Idx =3D &CDIndex; - NewDevPtr =3D NewCDPtr; - break; - - case BBS_EMBED_NETWORK: - Idx =3D &NETIndex; - NewDevPtr =3D NewNETPtr; - break; - - case BBS_BEV_DEVICE: - Idx =3D &BEVIndex; - NewDevPtr =3D NewBEVPtr; - break; - - default: - Idx =3D NULL; - break; - } - // - // at this point we have copied those valid indexes to new buffer - // and we should check if there is any new appeared boot device - // - if (Idx !=3D NULL) { - for (Index2 =3D 0; Index2 < *Idx; Index2++) { - if ((NewDevPtr[Index2] & 0xFF) =3D=3D (UINT16) Index) { - break; - } - } - - if (Index2 =3D=3D *Idx) { - // - // Index2 =3D=3D *Idx means we didn't find Index - // so Index is a new appeared device's index in BBS table - // insert it before disabled indexes. - // - for (Index2 =3D 0; Index2 < *Idx; Index2++) { - if ((NewDevPtr[Index2] & 0xFF00) =3D=3D 0xFF00) { - break; - } - } - CopyMem (&NewDevPtr[Index2 + 1], &NewDevPtr[Index2], (*Idx - Index= 2) * sizeof (UINT16)); - NewDevPtr[Index2] =3D (UINT16) (Index & 0xFF); - (*Idx)++; - } - } - } - - FreePool (DevOrder); - - Status =3D gRT->SetVariable ( - VAR_LEGACY_DEV_ORDER, - &gEfiLegacyDevOrderVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLAT= ILE, - TotalSize, - NewDevOrder - ); - FreePool (NewDevOrder); - - return Status; -} - -/** - Set Boot Priority for specified device type. - - @param DeviceType The device type. - @param BbsIndex The BBS index to set the highest priority. Ignore= when -1. - @param LocalBbsTable The BBS table. - @param Priority The prority table. - - @retval EFI_SUCCESS The function completes successfully. - @retval EFI_NOT_FOUND Failed to find device. - @retval EFI_OUT_OF_RESOURCES Failed to get the efi variable of device o= rder. - -**/ -EFI_STATUS -BdsSetBootPriority4SameTypeDev ( - IN UINT16 DeviceType, - IN UINTN BbsIndex, - IN OUT BBS_TABLE *LocalBbsTable, - IN OUT UINT16 *Priority - ) -{ - LEGACY_DEV_ORDER_ENTRY *DevOrder; - LEGACY_DEV_ORDER_ENTRY *DevOrderPtr; - UINTN DevOrderSize; - UINTN Index; - - DevOrder =3D BdsLibGetVariableAndSize ( - VAR_LEGACY_DEV_ORDER, - &gEfiLegacyDevOrderVariableGuid, - &DevOrderSize - ); - if (NULL =3D=3D DevOrder) { - return EFI_OUT_OF_RESOURCES; - } - - DevOrderPtr =3D DevOrder; - while ((UINT8 *) DevOrderPtr < (UINT8 *) DevOrder + DevOrderSize) { - if (DevOrderPtr->BbsType =3D=3D DeviceType) { - break; - } - - DevOrderPtr =3D (LEGACY_DEV_ORDER_ENTRY *) ((UINTN) DevOrderPtr + size= of (BBS_TYPE) + DevOrderPtr->Length); - } - - if ((UINT8 *) DevOrderPtr >=3D (UINT8 *) DevOrder + DevOrderSize) { - FreePool (DevOrder); - return EFI_NOT_FOUND; - } - - if (BbsIndex !=3D (UINTN) -1) { - LocalBbsTable[BbsIndex].BootPriority =3D *Priority; - (*Priority)++; - } - // - // If the high byte of the DevIndex is 0xFF, it indicates that this devi= ce has been disabled. - // - for (Index =3D 0; Index < DevOrderPtr->Length / sizeof (UINT16) - 1; Ind= ex++) { - if ((DevOrderPtr->Data[Index] & 0xFF00) =3D=3D 0xFF00) { - // - // LocalBbsTable[DevIndex[Index] & 0xFF].BootPriority =3D BBS_DISABL= ED_ENTRY; - // - } else if (DevOrderPtr->Data[Index] !=3D BbsIndex) { - LocalBbsTable[DevOrderPtr->Data[Index]].BootPriority =3D *Priority; - (*Priority)++; - } - } - - FreePool (DevOrder); - return EFI_SUCCESS; -} - -/** - Print the BBS Table. - - @param LocalBbsTable The BBS table. - @param BbsCount The count of entry in BBS table. -**/ -VOID -PrintBbsTable ( - IN BBS_TABLE *LocalBbsTable, - IN UINT16 BbsCount - ) -{ - UINT16 Idx; - - DEBUG ((DEBUG_ERROR, "\n")); - DEBUG ((DEBUG_ERROR, " NO Prio bb/dd/ff cl/sc Type Stat segm:offs\n")); - DEBUG ((DEBUG_ERROR, "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D\n")); - for (Idx =3D 0; Idx < BbsCount; Idx++) { - if ((LocalBbsTable[Idx].BootPriority =3D=3D BBS_IGNORE_ENTRY) || - (LocalBbsTable[Idx].BootPriority =3D=3D BBS_DO_NOT_BOOT_FROM) || - (LocalBbsTable[Idx].BootPriority =3D=3D BBS_LOWEST_PRIORITY) - ) { - continue; - } - - DEBUG ( - (DEBUG_ERROR, - " %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x\n", - (UINTN) Idx, - (UINTN) LocalBbsTable[Idx].BootPriority, - (UINTN) LocalBbsTable[Idx].Bus, - (UINTN) LocalBbsTable[Idx].Device, - (UINTN) LocalBbsTable[Idx].Function, - (UINTN) LocalBbsTable[Idx].Class, - (UINTN) LocalBbsTable[Idx].SubClass, - (UINTN) LocalBbsTable[Idx].DeviceType, - (UINTN) * (UINT16 *) &LocalBbsTable[Idx].StatusFlags, - (UINTN) LocalBbsTable[Idx].BootHandlerSegment, - (UINTN) LocalBbsTable[Idx].BootHandlerOffset, - (UINTN) ((LocalBbsTable[Idx].MfgStringSegment << 4) + LocalBbsTable[= Idx].MfgStringOffset), - (UINTN) ((LocalBbsTable[Idx].DescStringSegment << 4) + LocalBbsTable= [Idx].DescStringOffset)) - ); - } - - DEBUG ((DEBUG_ERROR, "\n")); -} - -/** - Set the boot priority for BBS entries based on boot option entry and boo= t order. - - @param Entry The boot option is to be checked for refresh B= BS table. - =20 - @retval EFI_SUCCESS The boot priority for BBS entries is refre= shed successfully. - @retval EFI_NOT_FOUND BBS entries can't be found. - @retval EFI_OUT_OF_RESOURCES Failed to get the legacy device boot order. -**/ -EFI_STATUS -EFIAPI -BdsRefreshBbsTableForBoot ( - IN BDS_COMMON_OPTION *Entry - ) -{ - EFI_STATUS Status; - UINT16 BbsIndex; - UINT16 HddCount; - UINT16 BbsCount; - HDD_INFO *LocalHddInfo; - BBS_TABLE *LocalBbsTable; - UINT16 DevType; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios; - UINTN Index; - UINT16 Priority; - UINT16 *BootOrder; - UINTN BootOrderSize; - UINT8 *BootOptionVar; - UINTN BootOptionSize; - CHAR16 BootOption[9]; - UINT8 *Ptr; - UINT16 DevPathLen; - EFI_DEVICE_PATH_PROTOCOL *DevPath; - UINT16 *DeviceType; - UINTN DeviceTypeCount; - UINTN DeviceTypeIndex; - - HddCount =3D 0; - BbsCount =3D 0; - LocalHddInfo =3D NULL; - LocalBbsTable =3D NULL; - DevType =3D BBS_UNKNOWN; - - Status =3D gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL= , (VOID **) &LegacyBios); - if (EFI_ERROR (Status)) { - return Status; - } - - LegacyBios->GetBbsInfo ( - LegacyBios, - &HddCount, - &LocalHddInfo, - &BbsCount, - &LocalBbsTable - ); - // - // First, set all the present devices' boot priority to BBS_UNPRIORITIZE= D_ENTRY - // We will set them according to the settings setup by user - // - for (Index =3D 0; Index < BbsCount; Index++) { - if (!((BBS_IGNORE_ENTRY =3D=3D LocalBbsTable[Index].BootPriority) || - (BBS_DO_NOT_BOOT_FROM =3D=3D LocalBbsTable[Index].BootPriority) || - (BBS_LOWEST_PRIORITY =3D=3D LocalBbsTable[Index].BootPriority))) { - LocalBbsTable[Index].BootPriority =3D BBS_UNPRIORITIZED_ENTRY; - } - } - // - // boot priority always starts at 0 - // - Priority =3D 0; - if (Entry->LoadOptionsSize =3D=3D sizeof (BBS_TABLE) + sizeof (UINT16)) { - // - // If Entry stands for a legacy boot option, we prioritize the devices= with the same type first. - // - DevType =3D ((BBS_TABLE *) Entry->LoadOptions)->DeviceType; - BbsIndex =3D *(UINT16 *) ((BBS_TABLE *) Entry->LoadOptions + 1); - Status =3D BdsSetBootPriority4SameTypeDev ( - DevType, - BbsIndex, - LocalBbsTable, - &Priority - ); - if (EFI_ERROR (Status)) { - return Status; - } - } - // - // we have to set the boot priority for other BBS entries with different= device types - // - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - DeviceType =3D AllocatePool (BootOrderSize + sizeof (UINT16)); - ASSERT (DeviceType !=3D NULL); - - DeviceType[0] =3D DevType; - DeviceTypeCount =3D 1; - for (Index =3D 0; ((BootOrder !=3D NULL) && (Index < BootOrderSize / siz= eof (UINT16))); Index++) { - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder= [Index]); - BootOptionVar =3D BdsLibGetVariableAndSize ( - BootOption, - &gEfiGlobalVariableGuid, - &BootOptionSize - ); - if (NULL =3D=3D BootOptionVar) { - continue; - } - - Ptr =3D BootOptionVar; - - Ptr +=3D sizeof (UINT32); - DevPathLen =3D *(UINT16 *) Ptr; - Ptr +=3D sizeof (UINT16); - Ptr +=3D StrSize ((UINT16 *) Ptr); - DevPath =3D (EFI_DEVICE_PATH_PROTOCOL *) Ptr; - if (BBS_DEVICE_PATH !=3D DevPath->Type || BBS_BBS_DP !=3D DevPath->Sub= Type) { - FreePool (BootOptionVar); - continue; - } - - Ptr +=3D DevPathLen; - DevType =3D ((BBS_TABLE *) Ptr)->DeviceType; - for (DeviceTypeIndex =3D 0; DeviceTypeIndex < DeviceTypeCount; DeviceT= ypeIndex++) { - if (DeviceType[DeviceTypeIndex] =3D=3D DevType) { - break; - } - } - if (DeviceTypeIndex < DeviceTypeCount) { - // - // We don't want to process twice for a device type - // - FreePool (BootOptionVar); - continue; - } - - DeviceType[DeviceTypeCount] =3D DevType; - DeviceTypeCount++; - - Status =3D BdsSetBootPriority4SameTypeDev ( - DevType, - (UINTN) -1, - LocalBbsTable, - &Priority - ); - FreePool (BootOptionVar); - if (EFI_ERROR (Status)) { - break; - } - } - - FreePool (DeviceType); - - if (BootOrder !=3D NULL) { - FreePool (BootOrder); - } - - DEBUG_CODE_BEGIN(); - PrintBbsTable (LocalBbsTable, BbsCount); - DEBUG_CODE_END(); - - return Status; -} - -/** - Boot the legacy system with the boot option - - @param Option The legacy boot option which have BBS dev= ice path - - @retval EFI_UNSUPPORTED There is no legacybios protocol, do not s= upport - legacy boot. - @retval EFI_STATUS Return the status of LegacyBios->LegacyBo= ot (). - -**/ -EFI_STATUS -BdsLibDoLegacyBoot ( - IN BDS_COMMON_OPTION *Option - ) -{ - EFI_STATUS Status; - EFI_LEGACY_BIOS_PROTOCOL *LegacyBios; - EFI_EVENT LegacyBootEvent; - - Status =3D gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL, (VOID= **) &LegacyBios); - if (EFI_ERROR (Status)) { - // - // If no LegacyBios protocol we do not support legacy boot - // - return EFI_UNSUPPORTED; - } - // - // Notes: if we separate the int 19, then we don't need to refresh BBS - // - BdsRefreshBbsTableForBoot (Option); - - // - // Write boot to OS performance data for legacy boot. - // - PERF_CODE ( - // - // Create an event to be signalled when Legacy Boot occurs to write pe= rformance data. - // - Status =3D EfiCreateEventLegacyBootEx( - TPL_NOTIFY, - BmEndOfBdsPerfCode, - NULL,=20 - &LegacyBootEvent - ); - ASSERT_EFI_ERROR (Status); - ); - - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Legacy Boot: %S\n", Option->Descriptio= n)); - return LegacyBios->LegacyBoot ( - LegacyBios, - (BBS_BBS_DEVICE_PATH *) Option->DevicePath, - Option->LoadOptionsSize, - Option->LoadOptions - ); -} - -/** - Internal function to check if the input boot option is a valid EFI NV Bo= ot####. - - @param OptionToCheck Boot option to be checked. - - @retval TRUE This boot option matches a valid EFI NV Boot####. - @retval FALSE If not. - -**/ -BOOLEAN -IsBootOptionValidNVVarialbe ( - IN BDS_COMMON_OPTION *OptionToCheck - ) -{ - LIST_ENTRY TempList; - BDS_COMMON_OPTION *BootOption; - BOOLEAN Valid; - CHAR16 OptionName[20]; - - Valid =3D FALSE; - - InitializeListHead (&TempList); - UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", OptionToChe= ck->BootCurrent); - - BootOption =3D BdsLibVariableToOption (&TempList, OptionName); - if (BootOption =3D=3D NULL) { - return FALSE; - } - - // - // If the Boot Option Number and Device Path matches, OptionToCheck matc= hes a - // valid EFI NV Boot####. - // - if ((OptionToCheck->BootCurrent =3D=3D BootOption->BootCurrent) && - (CompareMem (OptionToCheck->DevicePath, BootOption->DevicePath, GetD= evicePathSize (OptionToCheck->DevicePath)) =3D=3D 0)) - { - Valid =3D TRUE; - } - - FreePool (BootOption); - - return Valid; -} - -/** - Check whether a USB device match the specified USB Class device path. Th= is - function follows "Load Option Processing" behavior in UEFI specification. - - @param UsbIo USB I/O protocol associated with the USB device. - @param UsbClass The USB Class device path to match. - - @retval TRUE The USB device match the USB Class device path. - @retval FALSE The USB device does not match the USB Class device pa= th. - -**/ -BOOLEAN -BdsMatchUsbClass ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_CLASS_DEVICE_PATH *UsbClass - ) -{ - EFI_STATUS Status; - EFI_USB_DEVICE_DESCRIPTOR DevDesc; - EFI_USB_INTERFACE_DESCRIPTOR IfDesc; - UINT8 DeviceClass; - UINT8 DeviceSubClass; - UINT8 DeviceProtocol; - - if ((DevicePathType (UsbClass) !=3D MESSAGING_DEVICE_PATH) || - (DevicePathSubType (UsbClass) !=3D MSG_USB_CLASS_DP)){ - return FALSE; - } - - // - // Check Vendor Id and Product Id. - // - Status =3D UsbIo->UsbGetDeviceDescriptor (UsbIo, &DevDesc); - if (EFI_ERROR (Status)) { - return FALSE; - } - - if ((UsbClass->VendorId !=3D 0xffff) && - (UsbClass->VendorId !=3D DevDesc.IdVendor)) { - return FALSE; - } - - if ((UsbClass->ProductId !=3D 0xffff) && - (UsbClass->ProductId !=3D DevDesc.IdProduct)) { - return FALSE; - } - - DeviceClass =3D DevDesc.DeviceClass; - DeviceSubClass =3D DevDesc.DeviceSubClass; - DeviceProtocol =3D DevDesc.DeviceProtocol; - if (DeviceClass =3D=3D 0) { - // - // If Class in Device Descriptor is set to 0, use the Class, SubClass = and - // Protocol in Interface Descriptor instead. - // - Status =3D UsbIo->UsbGetInterfaceDescriptor (UsbIo, &IfDesc); - if (EFI_ERROR (Status)) { - return FALSE; - } - - DeviceClass =3D IfDesc.InterfaceClass; - DeviceSubClass =3D IfDesc.InterfaceSubClass; - DeviceProtocol =3D IfDesc.InterfaceProtocol; - } - - // - // Check Class, SubClass and Protocol. - // - if ((UsbClass->DeviceClass !=3D 0xff) && - (UsbClass->DeviceClass !=3D DeviceClass)) { - return FALSE; - } - - if ((UsbClass->DeviceSubClass !=3D 0xff) && - (UsbClass->DeviceSubClass !=3D DeviceSubClass)) { - return FALSE; - } - - if ((UsbClass->DeviceProtocol !=3D 0xff) && - (UsbClass->DeviceProtocol !=3D DeviceProtocol)) { - return FALSE; - } - - return TRUE; -} - -/** - Check whether a USB device match the specified USB WWID device path. This - function follows "Load Option Processing" behavior in UEFI specification. - - @param UsbIo USB I/O protocol associated with the USB device. - @param UsbWwid The USB WWID device path to match. - - @retval TRUE The USB device match the USB WWID device path. - @retval FALSE The USB device does not match the USB WWID device pat= h. - -**/ -BOOLEAN -BdsMatchUsbWwid ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_WWID_DEVICE_PATH *UsbWwid - ) -{ - EFI_STATUS Status; - EFI_USB_DEVICE_DESCRIPTOR DevDesc; - EFI_USB_INTERFACE_DESCRIPTOR IfDesc; - UINT16 *LangIdTable; - UINT16 TableSize; - UINT16 Index; - CHAR16 *CompareStr; - UINTN CompareLen; - CHAR16 *SerialNumberStr; - UINTN Length; - - if ((DevicePathType (UsbWwid) !=3D MESSAGING_DEVICE_PATH) || - (DevicePathSubType (UsbWwid) !=3D MSG_USB_WWID_DP )){ - return FALSE; - } - - // - // Check Vendor Id and Product Id. - // - Status =3D UsbIo->UsbGetDeviceDescriptor (UsbIo, &DevDesc); - if (EFI_ERROR (Status)) { - return FALSE; - } - if ((DevDesc.IdVendor !=3D UsbWwid->VendorId) || - (DevDesc.IdProduct !=3D UsbWwid->ProductId)) { - return FALSE; - } - - // - // Check Interface Number. - // - Status =3D UsbIo->UsbGetInterfaceDescriptor (UsbIo, &IfDesc); - if (EFI_ERROR (Status)) { - return FALSE; - } - if (IfDesc.InterfaceNumber !=3D UsbWwid->InterfaceNumber) { - return FALSE; - } - - // - // Check Serial Number. - // - if (DevDesc.StrSerialNumber =3D=3D 0) { - return FALSE; - } - - // - // Get all supported languages. - // - TableSize =3D 0; - LangIdTable =3D NULL; - Status =3D UsbIo->UsbGetSupportedLanguages (UsbIo, &LangIdTable, &TableS= ize); - if (EFI_ERROR (Status) || (TableSize =3D=3D 0) || (LangIdTable =3D=3D NU= LL)) { - return FALSE; - } - - // - // Serial number in USB WWID device path is the last 64-or-less UTF-16 c= haracters. - // - CompareStr =3D (CHAR16 *) (UINTN) (UsbWwid + 1); - CompareLen =3D (DevicePathNodeLength (UsbWwid) - sizeof (USB_WWID_DEVICE= _PATH)) / sizeof (CHAR16); - if (CompareStr[CompareLen - 1] =3D=3D L'\0') { - CompareLen--; - } - - // - // Compare serial number in each supported language. - // - for (Index =3D 0; Index < TableSize / sizeof (UINT16); Index++) { - SerialNumberStr =3D NULL; - Status =3D UsbIo->UsbGetStringDescriptor ( - UsbIo, - LangIdTable[Index], - DevDesc.StrSerialNumber, - &SerialNumberStr - ); - if (EFI_ERROR (Status) || (SerialNumberStr =3D=3D NULL)) { - continue; - } - - Length =3D StrLen (SerialNumberStr); - if ((Length >=3D CompareLen) && - (CompareMem (SerialNumberStr + Length - CompareLen, CompareStr, Co= mpareLen * sizeof (CHAR16)) =3D=3D 0)) { - FreePool (SerialNumberStr); - return TRUE; - } - - FreePool (SerialNumberStr); - } - - return FALSE; -} - -/** - Find a USB device path which match the specified short-form device path = start - with USB Class or USB WWID device path and load the boot file then retur= n the=20 - image handle. If ParentDevicePath is NULL, this function will search in = all USB - devices of the platform. If ParentDevicePath is not NULL,this function w= ill only - search in its child devices. - - @param ParentDevicePath The device path of the parent. - @param ShortFormDevicePath The USB Class or USB WWID device path to ma= tch. - - @return The image Handle if find load file from specified short-form de= vice path - or NULL if not found. - -**/ -EFI_HANDLE * -BdsFindUsbDevice ( - IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, - IN EFI_DEVICE_PATH_PROTOCOL *ShortFormDevicePath - ) -{ - EFI_STATUS Status; - UINTN UsbIoHandleCount; - EFI_HANDLE *UsbIoHandleBuffer; - EFI_DEVICE_PATH_PROTOCOL *UsbIoDevicePath; - EFI_USB_IO_PROTOCOL *UsbIo; - UINTN Index; - UINTN ParentSize; - UINTN Size; - EFI_HANDLE ImageHandle; - EFI_HANDLE Handle; - EFI_DEVICE_PATH_PROTOCOL *FullDevicePath; - EFI_DEVICE_PATH_PROTOCOL *NextDevicePath; - - FullDevicePath =3D NULL; - ImageHandle =3D NULL; - - // - // Get all UsbIo Handles. - // - UsbIoHandleCount =3D 0; - UsbIoHandleBuffer =3D NULL; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiUsbIoProtocolGuid, - NULL, - &UsbIoHandleCount, - &UsbIoHandleBuffer - ); - if (EFI_ERROR (Status) || (UsbIoHandleCount =3D=3D 0) || (UsbIoHandleBuf= fer =3D=3D NULL)) { - return NULL; - } - - ParentSize =3D (ParentDevicePath =3D=3D NULL) ? 0 : GetDevicePathSize (P= arentDevicePath); - for (Index =3D 0; Index < UsbIoHandleCount; Index++) { - // - // Get the Usb IO interface. - // - Status =3D gBS->HandleProtocol( - UsbIoHandleBuffer[Index], - &gEfiUsbIoProtocolGuid, - (VOID **) &UsbIo - ); - if (EFI_ERROR (Status)) { - continue; - } - - UsbIoDevicePath =3D DevicePathFromHandle (UsbIoHandleBuffer[Index]); - if (UsbIoDevicePath =3D=3D NULL) { - continue; - } - - if (ParentDevicePath !=3D NULL) { - // - // Compare starting part of UsbIoHandle's device path with ParentDev= icePath. - // - Size =3D GetDevicePathSize (UsbIoDevicePath); - if ((Size < ParentSize) || - (CompareMem (UsbIoDevicePath, ParentDevicePath, ParentSize - END= _DEVICE_PATH_LENGTH) !=3D 0)) { - continue; - } - } - - if (BdsMatchUsbClass (UsbIo, (USB_CLASS_DEVICE_PATH *) ShortFormDevice= Path) || - BdsMatchUsbWwid (UsbIo, (USB_WWID_DEVICE_PATH *) ShortFormDevicePa= th)) { - // - // Try to find if there is the boot file in this DevicePath - // - NextDevicePath =3D NextDevicePathNode (ShortFormDevicePath); - if (!IsDevicePathEnd (NextDevicePath)) { - FullDevicePath =3D AppendDevicePath (UsbIoDevicePath, NextDevicePa= th); - // - // Connect the full device path, so that Simple File System protoc= ol - // could be installed for this USB device. - // - BdsLibConnectDevicePath (FullDevicePath); - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCodeOs= LoaderLoad)); - Status =3D gBS->LoadImage ( - TRUE, - gImageHandle, - FullDevicePath, - NULL, - 0, - &ImageHandle - ); - FreePool (FullDevicePath); - } else { - FullDevicePath =3D UsbIoDevicePath; - Status =3D EFI_NOT_FOUND; - } - - // - // If we didn't find an image directly, we need to try as if it is a= removable device boot option - // and load the image according to the default boot behavior for rem= ovable device. - // - if (EFI_ERROR (Status)) { - // - // check if there is a bootable removable media could be found in = this device path , - // and get the bootable media handle - // - Handle =3D BdsLibGetBootableHandle(UsbIoDevicePath); - if (Handle =3D=3D NULL) { - continue; - } - // - // Load the default boot file \EFI\BOOT\boot{machinename}.EFI from= removable Media - // machinename is ia32, ia64, x64, ... - // - FullDevicePath =3D FileDevicePath (Handle, EFI_REMOVABLE_MEDIA_FIL= E_NAME); - if (FullDevicePath !=3D NULL) { - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCode= OsLoaderLoad)); - Status =3D gBS->LoadImage ( - TRUE, - gImageHandle, - FullDevicePath, - NULL, - 0, - &ImageHandle - ); - if (EFI_ERROR (Status)) { - // - // The DevicePath failed, and it's not a valid - // removable media device. - // - continue; - } - } else { - continue; - } - } - break; - } - } - - FreePool (UsbIoHandleBuffer); - return ImageHandle; -} - -/** - Expand USB Class or USB WWID device path node to be full device path of = a USB - device in platform then load the boot file on this full device path and = return the=20 - image handle. - - This function support following 4 cases: - 1) Boot Option device path starts with a USB Class or USB WWID device pa= th, - and there is no Media FilePath device path in the end. - In this case, it will follow Removable Media Boot Behavior. - 2) Boot Option device path starts with a USB Class or USB WWID device pa= th, - and ended with Media FilePath device path. - 3) Boot Option device path starts with a full device path to a USB Host = Controller, - contains a USB Class or USB WWID device path node, while not ended wi= th Media - FilePath device path. In this case, it will follow Removable Media Bo= ot Behavior. - 4) Boot Option device path starts with a full device path to a USB Host = Controller, - contains a USB Class or USB WWID device path node, and ended with Med= ia - FilePath device path. - - @param DevicePath The Boot Option device path. - - @return The image handle of boot file, or NULL if there is no boot file= found in - the specified USB Class or USB WWID device path. - -**/ -EFI_HANDLE * -BdsExpandUsbShortFormDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - EFI_HANDLE *ImageHandle; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - EFI_DEVICE_PATH_PROTOCOL *ShortFormDevicePath; - - // - // Search for USB Class or USB WWID device path node. - // - ShortFormDevicePath =3D NULL; - ImageHandle =3D NULL; - TempDevicePath =3D DevicePath; - while (!IsDevicePathEnd (TempDevicePath)) { - if ((DevicePathType (TempDevicePath) =3D=3D MESSAGING_DEVICE_PATH) && - ((DevicePathSubType (TempDevicePath) =3D=3D MSG_USB_CLASS_DP) || - (DevicePathSubType (TempDevicePath) =3D=3D MSG_USB_WWID_DP))) { - ShortFormDevicePath =3D TempDevicePath; - break; - } - TempDevicePath =3D NextDevicePathNode (TempDevicePath); - } - - if (ShortFormDevicePath =3D=3D NULL) { - // - // No USB Class or USB WWID device path node found, do nothing. - // - return NULL; - } - - if (ShortFormDevicePath =3D=3D DevicePath) { - // - // Boot Option device path starts with USB Class or USB WWID device pa= th. - // - ImageHandle =3D BdsFindUsbDevice (NULL, ShortFormDevicePath); - if (ImageHandle =3D=3D NULL) { - // - // Failed to find a match in existing devices, connect the short for= m USB - // device path and try again. - // - BdsLibConnectUsbDevByShortFormDP (0xff, ShortFormDevicePath); - ImageHandle =3D BdsFindUsbDevice (NULL, ShortFormDevicePath); - } - } else { - // - // Boot Option device path contains USB Class or USB WWID device path = node. - // - - // - // Prepare the parent device path for search. - // - TempDevicePath =3D DuplicateDevicePath (DevicePath); - ASSERT (TempDevicePath !=3D NULL); - SetDevicePathEndNode (((UINT8 *) TempDevicePath) + ((UINTN) ShortFormD= evicePath - (UINTN) DevicePath)); - - // - // The USB Host Controller device path is already in Boot Option devic= e path - // and USB Bus driver already support RemainingDevicePath starts with = USB - // Class or USB WWID device path, so just search in existing USB devic= es and - // doesn't perform ConnectController here. - // - ImageHandle =3D BdsFindUsbDevice (TempDevicePath, ShortFormDevicePath); - FreePool (TempDevicePath); - } - - return ImageHandle; -} - -/** - Process the boot option follow the UEFI specification and - special treat the legacy boot option with BBS_DEVICE_PATH. - - @param Option The boot option need to be processed - @param DevicePath The device path which describe where to l= oad the - boot image or the legacy BBS device path = to boot - the legacy OS - @param ExitDataSize The size of exit data. - @param ExitData Data returned when Boot image failed. - - @retval EFI_SUCCESS Boot from the input boot option successfu= lly. - @retval EFI_NOT_FOUND If the Device Path is not found in the sy= stem - -**/ -EFI_STATUS -EFIAPI -BdsLibBootViaBootOption ( - IN BDS_COMMON_OPTION *Option, - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, - OUT UINTN *ExitDataSize, - OUT CHAR16 **ExitData OPTIONAL - ) -{ - EFI_STATUS Status; - EFI_STATUS StatusLogo; - EFI_HANDLE Handle; - EFI_HANDLE ImageHandle; - EFI_DEVICE_PATH_PROTOCOL *FilePath; - EFI_LOADED_IMAGE_PROTOCOL *ImageInfo; - EFI_DEVICE_PATH_PROTOCOL *WorkingDevicePath; - EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save; - LIST_ENTRY TempBootLists; - EFI_BOOT_LOGO_PROTOCOL *BootLogo; - - *ExitDataSize =3D 0; - *ExitData =3D NULL; - - // - // Notes: this code can be remove after the s3 script table - // hook on the event EVT_SIGNAL_READY_TO_BOOT or - // EVT_SIGNAL_LEGACY_BOOT - // - Status =3D gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID= **) &AcpiS3Save); - if (!EFI_ERROR (Status)) { - AcpiS3Save->S3Save (AcpiS3Save, NULL); - } - // - // If it's Device Path that starts with a hard drive path, append it wit= h the front part to compose a - // full device path - // - WorkingDevicePath =3D NULL; - if ((DevicePathType (DevicePath) =3D=3D MEDIA_DEVICE_PATH) && - (DevicePathSubType (DevicePath) =3D=3D MEDIA_HARDDRIVE_DP)) { - WorkingDevicePath =3D BdsExpandPartitionPartialDevicePathToFull ( - (HARDDRIVE_DEVICE_PATH *)DevicePath - ); - if (WorkingDevicePath !=3D NULL) { - DevicePath =3D WorkingDevicePath; - } - } - - // - // Set Boot Current - // - if (IsBootOptionValidNVVarialbe (Option)) { - // - // For a temporary boot (i.e. a boot by selected a EFI Shell using "Bo= ot From File"), Boot Current is actually not valid. - // In this case, "BootCurrent" is not created. - // Only create the BootCurrent variable when it points to a valid Boot= #### variable. - // - SetVariableAndReportStatusCodeOnError ( - L"BootCurrent", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - sizeof (UINT16), - &Option->BootCurrent - ); - } - - // - // Report Status Code to indicate ReadyToBoot event will be signalled - // - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_BS_DRIVER | EFI= _SW_DXE_BS_PC_READY_TO_BOOT_EVENT)); - - // - // Signal the EVT_SIGNAL_READY_TO_BOOT event - // - EfiSignalEventReadyToBoot(); - - // - // Expand USB Class or USB WWID device path node to be full device path = of a USB - // device in platform then load the boot file on this full device path a= nd get the - // image handle. - // - ImageHandle =3D BdsExpandUsbShortFormDevicePath (DevicePath); - - // - // Adjust the different type memory page number just before booting - // and save the updated info into the variable for next boot to use - // - BdsSetMemoryTypeInformationVariable (); - - // - // By expanding the USB Class or WWID device path, the ImageHandle has r= eturnned. - // Here get the ImageHandle for the non USB class or WWID device path. - // - if (ImageHandle =3D=3D NULL) { - ASSERT (Option->DevicePath !=3D NULL); - if ((DevicePathType (Option->DevicePath) =3D=3D BBS_DEVICE_PATH) && - (DevicePathSubType (Option->DevicePath) =3D=3D BBS_BBS_DP) - ) { - // - // Check to see if we should legacy BOOT. If yes then do the legacy = boot - // - return BdsLibDoLegacyBoot (Option); - } - - // - // If the boot option point to Internal FV shell, make sure it is valid - // - Status =3D BdsLibUpdateFvFileDevicePath (&DevicePath, &gUefiShellFileG= uid); - if (!EFI_ERROR(Status)) { - if (Option->DevicePath !=3D NULL) { - FreePool(Option->DevicePath); - } - Option->DevicePath =3D AllocateZeroPool (GetDevicePathSize (DeviceP= ath)); - ASSERT(Option->DevicePath !=3D NULL); - CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePa= th)); - // - // Update the shell boot option - // - InitializeListHead (&TempBootLists); - BdsLibRegisterNewOption (&TempBootLists, DevicePath, L"EFI Internal = Shell", L"BootOrder"); - - // - // free the temporary device path created by BdsLibUpdateFvFileDevic= ePath() - // - FreePool (DevicePath); - DevicePath =3D Option->DevicePath; - } - - DEBUG_CODE_BEGIN(); - - if (Option->Description =3D=3D NULL) { - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting from unknown device path\n= ")); - } else { - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description= )); - } - =20 - DEBUG_CODE_END(); - =20 - // - // Report status code for OS Loader LoadImage. - // - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCodeOsLoad= erLoad)); - Status =3D gBS->LoadImage ( - TRUE, - gImageHandle, - DevicePath, - NULL, - 0, - &ImageHandle - ); - - // - // If we didn't find an image directly, we need to try as if it is a r= emovable device boot option - // and load the image according to the default boot behavior for remov= able device. - // - if (EFI_ERROR (Status)) { - // - // check if there is a bootable removable media could be found in th= is device path , - // and get the bootable media handle - // - Handle =3D BdsLibGetBootableHandle(DevicePath); - if (Handle !=3D NULL) { - // - // Load the default boot file \EFI\BOOT\boot{machinename}.EFI from= removable Media - // machinename is ia32, ia64, x64, ... - // - FilePath =3D FileDevicePath (Handle, EFI_REMOVABLE_MEDIA_FILE_NAME= ); - if (FilePath !=3D NULL) { - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCode= OsLoaderLoad)); - Status =3D gBS->LoadImage ( - TRUE, - gImageHandle, - FilePath, - NULL, - 0, - &ImageHandle - ); - } - } - } - } - // - // Provide the image with it's load options - // - if ((ImageHandle =3D=3D NULL) || (EFI_ERROR(Status))) { - // - // Report Status Code to indicate that the failure to load boot option - // - REPORT_STATUS_CODE ( - EFI_ERROR_CODE | EFI_ERROR_MINOR, - (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERRO= R) - ); =20 - goto Done; - } - - Status =3D gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGui= d, (VOID **) &ImageInfo); - ASSERT_EFI_ERROR (Status); - - if (Option->LoadOptionsSize !=3D 0) { - ImageInfo->LoadOptionsSize =3D Option->LoadOptionsSize; - ImageInfo->LoadOptions =3D Option->LoadOptions; - } - - // - // Clean to NULL because the image is loaded directly from the firmwares= boot manager. - // - ImageInfo->ParentHandle =3D NULL; - - // - // Before calling the image, enable the Watchdog Timer for - // the 5 Minute period - // - gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00, NULL); - - // - // Write boot to OS performance data for UEFI boot - // - PERF_CODE ( - BmEndOfBdsPerfCode (NULL, NULL); - ); - - // - // Report status code for OS Loader StartImage. - // - REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCodeOsLoader= Start)); - - Status =3D gBS->StartImage (ImageHandle, ExitDataSize, ExitData); - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Image Return Status =3D %r\n", Status)= ); - if (EFI_ERROR (Status)) { - // - // Report Status Code to indicate that boot failure - // - REPORT_STATUS_CODE ( - EFI_ERROR_CODE | EFI_ERROR_MINOR, - (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED) - ); - } - - // - // Clear the Watchdog Timer after the image returns - // - gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000, NULL); - -Done: - // - // Set Logo status invalid after trying one boot option - // - BootLogo =3D NULL; - StatusLogo =3D gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (VO= ID **) &BootLogo); - if (!EFI_ERROR (StatusLogo) && (BootLogo !=3D NULL)) { - BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0); - } - - // - // Clear Boot Current - // Deleting variable with current implementation shouldn't fail. - // - gRT->SetVariable ( - L"BootCurrent", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - 0, - NULL - ); - - return Status; -} - - -/** - Expand a device path that starts with a hard drive media device path nod= e to be a - full device path that includes the full hardware path to the device. We = need - to do this so it can be booted. As an optimization the front match (the = part point - to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ) is saved i= n a variable - so a connect all is not required on every boot. All successful history d= evice path - which point to partition node (the front part) will be saved. - - @param HardDriveDevicePath EFI Device Path to boot, if it starts wit= h a hard - drive media device path. - @return A Pointer to the full device path or NULL if a valid Hard Drive = devic path - cannot be found. - -**/ -EFI_DEVICE_PATH_PROTOCOL * -EFIAPI -BdsExpandPartitionPartialDevicePathToFull ( - IN HARDDRIVE_DEVICE_PATH *HardDriveDevicePath - ) -{ - EFI_STATUS Status; - UINTN BlockIoHandleCount; - EFI_HANDLE *BlockIoBuffer; - EFI_DEVICE_PATH_PROTOCOL *FullDevicePath; - EFI_DEVICE_PATH_PROTOCOL *BlockIoDevicePath; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - UINTN Index; - UINTN InstanceNum; - EFI_DEVICE_PATH_PROTOCOL *CachedDevicePath; - EFI_DEVICE_PATH_PROTOCOL *TempNewDevicePath; - UINTN CachedDevicePathSize; - BOOLEAN DeviceExist; - BOOLEAN NeedAdjust; - EFI_DEVICE_PATH_PROTOCOL *Instance; - UINTN Size; - - FullDevicePath =3D NULL; - // - // Check if there is prestore HD_BOOT_DEVICE_PATH_VARIABLE_NAME variable. - // If exist, search the front path which point to partition node in the = variable instants. - // If fail to find or HD_BOOT_DEVICE_PATH_VARIABLE_NAME not exist, recon= nect all and search in all system - // - GetVariable2 ( - HD_BOOT_DEVICE_PATH_VARIABLE_NAME, - &gHdBootDevicePathVariablGuid, - (VOID **) &CachedDevicePath, - &CachedDevicePathSize - ); - - // - // Delete the invalid HD_BOOT_DEVICE_PATH_VARIABLE_NAME variable. - // - if ((CachedDevicePath !=3D NULL) && !IsDevicePathValid (CachedDevicePath= , CachedDevicePathSize)) { - FreePool (CachedDevicePath); - CachedDevicePath =3D NULL; - Status =3D gRT->SetVariable ( - HD_BOOT_DEVICE_PATH_VARIABLE_NAME, - &gHdBootDevicePathVariablGuid, - 0, - 0, - NULL - ); - ASSERT_EFI_ERROR (Status); - } - - if (CachedDevicePath !=3D NULL) { - TempNewDevicePath =3D CachedDevicePath; - DeviceExist =3D FALSE; - NeedAdjust =3D FALSE; - do { - // - // Check every instance of the variable - // First, check whether the instance contain the partition node, whi= ch is needed for distinguishing multi - // partial partition boot option. Second, check whether the instance= could be connected. - // - Instance =3D GetNextDevicePathInstance (&TempNewDevicePath, &Size); - if (MatchPartitionDevicePathNode (Instance, HardDriveDevicePath)) { - // - // Connect the device path instance, the device path point to hard= drive media device path node - // e.g. ACPI() /PCI()/ATA()/Partition() - // - Status =3D BdsLibConnectDevicePath (Instance); - if (!EFI_ERROR (Status)) { - DeviceExist =3D TRUE; - break; - } - } - // - // Come here means the first instance is not matched - // - NeedAdjust =3D TRUE; - FreePool(Instance); - } while (TempNewDevicePath !=3D NULL); - - if (DeviceExist) { - // - // Find the matched device path. - // Append the file path information from the boot option and return = the fully expanded device path. - // - DevicePath =3D NextDevicePathNode ((EFI_DEVICE_PATH_PROTOCOL *) = HardDriveDevicePath); - FullDevicePath =3D AppendDevicePath (Instance, DevicePath); - - // - // Adjust the HD_BOOT_DEVICE_PATH_VARIABLE_NAME instances sequence i= f the matched one is not first one. - // - if (NeedAdjust) { - // - // First delete the matched instance. - // - TempNewDevicePath =3D CachedDevicePath; - CachedDevicePath =3D BdsLibDelPartMatchInstance (CachedDevicePath= , Instance ); - FreePool (TempNewDevicePath); - - // - // Second, append the remaining path after the matched instance - // - TempNewDevicePath =3D CachedDevicePath; - CachedDevicePath =3D AppendDevicePathInstance (Instance, CachedDev= icePath ); - FreePool (TempNewDevicePath); - // - // Save the matching Device Path so we don't need to do a connect = all next time - // Failure to set the variable only impacts the performance when n= ext time expanding the short-form device path. - // - Status =3D gRT->SetVariable ( - HD_BOOT_DEVICE_PATH_VARIABLE_NAME, - &gHdBootDevicePathVariablGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON= _VOLATILE, - GetDevicePathSize (CachedDevicePath), - CachedDevicePath - ); - } - - FreePool (Instance); - FreePool (CachedDevicePath); - return FullDevicePath; - } - } - - // - // If we get here we fail to find or HD_BOOT_DEVICE_PATH_VARIABLE_NAME n= ot exist, and now we need - // to search all devices in the system for a matched partition - // - BdsLibConnectAllDriversToAllControllers (); - Status =3D gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid= , NULL, &BlockIoHandleCount, &BlockIoBuffer); - if (EFI_ERROR (Status) || BlockIoHandleCount =3D=3D 0 || BlockIoBuffer = =3D=3D NULL) { - // - // If there was an error or there are no device handles that support - // the BLOCK_IO Protocol, then return. - // - return NULL; - } - // - // Loop through all the device handles that support the BLOCK_IO Protocol - // - for (Index =3D 0; Index < BlockIoHandleCount; Index++) { - - Status =3D gBS->HandleProtocol (BlockIoBuffer[Index], &gEfiDevicePathP= rotocolGuid, (VOID *) &BlockIoDevicePath); - if (EFI_ERROR (Status) || BlockIoDevicePath =3D=3D NULL) { - continue; - } - - if (MatchPartitionDevicePathNode (BlockIoDevicePath, HardDriveDevicePa= th)) { - // - // Find the matched partition device path - // - DevicePath =3D NextDevicePathNode ((EFI_DEVICE_PATH_PROTOCOL *) H= ardDriveDevicePath); - FullDevicePath =3D AppendDevicePath (BlockIoDevicePath, DevicePath); - - // - // Save the matched partition device path in HD_BOOT_DEVICE_PATH_VAR= IABLE_NAME variable - // - if (CachedDevicePath !=3D NULL) { - // - // Save the matched partition device path as first instance of HD_= BOOT_DEVICE_PATH_VARIABLE_NAME variable - // - if (BdsLibMatchDevicePaths (CachedDevicePath, BlockIoDevicePath)) { - TempNewDevicePath =3D CachedDevicePath; - CachedDevicePath =3D BdsLibDelPartMatchInstance (CachedDevicePat= h, BlockIoDevicePath); - FreePool(TempNewDevicePath); - } - - if (CachedDevicePath !=3D NULL) { - TempNewDevicePath =3D CachedDevicePath; - CachedDevicePath =3D AppendDevicePathInstance (BlockIoDevicePath= , CachedDevicePath); - FreePool(TempNewDevicePath); - } else { - CachedDevicePath =3D DuplicateDevicePath (BlockIoDevicePath); - } - - // - // Here limit the device path instance number to 12, which is max = number for a system support 3 IDE controller - // If the user try to boot many OS in different HDs or partitions,= in theory,=20 - // the HD_BOOT_DEVICE_PATH_VARIABLE_NAME variable maybe become lar= ger and larger. - // - InstanceNum =3D 0; - ASSERT (CachedDevicePath !=3D NULL); - TempNewDevicePath =3D CachedDevicePath; - while (!IsDevicePathEnd (TempNewDevicePath)) { - TempNewDevicePath =3D NextDevicePathNode (TempNewDevicePath); - // - // Parse one instance - // - while (!IsDevicePathEndType (TempNewDevicePath)) { - TempNewDevicePath =3D NextDevicePathNode (TempNewDevicePath); - } - InstanceNum++; - // - // If the CachedDevicePath variable contain too much instance, o= nly remain 12 instances. - // - if (InstanceNum >=3D 12) { - SetDevicePathEndNode (TempNewDevicePath); - break; - } - } - } else { - CachedDevicePath =3D DuplicateDevicePath (BlockIoDevicePath); - } - - // - // Save the matching Device Path so we don't need to do a connect al= l next time - // Failure to set the variable only impacts the performance when nex= t time expanding the short-form device path. - // - Status =3D gRT->SetVariable ( - HD_BOOT_DEVICE_PATH_VARIABLE_NAME, - &gHdBootDevicePathVariablGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_V= OLATILE, - GetDevicePathSize (CachedDevicePath), - CachedDevicePath - ); - - break; - } - } - - if (CachedDevicePath !=3D NULL) { - FreePool (CachedDevicePath); - } - if (BlockIoBuffer !=3D NULL) { - FreePool (BlockIoBuffer); - } - return FullDevicePath; -} - -/** - Check whether there is a instance in BlockIoDevicePath, which contain mu= lti device path - instances, has the same partition node with HardDriveDevicePath device p= ath - - @param BlockIoDevicePath Multi device path instances which need to= check - @param HardDriveDevicePath A device path which starts with a hard dr= ive media - device path. - - @retval TRUE There is a matched device path instance. - @retval FALSE There is no matched device path instance. - -**/ -BOOLEAN -EFIAPI -MatchPartitionDevicePathNode ( - IN EFI_DEVICE_PATH_PROTOCOL *BlockIoDevicePath, - IN HARDDRIVE_DEVICE_PATH *HardDriveDevicePath - ) -{ - HARDDRIVE_DEVICE_PATH *TmpHdPath; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - BOOLEAN Match; - EFI_DEVICE_PATH_PROTOCOL *BlockIoHdDevicePathNode; - - if ((BlockIoDevicePath =3D=3D NULL) || (HardDriveDevicePath =3D=3D NULL)= ) { - return FALSE; - } - - // - // Make PreviousDevicePath =3D=3D the device path node before the end no= de - // - DevicePath =3D BlockIoDevicePath; - BlockIoHdDevicePathNode =3D NULL; - - // - // find the partition device path node - // - while (!IsDevicePathEnd (DevicePath)) { - if ((DevicePathType (DevicePath) =3D=3D MEDIA_DEVICE_PATH) && - (DevicePathSubType (DevicePath) =3D=3D MEDIA_HARDDRIVE_DP) - ) { - BlockIoHdDevicePathNode =3D DevicePath; - break; - } - - DevicePath =3D NextDevicePathNode (DevicePath); - } - - if (BlockIoHdDevicePathNode =3D=3D NULL) { - return FALSE; - } - // - // See if the harddrive device path in blockio matches the orig Hard Dri= ve Node - // - TmpHdPath =3D (HARDDRIVE_DEVICE_PATH *) BlockIoHdDevicePathNode; - Match =3D FALSE; - - // - // Check for the match - // - if ((TmpHdPath->MBRType =3D=3D HardDriveDevicePath->MBRType) && - (TmpHdPath->SignatureType =3D=3D HardDriveDevicePath->SignatureType)= ) { - switch (TmpHdPath->SignatureType) { - case SIGNATURE_TYPE_GUID: - Match =3D CompareGuid ((EFI_GUID *)TmpHdPath->Signature, (EFI_GUID *= )HardDriveDevicePath->Signature); - break; - case SIGNATURE_TYPE_MBR: - Match =3D (BOOLEAN)(*((UINT32 *)(&(TmpHdPath->Signature[0]))) =3D=3D= ReadUnaligned32((UINT32 *)(&(HardDriveDevicePath->Signature[0])))); - break; - default: - Match =3D FALSE; - break; - } - } - - return Match; -} - -/** - Delete the boot option associated with the handle passed in. - - @param Handle The handle which present the device path = to create - boot option - - @retval EFI_SUCCESS Delete the boot option success - @retval EFI_NOT_FOUND If the Device Path is not found in the sy= stem - @retval EFI_OUT_OF_RESOURCES Lack of memory resource - @retval Other Error return value from SetVariable() - -**/ -EFI_STATUS -BdsLibDeleteOptionFromHandle ( - IN EFI_HANDLE Handle - ) -{ - UINT16 *BootOrder; - UINT8 *BootOptionVar; - UINTN BootOrderSize; - UINTN BootOptionSize; - EFI_STATUS Status; - UINTN Index; - UINT16 BootOption[BOOT_OPTION_MAX_CHAR]; - UINTN DevicePathSize; - UINTN OptionDevicePathSize; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - EFI_DEVICE_PATH_PROTOCOL *OptionDevicePath; - UINT8 *TempPtr; - - Status =3D EFI_SUCCESS; - BootOrder =3D NULL; - BootOrderSize =3D 0; - - // - // Check "BootOrder" variable, if no, means there is no any boot order. - // - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - if (BootOrder =3D=3D NULL) { - return EFI_NOT_FOUND; - } - - // - // Convert device handle to device path protocol instance - // - DevicePath =3D DevicePathFromHandle (Handle); - if (DevicePath =3D=3D NULL) { - return EFI_NOT_FOUND; - } - DevicePathSize =3D GetDevicePathSize (DevicePath); - - // - // Loop all boot order variable and find the matching device path - // - Index =3D 0; - while (Index < BootOrderSize / sizeof (UINT16)) { - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder= [Index]); - BootOptionVar =3D BdsLibGetVariableAndSize ( - BootOption, - &gEfiGlobalVariableGuid, - &BootOptionSize - ); - - if (BootOptionVar =3D=3D NULL) { - FreePool (BootOrder); - return EFI_OUT_OF_RESOURCES; - } - - if (!ValidateOption(BootOptionVar, BootOptionSize)) { - BdsDeleteBootOption (BootOrder[Index], BootOrder, &BootOrderSize); - FreePool (BootOptionVar); - Index++; - continue; - } - - TempPtr =3D BootOptionVar; - TempPtr +=3D sizeof (UINT32) + sizeof (UINT16); - TempPtr +=3D StrSize ((CHAR16 *) TempPtr); - OptionDevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) TempPtr; - OptionDevicePathSize =3D GetDevicePathSize (OptionDevicePath); - - // - // Check whether the device path match - // - if ((OptionDevicePathSize =3D=3D DevicePathSize) && - (CompareMem (DevicePath, OptionDevicePath, DevicePathSize) =3D=3D = 0)) { - BdsDeleteBootOption (BootOrder[Index], BootOrder, &BootOrderSize); - FreePool (BootOptionVar); - break; - } - - FreePool (BootOptionVar); - Index++; - } - - // - // Adjust number of boot option for "BootOrder" variable. - // - Status =3D gRT->SetVariable ( - L"BootOrder", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - BootOrderSize, - BootOrder - ); - // - // Shrinking variable with existing variable implementation shouldn't fa= il. - // - ASSERT_EFI_ERROR (Status); - - FreePool (BootOrder); - - return Status; -} - - -/** - Delete all invalid EFI boot options. - - @retval EFI_SUCCESS Delete all invalid boot option success - @retval EFI_NOT_FOUND Variable "BootOrder" is not found - @retval EFI_OUT_OF_RESOURCES Lack of memory resource - @retval Other Error return value from SetVariable() - -**/ -EFI_STATUS -BdsDeleteAllInvalidEfiBootOption ( - VOID - ) -{ - UINT16 *BootOrder; - UINT8 *BootOptionVar; - UINTN BootOrderSize; - UINTN BootOptionSize; - EFI_STATUS Status; - UINTN Index; - UINTN Index2; - UINT16 BootOption[BOOT_OPTION_MAX_CHAR]; - EFI_DEVICE_PATH_PROTOCOL *OptionDevicePath; - UINT8 *TempPtr; - CHAR16 *Description; - BOOLEAN Corrupted; - - Status =3D EFI_SUCCESS; - BootOrder =3D NULL; - Description =3D NULL; - OptionDevicePath =3D NULL; - BootOrderSize =3D 0; - Corrupted =3D FALSE; - - // - // Check "BootOrder" variable firstly, this variable hold the number of = boot options - // - BootOrder =3D BdsLibGetVariableAndSize ( - L"BootOrder", - &gEfiGlobalVariableGuid, - &BootOrderSize - ); - if (NULL =3D=3D BootOrder) { - return EFI_NOT_FOUND; - } - - Index =3D 0; - while (Index < BootOrderSize / sizeof (UINT16)) { - UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder= [Index]); - BootOptionVar =3D BdsLibGetVariableAndSize ( - BootOption, - &gEfiGlobalVariableGuid, - &BootOptionSize - ); - if (NULL =3D=3D BootOptionVar) { - FreePool (BootOrder); - return EFI_OUT_OF_RESOURCES; - } - - if (!ValidateOption(BootOptionVar, BootOptionSize)) { - Corrupted =3D TRUE; - } else { - TempPtr =3D BootOptionVar; - TempPtr +=3D sizeof (UINT32) + sizeof (UINT16); - Description =3D (CHAR16 *) TempPtr; - TempPtr +=3D StrSize ((CHAR16 *) TempPtr); - OptionDevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) TempPtr; - - // - // Skip legacy boot option (BBS boot device) - // - if ((DevicePathType (OptionDevicePath) =3D=3D BBS_DEVICE_PATH) && - (DevicePathSubType (OptionDevicePath) =3D=3D BBS_BBS_DP)) { - FreePool (BootOptionVar); - Index++; - continue; - } - } - - if (Corrupted || !BdsLibIsValidEFIBootOptDevicePathExt (OptionDevicePa= th, FALSE, Description)) { - // - // Delete this invalid boot option "Boot####" - // - Status =3D gRT->SetVariable ( - BootOption, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTI= ME_ACCESS | EFI_VARIABLE_NON_VOLATILE, - 0, - NULL - ); - // - // Deleting variable with current variable implementation shouldn't = fail. - // - ASSERT_EFI_ERROR (Status); - // - // Mark this boot option in boot order as deleted - // - BootOrder[Index] =3D 0xffff; - Corrupted =3D FALSE; - } - - FreePool (BootOptionVar); - Index++; - } - - // - // Adjust boot order array - // - Index2 =3D 0; - for (Index =3D 0; Index < BootOrderSize / sizeof (UINT16); Index++) { - if (BootOrder[Index] !=3D 0xffff) { - BootOrder[Index2] =3D BootOrder[Index]; - Index2 ++; - } - } - Status =3D gRT->SetVariable ( - L"BootOrder", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - Index2 * sizeof (UINT16), - BootOrder - ); - // - // Shrinking variable with current variable implementation shouldn't fai= l. - // - ASSERT_EFI_ERROR (Status); - - FreePool (BootOrder); - - return Status; -} - - -/** - For EFI boot option, BDS separate them as six types: - 1. Network - The boot option points to the SimpleNetworkProtocol device. - Bds will try to automatically create this type boot option = when enumerate. - 2. Shell - The boot option points to internal flash shell. - Bds will try to automatically create this type boot option = when enumerate. - 3. Removable BlockIo - The boot option only points to the removable= media - device, like USB flash disk, DVD, Floppy etc. - These device should contain a *removable* bl= ockIo - protocol in their device handle. - Bds will try to automatically create this ty= pe boot option - when enumerate. - 4. Fixed BlockIo - The boot option only points to a Fixed block= Io device, - like HardDisk. - These device should contain a *fixed* blockIo - protocol in their device handle. - BDS will skip fixed blockIo devices, and NOT - automatically create boot option for them. B= ut BDS - will help to delete those fixed blockIo boot= option, - whose description rule conflict with other a= uto-created - boot options. - 5. Non-BlockIo Simplefile - The boot option points to a device whose han= dle - has SimpleFileSystem Protocol, but has no bl= ockio - protocol. These devices do not offer blockIo - protocol, but BDS still can get the - \EFI\BOOT\boot{machinename}.EFI by SimpleFil= eSystem - Protocol. - 6. File - The boot option points to a file. These boot options are us= ually - created by user manually or OS loader. BDS will not delete = or modify - these boot options. - - This function will enumerate all possible boot device in the system, and - automatically create boot options for Network, Shell, Removable BlockIo, - and Non-BlockIo Simplefile devices. - It will only execute once of every boot. - - @param BdsBootOptionList The header of the link list which indexed= all - current boot options - - @retval EFI_SUCCESS Finished all the boot device enumerate an= d create - the boot option base on that boot device - - @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and c= reate the boot option list -**/ -EFI_STATUS -EFIAPI -BdsLibEnumerateAllBootOption ( - IN OUT LIST_ENTRY *BdsBootOptionList - ) -{ - EFI_STATUS Status; - UINT16 FloppyNumber; - UINT16 HarddriveNumber; - UINT16 CdromNumber; - UINT16 UsbNumber; - UINT16 MiscNumber; - UINT16 ScsiNumber; - UINT16 NonBlockNumber; - UINTN NumberBlockIoHandles; - EFI_HANDLE *BlockIoHandles; - EFI_BLOCK_IO_PROTOCOL *BlkIo; - BOOLEAN Removable[2]; - UINTN RemovableIndex; - UINTN Index; - UINTN NumOfLoadFileHandles; - EFI_HANDLE *LoadFileHandles; - UINTN FvHandleCount; - EFI_HANDLE *FvHandleBuffer; - EFI_FV_FILETYPE Type; - UINTN Size; - EFI_FV_FILE_ATTRIBUTES Attributes; - UINT32 AuthenticationStatus; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - UINTN DevicePathType; - CHAR16 Buffer[40]; - EFI_HANDLE *FileSystemHandles; - UINTN NumberFileSystemHandles; - BOOLEAN NeedDelete; - EFI_IMAGE_DOS_HEADER DosHeader; - CHAR8 *PlatLang; - CHAR8 *LastLang; - EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - CHAR16 *MacStr; - CHAR16 *IPverStr; - EFI_HANDLE *NetworkHandles; - UINTN BufferSize; - - FloppyNumber =3D 0; - HarddriveNumber =3D 0; - CdromNumber =3D 0; - UsbNumber =3D 0; - MiscNumber =3D 0; - ScsiNumber =3D 0; - PlatLang =3D NULL; - LastLang =3D NULL; - ZeroMem (Buffer, sizeof (Buffer)); - - // - // If the boot device enumerate happened, just get the boot - // device from the boot order variable - // - if (mEnumBootDevice) { - GetVariable2 (LAST_ENUM_LANGUAGE_VARIABLE_NAME, &gLastEnumLangGuid, (V= OID**)&LastLang, NULL); - GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatLang, NULL); - ASSERT (PlatLang !=3D NULL); - if ((LastLang !=3D NULL) && (AsciiStrCmp (LastLang, PlatLang) =3D=3D 0= )) { - Status =3D BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder"= ); - FreePool (LastLang); - FreePool (PlatLang); - return Status; - } else { - Status =3D gRT->SetVariable ( - LAST_ENUM_LANGUAGE_VARIABLE_NAME, - &gLastEnumLangGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, - AsciiStrSize (PlatLang), - PlatLang - ); - // - // Failure to set the variable only impacts the performance next tim= e enumerating the boot options. - // - - if (LastLang !=3D NULL) { - FreePool (LastLang); - } - FreePool (PlatLang); - } - } - - // - // Notes: this dirty code is to get the legacy boot option from the - // BBS table and create to variable as the EFI boot option, it should - // be removed after the CSM can provide legacy boot option directly - // - REFRESH_LEGACY_BOOT_OPTIONS; - - // - // Delete invalid boot option - // - BdsDeleteAllInvalidEfiBootOption (); - - // - // Parse removable media followed by fixed media. - // The Removable[] array is used by the for-loop below to create removab= le media boot options=20 - // at first, and then to create fixed media boot options. - // - Removable[0] =3D FALSE; - Removable[1] =3D TRUE; - - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiBlockIoProtocolGuid, - NULL, - &NumberBlockIoHandles, - &BlockIoHandles - ); - - for (RemovableIndex =3D 0; RemovableIndex < 2; RemovableIndex++) { - for (Index =3D 0; Index < NumberBlockIoHandles; Index++) { - Status =3D gBS->HandleProtocol ( - BlockIoHandles[Index], - &gEfiBlockIoProtocolGuid, - (VOID **) &BlkIo - ); - // - // skip the logical partition - // - if (EFI_ERROR (Status) || BlkIo->Media->LogicalPartition) { - continue; - } - - // - // firstly fixed block io then the removable block io - // - if (BlkIo->Media->RemovableMedia =3D=3D Removable[RemovableIndex]) { - continue; - } - DevicePath =3D DevicePathFromHandle (BlockIoHandles[Index]); - DevicePathType =3D BdsGetBootTypeFromDevicePath (DevicePath); - - switch (DevicePathType) { - case BDS_EFI_ACPI_FLOPPY_BOOT: - if (FloppyNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY)), FloppyNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_FLOPPY))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - FloppyNumber++; - break; - - // - // Assume a removable SATA device should be the DVD/CD device, a fix= ed SATA device should be the Hard Drive device. - // - case BDS_EFI_MESSAGE_ATAPI_BOOT: - case BDS_EFI_MESSAGE_SATA_BOOT: - if (BlkIo->Media->RemovableMedia) { - if (CdromNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStr= ingById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD)), CdromNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetString= ById (STRING_TOKEN (STR_DESCRIPTION_CD_DVD))); - } - CdromNumber++; - } else { - if (HarddriveNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStr= ingById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE)), HarddriveNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetString= ById (STRING_TOKEN (STR_DESCRIPTION_HARDDRIVE))); - } - HarddriveNumber++; - } - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Buffer: %S\n", Buffer)); - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - break; - - case BDS_EFI_MESSAGE_USB_DEVICE_BOOT: - if (UsbNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_USB)), UsbNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_USB))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - UsbNumber++; - break; - - case BDS_EFI_MESSAGE_SCSI_BOOT: - if (ScsiNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_SCSI)), ScsiNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_SCSI))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - ScsiNumber++; - break; - - case BDS_EFI_MESSAGE_MISC_BOOT: - default: - if (MiscNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStrin= gById (STRING_TOKEN (STR_DESCRIPTION_MISC)), MiscNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_MISC))); - } - BdsLibBuildOptionFromHandle (BlockIoHandles[Index], BdsBootOptionL= ist, Buffer); - MiscNumber++; - break; - } - } - } - - if (NumberBlockIoHandles !=3D 0) { - FreePool (BlockIoHandles); - } - - // - // If there is simple file protocol which does not consume block Io prot= ocol, create a boot option for it here. - // - NonBlockNumber =3D 0; - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiSimpleFileSystemProtocolGuid, - NULL, - &NumberFileSystemHandles, - &FileSystemHandles - ); - for (Index =3D 0; Index < NumberFileSystemHandles; Index++) { - Status =3D gBS->HandleProtocol ( - FileSystemHandles[Index], - &gEfiBlockIoProtocolGuid, - (VOID **) &BlkIo - ); - if (!EFI_ERROR (Status)) { - // - // Skip if the file system handle supports a BlkIo protocol, - // - continue; - } - - // - // Do the removable Media thing. \EFI\BOOT\boot{machinename}.EFI - // machinename is ia32, ia64, x64, ... - // - Hdr.Union =3D &HdrData; - NeedDelete =3D TRUE; - Status =3D BdsLibGetImageHeader ( - FileSystemHandles[Index], - EFI_REMOVABLE_MEDIA_FILE_NAME, - &DosHeader, - Hdr - ); - if (!EFI_ERROR (Status) && - EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Hdr.Pe32->FileHeader.Machine) && - Hdr.Pe32->OptionalHeader.Subsystem =3D=3D EFI_IMAGE_SUBSYSTEM_EFI_= APPLICATION) { - NeedDelete =3D FALSE; - } - - if (NeedDelete) { - // - // No such file or the file is not a EFI application, delete this bo= ot option - // - BdsLibDeleteOptionFromHandle (FileSystemHandles[Index]); - } else { - if (NonBlockNumber !=3D 0) { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s %d", BdsLibGetStringB= yId (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK)), NonBlockNumber); - } else { - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s", BdsLibGetStringById= (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK))); - } - BdsLibBuildOptionFromHandle (FileSystemHandles[Index], BdsBootOption= List, Buffer); - NonBlockNumber++; - } - } - - if (NumberFileSystemHandles !=3D 0) { - FreePool (FileSystemHandles); - } - - // - // Parse Network Boot Device - // - NumOfLoadFileHandles =3D 0; - // - // Search Load File protocol for PXE boot option. - // - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiLoadFileProtocolGuid, - NULL, - &NumOfLoadFileHandles, - &LoadFileHandles - ); - - for (Index =3D 0; Index < NumOfLoadFileHandles; Index++) { - -// -//Locate EFI_DEVICE_PATH_PROTOCOL to dynamically get IPv4/IPv6 protocol in= formation. -// - - Status =3D gBS->HandleProtocol ( - LoadFileHandles[Index], - &gEfiDevicePathProtocolGuid, - (VOID **) &DevicePath - ); - =20 - ASSERT_EFI_ERROR (Status); - - while (!IsDevicePathEnd (DevicePath)) { - if ((DevicePath->Type =3D=3D MESSAGING_DEVICE_PATH) && - (DevicePath->SubType =3D=3D MSG_IPv4_DP)) { - - // - //Get handle infomation - // - BufferSize =3D 0; - NetworkHandles =3D NULL; - Status =3D gBS->LocateHandle ( - ByProtocol,=20 - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - NetworkHandles =3D AllocateZeroPool(BufferSize); - if (NetworkHandles =3D=3D NULL) { - return (EFI_OUT_OF_RESOURCES); - } - Status =3D gBS->LocateHandle( - ByProtocol, - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - } - =20 - // - //Get the MAC string - // - Status =3D NetLibGetMacString ( - *NetworkHandles, - NULL, - &MacStr - ); - if (EFI_ERROR (Status)) {=09 - return Status; - } - IPverStr =3D L" IPv4"; - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s%s%s", BdsLibGetStringById (= STRING_TOKEN (STR_DESCRIPTION_NETWORK)),MacStr,IPverStr); - break; - } - if((DevicePath->Type =3D=3D MESSAGING_DEVICE_PATH) && - (DevicePath->SubType =3D=3D MSG_IPv6_DP)) { - - // - //Get handle infomation - // - BufferSize =3D 0; - NetworkHandles =3D NULL; - Status =3D gBS->LocateHandle ( - ByProtocol,=20 - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - NetworkHandles =3D AllocateZeroPool(BufferSize); - if (NetworkHandles =3D=3D NULL) { - return (EFI_OUT_OF_RESOURCES); - } - Status =3D gBS->LocateHandle( - ByProtocol, - &gEfiSimpleNetworkProtocolGuid, - NULL, - &BufferSize, - NetworkHandles - ); - } - =20 - // - //Get the MAC string - // - Status =3D NetLibGetMacString ( - *NetworkHandles, - NULL, - &MacStr - ); - if (EFI_ERROR (Status)) {=09 - return Status; - } - IPverStr =3D L" IPv6"; - UnicodeSPrint (Buffer, sizeof (Buffer), L"%s%s%s", BdsLibGetStringBy= Id (STRING_TOKEN (STR_DESCRIPTION_NETWORK)),MacStr,IPverStr); - break; - } - DevicePath =3D NextDevicePathNode (DevicePath); - } - =20 - BdsLibBuildOptionFromHandle (LoadFileHandles[Index], BdsBootOptionList= , Buffer); - } - - if (NumOfLoadFileHandles !=3D 0) { - FreePool (LoadFileHandles); - } - - // - // Check if we have on flash shell - // - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &FvHandleCount, - &FvHandleBuffer - ); - for (Index =3D 0; Index < FvHandleCount; Index++) { - gBS->HandleProtocol ( - FvHandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - - Status =3D Fv->ReadFile ( - Fv, - &gUefiShellFileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (EFI_ERROR (Status)) { - // - // Skip if no shell file in the FV - // - continue; - } - // - // Build the shell boot option - // - BdsLibBuildOptionFromShell (FvHandleBuffer[Index], BdsBootOptionList); - } - - if (FvHandleCount !=3D 0) { - FreePool (FvHandleBuffer); - } - // - // Make sure every boot only have one time - // boot device enumerate - // - Status =3D BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder"); - mEnumBootDevice =3D TRUE; - - return Status; -} - -/** - Build the boot option with the handle parsed in - - @param Handle The handle which present the device path = to create - boot option - @param BdsBootOptionList The header of the link list which indexed= all - current boot options - @param String The description of the boot option. - -**/ -VOID -EFIAPI -BdsLibBuildOptionFromHandle ( - IN EFI_HANDLE Handle, - IN LIST_ENTRY *BdsBootOptionList, - IN CHAR16 *String - ) -{ - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - - DevicePath =3D DevicePathFromHandle (Handle); - - // - // Create and register new boot option - // - BdsLibRegisterNewOption (BdsBootOptionList, DevicePath, String, L"BootOr= der"); -} - - -/** - Build the on flash shell boot option with the handle parsed in. - - @param Handle The handle which present the device path = to create - on flash shell boot option - @param BdsBootOptionList The header of the link list which indexed= all - current boot options - -**/ -VOID -EFIAPI -BdsLibBuildOptionFromShell ( - IN EFI_HANDLE Handle, - IN OUT LIST_ENTRY *BdsBootOptionList - ) -{ - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH ShellNode; - - DevicePath =3D DevicePathFromHandle (Handle); - - // - // Build the shell device path - // - EfiInitializeFwVolDevicepathNode (&ShellNode, &gUefiShellFileGuid); - - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *) &ShellNode); - - // - // Create and register the shell boot option - // - BdsLibRegisterNewOption (BdsBootOptionList, DevicePath, L"EFI Internal S= hell", L"BootOrder"); - -} - -/** - Boot from the UEFI spec defined "BootNext" variable. - -**/ -VOID -EFIAPI -BdsLibBootNext ( - VOID - ) -{ - EFI_STATUS Status; - UINT16 *BootNext; - UINTN BootNextSize; - CHAR16 Buffer[20]; - BDS_COMMON_OPTION *BootOption; - LIST_ENTRY TempList; - UINTN ExitDataSize; - CHAR16 *ExitData; - - // - // Init the boot option name buffer and temp link list - // - InitializeListHead (&TempList); - ZeroMem (Buffer, sizeof (Buffer)); - - BootNext =3D BdsLibGetVariableAndSize ( - L"BootNext", - &gEfiGlobalVariableGuid, - &BootNextSize - ); - - // - // Clear the boot next variable first - // - if (BootNext !=3D NULL) { - Status =3D gRT->SetVariable ( - L"BootNext", - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME= _ACCESS | EFI_VARIABLE_NON_VOLATILE, - 0, - NULL - ); - // - // Deleting variable with current variable implementation shouldn't fa= il. - // - ASSERT_EFI_ERROR (Status); - - // - // Start to build the boot option and try to boot - // - UnicodeSPrint (Buffer, sizeof (Buffer), L"Boot%04x", *BootNext); - BootOption =3D BdsLibVariableToOption (&TempList, Buffer); - ASSERT (BootOption !=3D NULL); - BdsLibConnectDevicePath (BootOption->DevicePath); - BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitData= Size, &ExitData); - FreePool(BootOption); - FreePool(BootNext); - } - -} - -/** - Return the bootable media handle. - First, check the device is connected - Second, check whether the device path point to a device which support Si= mpleFileSystemProtocol, - Third, detect the the default boot file in the Media, and return the rem= ovable Media handle. - - @param DevicePath Device Path to a bootable device - - @return The bootable media handle. If the media on the DevicePath is no= t bootable, NULL will return. - -**/ -EFI_HANDLE -EFIAPI -BdsLibGetBootableHandle ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - EFI_STATUS Status; - EFI_TPL OldTpl; - EFI_DEVICE_PATH_PROTOCOL *UpdatedDevicePath; - EFI_DEVICE_PATH_PROTOCOL *DupDevicePath; - EFI_HANDLE Handle; - EFI_BLOCK_IO_PROTOCOL *BlockIo; - VOID *Buffer; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - UINTN Size; - UINTN TempSize; - EFI_HANDLE ReturnHandle; - EFI_HANDLE *SimpleFileSystemHandles; - - UINTN NumberSimpleFileSystemHandles; - UINTN Index; - EFI_IMAGE_DOS_HEADER DosHeader; - EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - - UpdatedDevicePath =3D DevicePath; - - // - // Enter to critical section to protect the acquired BlockIo instance=20 - // from getting released due to the USB mass storage hotplug event - // - OldTpl =3D gBS->RaiseTPL (TPL_CALLBACK); - - // - // Check whether the device is connected - // - Status =3D gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &UpdatedDevi= cePath, &Handle); - if (EFI_ERROR (Status)) { - // - // Skip the case that the boot option point to a simple file protocol = which does not consume block Io protocol, - // - Status =3D gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &= UpdatedDevicePath, &Handle); - if (EFI_ERROR (Status)) { - // - // Fail to find the proper BlockIo and simple file protocol, maybe b= ecause device not present, we need to connect it firstly - // - UpdatedDevicePath =3D DevicePath; - Status =3D gBS->LocateDevicePath (&gEfiDevicePathProtocol= Guid, &UpdatedDevicePath, &Handle); - gBS->ConnectController (Handle, NULL, NULL, TRUE); - } - } else { - // - // For removable device boot option, its contained device path only po= int to the removable device handle,=20 - // should make sure all its children handles (its child partion or med= ia handles) are created and connected.=20 - // - gBS->ConnectController (Handle, NULL, NULL, TRUE);=20 - // - // Get BlockIo protocol and check removable attribute - // - Status =3D gBS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOI= D **)&BlockIo); - ASSERT_EFI_ERROR (Status); - - // - // Issue a dummy read to the device to check for media change. - // When the removable media is changed, any Block IO read/write will - // cause the BlockIo protocol be reinstalled and EFI_MEDIA_CHANGED is - // returned. After the Block IO protocol is reinstalled, subsequent - // Block IO read/write will success. - // - Buffer =3D AllocatePool (BlockIo->Media->BlockSize); - if (Buffer !=3D NULL) { - BlockIo->ReadBlocks ( - BlockIo, - BlockIo->Media->MediaId, - 0, - BlockIo->Media->BlockSize, - Buffer - ); - FreePool(Buffer); - } - } - - // - // Detect the the default boot file from removable Media - // - - // - // If fail to get bootable handle specified by a USB boot option, the BD= S should try to find other bootable device in the same USB bus - // Try to locate the USB node device path first, if fail then use its pr= evious PCI node to search - // - DupDevicePath =3D DuplicateDevicePath (DevicePath); - ASSERT (DupDevicePath !=3D NULL); - - UpdatedDevicePath =3D DupDevicePath; - Status =3D gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &UpdatedD= evicePath, &Handle); - // - // if the resulting device path point to a usb node, and the usb node is= a dummy node, should only let device path only point to the previous Pci n= ode - // Acpi()/Pci()/Usb() --> Acpi()/Pci() - // - if ((DevicePathType (UpdatedDevicePath) =3D=3D MESSAGING_DEVICE_PATH) && - (DevicePathSubType (UpdatedDevicePath) =3D=3D MSG_USB_DP)) { - // - // Remove the usb node, let the device path only point to PCI node - // - SetDevicePathEndNode (UpdatedDevicePath); - UpdatedDevicePath =3D DupDevicePath; - } else { - UpdatedDevicePath =3D DevicePath; - } - - // - // Get the device path size of boot option - // - Size =3D GetDevicePathSize(UpdatedDevicePath) - sizeof (EFI_DEVICE_PATH_= PROTOCOL); // minus the end node - ReturnHandle =3D NULL; - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiSimpleFileSystemProtocolGuid, - NULL, - &NumberSimpleFileSystemHandles, - &SimpleFileSystemHandles - ); - for (Index =3D 0; Index < NumberSimpleFileSystemHandles; Index++) { - // - // Get the device path size of SimpleFileSystem handle - // - TempDevicePath =3D DevicePathFromHandle (SimpleFileSystemHandles[Index= ]); - TempSize =3D GetDevicePathSize (TempDevicePath)- sizeof (EFI_DEVICE_PA= TH_PROTOCOL); // minus the end node - // - // Check whether the device path of boot option is part of the Simple= FileSystem handle's device path - // - if (Size <=3D TempSize && CompareMem (TempDevicePath, UpdatedDevicePat= h, Size)=3D=3D0) { - // - // Load the default boot file \EFI\BOOT\boot{machinename}.EFI from r= emovable Media - // machinename is ia32, ia64, x64, ... - // - Hdr.Union =3D &HdrData; - Status =3D BdsLibGetImageHeader ( - SimpleFileSystemHandles[Index], - EFI_REMOVABLE_MEDIA_FILE_NAME, - &DosHeader, - Hdr - ); - if (!EFI_ERROR (Status) && - EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Hdr.Pe32->FileHeader.Machine) && - Hdr.Pe32->OptionalHeader.Subsystem =3D=3D EFI_IMAGE_SUBSYSTEM_EFI_= APPLICATION) { - ReturnHandle =3D SimpleFileSystemHandles[Index]; - break; - } - } - } - - FreePool(DupDevicePath); - - if (SimpleFileSystemHandles !=3D NULL) { - FreePool(SimpleFileSystemHandles); - } - - gBS->RestoreTPL (OldTpl); - - return ReturnHandle; -} - -/** - Check to see if the network cable is plugged in. If the DevicePath is not - connected it will be connected. - - @param DevicePath Device Path to check - - @retval TRUE DevicePath points to an Network that is c= onnected - @retval FALSE DevicePath does not point to a bootable n= etwork - -**/ -BOOLEAN -BdsLibNetworkBootWithMediaPresent ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *UpdatedDevicePath; - EFI_HANDLE Handle; - EFI_SIMPLE_NETWORK_PROTOCOL *Snp; - BOOLEAN MediaPresent; - UINT32 InterruptStatus; - - MediaPresent =3D FALSE; - - UpdatedDevicePath =3D DevicePath; - // - // Locate Load File Protocol for PXE boot option first - // - Status =3D gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &UpdatedDev= icePath, &Handle); - if (EFI_ERROR (Status)) { - // - // Device not present so see if we need to connect it - // - Status =3D BdsLibConnectDevicePath (DevicePath); - if (!EFI_ERROR (Status)) { - // - // This one should work after we did the connect - // - Status =3D gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &Update= dDevicePath, &Handle); - } - } - - if (!EFI_ERROR (Status)) { - Status =3D gBS->HandleProtocol (Handle, &gEfiSimpleNetworkProtocolGuid= , (VOID **)&Snp); - if (EFI_ERROR (Status)) { - // - // Failed to open SNP from this handle, try to get SNP from parent h= andle - // - UpdatedDevicePath =3D DevicePathFromHandle (Handle); - if (UpdatedDevicePath !=3D NULL) { - Status =3D gBS->LocateDevicePath (&gEfiSimpleNetworkProtocolGuid, = &UpdatedDevicePath, &Handle); - if (!EFI_ERROR (Status)) { - // - // SNP handle found, get SNP from it - // - Status =3D gBS->HandleProtocol (Handle, &gEfiSimpleNetworkProtoc= olGuid, (VOID **) &Snp); - } - } - } - - if (!EFI_ERROR (Status)) { - if (Snp->Mode->MediaPresentSupported) { - if (Snp->Mode->State =3D=3D EfiSimpleNetworkInitialized) { - // - // Invoke Snp->GetStatus() to refresh the media status - // - Snp->GetStatus (Snp, &InterruptStatus, NULL); - - // - // In case some one else is using the SNP check to see if it's c= onnected - // - MediaPresent =3D Snp->Mode->MediaPresent; - } else { - // - // No one is using SNP so we need to Start and Initialize so - // MediaPresent will be valid. - // - Status =3D Snp->Start (Snp); - if (!EFI_ERROR (Status)) { - Status =3D Snp->Initialize (Snp, 0, 0); - if (!EFI_ERROR (Status)) { - MediaPresent =3D Snp->Mode->MediaPresent; - Snp->Shutdown (Snp); - } - Snp->Stop (Snp); - } - } - } else { - MediaPresent =3D TRUE; - } - } - } - - return MediaPresent; -} - -/** - For a bootable Device path, return its boot type. - - @param DevicePath The bootable device Path to check - - @retval BDS_EFI_MEDIA_HD_BOOT If given device path contains ME= DIA_DEVICE_PATH type device path node - which subtype is MEDIA_HARDDRIVE= _DP - @retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains ME= DIA_DEVICE_PATH type device path node - which subtype is MEDIA_CDROM_DP - @retval BDS_EFI_ACPI_FLOPPY_BOOT If given device path contains AC= PI_DEVICE_PATH type device path node - which HID is floppy device. - @retval BDS_EFI_MESSAGE_ATAPI_BOOT If given device path contains ME= SSAGING_DEVICE_PATH type device path node - and its last device path node's = subtype is MSG_ATAPI_DP. - @retval BDS_EFI_MESSAGE_SCSI_BOOT If given device path contains ME= SSAGING_DEVICE_PATH type device path node - and its last device path node's = subtype is MSG_SCSI_DP. - @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT If given device path contains ME= SSAGING_DEVICE_PATH type device path node - and its last device path node's = subtype is MSG_USB_DP. - @retval BDS_EFI_MESSAGE_MISC_BOOT If the device path not contains = any media device path node, and - its last device path node point = to a message device path node. - @retval BDS_LEGACY_BBS_BOOT If given device path contains BB= S_DEVICE_PATH type device path node. - @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device = path not point to a media and message device, - -**/ -UINT32 -EFIAPI -BdsGetBootTypeFromDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath - ) -{ - ACPI_HID_DEVICE_PATH *Acpi; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode; - UINT32 BootType; - - if (NULL =3D=3D DevicePath) { - return BDS_EFI_UNSUPPORT; - } - - TempDevicePath =3D DevicePath; - - while (!IsDevicePathEndType (TempDevicePath)) { - switch (DevicePathType (TempDevicePath)) { - case BBS_DEVICE_PATH: - return BDS_LEGACY_BBS_BOOT; - case MEDIA_DEVICE_PATH: - if (DevicePathSubType (TempDevicePath) =3D=3D MEDIA_HARDDRIVE_DP) { - return BDS_EFI_MEDIA_HD_BOOT; - } else if (DevicePathSubType (TempDevicePath) =3D=3D MEDIA_CDROM_D= P) { - return BDS_EFI_MEDIA_CDROM_BOOT; - } - break; - case ACPI_DEVICE_PATH: - Acpi =3D (ACPI_HID_DEVICE_PATH *) TempDevicePath; - if (EISA_ID_TO_NUM (Acpi->HID) =3D=3D 0x0604) { - return BDS_EFI_ACPI_FLOPPY_BOOT; - } - break; - case MESSAGING_DEVICE_PATH: - // - // Get the last device path node - // - LastDeviceNode =3D NextDevicePathNode (TempDevicePath); - if (DevicePathSubType(LastDeviceNode) =3D=3D MSG_DEVICE_LOGICAL_UN= IT_DP) { - // - // if the next node type is Device Logical Unit, which specify t= he Logical Unit Number (LUN), - // skip it - // - LastDeviceNode =3D NextDevicePathNode (LastDeviceNode); - } - // - // if the device path not only point to driver device, it is not a= messaging device path, - // - if (!IsDevicePathEndType (LastDeviceNode)) { - break; - } - - switch (DevicePathSubType (TempDevicePath)) { - case MSG_ATAPI_DP: - BootType =3D BDS_EFI_MESSAGE_ATAPI_BOOT; - break; - - case MSG_USB_DP: - BootType =3D BDS_EFI_MESSAGE_USB_DEVICE_BOOT; - break; - - case MSG_SCSI_DP: - BootType =3D BDS_EFI_MESSAGE_SCSI_BOOT; - break; - - case MSG_SATA_DP: - BootType =3D BDS_EFI_MESSAGE_SATA_BOOT; - break; - - case MSG_MAC_ADDR_DP: - case MSG_VLAN_DP: - case MSG_IPv4_DP: - case MSG_IPv6_DP: - BootType =3D BDS_EFI_MESSAGE_MAC_BOOT; - break; - - default: - BootType =3D BDS_EFI_MESSAGE_MISC_BOOT; - break; - } - return BootType; - - default: - break; - } - TempDevicePath =3D NextDevicePathNode (TempDevicePath); - } - - return BDS_EFI_UNSUPPORT; -} - -/** - Check whether the Device path in a boot option point to a valid bootable= device, - And if CheckMedia is true, check the device is ready to boot now. - - @param DevPath the Device path in a boot option - @param CheckMedia if true, check the device is ready to boot now. - - @retval TRUE the Device path is valid - @retval FALSE the Device path is invalid . - -**/ -BOOLEAN -EFIAPI -BdsLibIsValidEFIBootOptDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *DevPath, - IN BOOLEAN CheckMedia - ) -{ - return BdsLibIsValidEFIBootOptDevicePathExt (DevPath, CheckMedia, NULL); -} - -/** - Check whether the Device path in a boot option point to a valid bootable= device, - And if CheckMedia is true, check the device is ready to boot now. - If Description is not NULL and the device path point to a fixed BlockIo - device, check the description whether conflict with other auto-created - boot options. - - @param DevPath the Device path in a boot option - @param CheckMedia if true, check the device is ready to boot now. - @param Description the description in a boot option - - @retval TRUE the Device path is valid - @retval FALSE the Device path is invalid . - -**/ -BOOLEAN -EFIAPI -BdsLibIsValidEFIBootOptDevicePathExt ( - IN EFI_DEVICE_PATH_PROTOCOL *DevPath, - IN BOOLEAN CheckMedia, - IN CHAR16 *Description - ) -{ - EFI_STATUS Status; - EFI_HANDLE Handle; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode; - EFI_BLOCK_IO_PROTOCOL *BlockIo; - - TempDevicePath =3D DevPath; - LastDeviceNode =3D DevPath; - - // - // Check if it's a valid boot option for network boot device. - // Check if there is EfiLoadFileProtocol installed.=20 - // If yes, that means there is a boot option for network. - // - Status =3D gBS->LocateDevicePath ( - &gEfiLoadFileProtocolGuid, - &TempDevicePath, - &Handle - ); - if (EFI_ERROR (Status)) { - // - // Device not present so see if we need to connect it - // - TempDevicePath =3D DevPath; - BdsLibConnectDevicePath (TempDevicePath); - Status =3D gBS->LocateDevicePath ( - &gEfiLoadFileProtocolGuid, - &TempDevicePath, - &Handle - ); - } - - if (!EFI_ERROR (Status)) { - if (!IsDevicePathEnd (TempDevicePath)) { - // - // LoadFile protocol is not installed on handle with exactly the sam= e DevPath - // - return FALSE; - } - - if (CheckMedia) { - // - // Test if it is ready to boot now - // - if (BdsLibNetworkBootWithMediaPresent(DevPath)) { - return TRUE; - } - } else { - return TRUE; - } =20 - } - - // - // If the boot option point to a file, it is a valid EFI boot option, - // and assume it is ready to boot now - // - while (!IsDevicePathEnd (TempDevicePath)) { - // - // If there is USB Class or USB WWID device path node, treat it as val= id EFI - // Boot Option. BdsExpandUsbShortFormDevicePath () will be used to exp= and it - // to full device path. - // - if ((DevicePathType (TempDevicePath) =3D=3D MESSAGING_DEVICE_PATH) && - ((DevicePathSubType (TempDevicePath) =3D=3D MSG_USB_CLASS_DP) || - (DevicePathSubType (TempDevicePath) =3D=3D MSG_USB_WWID_DP))) { - return TRUE; - } - - LastDeviceNode =3D TempDevicePath; - TempDevicePath =3D NextDevicePathNode (TempDevicePath); - } - if ((DevicePathType (LastDeviceNode) =3D=3D MEDIA_DEVICE_PATH) && - (DevicePathSubType (LastDeviceNode) =3D=3D MEDIA_FILEPATH_DP)) { - return TRUE; - } - - // - // Check if it's a valid boot option for internal FV application - // - if (EfiGetNameGuidFromFwVolDevicePathNode ((MEDIA_FW_VOL_FILEPATH_DEVICE= _PATH *) LastDeviceNode) !=3D NULL) { - // - // If the boot option point to internal FV application, make sure it i= s valid - // - TempDevicePath =3D DevPath; - Status =3D BdsLibUpdateFvFileDevicePath ( - &TempDevicePath, - EfiGetNameGuidFromFwVolDevicePathNode ((MEDIA_FW_VOL_FILEPA= TH_DEVICE_PATH *) LastDeviceNode) - ); - if (Status =3D=3D EFI_ALREADY_STARTED) { - return TRUE; - } else { - if (Status =3D=3D EFI_SUCCESS) { - FreePool (TempDevicePath); - } - return FALSE; - } - } - - // - // If the boot option point to a blockIO device: - // if it is a removable blockIo device, it is valid. - // if it is a fixed blockIo device, check its description confliction. - // - TempDevicePath =3D DevPath; - Status =3D gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDeviceP= ath, &Handle); - if (EFI_ERROR (Status)) { - // - // Device not present so see if we need to connect it - // - Status =3D BdsLibConnectDevicePath (DevPath); - if (!EFI_ERROR (Status)) { - // - // Try again to get the Block Io protocol after we did the connect - // - TempDevicePath =3D DevPath; - Status =3D gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDev= icePath, &Handle); - } - } - - if (!EFI_ERROR (Status)) { - Status =3D gBS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOI= D **)&BlockIo); - if (!EFI_ERROR (Status)) { - if (CheckMedia) { - // - // Test if it is ready to boot now - // - if (BdsLibGetBootableHandle (DevPath) !=3D NULL) { - return TRUE; - } - } else { - return TRUE; - } - } - } else { - // - // if the boot option point to a simple file protocol which does not c= onsume block Io protocol, it is also a valid EFI boot option, - // - Status =3D gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &= TempDevicePath, &Handle); - if (!EFI_ERROR (Status)) { - if (CheckMedia) { - // - // Test if it is ready to boot now - // - if (BdsLibGetBootableHandle (DevPath) !=3D NULL) { - return TRUE; - } - } else { - return TRUE; - } - } - } - - return FALSE; -} - - -/** - According to a file guild, check a Fv file device path is valid. If it i= s invalid, - try to return the valid device path. - FV address maybe changes for memory layout adjust from time to time, use= this function - could promise the Fv file device path is right. - - @param DevicePath on input, the Fv file device path need to= check on - output, the updated valid Fv file device = path - @param FileGuid the Fv file guild - - @retval EFI_INVALID_PARAMETER the input DevicePath or FileGuid is inval= id - parameter - @retval EFI_UNSUPPORTED the input DevicePath does not contain Fv = file - guild at all - @retval EFI_ALREADY_STARTED the input DevicePath has pointed to Fv fi= le, it is - valid - @retval EFI_SUCCESS has successfully updated the invalid Devi= cePath, - and return the updated device path in Dev= icePath - -**/ -EFI_STATUS -EFIAPI -BdsLibUpdateFvFileDevicePath ( - IN OUT EFI_DEVICE_PATH_PROTOCOL ** DevicePath, - IN EFI_GUID *FileGuid - ) -{ - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; - EFI_DEVICE_PATH_PROTOCOL *LastDeviceNode; - EFI_STATUS Status; - EFI_GUID *GuidPoint; - UINTN Index; - UINTN FvHandleCount; - EFI_HANDLE *FvHandleBuffer; - EFI_FV_FILETYPE Type; - UINTN Size; - EFI_FV_FILE_ATTRIBUTES Attributes; - UINT32 AuthenticationStatus; - BOOLEAN FindFvFile; - EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FvFileNode; - EFI_HANDLE FoundFvHandle; - EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; - - if ((DevicePath =3D=3D NULL) || (*DevicePath =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - if (FileGuid =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - // - // Check whether the device path point to the default the input Fv file - // - TempDevicePath =3D *DevicePath; - LastDeviceNode =3D TempDevicePath; - while (!IsDevicePathEnd (TempDevicePath)) { - LastDeviceNode =3D TempDevicePath; - TempDevicePath =3D NextDevicePathNode (TempDevicePath); - } - GuidPoint =3D EfiGetNameGuidFromFwVolDevicePathNode ( - (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) LastDeviceNode - ); - if (GuidPoint =3D=3D NULL) { - // - // if this option does not points to a Fv file, just return EFI_UNSUPP= ORTED - // - return EFI_UNSUPPORTED; - } - if (!CompareGuid (GuidPoint, FileGuid)) { - // - // If the Fv file is not the input file guid, just return EFI_UNSUPPOR= TED - // - return EFI_UNSUPPORTED; - } - - // - // Check whether the input Fv file device path is valid - // - TempDevicePath =3D *DevicePath; - FoundFvHandle =3D NULL; - Status =3D gBS->LocateDevicePath ( - &gEfiFirmwareVolume2ProtocolGuid, - &TempDevicePath, - &FoundFvHandle - ); - if (!EFI_ERROR (Status)) { - Status =3D gBS->HandleProtocol ( - FoundFvHandle, - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - if (!EFI_ERROR (Status)) { - // - // Set FV ReadFile Buffer as NULL, only need to check whether input = Fv file exist there - // - Status =3D Fv->ReadFile ( - Fv, - FileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (!EFI_ERROR (Status)) { - return EFI_ALREADY_STARTED; - } - } - } - - // - // Look for the input wanted FV file in current FV - // First, try to look for in Bds own FV. Bds and input wanted FV file us= ually are in the same FV - // - FindFvFile =3D FALSE; - FoundFvHandle =3D NULL; - Status =3D gBS->HandleProtocol ( - gImageHandle, - &gEfiLoadedImageProtocolGuid, - (VOID **) &LoadedImage - ); - if (!EFI_ERROR (Status)) { - Status =3D gBS->HandleProtocol ( - LoadedImage->DeviceHandle, - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - if (!EFI_ERROR (Status)) { - Status =3D Fv->ReadFile ( - Fv, - FileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (!EFI_ERROR (Status)) { - FindFvFile =3D TRUE; - FoundFvHandle =3D LoadedImage->DeviceHandle; - } - } - } - // - // Second, if fail to find, try to enumerate all FV - // - if (!FindFvFile) { - FvHandleBuffer =3D NULL; - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &FvHandleCount, - &FvHandleBuffer - ); - for (Index =3D 0; Index < FvHandleCount; Index++) { - gBS->HandleProtocol ( - FvHandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv - ); - - Status =3D Fv->ReadFile ( - Fv, - FileGuid, - NULL, - &Size, - &Type, - &Attributes, - &AuthenticationStatus - ); - if (EFI_ERROR (Status)) { - // - // Skip if input Fv file not in the FV - // - continue; - } - FindFvFile =3D TRUE; - FoundFvHandle =3D FvHandleBuffer[Index]; - break; - } - - if (FvHandleBuffer !=3D NULL) { - FreePool (FvHandleBuffer); - } - } - - if (FindFvFile) { - // - // Build the shell device path - // - NewDevicePath =3D DevicePathFromHandle (FoundFvHandle); - EfiInitializeFwVolDevicepathNode (&FvFileNode, FileGuid); - NewDevicePath =3D AppendDevicePathNode (NewDevicePath, (EFI_DEVICE_PAT= H_PROTOCOL *) &FvFileNode); - ASSERT (NewDevicePath !=3D NULL); - *DevicePath =3D NewDevicePath; - return EFI_SUCCESS; - } - return EFI_NOT_FOUND; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/BdsConnect.c b/Platform/Intel/Vlv2TbltDevicePkg/O= verride/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c deleted file mode 100644 index dfeefc01b8..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/BdsConnect.c +++ /dev/null @@ -1,429 +0,0 @@ -/** @file - BDS Lib functions which relate with connect the device - -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalBdsLib.h" - - -/** - This function will connect all the system driver to controller - first, and then special connect the default console, this make - sure all the system controller available and the platform default - console connected. - -**/ -VOID -EFIAPI -BdsLibConnectAll ( - VOID - ) -{ - // - // Connect the platform console first - // - BdsLibConnectAllDefaultConsoles (); - - // - // Generic way to connect all the drivers - // - BdsLibConnectAllDriversToAllControllers (); - - // - // Here we have the assumption that we have already had - // platform default console - // - BdsLibConnectAllDefaultConsoles (); -} - - -/** - This function will connect all the system drivers to all controllers - first, and then connect all the console devices the system current - have. After this we should get all the device work and console available - if the system have console device. - -**/ -VOID -BdsLibGenericConnectAll ( - VOID - ) -{ - // - // Most generic way to connect all the drivers - // - BdsLibConnectAllDriversToAllControllers (); - BdsLibConnectAllConsoles (); -} - -/** - This function will create all handles associate with every device - path node. If the handle associate with one device path node can not - be created successfully, then still give chance to do the dispatch, - which load the missing drivers if possible. - - @param DevicePathToConnect The device path which will be connected, i= t can be - a multi-instance device path - - @retval EFI_SUCCESS All handles associate with every device pa= th node - have been created - @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles - @retval EFI_NOT_FOUND Create the handle associate with one devic= e path - node failed - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - EFI_DEVICE_PATH_PROTOCOL *CopyOfDevicePath; - EFI_DEVICE_PATH_PROTOCOL *Instance; - EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath; - EFI_DEVICE_PATH_PROTOCOL *Next; - EFI_HANDLE Handle; - EFI_HANDLE PreviousHandle; - UINTN Size; - EFI_TPL CurrentTpl; - - if (DevicePathToConnect =3D=3D NULL) { - return EFI_SUCCESS; - } - - CurrentTpl =3D EfiGetCurrentTpl (); - - DevicePath =3D DuplicateDevicePath (DevicePathToConnect); - if (DevicePath =3D=3D NULL) { - return EFI_OUT_OF_RESOURCES; - } - CopyOfDevicePath =3D DevicePath; - =20 - do { - // - // The outer loop handles multi instance device paths. - // Only console variables contain multiple instance device paths. - // - // After this call DevicePath points to the next Instance - // - Instance =3D GetNextDevicePathInstance (&DevicePath, &Size); - if (Instance =3D=3D NULL) { - FreePool (CopyOfDevicePath); - return EFI_OUT_OF_RESOURCES; - } - =20 - Next =3D Instance; - while (!IsDevicePathEndType (Next)) { - Next =3D NextDevicePathNode (Next); - } - - SetDevicePathEndNode (Next); - - // - // Start the real work of connect with RemainingDevicePath - // - PreviousHandle =3D NULL; - do { - // - // Find the handle that best matches the Device Path. If it is only a - // partial match the remaining part of the device path is returned in - // RemainingDevicePath. - // - RemainingDevicePath =3D Instance; - Status =3D gBS->LocateDevicePath (&gEfiDevicePathProtoc= olGuid, &RemainingDevicePath, &Handle); - - if (!EFI_ERROR (Status)) { - if (Handle =3D=3D PreviousHandle) { - // - // If no forward progress is made try invoking the Dispatcher. - // A new FV may have been added to the system an new drivers - // may now be found. - // Status =3D=3D EFI_SUCCESS means a driver was dispatched - // Status =3D=3D EFI_NOT_FOUND means no new drivers were dispatc= hed - // - if (CurrentTpl =3D=3D TPL_APPLICATION) { - // - // Dispatch calls LoadImage/StartImage which cannot run at TPL= > TPL_APPLICATION - // - Status =3D gDS->Dispatch (); - } else { - // - // Always return EFI_NOT_FOUND here - // to prevent dead loop when control handle is found but conne= ction failded case - // - Status =3D EFI_NOT_FOUND; - } - } - - if (!EFI_ERROR (Status)) { - PreviousHandle =3D Handle; - // - // Connect all drivers that apply to Handle and RemainingDeviceP= ath, - // the Recursive flag is FALSE so only one level will be expande= d. - // - // Do not check the connect status here, if the connect controll= er fail, - // then still give the chance to do dispatch, because partial - // RemainingDevicepath may be in the new FV - // - // 1. If the connect fail, RemainingDevicepath and handle will n= ot - // change, so next time will do the dispatch, then dispatch's= status - // will take effect - // 2. If the connect success, the RemainingDevicepath and handle= will - // change, then avoid the dispatch, we have chance to continu= e the - // next connection - // - gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE= ); - } - } - // - // Loop until RemainingDevicePath is an empty device path - // - } while (!EFI_ERROR (Status) && !IsDevicePathEnd (RemainingDevicePath)= ); - - } while (DevicePath !=3D NULL); - - if (CopyOfDevicePath !=3D NULL) { - FreePool (CopyOfDevicePath); - } - // - // All handle with DevicePath exists in the handle database - // - return Status; -} - -/** - This function will connect all current system handles recursively.=20 - =20 - gBS->ConnectController() service is invoked for each handle exist in sys= tem handler buffer. - If the handle is bus type handler, all childrens also will be connected = recursively - by gBS->ConnectController(). - - @retval EFI_SUCCESS All handles and it's child handle have bee= n connected - @retval EFI_STATUS Error status returned by of gBS->LocateHan= dleBuffer(). - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectAllEfi ( - VOID - ) -{ - EFI_STATUS Status; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - UINTN Index; - - Status =3D gBS->LocateHandleBuffer ( - AllHandles, - NULL, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TR= UE); - } - - if (HandleBuffer !=3D NULL) { - FreePool (HandleBuffer); - } - - return EFI_SUCCESS; -} - -/** - This function will disconnect all current system handles.=20 - =20 - gBS->DisconnectController() is invoked for each handle exists in system = handle buffer. - If handle is a bus type handle, all childrens also are disconnected recu= rsively by - gBS->DisconnectController(). - - @retval EFI_SUCCESS All handles have been disconnected - @retval EFI_STATUS Error status returned by of gBS->LocateHan= dleBuffer(). - -**/ -EFI_STATUS -EFIAPI -BdsLibDisconnectAllEfi ( - VOID - ) -{ - EFI_STATUS Status; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - UINTN Index; - - // - // Disconnect all - // - Status =3D gBS->LocateHandleBuffer ( - AllHandles, - NULL, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index =3D 0; Index < HandleCount; Index++) { - Status =3D gBS->DisconnectController (HandleBuffer[Index], NULL, NULL); - } - - if (HandleBuffer !=3D NULL) { - FreePool (HandleBuffer); - } - - return EFI_SUCCESS; -} - - -/** - Connects all drivers to all controllers. - This function make sure all the current system driver will manage - the correspoinding controllers if have. And at the same time, make - sure all the system controllers have driver to manage it if have. - -**/ -VOID -EFIAPI -BdsLibConnectAllDriversToAllControllers ( - VOID - ) -{ - EFI_STATUS Status; - - do { - // - // Connect All EFI 1.10 drivers following EFI 1.10 algorithm - // - BdsLibConnectAllEfi (); - - // - // Check to see if it's possible to dispatch an more DXE drivers. - // The BdsLibConnectAllEfi () may have made new DXE drivers show up. - // If anything is Dispatched Status =3D=3D EFI_SUCCESS and we will try - // the connect again. - // - Status =3D gDS->Dispatch (); - - } while (!EFI_ERROR (Status)); - -} - - -/** - Connect the specific Usb device which match the short form device path, - and whose bus is determined by Host Controller (Uhci or Ehci). - - @param HostControllerPI Uhci (0x00) or Ehci (0x20) or Both uhci an= d ehci - (0xFF) - @param RemainingDevicePath a short-form device path that starts with = the first - element being a USB WWID or a USB Class d= evice - path - - @return EFI_INVALID_PARAMETER RemainingDevicePath is NULL pointer. - RemainingDevicePath is not a USB device p= ath. - Invalid HostControllerPI type. - @return EFI_SUCCESS Success to connect USB device - @return EFI_NOT_FOUND Fail to find handle for USB controller to= connect. - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectUsbDevByShortFormDP( - IN UINT8 HostControllerPI, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ) -{ - EFI_STATUS Status; - EFI_HANDLE *HandleArray; - UINTN HandleArrayCount; - UINTN Index; - EFI_PCI_IO_PROTOCOL *PciIo; - UINT8 Class[3]; - BOOLEAN AtLeastOneConnected; - - // - // Check the passed in parameters - // - if (RemainingDevicePath =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - if ((DevicePathType (RemainingDevicePath) !=3D MESSAGING_DEVICE_PATH) || - ((DevicePathSubType (RemainingDevicePath) !=3D MSG_USB_CLASS_DP) - && (DevicePathSubType (RemainingDevicePath) !=3D MSG_USB_WWID_DP) - )) { - return EFI_INVALID_PARAMETER; - } - - if (HostControllerPI !=3D 0xFF && - HostControllerPI !=3D 0x00 && - HostControllerPI !=3D 0x20) { - return EFI_INVALID_PARAMETER; - } - - // - // Find the usb host controller firstly, then connect with the remaining= device path - // - AtLeastOneConnected =3D FALSE; - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiPciIoProtocolGuid, - NULL, - &HandleArrayCount, - &HandleArray - ); - if (!EFI_ERROR (Status)) { - for (Index =3D 0; Index < HandleArrayCount; Index++) { - Status =3D gBS->HandleProtocol ( - HandleArray[Index], - &gEfiPciIoProtocolGuid, - (VOID **)&PciIo - ); - if (!EFI_ERROR (Status)) { - // - // Check whether the Pci device is the wanted usb host controller - // - Status =3D PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &C= lass); - if (!EFI_ERROR (Status)) { - if ((PCI_CLASS_SERIAL =3D=3D Class[2]) && - (PCI_CLASS_SERIAL_USB =3D=3D Class[1])) { - if (HostControllerPI =3D=3D Class[0] || HostControllerPI =3D= =3D 0xFF) { - Status =3D gBS->ConnectController ( - HandleArray[Index], - NULL, - RemainingDevicePath, - FALSE - ); - if (!EFI_ERROR(Status)) { - AtLeastOneConnected =3D TRUE; - } - } - } - } - } - } - - if (HandleArray !=3D NULL) { - FreePool (HandleArray); - } - - if (AtLeastOneConnected) { - return EFI_SUCCESS; - } - } - - return EFI_NOT_FOUND; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/BdsConsole.c b/Platform/Intel/Vlv2TbltDevicePkg/O= verride/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c deleted file mode 100644 index 2fffd9e4bc..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/BdsConsole.c +++ /dev/null @@ -1,1061 +0,0 @@ -/** @file - BDS Lib functions which contain all the code to connect console device - -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalBdsLib.h" - - -/** - Check if we need to save the EFI variable with "ConVarName" as name - as NV type - If ConVarName is NULL, then ASSERT(). - =20 - @param ConVarName The name of the EFI variable. - - @retval TRUE Set the EFI variable as NV type. - @retval FALSE EFI variable as NV type can be set NonNV. -**/ -BOOLEAN -IsNvNeed ( - IN CHAR16 *ConVarName - ) -{ - CHAR16 *Ptr; - - ASSERT (ConVarName !=3D NULL); - =20 - Ptr =3D ConVarName; - - // - // If the variable includes "Dev" at last, we consider - // it does not support NV attribute. - // - while (*Ptr !=3D L'\0') { - Ptr++; - } - - if (((INTN)((UINTN)Ptr - (UINTN)ConVarName) / sizeof (CHAR16)) <=3D 3) { - return TRUE; - } - =20 - if ((*(Ptr - 3) =3D=3D 'D') && (*(Ptr - 2) =3D=3D 'e') && (*(Ptr - 1) = =3D=3D 'v')) { - return FALSE; - } else { - return TRUE; - } -} - -/** - Fill console handle in System Table if there are no valid console handle= in. - - Firstly, check the validation of console handle in System Table. If it i= s invalid, - update it by the first console device handle from EFI console variable.=20 - - @param VarName The name of the EFI console variable. - @param ConsoleGuid Specified Console protocol GUID. - @param ConsoleHandle On IN, console handle in System Table to be = checked.=20 - On OUT, new console handle in system table. - @param ProtocolInterface On IN, console protocol on console handle in= System Table to be checked.=20 - On OUT, new console protocol on new console h= andle in system table. - - @retval TRUE System Table has been updated. - @retval FALSE System Table hasn't been updated. - -**/ -BOOLEAN=20 -UpdateSystemTableConsole ( - IN CHAR16 *VarName, - IN EFI_GUID *ConsoleGuid, - IN OUT EFI_HANDLE *ConsoleHandle, - IN OUT VOID **ProtocolInterface - ) -{ - EFI_STATUS Status; - UINTN DevicePathSize; - EFI_DEVICE_PATH_PROTOCOL *FullDevicePath; - EFI_DEVICE_PATH_PROTOCOL *VarConsole; - EFI_DEVICE_PATH_PROTOCOL *Instance; - VOID *Interface; - EFI_HANDLE NewHandle; - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut; - - ASSERT (VarName !=3D NULL); - ASSERT (ConsoleHandle !=3D NULL); - ASSERT (ConsoleGuid !=3D NULL); - ASSERT (ProtocolInterface !=3D NULL); - - if (*ConsoleHandle !=3D NULL) { - Status =3D gBS->HandleProtocol ( - *ConsoleHandle, - ConsoleGuid, - &Interface - ); - if (Status =3D=3D EFI_SUCCESS && Interface =3D=3D *ProtocolInterface) { - // - // If ConsoleHandle is valid and console protocol on this handle also - // also matched, just return. - // - return FALSE; - } - } - =20 - // - // Get all possible consoles device path from EFI variable - // - VarConsole =3D BdsLibGetVariableAndSize ( - VarName, - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - if (VarConsole =3D=3D NULL) { - // - // If there is no any console device, just return. - // - return FALSE; - } - - FullDevicePath =3D VarConsole; - - do { - // - // Check every instance of the console variable - // - Instance =3D GetNextDevicePathInstance (&VarConsole, &DevicePathSize); - if (Instance =3D=3D NULL) { - FreePool (FullDevicePath); - ASSERT (FALSE); - } - =20 - // - // Find console device handle by device path instance - // - Status =3D gBS->LocateDevicePath ( - ConsoleGuid, - &Instance, - &NewHandle - ); - if (!EFI_ERROR (Status)) { - // - // Get the console protocol on this console device handle - // - Status =3D gBS->HandleProtocol ( - NewHandle, - ConsoleGuid, - &Interface - ); - if (!EFI_ERROR (Status)) { - // - // Update new console handle in System Table. - // - *ConsoleHandle =3D NewHandle; - *ProtocolInterface =3D Interface; - if (CompareGuid (ConsoleGuid, &gEfiSimpleTextOutProtocolGuid)) { - // - // If it is console out device, set console mode 80x25 if curren= t mode is invalid. - // - TextOut =3D (EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *) Interface; - if (TextOut->Mode->Mode =3D=3D -1) { - TextOut->SetMode (TextOut, 0); - } - } - return TRUE; - } - } - - } while (Instance !=3D NULL); - - // - // No any available console devcie found. - // - return FALSE; -} - -/** - This function update console variable based on ConVarName, it can - add or remove one specific console device path from the variable - - @param ConVarName Console related variable name, ConIn, C= onOut, - ErrOut. - @param CustomizedConDevicePath The console device path which will be a= dded to - the console variable ConVarName, this p= arameter - can not be multi-instance. - @param ExclusiveDevicePath The console device path which will be r= emoved - from the console variable ConVarName, t= his - parameter can not be multi-instance. - - @retval EFI_UNSUPPORTED The added device path is same to the re= moved one. - @retval EFI_SUCCESS Success add or remove the device path f= rom the - console variable. - -**/ -EFI_STATUS -EFIAPI -BdsLibUpdateConsoleVariable ( - IN CHAR16 *ConVarName, - IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath, - IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *VarConsole; - UINTN DevicePathSize; - EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; - EFI_DEVICE_PATH_PROTOCOL *TempNewDevicePath; - UINT32 Attributes; - - VarConsole =3D NULL; - DevicePathSize =3D 0; - - // - // Notes: check the device path point, here should check - // with compare memory - // - if (CustomizedConDevicePath =3D=3D ExclusiveDevicePath) { - return EFI_UNSUPPORTED; - } - // - // Delete the ExclusiveDevicePath from current default console - // - VarConsole =3D BdsLibGetVariableAndSize ( - ConVarName, - &gEfiGlobalVariableGuid, - &DevicePathSize - ); - - // - // Initialize NewDevicePath - // - NewDevicePath =3D VarConsole; - - // - // If ExclusiveDevicePath is even the part of the instance in VarConsole= , delete it. - // In the end, NewDevicePath is the final device path. - // - if (ExclusiveDevicePath !=3D NULL && VarConsole !=3D NULL) { - NewDevicePath =3D BdsLibDelPartMatchInstance (VarConsole, ExclusiveD= evicePath); - } - // - // Try to append customized device path to NewDevicePath. - // - if (CustomizedConDevicePath !=3D NULL) { - if (!BdsLibMatchDevicePaths (NewDevicePath, CustomizedConDevicePath)) { - // - // Check if there is part of CustomizedConDevicePath in NewDevicePat= h, delete it. - // - NewDevicePath =3D BdsLibDelPartMatchInstance (NewDevicePath, Customi= zedConDevicePath); - // - // In the first check, the default console variable will be _ModuleE= ntryPoint, - // just append current customized device path - // - TempNewDevicePath =3D NewDevicePath; - NewDevicePath =3D AppendDevicePathInstance (NewDevicePath, Customize= dConDevicePath); - if (TempNewDevicePath !=3D NULL) { - FreePool(TempNewDevicePath); - } - } - } - - // - // The attribute for ConInDev, ConOutDev and ErrOutDev does not include = NV. - // - if (IsNvNeed(ConVarName)) { - // - // ConVarName has NV attribute. - // - Attributes =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_= ACCESS | EFI_VARIABLE_NON_VOLATILE; - } else { - // - // ConVarName does not have NV attribute. - // - Attributes =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_= ACCESS; - } - - // - // Finally, Update the variable of the default console by NewDevicePath - // - DevicePathSize =3D GetDevicePathSize (NewDevicePath); - Status =3D SetVariableAndReportStatusCodeOnError ( - ConVarName, - &gEfiGlobalVariableGuid, - Attributes, - DevicePathSize, - NewDevicePath - ); - if ((DevicePathSize =3D=3D 0) && (Status =3D=3D EFI_NOT_FOUND)) { - Status =3D EFI_SUCCESS; - } - - if (VarConsole =3D=3D NewDevicePath) { - if (VarConsole !=3D NULL) { - FreePool(VarConsole); - } - } else { - if (VarConsole !=3D NULL) { - FreePool(VarConsole); - } - if (NewDevicePath !=3D NULL) { - FreePool(NewDevicePath); - } - } - - return Status; - -} - - -/** - Connect the console device base on the variable ConVarName, if - device path of the ConVarName is multi-instance device path and - anyone of the instances is connected success, then this function - will return success. - If the handle associate with one device path node can not - be created successfully, then still give chance to do the dispatch, - which load the missing drivers if possible.. - - @param ConVarName Console related variable name, ConIn, C= onOut, - ErrOut. - - @retval EFI_NOT_FOUND There is not any console devices connec= ted - success - @retval EFI_SUCCESS Success connect any one instance of the= console - device path base on the variable ConVar= Name. - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectConsoleVariable ( - IN CHAR16 *ConVarName - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH_PROTOCOL *StartDevicePath; - UINTN VariableSize; - EFI_DEVICE_PATH_PROTOCOL *Instance; - EFI_DEVICE_PATH_PROTOCOL *Next; - EFI_DEVICE_PATH_PROTOCOL *CopyOfDevicePath; - UINTN Size; - BOOLEAN DeviceExist; - - Status =3D EFI_SUCCESS; - DeviceExist =3D FALSE; - - // - // Check if the console variable exist - // - StartDevicePath =3D BdsLibGetVariableAndSize ( - ConVarName, - &gEfiGlobalVariableGuid, - &VariableSize - ); - if (StartDevicePath =3D=3D NULL) { - return EFI_UNSUPPORTED; - } - - CopyOfDevicePath =3D StartDevicePath; - do { - // - // Check every instance of the console variable - // - Instance =3D GetNextDevicePathInstance (&CopyOfDevicePath, &Size); - if (Instance =3D=3D NULL) { - FreePool (StartDevicePath); - return EFI_UNSUPPORTED; - } - =20 - Next =3D Instance; - while (!IsDevicePathEndType (Next)) { - Next =3D NextDevicePathNode (Next); - } - - SetDevicePathEndNode (Next); - // - // Connect the USB console - // USB console device path is a short-form device path that=20 - // starts with the first element being a USB WWID - // or a USB Class device path - // - if ((DevicePathType (Instance) =3D=3D MESSAGING_DEVICE_PATH) && - ((DevicePathSubType (Instance) =3D=3D MSG_USB_CLASS_DP) - || (DevicePathSubType (Instance) =3D=3D MSG_USB_WWID_DP) - )) { - Status =3D BdsLibConnectUsbDevByShortFormDP (0xFF, Instance); - if (!EFI_ERROR (Status)) { - DeviceExist =3D TRUE; - } - } else { - // - // Connect the instance device path - // - Status =3D BdsLibConnectDevicePath (Instance); - - if (EFI_ERROR (Status)) { - // - // Delete the instance from the console varialbe - // - BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance); - } else { - DeviceExist =3D TRUE; - } - } - FreePool(Instance); - } while (CopyOfDevicePath !=3D NULL); - - FreePool (StartDevicePath); - - if (!DeviceExist) { - return EFI_NOT_FOUND; - } - - return EFI_SUCCESS; -} - -/** - This function will search every simpletext device in current system, - and make every simpletext device as pertantial console device. - -**/ -VOID -EFIAPI -BdsLibConnectAllConsoles ( - VOID - ) -{ - UINTN Index; - EFI_DEVICE_PATH_PROTOCOL *ConDevicePath; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - - Index =3D 0; - HandleCount =3D 0; - HandleBuffer =3D NULL; - ConDevicePath =3D NULL; - - // - // Update all the console variables - // - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiSimpleTextInProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - - for (Index =3D 0; Index < HandleCount; Index++) { - gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiDevicePathProtocolGuid, - (VOID **) &ConDevicePath - ); - BdsLibUpdateConsoleVariable (L"ConIn", ConDevicePath, NULL); - } - - if (HandleBuffer !=3D NULL) { - FreePool(HandleBuffer); - HandleBuffer =3D NULL; - } - - gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiSimpleTextOutProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - for (Index =3D 0; Index < HandleCount; Index++) { - gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiDevicePathProtocolGuid, - (VOID **) &ConDevicePath - ); - BdsLibUpdateConsoleVariable (L"ConOut", ConDevicePath, NULL); - BdsLibUpdateConsoleVariable (L"ErrOut", ConDevicePath, NULL); - } - - if (HandleBuffer !=3D NULL) { - FreePool(HandleBuffer); - } - - // - // Connect all console variables - // - BdsLibConnectAllDefaultConsoles (); - -} - -/** - This function will connect console device base on the console - device variable ConIn, ConOut and ErrOut. - - @retval EFI_SUCCESS At least one of the ConIn and ConOut de= vice have - been connected success. - @retval EFI_STATUS Return the status of BdsLibConnectConso= leVariable (). - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectAllDefaultConsoles ( - VOID - ) -{ - EFI_STATUS Status; - BOOLEAN SystemTableUpdated; - - // - // Connect all default console variables - // - - // - // It seems impossible not to have any ConOut device on platform, - // so we check the status here. - // - Status =3D BdsLibConnectConsoleVariable (L"ConOut"); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Insert the performance probe for Console Out - // - PERF_START (NULL, "ConOut", "BDS", 1); - PERF_END (NULL, "ConOut", "BDS", 0); - - // - // Because possibly the platform is legacy free, in such case, - // ConIn devices (Serial Port and PS2 Keyboard ) does not exist, - // so we need not check the status. - // - BdsLibConnectConsoleVariable (L"ConIn"); - - // - // The _ModuleEntryPoint err out var is legal. - // - BdsLibConnectConsoleVariable (L"ErrOut"); - - SystemTableUpdated =3D FALSE; - // - // Fill console handles in System Table if no console device assignd. - // - if (UpdateSystemTableConsole (L"ConIn", &gEfiSimpleTextInProtocolGuid, &= gST->ConsoleInHandle, (VOID **) &gST->ConIn)) { - SystemTableUpdated =3D TRUE; - } - if (UpdateSystemTableConsole (L"ConOut", &gEfiSimpleTextOutProtocolGuid,= &gST->ConsoleOutHandle, (VOID **) &gST->ConOut)) { - SystemTableUpdated =3D TRUE; - } - if (UpdateSystemTableConsole (L"ErrOut", &gEfiSimpleTextOutProtocolGuid,= &gST->StandardErrorHandle, (VOID **) &gST->StdErr)) { - SystemTableUpdated =3D TRUE; - } - - if (SystemTableUpdated) { - // - // Update the CRC32 in the EFI System Table header - // - gST->Hdr.CRC32 =3D 0; - gBS->CalculateCrc32 ( - (UINT8 *) &gST->Hdr, - gST->Hdr.HeaderSize, - &gST->Hdr.CRC32 - ); - } - - // - // If any component set PcdTestKeyUsed to TRUE because use of a test key - // was detected, then display a warning message on the debug log and the= console - // - if (PcdGetBool (PcdTestKeyUsed) =3D=3D TRUE) { - DEBUG ((DEBUG_ERROR, "**********************************\n")); - DEBUG ((DEBUG_ERROR, "** WARNING: Test Key is used. **\n")); - DEBUG ((DEBUG_ERROR, "**********************************\n")); - Print (L"** WARNING: Test Key is used. **\n"); - } - - return EFI_SUCCESS; - -} - -/** - This function will connect console device except ConIn base on the conso= le - device variable ConOut and ErrOut. - - @retval EFI_SUCCESS At least one of the ConOut device have - been connected success. - @retval EFI_STATUS Return the status of BdsLibConnectConso= leVariable (). - -**/ -EFI_STATUS -EFIAPI -BdsLibConnectAllDefaultConsolesWithOutConIn ( - VOID - ) -{ - EFI_STATUS Status; - BOOLEAN SystemTableUpdated; - - // - // Connect all default console variables except ConIn - // - - // - // It seems impossible not to have any ConOut device on platform, - // so we check the status here. - // - Status =3D BdsLibConnectConsoleVariable (L"ConOut"); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Insert the performance probe for Console Out - // - PERF_START (NULL, "ConOut", "BDS", 1); - PERF_END (NULL, "ConOut", "BDS", 0); - - // - // The _ModuleEntryPoint err out var is legal. - // - BdsLibConnectConsoleVariable (L"ErrOut"); - - SystemTableUpdated =3D FALSE; - // - // Fill console handles in System Table if no console device assignd. - // - if (UpdateSystemTableConsole (L"ConOut", &gEfiSimpleTextOutProtocolGuid,= &gST->ConsoleOutHandle, (VOID **) &gST->ConOut)) { - SystemTableUpdated =3D TRUE; - } - if (UpdateSystemTableConsole (L"ErrOut", &gEfiSimpleTextOutProtocolGuid,= &gST->StandardErrorHandle, (VOID **) &gST->StdErr)) { - SystemTableUpdated =3D TRUE; - } - - if (SystemTableUpdated) { - // - // Update the CRC32 in the EFI System Table header - // - gST->Hdr.CRC32 =3D 0; - gBS->CalculateCrc32 ( - (UINT8 *) &gST->Hdr, - gST->Hdr.HeaderSize, - &gST->Hdr.CRC32 - ); - } - - return EFI_SUCCESS; - -} - -/** - Use SystemTable Conout to stop video based Simple Text Out consoles from= going - to the video device. Put up LogoFile on every video device that is a con= sole. - - @param[in] LogoFile File name of logo to display on the center of the= screen. - - @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and = logo displayed. - @retval EFI_UNSUPPORTED Logo not found - -**/ -EFI_STATUS -EFIAPI -EnableQuietBoot ( - IN EFI_GUID *LogoFile - ) -{ - EFI_STATUS Status; - EFI_OEM_BADGING_PROTOCOL *Badging; - UINT32 SizeOfX; - UINT32 SizeOfY; - INTN DestX; - INTN DestY; - UINT8 *ImageData; - UINTN ImageSize; - UINTN BltSize; - UINT32 Instance; - EFI_BADGING_FORMAT Format; - EFI_BADGING_DISPLAY_ATTRIBUTE Attribute; - UINTN CoordinateX; - UINTN CoordinateY; - UINTN Height; - UINTN Width; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; - UINT32 ColorDepth; - UINT32 RefreshRate; - EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_BOOT_LOGO_PROTOCOL *BootLogo; - UINTN NumberOfLogos; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LogoBlt; - UINTN LogoDestX; - UINTN LogoDestY; - UINTN LogoHeight; - UINTN LogoWidth; - UINTN NewDestX; - UINTN NewDestY; - UINTN NewHeight; - UINTN NewWidth; - UINT64 BufferSize; - - UgaDraw =3D NULL; - // - // Try to open GOP first - // - Status =3D gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutp= utProtocolGuid, (VOID **) &GraphicsOutput); - if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) { - GraphicsOutput =3D NULL; - // - // Open GOP failed, try to open UGA - // - Status =3D gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiUgaDrawPro= tocolGuid, (VOID **) &UgaDraw); - } - if (EFI_ERROR (Status)) { - return EFI_UNSUPPORTED; - } - - // - // Try to open Boot Logo Protocol. - // - BootLogo =3D NULL; - gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (VOID **) &BootLog= o); - - // - // Erase Cursor from screen - // - gST->ConOut->EnableCursor (gST->ConOut, FALSE); - - Badging =3D NULL; - Status =3D gBS->LocateProtocol (&gEfiOEMBadgingProtocolGuid, NULL, (VOI= D **) &Badging); - - if (GraphicsOutput !=3D NULL) { - SizeOfX =3D GraphicsOutput->Mode->Info->HorizontalResolution; - SizeOfY =3D GraphicsOutput->Mode->Info->VerticalResolution; - - } else if (UgaDraw !=3D NULL && FeaturePcdGet (PcdUgaConsumeSupport)) { - Status =3D UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth,= &RefreshRate); - if (EFI_ERROR (Status)) { - return EFI_UNSUPPORTED; - } - } else { - return EFI_UNSUPPORTED; - } - - Blt =3D NULL; - NumberOfLogos =3D 0; - LogoDestX =3D 0; - LogoDestY =3D 0; - LogoHeight =3D 0; - LogoWidth =3D 0; - NewDestX =3D 0; - NewDestY =3D 0; - NewHeight =3D 0; - NewWidth =3D 0; - Instance =3D 0; - while (1) { - ImageData =3D NULL; - ImageSize =3D 0; - - if (Badging !=3D NULL) { - // - // Get image from OEMBadging protocol. - // - Status =3D Badging->GetImage ( - Badging, - &Instance, - &Format, - &ImageData, - &ImageSize, - &Attribute, - &CoordinateX, - &CoordinateY - ); - if (EFI_ERROR (Status)) { - goto Done; - } - - // - // Currently only support BMP format. - // - if (Format !=3D EfiBadgingFormatBMP) { - if (ImageData !=3D NULL) { - FreePool (ImageData); - } - continue; - } - } else { - // - // Get the specified image from FV. - // - Status =3D GetSectionFromAnyFv (LogoFile, EFI_SECTION_RAW, 0, (VOID = **) &ImageData, &ImageSize); - if (EFI_ERROR (Status)) { - return EFI_UNSUPPORTED; - } - - CoordinateX =3D 0; - CoordinateY =3D 0; - if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) { - Attribute =3D EfiBadgingDisplayAttributeCenter; - } else { - Attribute =3D EfiBadgingDisplayAttributeCustomized; - }=20 - } - - if (Blt !=3D NULL) { - FreePool (Blt); - } - Blt =3D NULL; - Status =3D TranslateBmpToGopBlt ( - ImageData, - ImageSize, - &Blt, - &BltSize, - &Height, - &Width - ); - if (EFI_ERROR (Status)) { - FreePool (ImageData); - - if (Badging =3D=3D NULL) { - return Status; - } else { - continue; - } - } - - // - // Calculate the display position according to Attribute. - // - switch (Attribute) { - case EfiBadgingDisplayAttributeLeftTop: - DestX =3D CoordinateX; - DestY =3D CoordinateY; - break; - - case EfiBadgingDisplayAttributeCenterTop: - DestX =3D (SizeOfX - Width) / 2; - DestY =3D CoordinateY; - break; - - case EfiBadgingDisplayAttributeRightTop: - DestX =3D (SizeOfX - Width - CoordinateX); - DestY =3D CoordinateY;; - break; - - case EfiBadgingDisplayAttributeCenterRight: - DestX =3D (SizeOfX - Width - CoordinateX); - DestY =3D (SizeOfY - Height) / 2; - break; - - case EfiBadgingDisplayAttributeRightBottom: - DestX =3D (SizeOfX - Width - CoordinateX); - DestY =3D (SizeOfY - Height - CoordinateY); - break; - - case EfiBadgingDisplayAttributeCenterBottom: - DestX =3D (SizeOfX - Width) / 2; - DestY =3D (SizeOfY - Height - CoordinateY); - break; - - case EfiBadgingDisplayAttributeLeftBottom: - DestX =3D CoordinateX; - DestY =3D (SizeOfY - Height - CoordinateY); - break; - - case EfiBadgingDisplayAttributeCenterLeft: - DestX =3D CoordinateX; - DestY =3D (SizeOfY - Height) / 2; - break; - - case EfiBadgingDisplayAttributeCenter: - DestX =3D (SizeOfX - Width) / 2; - DestY =3D (SizeOfY - Height) / 2; - break; - - case EfiBadgingDisplayAttributeCustomized: - DestX =3D (SizeOfX - Width) / 2; - DestY =3D ((SizeOfY * 382) / 1000) - Height / 2; - break; - - default: - DestX =3D CoordinateX; - DestY =3D CoordinateY; - break; - } - - if ((DestX >=3D 0) && (DestY >=3D 0)) { - if (GraphicsOutput !=3D NULL) { - Status =3D GraphicsOutput->Blt ( - GraphicsOutput, - Blt, - EfiBltBufferToVideo, - 0, - 0, - (UINTN) DestX, - (UINTN) DestY, - Width, - Height, - Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) - ); - } else if (UgaDraw !=3D NULL && FeaturePcdGet (PcdUgaConsumeSupport)= ) { - Status =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *) Blt, - EfiUgaBltBufferToVideo, - 0, - 0, - (UINTN) DestX, - (UINTN) DestY, - Width, - Height, - Width * sizeof (EFI_UGA_PIXEL) - ); - } else { - Status =3D EFI_UNSUPPORTED; - } - - // - // Report displayed Logo information. - // - if (!EFI_ERROR (Status)) { - NumberOfLogos++; - - if (LogoWidth =3D=3D 0) { - // - // The first Logo. - // - LogoDestX =3D (UINTN) DestX; - LogoDestY =3D (UINTN) DestY; - LogoWidth =3D Width; - LogoHeight =3D Height; - } else { - // - // Merge new logo with old one. - // - NewDestX =3D MIN ((UINTN) DestX, LogoDestX); - NewDestY =3D MIN ((UINTN) DestY, LogoDestY); - NewWidth =3D MAX ((UINTN) DestX + Width, LogoDestX + LogoWidth) = - NewDestX; - NewHeight =3D MAX ((UINTN) DestY + Height, LogoDestY + LogoHeigh= t) - NewDestY; - - LogoDestX =3D NewDestX; - LogoDestY =3D NewDestY; - LogoWidth =3D NewWidth; - LogoHeight =3D NewHeight; - } - } - } - - FreePool (ImageData); - - if (Badging =3D=3D NULL) { - break; - } - } - -Done: - if (BootLogo =3D=3D NULL || NumberOfLogos =3D=3D 0) { - // - // No logo displayed. - // - if (Blt !=3D NULL) { - FreePool (Blt); - } - - return Status; - } - - // - // Advertise displayed Logo information. - // - if (NumberOfLogos =3D=3D 1) { - // - // Only one logo displayed, use its Blt buffer directly for BootLogo p= rotocol. - // - LogoBlt =3D Blt; - Status =3D EFI_SUCCESS; - } else { - // - // More than one Logo displayed, get merged BltBuffer using VideoToBuf= fer operation.=20 - // - if (Blt !=3D NULL) { - FreePool (Blt); - } - - // - // Ensure the LogoHeight * LogoWidth doesn't overflow - // - if (LogoHeight > DivU64x64Remainder ((UINTN) ~0, LogoWidth, NULL)) { - return EFI_UNSUPPORTED; - } - BufferSize =3D MultU64x64 (LogoWidth, LogoHeight); - - // - // Ensure the BufferSize * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) does= n't overflow - // - if (BufferSize > DivU64x32 ((UINTN) ~0, sizeof (EFI_GRAPHICS_OUTPUT_BL= T_PIXEL))) { - return EFI_UNSUPPORTED; - } - - LogoBlt =3D AllocateZeroPool ((UINTN)BufferSize * sizeof (EFI_GRAPHICS= _OUTPUT_BLT_PIXEL)); - if (LogoBlt =3D=3D NULL) { - return EFI_OUT_OF_RESOURCES; - } - - if (GraphicsOutput !=3D NULL) { - Status =3D GraphicsOutput->Blt ( - GraphicsOutput, - LogoBlt, - EfiBltVideoToBltBuffer, - LogoDestX, - LogoDestY, - 0, - 0, - LogoWidth, - LogoHeight, - LogoWidth * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXE= L) - ); - } else if (UgaDraw !=3D NULL && FeaturePcdGet (PcdUgaConsumeSupport)) { - Status =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *) LogoBlt, - EfiUgaVideoToBltBuffer, - LogoDestX, - LogoDestY, - 0, - 0, - LogoWidth, - LogoHeight, - LogoWidth * sizeof (EFI_UGA_PIXEL) - ); - } else { - Status =3D EFI_UNSUPPORTED; - } - } - - if (!EFI_ERROR (Status)) { - BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWi= dth, LogoHeight); - } - FreePool (LogoBlt); - - return Status; -} - -/** - Use SystemTable Conout to turn on video based Simple Text Out consoles. = The=20 - Simple Text Out screens will now be synced up with all non video output = devices - - @retval EFI_SUCCESS UGA devices are back in text mode and synced up. - -**/ -EFI_STATUS -EFIAPI -DisableQuietBoot ( - VOID - ) -{ - - // - // Enable Cursor on Screen - // - gST->ConOut->EnableCursor (gST->ConOut, TRUE); - return EFI_SUCCESS; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/BdsMisc.c b/Platform/Intel/Vlv2TbltDevicePkg/Over= ride/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c deleted file mode 100644 index 313a1ea9f6..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/BdsMisc.c +++ /dev/null @@ -1,1575 +0,0 @@ -/** @file - Misc BDS library function - -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalBdsLib.h" - - -#define MAX_STRING_LEN 200 - -BOOLEAN mFeaturerSwitch =3D TRUE; -BOOLEAN mResetRequired =3D FALSE; - -extern UINT16 gPlatformBootTimeOutDefault; - -/** - The function will go through the driver option link list, load and start - every driver the driver option device path point to. - - @param BdsDriverLists The header of the current driver option li= nk list - -**/ -VOID -EFIAPI -BdsLibLoadDrivers ( - IN LIST_ENTRY *BdsDriverLists - ) -{ - EFI_STATUS Status; - LIST_ENTRY *Link; - BDS_COMMON_OPTION *Option; - EFI_HANDLE ImageHandle; - EFI_LOADED_IMAGE_PROTOCOL *ImageInfo; - UINTN ExitDataSize; - CHAR16 *ExitData; - BOOLEAN ReconnectAll; - - ReconnectAll =3D FALSE; - - // - // Process the driver option - // - for (Link =3D BdsDriverLists->ForwardLink; Link !=3D BdsDriverLists; Lin= k =3D Link->ForwardLink) { - Option =3D CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATUR= E); - =20 - // - // If a load option is not marked as LOAD_OPTION_ACTIVE, - // the boot manager will not automatically load the option. - // - if (!IS_LOAD_OPTION_TYPE (Option->Attribute, LOAD_OPTION_ACTIVE)) { - continue; - } - =20 - // - // If a driver load option is marked as LOAD_OPTION_FORCE_RECONNECT, - // then all of the EFI drivers in the system will be disconnected and - // reconnected after the last driver load option is processed. - // - if (IS_LOAD_OPTION_TYPE (Option->Attribute, LOAD_OPTION_FORCE_RECONNEC= T)) { - ReconnectAll =3D TRUE; - } - =20 - // - // Make sure the driver path is connected. - // - BdsLibConnectDevicePath (Option->DevicePath); - - // - // Load and start the image that Driver#### describes - // - Status =3D gBS->LoadImage ( - FALSE, - gImageHandle, - Option->DevicePath, - NULL, - 0, - &ImageHandle - ); - - if (!EFI_ERROR (Status)) { - gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGuid, (VOI= D **) &ImageInfo); - - // - // Verify whether this image is a driver, if not, - // exit it and continue to parse next load option - // - if (ImageInfo->ImageCodeType !=3D EfiBootServicesCode && ImageInfo->= ImageCodeType !=3D EfiRuntimeServicesCode) { - gBS->Exit (ImageHandle, EFI_INVALID_PARAMETER, 0, NULL); - continue; - } - - if (Option->LoadOptionsSize !=3D 0) { - ImageInfo->LoadOptionsSize =3D Option->LoadOptionsSize; - ImageInfo->LoadOptions =3D Option->LoadOptions; - } - // - // Before calling the image, enable the Watchdog Timer for - // the 5 Minute period - // - gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00, NULL); - - Status =3D gBS->StartImage (ImageHandle, &ExitDataSize, &ExitData); - DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Driver Return Status =3D %r\n", St= atus)); - - // - // Clear the Watchdog Timer after the image returns - // - gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000, NULL); - } - } - =20 - // - // Process the LOAD_OPTION_FORCE_RECONNECT driver option - // - if (ReconnectAll) { - BdsLibDisconnectAllEfi (); - BdsLibConnectAll (); - } - -} - -/** - Get the Option Number that does not used. - Try to locate the specific option variable one by one utile find a free = number. - - @param VariableName Indicate if the boot#### or driver#### opt= ion - - @return The Minimal Free Option Number - -**/ -UINT16 -BdsLibGetFreeOptionNumber ( - IN CHAR16 *VariableName - ) -{ - UINTN Index; - CHAR16 StrTemp[10]; - UINT16 *OptionBuffer; - UINTN OptionSize; - - // - // Try to find the minimum free number from 0, 1, 2, 3.... - // - Index =3D 0; - do { - if (*VariableName =3D=3D 'B') { - UnicodeSPrint (StrTemp, sizeof (StrTemp), L"Boot%04x", Index); - } else { - UnicodeSPrint (StrTemp, sizeof (StrTemp), L"Driver%04x", Index); - } - // - // try if the option number is used - // - OptionBuffer =3D BdsLibGetVariableAndSize ( - StrTemp, - &gEfiGlobalVariableGuid, - &OptionSize - ); - if (OptionBuffer =3D=3D NULL) { - break; - } - FreePool(OptionBuffer); - Index++; - } while (TRUE); - - return ((UINT16) Index); -} - - -/** - This function will register the new boot#### or driver#### option base on - the VariableName. The new registered boot#### or driver#### will be link= ed - to BdsOptionList and also update to the VariableName. After the boot####= or - driver#### updated, the BootOrder or DriverOrder will also be updated. - - @param BdsOptionList The header of the boot#### or driver#### l= ink list - @param DevicePath The device path which the boot#### or driv= er#### - option present - @param String The description of the boot#### or driver#= ### - @param VariableName Indicate if the boot#### or driver#### opt= ion - - @retval EFI_SUCCESS The boot#### or driver#### have been succe= ss - registered - @retval EFI_STATUS Return the status of gRT->SetVariable (). - -**/ -EFI_STATUS -EFIAPI -BdsLibRegisterNewOption ( - IN LIST_ENTRY *BdsOptionList, - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN CHAR16 *String, - IN CHAR16 *VariableName - ) -{ - EFI_STATUS Status; - UINTN Index; - UINT16 RegisterOptionNumber; - UINT16 *TempOptionPtr; - UINTN TempOptionSize; - UINT16 *OptionOrderPtr; - VOID *OptionPtr; - UINTN OptionSize; - UINT8 *TempPtr; - EFI_DEVICE_PATH_PROTOCOL *OptionDevicePath; - CHAR16 *Description; - CHAR16 OptionName[10]; - BOOLEAN UpdateDescription; - UINT16 BootOrderEntry; - UINTN OrderItemNum; - - if (DevicePath =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - - OptionPtr =3D NULL; - OptionSize =3D 0; - TempPtr =3D NULL; - OptionDevicePath =3D NULL; - Description =3D NULL; - OptionOrderPtr =3D NULL; - UpdateDescription =3D FALSE; - Status =3D EFI_SUCCESS; - ZeroMem (OptionName, sizeof (OptionName)); - - TempOptionSize =3D 0; - TempOptionPtr =3D BdsLibGetVariableAndSize ( - VariableName, - &gEfiGlobalVariableGuid, - &TempOptionSize - ); - // - // Compare with current option variable if the previous option is set in= global variable. - // - for (Index =3D 0; Index < TempOptionSize / sizeof (UINT16); Index++) { - // - // TempOptionPtr must not be NULL if we have non-zero TempOptionSize. - // - ASSERT (TempOptionPtr !=3D NULL); - - if (*VariableName =3D=3D 'B') { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", TempOpt= ionPtr[Index]); - } else { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Driver%04x", TempO= ptionPtr[Index]); - } - - OptionPtr =3D BdsLibGetVariableAndSize ( - OptionName, - &gEfiGlobalVariableGuid, - &OptionSize - ); - if (OptionPtr =3D=3D NULL) { - continue; - } - - // - // Validate the variable. - // - if (!ValidateOption(OptionPtr, OptionSize)) { - FreePool(OptionPtr); - continue; - } - - TempPtr =3D OptionPtr; - TempPtr +=3D sizeof (UINT32) + sizeof (UINT16); - Description =3D (CHAR16 *) TempPtr; - TempPtr +=3D StrSize ((CHAR16 *) TempPtr); - OptionDevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) TempPtr; - - // - // Notes: the description may will change base on the GetStringToken - // - if (CompareMem (OptionDevicePath, DevicePath, GetDevicePathSize (Optio= nDevicePath)) =3D=3D 0) { - if (CompareMem (Description, String, StrSize (Description)) =3D=3D 0= ) {=20 - // - // Got the option, so just return - // - FreePool (OptionPtr); - FreePool (TempOptionPtr); - return EFI_SUCCESS; - } else { - // - // Option description changed, need update. - // - UpdateDescription =3D TRUE; - FreePool (OptionPtr); - break; - } - } - - FreePool (OptionPtr); - } - - OptionSize =3D sizeof (UINT32) + sizeof (UINT16) + StrSize (Str= ing); - OptionSize +=3D GetDevicePathSize (DevicePath); - OptionPtr =3D AllocateZeroPool (OptionSize); - ASSERT (OptionPtr !=3D NULL); - =20 - TempPtr =3D OptionPtr; - *(UINT32 *) TempPtr =3D LOAD_OPTION_ACTIVE; - TempPtr +=3D sizeof (UINT32); - *(UINT16 *) TempPtr =3D (UINT16) GetDevicePathSize (DevicePath); - TempPtr +=3D sizeof (UINT16); - CopyMem (TempPtr, String, StrSize (String)); - TempPtr +=3D StrSize (String); - CopyMem (TempPtr, DevicePath, GetDevicePathSize (DevicePath)); - - if (UpdateDescription) { - // - // The number in option#### to be updated.=20 - // In this case, we must have non-NULL TempOptionPtr. - // - ASSERT (TempOptionPtr !=3D NULL); - RegisterOptionNumber =3D TempOptionPtr[Index]; - } else { - // - // The new option#### number - // - RegisterOptionNumber =3D BdsLibGetFreeOptionNumber(VariableName); - } - - if (*VariableName =3D=3D 'B') { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", RegisterO= ptionNumber); - } else { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Driver%04x", Registe= rOptionNumber); - } - - Status =3D gRT->SetVariable ( - OptionName, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - OptionSize, - OptionPtr - ); - // - // Return if only need to update a changed description or fail to set op= tion. - // - if (EFI_ERROR (Status) || UpdateDescription) { - FreePool (OptionPtr); - if (TempOptionPtr !=3D NULL) { - FreePool (TempOptionPtr); - } - return Status; - } - - FreePool (OptionPtr); - - // - // Update the option order variable - // - - // - // If no option order - // - if (TempOptionSize =3D=3D 0) { - BootOrderEntry =3D 0; - Status =3D gRT->SetVariable ( - VariableName, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME= _ACCESS | EFI_VARIABLE_NON_VOLATILE, - sizeof (UINT16), - &BootOrderEntry - ); - if (TempOptionPtr !=3D NULL) { - FreePool (TempOptionPtr); - } - return Status; - } - =20 - // - // TempOptionPtr must not be NULL if TempOptionSize is not zero. - // - ASSERT (TempOptionPtr !=3D NULL); - // - // Append the new option number to the original option order - // - OrderItemNum =3D (TempOptionSize / sizeof (UINT16)) + 1 ; - OptionOrderPtr =3D AllocateZeroPool ( OrderItemNum * sizeof (UINT16)); - ASSERT (OptionOrderPtr!=3D NULL); - CopyMem (OptionOrderPtr, TempOptionPtr, (OrderItemNum - 1) * sizeof (UIN= T16)); - - OptionOrderPtr[Index] =3D RegisterOptionNumber; - - Status =3D gRT->SetVariable ( - VariableName, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_A= CCESS | EFI_VARIABLE_NON_VOLATILE, - OrderItemNum * sizeof (UINT16), - OptionOrderPtr - ); - FreePool (TempOptionPtr); - FreePool (OptionOrderPtr); - - return Status; -} - -/** - Returns the size of a device path in bytes. - - This function returns the size, in bytes, of the device path data struct= ure=20 - specified by DevicePath including the end of device path node. If Device= Path=20 - is NULL, then 0 is returned. If the length of the device path is bigger = than - MaxSize, also return 0 to indicate this is an invalidate device path. - - @param DevicePath A pointer to a device path data structure. - @param MaxSize Max valid device path size. If big than this = size,=20 - return error. - =20 - @retval 0 An invalid device path. - @retval Others The size of a device path in bytes. - -**/ -UINTN -GetDevicePathSizeEx ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN UINTN MaxSize - ) -{ - UINTN Size; - UINTN NodeSize; - - if (DevicePath =3D=3D NULL) { - return 0; - } - - // - // Search for the end of the device path structure - // - Size =3D 0; - while (!IsDevicePathEnd (DevicePath)) { - NodeSize =3D DevicePathNodeLength (DevicePath); - if (NodeSize < END_DEVICE_PATH_LENGTH) { - return 0; - } - Size +=3D NodeSize; - if (Size > MaxSize) { - return 0; - } - DevicePath =3D NextDevicePathNode (DevicePath); - } - Size +=3D DevicePathNodeLength (DevicePath); - if (Size > MaxSize) { - return 0; - } - - return Size; -} - -/** - Returns the length of a Null-terminated Unicode string. If the length is=20 - bigger than MaxStringLen, return length 0 to indicate that this is an=20 - invalidate string. - - This function returns the byte length of Unicode characters in the Null-= terminated - Unicode string specified by String.=20 - - If String is NULL, then ASSERT(). - If String is not aligned on a 16-bit boundary, then ASSERT(). - - @param String A pointer to a Null-terminated Unicode string. - @param MaxStringLen Max string len in this string. - - @retval 0 An invalid string. - @retval Others The length of String. - -**/ -UINTN -StrSizeEx ( - IN CONST CHAR16 *String, - IN UINTN MaxStringLen - ) -{ - UINTN Length; - - ASSERT (String !=3D NULL && MaxStringLen !=3D 0); - ASSERT (((UINTN) String & BIT0) =3D=3D 0); - - for (Length =3D 0; *String !=3D L'\0' && MaxStringLen !=3D Length; Strin= g++, Length+=3D2); - - if (*String !=3D L'\0' && MaxStringLen =3D=3D Length) { - return 0; - } - - return Length + 2; -} - -/** - Validate the EFI Boot#### variable (VendorGuid/Name) - - @param Variable Boot#### variable data. - @param VariableSize Returns the size of the EFI variable that = was read - - @retval TRUE The variable data is correct. - @retval FALSE The variable data is corrupted. - -**/ -BOOLEAN=20 -ValidateOption ( - UINT8 *Variable, - UINTN VariableSize - ) -{ - UINT16 FilePathSize; - UINT8 *TempPtr; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - UINTN TempSize; - - if (VariableSize <=3D sizeof (UINT16) + sizeof (UINT32)) { - return FALSE; - } - - // - // Skip the option attribute - // - TempPtr =3D Variable; - TempPtr +=3D sizeof (UINT32); - - // - // Get the option's device path size - // - FilePathSize =3D *(UINT16 *) TempPtr; - TempPtr +=3D sizeof (UINT16); - - // - // Get the option's description string size - // - TempSize =3D StrSizeEx ((CHAR16 *) TempPtr, VariableSize - sizeof (UINT1= 6) - sizeof (UINT32)); - TempPtr +=3D TempSize; - - // - // Get the option's device path - // - DevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) TempPtr; - TempPtr +=3D FilePathSize; - - // - // Validation boot option variable. - // - if ((FilePathSize =3D=3D 0) || (TempSize =3D=3D 0)) { - return FALSE; - } - - if (TempSize + FilePathSize + sizeof (UINT16) + sizeof (UINT32) > Variab= leSize) { - return FALSE; - } - - return (BOOLEAN) (GetDevicePathSizeEx (DevicePath, FilePathSize) !=3D 0); -} - -/** - Convert a single character to number. - It assumes the input Char is in the scope of L'0' ~ L'9' and L'A' ~ L'F' - =20 - @param Char The input char which need to change to a hex number. - =20 -**/ -UINTN -CharToUint ( - IN CHAR16 Char - ) -{ - if ((Char >=3D L'0') && (Char <=3D L'9')) { - return (UINTN) (Char - L'0'); - } - - if ((Char >=3D L'A') && (Char <=3D L'F')) { - return (UINTN) (Char - L'A' + 0xA); - } - - ASSERT (FALSE); - return 0; -} - -/** - Build the boot#### or driver#### option from the VariableName, the - build boot#### or driver#### will also be linked to BdsCommonOptionList. - - @param BdsCommonOptionList The header of the boot#### or driver#### o= ption - link list - @param VariableName EFI Variable name indicate if it is boot##= ## or - driver#### - - @retval BDS_COMMON_OPTION Get the option just been created - @retval NULL Failed to get the new option - -**/ -BDS_COMMON_OPTION * -EFIAPI -BdsLibVariableToOption ( - IN OUT LIST_ENTRY *BdsCommonOptionList, - IN CHAR16 *VariableName - ) -{ - UINT32 Attribute; - UINT16 FilePathSize; - UINT8 *Variable; - UINT8 *TempPtr; - UINTN VariableSize; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - BDS_COMMON_OPTION *Option; - VOID *LoadOptions; - UINT32 LoadOptionsSize; - CHAR16 *Description; - UINT8 NumOff; - - // - // Read the variable. We will never free this data. - // - Variable =3D BdsLibGetVariableAndSize ( - VariableName, - &gEfiGlobalVariableGuid, - &VariableSize - ); - if (Variable =3D=3D NULL) { - return NULL; - } - - // - // Validate Boot#### variable data. - // - if (!ValidateOption(Variable, VariableSize)) { - FreePool (Variable); - return NULL; - } - - // - // Notes: careful defined the variable of Boot#### or - // Driver####, consider use some macro to abstract the code - // - // - // Get the option attribute - // - TempPtr =3D Variable; - Attribute =3D *(UINT32 *) Variable; - TempPtr +=3D sizeof (UINT32); - - // - // Get the option's device path size - // - FilePathSize =3D *(UINT16 *) TempPtr; - TempPtr +=3D sizeof (UINT16); - - // - // Get the option's description string - // - Description =3D (CHAR16 *) TempPtr; - - // - // Get the option's description string size - // - TempPtr +=3D StrSize((CHAR16 *) TempPtr); - - // - // Get the option's device path - // - DevicePath =3D (EFI_DEVICE_PATH_PROTOCOL *) TempPtr; - TempPtr +=3D FilePathSize; - - // - // Get load opion data. - // - LoadOptions =3D TempPtr; - LoadOptionsSize =3D (UINT32) (VariableSize - (UINTN) (TempPtr - Variable= )); - - // - // The Console variables may have multiple device paths, so make - // an Entry for each one. - // - Option =3D AllocateZeroPool (sizeof (BDS_COMMON_OPTION)); - if (Option =3D=3D NULL) { - FreePool (Variable); - return NULL; - } - - Option->Signature =3D BDS_LOAD_OPTION_SIGNATURE; - Option->DevicePath =3D AllocateZeroPool (GetDevicePathSize (DevicePath)= ); - ASSERT(Option->DevicePath !=3D NULL); - CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath)); - - Option->Attribute =3D Attribute; - Option->Description =3D AllocateZeroPool (StrSize (Description)); - ASSERT(Option->Description !=3D NULL); - CopyMem (Option->Description, Description, StrSize (Description)); - - Option->LoadOptions =3D AllocateZeroPool (LoadOptionsSize); - ASSERT(Option->LoadOptions !=3D NULL); - CopyMem (Option->LoadOptions, LoadOptions, LoadOptionsSize); - Option->LoadOptionsSize =3D LoadOptionsSize; - - // - // Get the value from VariableName Unicode string - // since the ISO standard assumes ASCII equivalent abbreviations, we can= be safe in converting this - // Unicode stream to ASCII without any loss in meaning. - // - if (*VariableName =3D=3D 'B') { - NumOff =3D (UINT8) (sizeof (L"Boot") / sizeof (CHAR16) - 1); - Option->BootCurrent =3D (UINT16) (CharToUint (VariableName[NumOff+0]) = * 0x1000)=20 - + (UINT16) (CharToUint (VariableName[NumOff+1]) * 0x100) - + (UINT16) (CharToUint (VariableName[NumOff+2]) * 0x10) - + (UINT16) (CharToUint (VariableName[NumOff+3]) * 0x1); - } - InsertTailList (BdsCommonOptionList, &Option->Link); - FreePool (Variable); - return Option; -} - -/** - Process BootOrder, or DriverOrder variables, by calling - BdsLibVariableToOption () for each UINT16 in the variables. - - @param BdsCommonOptionList The header of the option list base on vari= able - VariableName - @param VariableName EFI Variable name indicate the BootOrder or - DriverOrder - - @retval EFI_SUCCESS Success create the boot option or driver o= ption - list - @retval EFI_OUT_OF_RESOURCES Failed to get the boot option or driver op= tion list - -**/ -EFI_STATUS -EFIAPI -BdsLibBuildOptionFromVar ( - IN LIST_ENTRY *BdsCommonOptionList, - IN CHAR16 *VariableName - ) -{ - UINT16 *OptionOrder; - UINTN OptionOrderSize; - UINTN Index; - BDS_COMMON_OPTION *Option; - CHAR16 OptionName[20]; - - // - // Zero Buffer in order to get all BOOT#### variables - // - ZeroMem (OptionName, sizeof (OptionName)); - - // - // Read the BootOrder, or DriverOrder variable. - // - OptionOrder =3D BdsLibGetVariableAndSize ( - VariableName, - &gEfiGlobalVariableGuid, - &OptionOrderSize - ); - if (OptionOrder =3D=3D NULL) { - return EFI_OUT_OF_RESOURCES; - } - - for (Index =3D 0; Index < OptionOrderSize / sizeof (UINT16); Index++) { - if (*VariableName =3D=3D 'B') { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", OptionO= rder[Index]); - } else { - UnicodeSPrint (OptionName, sizeof (OptionName), L"Driver%04x", Optio= nOrder[Index]); - } - - Option =3D BdsLibVariableToOption (BdsCommonOptionList, O= ptionName); - if (Option !=3D NULL) { - Option->BootCurrent =3D OptionOrder[Index]; - } - } - - FreePool (OptionOrder); - - return EFI_SUCCESS; -} - -/** - Get boot mode by looking up configuration table and parsing HOB list - - @param BootMode Boot mode from PEI handoff HOB. - - @retval EFI_SUCCESS Successfully get boot mode - -**/ -EFI_STATUS -EFIAPI -BdsLibGetBootMode ( - OUT EFI_BOOT_MODE *BootMode - ) -{ - *BootMode =3D GetBootModeHob (); - - return EFI_SUCCESS; -} - -/** - Read the EFI variable (VendorGuid/Name) and return a dynamically allocat= ed - buffer, and the size of the buffer. If failure return NULL. - - @param Name String part of EFI variable name - @param VendorGuid GUID part of EFI variable name - @param VariableSize Returns the size of the EFI variable that = was read - - @return Dynamically allocated memory that contains= a copy of the EFI variable - Caller is responsible freeing the buffer. - @retval NULL Variable was not read - -**/ -VOID * -EFIAPI -BdsLibGetVariableAndSize ( - IN CHAR16 *Name, - IN EFI_GUID *VendorGuid, - OUT UINTN *VariableSize - ) -{ - EFI_STATUS Status; - UINTN BufferSize; - VOID *Buffer; - - Buffer =3D NULL; - - // - // Pass in a zero size buffer to find the required buffer size. - // - BufferSize =3D 0; - Status =3D gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, B= uffer); - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - // - // Allocate the buffer to return - // - Buffer =3D AllocateZeroPool (BufferSize); - if (Buffer =3D=3D NULL) { - *VariableSize =3D 0; - return NULL; - } - // - // Read variable into the allocated buffer. - // - Status =3D gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, Buff= er); - if (EFI_ERROR (Status)) { - FreePool (Buffer); - BufferSize =3D 0; - Buffer =3D NULL; - } - } - - ASSERT (((Buffer =3D=3D NULL) && (BufferSize =3D=3D 0)) || - ((Buffer !=3D NULL) && (BufferSize !=3D 0)) - ); - *VariableSize =3D BufferSize; - return Buffer; -} - -/** - Delete the instance in Multi which matches partly with Single instance - - @param Multi A pointer to a multi-instance device path = data - structure. - @param Single A pointer to a single-instance device path= data - structure. - - @return This function will remove the device path instances in Multi whi= ch partly - match with the Single, and return the result device path. If the= re is no - remaining device path as a result, this function will return NUL= L. - -**/ -EFI_DEVICE_PATH_PROTOCOL * -EFIAPI -BdsLibDelPartMatchInstance ( - IN EFI_DEVICE_PATH_PROTOCOL *Multi, - IN EFI_DEVICE_PATH_PROTOCOL *Single - ) -{ - EFI_DEVICE_PATH_PROTOCOL *Instance; - EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; - EFI_DEVICE_PATH_PROTOCOL *TempNewDevicePath; - UINTN InstanceSize; - UINTN SingleDpSize; - UINTN Size; - - NewDevicePath =3D NULL; - TempNewDevicePath =3D NULL; - - if (Multi =3D=3D NULL || Single =3D=3D NULL) { - return Multi; - } - - Instance =3D GetNextDevicePathInstance (&Multi, &InstanceSize); - SingleDpSize =3D GetDevicePathSize (Single) - END_DEVICE_PATH_LENGTH; - InstanceSize -=3D END_DEVICE_PATH_LENGTH; - - while (Instance !=3D NULL) { - - Size =3D (SingleDpSize < InstanceSize) ? SingleDpSize : InstanceSize; - - if ((CompareMem (Instance, Single, Size) !=3D 0)) { - // - // Append the device path instance which does not match with Single - // - TempNewDevicePath =3D NewDevicePath; - NewDevicePath =3D AppendDevicePathInstance (NewDevicePath, Instance); - if (TempNewDevicePath !=3D NULL) { - FreePool(TempNewDevicePath); - } - } - FreePool(Instance); - Instance =3D GetNextDevicePathInstance (&Multi, &InstanceSize); - InstanceSize -=3D END_DEVICE_PATH_LENGTH; - } - - return NewDevicePath; -} - -/** - Function compares a device path data structure to that of all the nodes = of a - second device path instance. - - @param Multi A pointer to a multi-instance device path = data - structure. - @param Single A pointer to a single-instance device path= data - structure. - - @retval TRUE If the Single device path is contained wit= hin Multi device path. - @retval FALSE The Single device path is not match within= Multi device path. - -**/ -BOOLEAN -EFIAPI -BdsLibMatchDevicePaths ( - IN EFI_DEVICE_PATH_PROTOCOL *Multi, - IN EFI_DEVICE_PATH_PROTOCOL *Single - ) -{ - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - EFI_DEVICE_PATH_PROTOCOL *DevicePathInst; - UINTN Size; - - if (Multi =3D=3D NULL || Single =3D=3D NULL) { - return FALSE; - } - - DevicePath =3D Multi; - DevicePathInst =3D GetNextDevicePathInstance (&DevicePath, &Size); - - // - // Search for the match of 'Single' in 'Multi' - // - while (DevicePathInst !=3D NULL) { - // - // If the single device path is found in multiple device paths, - // return success - // - if (CompareMem (Single, DevicePathInst, Size) =3D=3D 0) { - FreePool (DevicePathInst); - return TRUE; - } - - FreePool (DevicePathInst); - DevicePathInst =3D GetNextDevicePathInstance (&DevicePath, &Size); - } - - return FALSE; -} - -/** - This function prints a series of strings. - - @param ConOut Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL - @param ... A variable argument list containing series= of - strings, the last string must be NULL. - - @retval EFI_SUCCESS Success print out the string using ConOut. - @retval EFI_STATUS Return the status of the ConOut->OutputStr= ing (). - -**/ -EFI_STATUS -EFIAPI -BdsLibOutputStrings ( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut, - ... - ) -{ - VA_LIST Args; - EFI_STATUS Status; - CHAR16 *String; - - Status =3D EFI_SUCCESS; - VA_START (Args, ConOut); - - while (!EFI_ERROR (Status)) { - // - // If String is NULL, then it's the end of the list - // - String =3D VA_ARG (Args, CHAR16 *); - if (String =3D=3D NULL) { - break; - } - - Status =3D ConOut->OutputString (ConOut, String); - - if (EFI_ERROR (Status)) { - break; - } - } - =20 - VA_END(Args); - return Status; -} - -// -// Following are BDS Lib functions which contain all the code about setup= browser reset reminder feature. -// Setup Browser reset reminder feature is that an reset reminder will be= given before user leaves the setup browser if -// user change any option setting which needs a reset to be effective, an= d the reset will be applied according to the user selection. -// - - -/** - Enable the setup browser reset reminder feature. - This routine is used in platform tip. If the platform policy need the fe= ature, use the routine to enable it. - -**/ -VOID -EFIAPI -EnableResetReminderFeature ( - VOID - ) -{ - mFeaturerSwitch =3D TRUE; -} - - -/** - Disable the setup browser reset reminder feature. - This routine is used in platform tip. If the platform policy do not want= the feature, use the routine to disable it. - -**/ -VOID -EFIAPI -DisableResetReminderFeature ( - VOID - ) -{ - mFeaturerSwitch =3D FALSE; -} - - -/** - Record the info that a reset is required. - A module boolean variable is used to record whether a reset is required. - -**/ -VOID -EFIAPI -EnableResetRequired ( - VOID - ) -{ - mResetRequired =3D TRUE; -} - - -/** - Record the info that no reset is required. - A module boolean variable is used to record whether a reset is required. - -**/ -VOID -EFIAPI -DisableResetRequired ( - VOID - ) -{ - mResetRequired =3D FALSE; -} - - -/** - Check whether platform policy enable the reset reminder feature. The def= ault is enabled. - -**/ -BOOLEAN -EFIAPI -IsResetReminderFeatureEnable ( - VOID - ) -{ - return mFeaturerSwitch; -} - - -/** - Check if user changed any option setting which needs a system reset to = be effective. - -**/ -BOOLEAN -EFIAPI -IsResetRequired ( - VOID - ) -{ - return mResetRequired; -} - - -/** - Check whether a reset is needed, and finish the reset reminder feature. - If a reset is needed, Popup a menu to notice user, and finish the feature - according to the user selection. - -**/ -VOID -EFIAPI -SetupResetReminder ( - VOID - ) -{ - EFI_INPUT_KEY Key; - CHAR16 *StringBuffer1; - CHAR16 *StringBuffer2; - - - // - //check any reset required change is applied? if yes, reset system - // - if (IsResetReminderFeatureEnable ()) { - if (IsResetRequired ()) { - - StringBuffer1 =3D AllocateZeroPool (MAX_STRING_LEN * sizeof (CHAR16)= ); - ASSERT (StringBuffer1 !=3D NULL); - StringBuffer2 =3D AllocateZeroPool (MAX_STRING_LEN * sizeof (CHAR16)= ); - ASSERT (StringBuffer2 !=3D NULL); - StrCpy (StringBuffer1, L"Configuration changed. Reset to apply it No= w."); - StrCpy (StringBuffer2, L"Press ENTER to reset"); - // - // Popup a menu to notice user - // - do { - CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuff= er1, StringBuffer2, NULL); - } while (Key.UnicodeChar !=3D CHAR_CARRIAGE_RETURN); - - FreePool (StringBuffer1); - FreePool (StringBuffer2); - - gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL); - } - } -} - -/** - Get the headers (dos, image, optional header) from an image - - @param Device SimpleFileSystem device handle - @param FileName File name for the image - @param DosHeader Pointer to dos header - @param Hdr The buffer in which to return the PE32, PE= 32+, or TE header. - - @retval EFI_SUCCESS Successfully get the machine type. - @retval EFI_NOT_FOUND The file is not found. - @retval EFI_LOAD_ERROR File is not a valid image file. - -**/ -EFI_STATUS -EFIAPI -BdsLibGetImageHeader ( - IN EFI_HANDLE Device, - IN CHAR16 *FileName, - OUT EFI_IMAGE_DOS_HEADER *DosHeader, - OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr - ) -{ - EFI_STATUS Status; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume; - EFI_FILE_HANDLE Root; - EFI_FILE_HANDLE ThisFile; - UINTN BufferSize; - UINT64 FileSize; - EFI_FILE_INFO *Info; - - Root =3D NULL; - ThisFile =3D NULL; - // - // Handle the file system interface to the device - // - Status =3D gBS->HandleProtocol ( - Device, - &gEfiSimpleFileSystemProtocolGuid, - (VOID *) &Volume - ); - if (EFI_ERROR (Status)) { - goto Done; - } - - Status =3D Volume->OpenVolume ( - Volume, - &Root - ); - if (EFI_ERROR (Status)) { - Root =3D NULL; - goto Done; - } - ASSERT (Root !=3D NULL); - Status =3D Root->Open (Root, &ThisFile, FileName, EFI_FILE_MODE_READ, 0); - if (EFI_ERROR (Status)) { - goto Done; - } - ASSERT (ThisFile !=3D NULL); - - // - // Get file size - // - BufferSize =3D SIZE_OF_EFI_FILE_INFO + 200; - do { - Info =3D NULL; - Status =3D gBS->AllocatePool (EfiBootServicesData, BufferSize, (VOID *= *) &Info); - if (EFI_ERROR (Status)) { - goto Done; - } - Status =3D ThisFile->GetInfo ( - ThisFile, - &gEfiFileInfoGuid, - &BufferSize, - Info - ); - if (!EFI_ERROR (Status)) { - break; - } - if (Status !=3D EFI_BUFFER_TOO_SMALL) { - FreePool (Info); - goto Done; - } - FreePool (Info); - } while (TRUE); - - FileSize =3D Info->FileSize; - FreePool (Info); - - // - // Read dos header - // - BufferSize =3D sizeof (EFI_IMAGE_DOS_HEADER); - Status =3D ThisFile->Read (ThisFile, &BufferSize, DosHeader); - if (EFI_ERROR (Status) || - BufferSize < sizeof (EFI_IMAGE_DOS_HEADER) || - FileSize <=3D DosHeader->e_lfanew || - DosHeader->e_magic !=3D EFI_IMAGE_DOS_SIGNATURE) { - Status =3D EFI_LOAD_ERROR; - goto Done; - } - - // - // Move to PE signature - // - Status =3D ThisFile->SetPosition (ThisFile, DosHeader->e_lfanew); - if (EFI_ERROR (Status)) { - Status =3D EFI_LOAD_ERROR; - goto Done; - } - - // - // Read and check PE signature - // - BufferSize =3D sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION); - Status =3D ThisFile->Read (ThisFile, &BufferSize, Hdr.Pe32); - if (EFI_ERROR (Status) || - BufferSize < sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION) || - Hdr.Pe32->Signature !=3D EFI_IMAGE_NT_SIGNATURE) { - Status =3D EFI_LOAD_ERROR; - goto Done; - } - - // - // Check PE32 or PE32+ magic - // - if (Hdr.Pe32->OptionalHeader.Magic !=3D EFI_IMAGE_NT_OPTIONAL_HDR32_MAGI= C && - Hdr.Pe32->OptionalHeader.Magic !=3D EFI_IMAGE_NT_OPTIONAL_HDR64_MAGI= C) { - Status =3D EFI_LOAD_ERROR; - goto Done; - } - - Done: - if (ThisFile !=3D NULL) { - ThisFile->Close (ThisFile); - } - if (Root !=3D NULL) { - Root->Close (Root); - } - return Status; -} - -/** - This routine adjust the memory information for different memory type and=20 - save them into the variables for next boot. -**/ -VOID -BdsSetMemoryTypeInformationVariable ( - VOID - ) -{ - EFI_STATUS Status; - EFI_MEMORY_TYPE_INFORMATION *PreviousMemoryTypeInformation; - EFI_MEMORY_TYPE_INFORMATION *CurrentMemoryTypeInformation; - UINTN VariableSize; - UINTN Index; - UINTN Index1; - UINT32 Previous; - UINT32 Current; - UINT32 Next; - EFI_HOB_GUID_TYPE *GuidHob; - BOOLEAN MemoryTypeInformationModified; - BOOLEAN MemoryTypeInformationVariableExists; - EFI_BOOT_MODE BootMode; - - MemoryTypeInformationModified =3D FALSE; - MemoryTypeInformationVariableExists =3D FALSE; - - - BootMode =3D GetBootModeHob (); - // - // In BOOT_IN_RECOVERY_MODE, Variable region is not reliable. - // - if (BootMode =3D=3D BOOT_IN_RECOVERY_MODE) { - return; - } - - // - // Only check the the Memory Type Information variable in the boot mode=20 - // other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type - // Information is not valid in this boot mode. - // - if (BootMode !=3D BOOT_WITH_DEFAULT_SETTINGS) { - VariableSize =3D 0; - Status =3D gRT->GetVariable ( - EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, - &gEfiMemoryTypeInformationGuid, - NULL,=20 - &VariableSize,=20 - NULL - ); - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - MemoryTypeInformationVariableExists =3D TRUE; - } - } - - // - // Retrieve the current memory usage statistics. If they are not found,= then - // no adjustments can be made to the Memory Type Information variable. - // - Status =3D EfiGetSystemConfigurationTable ( - &gEfiMemoryTypeInformationGuid, - (VOID **) &CurrentMemoryTypeInformation - ); - if (EFI_ERROR (Status) || CurrentMemoryTypeInformation =3D=3D NULL) { - return; - } - - // - // Get the Memory Type Information settings from Hob if they exist, - // PEI is responsible for getting them from variable and build a Hob to = save them. - // If the previous Memory Type Information is not available, then set de= faults - // - GuidHob =3D GetFirstGuidHob (&gEfiMemoryTypeInformationGuid); - if (GuidHob =3D=3D NULL) { - // - // If Platform has not built Memory Type Info into the Hob, just retur= n. - // - return; - } - PreviousMemoryTypeInformation =3D GET_GUID_HOB_DATA (GuidHob); - VariableSize =3D GET_GUID_HOB_DATA_SIZE (GuidHob); - - // - // Use a heuristic to adjust the Memory Type Information for the next bo= ot - // - DEBUG ((EFI_D_INFO, "Memory Previous Current Next \n")); - DEBUG ((EFI_D_INFO, " Type Pages Pages Pages \n")); - DEBUG ((EFI_D_INFO, "=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D\n")); - - for (Index =3D 0; PreviousMemoryTypeInformation[Index].Type !=3D EfiMaxM= emoryType; Index++) { - - for (Index1 =3D 0; CurrentMemoryTypeInformation[Index1].Type !=3D EfiM= axMemoryType; Index1++) { - if (PreviousMemoryTypeInformation[Index].Type =3D=3D CurrentMemoryTy= peInformation[Index1].Type) { - break; - } - } - if (CurrentMemoryTypeInformation[Index1].Type =3D=3D EfiMaxMemoryType)= { - continue; - } - - // - // Previous is the number of pages pre-allocated - // Current is the number of pages actually needed - // - Previous =3D PreviousMemoryTypeInformation[Index].NumberOfPages; - Current =3D CurrentMemoryTypeInformation[Index1].NumberOfPages; - Next =3D Previous; - - // - // Inconsistent Memory Reserved across bootings may lead to S4 fail - // Write next varible to 125% * current when the pre-allocated memory = is: - // 1. More than 150% of needed memory and boot mode is BOOT_WITH_DEFA= ULT_SETTING - // 2. Less than the needed memory - // - if ((Current + (Current >> 1)) < Previous) { - if (BootMode =3D=3D BOOT_WITH_DEFAULT_SETTINGS) { - Next =3D Current + (Current >> 2); - } - } else if (Current > Previous) { - Next =3D Current + (Current >> 2); - } - if (Next > 0 && Next < 4) { - Next =3D 4; - } - - if (Next !=3D Previous) { - PreviousMemoryTypeInformation[Index].NumberOfPages =3D Next; - MemoryTypeInformationModified =3D TRUE; - } - - DEBUG ((EFI_D_INFO, " %02x %08x %08x %08x\n", PreviousMemoryType= Information[Index].Type, Previous, Current, Next)); - } - - // - // If any changes were made to the Memory Type Information settings, the= n set the new variable value; - // Or create the variable in first boot. - // - if (MemoryTypeInformationModified || !MemoryTypeInformationVariableExist= s) { - Status =3D SetVariableAndReportStatusCodeOnError ( - EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, - &gEfiMemoryTypeInformationGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCES= S, - VariableSize, - PreviousMemoryTypeInformation - ); - - if (!EFI_ERROR (Status)) { - // - // If the Memory Type Information settings have been modified, then = reset the platform - // so the new Memory Type Information setting will be used to guaran= tee that an S4 - // entry/resume cycle will not fail. - // - if (MemoryTypeInformationModified && PcdGetBool (PcdResetOnMemoryTyp= eInformationChange)) { - DEBUG ((EFI_D_INFO, "Memory Type Information settings change. Warm= Reset!!!\n")); - gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); - } - } else { - DEBUG ((EFI_D_ERROR, "Memory Type Information settings cannot be sav= ed. OS S4 may fail!\n")); - } - } -} - -/** - This routine is kept for backward compatibility. -**/ -VOID -EFIAPI -BdsLibSaveMemoryTypeInformation ( - VOID - ) -{ -} - - -/** - Identify a user and, if authenticated, returns the current user profile = handle. - - @param[out] User Point to user profile handle. - =20 - @retval EFI_SUCCESS User is successfully identified, or user ide= ntification - is not supported. - @retval EFI_ACCESS_DENIED User is not successfully identified - -**/ -EFI_STATUS -EFIAPI -BdsLibUserIdentify ( - OUT EFI_USER_PROFILE_HANDLE *User - ) -{ - EFI_STATUS Status; - EFI_USER_MANAGER_PROTOCOL *Manager; - =20 - Status =3D gBS->LocateProtocol ( - &gEfiUserManagerProtocolGuid, - NULL, - (VOID **) &Manager - ); - if (EFI_ERROR (Status)) { - return EFI_SUCCESS; - } - - return Manager->Identify (Manager, User); -} - -/** - Set the variable and report the error through status code upon failure. - - @param VariableName A Null-terminated string that is the name= of the vendor's variable. - Each VariableName is unique for each Vend= orGuid. VariableName must - contain 1 or more characters. If Variable= Name is an empty string, - then EFI_INVALID_PARAMETER is returned. - @param VendorGuid A unique identifier for the vendor. - @param Attributes Attributes bitmask to set for the variabl= e. - @param DataSize The size in bytes of the Data buffer. Unl= ess the EFI_VARIABLE_APPEND_WRITE,=20 - EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, = or=20 - EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRI= TE_ACCESS attribute is set, a size of zero=20 - causes the variable to be deleted. When t= he EFI_VARIABLE_APPEND_WRITE attribute is=20 - set, then a SetVariable() call with a Dat= aSize of zero will not cause any change to=20 - the variable value (the timestamp associa= ted with the variable may be updated however=20 - even if no new data value is provided,see= the description of the=20 - EFI_VARIABLE_AUTHENTICATION_2 descriptor = below. In this case the DataSize will not=20 - be zero since the EFI_VARIABLE_AUTHENTICA= TION_2 descriptor will be populated).=20 - @param Data The contents for the variable. - - @retval EFI_SUCCESS The firmware has successfully stored the = variable and its data as - defined by the Attributes. - @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits,= name, and GUID was supplied, or the - DataSize exceeds the maximum allowed. - @retval EFI_INVALID_PARAMETER VariableName is an empty string. - @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold t= he variable and its data. - @retval EFI_DEVICE_ERROR The variable could not be retrieved due t= o a hardware error. - @retval EFI_WRITE_PROTECTED The variable in question is read-only. - @retval EFI_WRITE_PROTECTED The variable in question cannot be delete= d. - @retval EFI_SECURITY_VIOLATION The variable could not be written due to = EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS=20 - or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_= WRITE_ACESS being set, but the AuthInfo=20 - does NOT pass the validation check carrie= d out by the firmware. - - @retval EFI_NOT_FOUND The variable trying to be updated or dele= ted was not found. -**/ -EFI_STATUS -SetVariableAndReportStatusCodeOnError ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data - ) -{ - EFI_STATUS Status; - EDKII_SET_VARIABLE_STATUS *SetVariableStatus; - UINTN NameSize; - - Status =3D gRT->SetVariable ( - VariableName, - VendorGuid, - Attributes, - DataSize, - Data - ); - if (EFI_ERROR (Status)) { - NameSize =3D StrSize (VariableName); - SetVariableStatus =3D AllocatePool (sizeof (EDKII_SET_VARIABLE_STATUS)= + NameSize + DataSize); - if (SetVariableStatus !=3D NULL) { - CopyGuid (&SetVariableStatus->Guid, VendorGuid); - SetVariableStatus->NameSize =3D NameSize; - SetVariableStatus->DataSize =3D DataSize; - SetVariableStatus->SetStatus =3D Status; - SetVariableStatus->Attributes =3D Attributes; - CopyMem (SetVariableStatus + 1, VariableNam= e, NameSize); - if ((Data !=3D NULL) && (DataSize !=3D 0)) { - CopyMem (((UINT8 *) (SetVariableStatus + 1)) + NameSize, Data, = DataSize); - } - - REPORT_STATUS_CODE_EX ( - EFI_ERROR_CODE, - PcdGet32 (PcdErrorCodeSetVariable), - 0, - NULL, - &gEdkiiStatusCodeDataTypeVariableGuid, - SetVariableStatus, - sizeof (EDKII_SET_VARIABLE_STATUS) + NameSize + DataSize - ); - - FreePool (SetVariableStatus); - } - } - - return Status; -} - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/DevicePath.c b/Platform/Intel/Vlv2TbltDevicePkg/O= verride/IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c deleted file mode 100644 index a0b9da880d..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/DevicePath.c +++ /dev/null @@ -1,27 +0,0 @@ -/** @file - BDS internal function define the default device path string, it can be - replaced by platform device path. - -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include "InternalBdsLib.h" - -/** - This function converts an input device structure to a Unicode string. - - @param DevPath A pointer to the device path structure. - - @return A new allocated Unicode string that represents the device path. - -**/ -CHAR16 * -EFIAPI -DevicePathToStr ( - IN EFI_DEVICE_PATH_PROTOCOL *DevPath - ) -{ - return ConvertDevicePathToText (DevPath, TRUE, TRUE); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/GenericBdsLib.inf b/Platform/Intel/Vlv2TbltDevice= Pkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf deleted file mode 100644 index 795a9de4b8..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/GenericBdsLib.inf +++ /dev/null @@ -1,143 +0,0 @@ -## @file -# General BDS library. -# =20 -# General BDS defines and produce general interfaces for platform BDS dri= ver including: -# 1) BDS boot policy interface; -# 2) BDS boot device connect interface; -# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc. -# =20 -# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -# =20 -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D GenericBdsLib - MODULE_UNI_FILE =3D GenericBdsLib.uni - FILE_GUID =3D e405ec31-ccaa-4dd4-83e8-0aec01703f7e - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D GenericBdsLib|DXE_DRIVER DXE_RUNTIME_= DRIVER UEFI_APPLICATION=20 - CONSTRUCTOR =3D GenericBdsLibConstructor - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - DevicePath.c - BdsConnect.c - BdsMisc.c - BdsConsole.c - BdsBoot.c - InternalBdsLib.h - String.h - String.c - GenericBdsStrings.uni - =20 -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - ShellPkg/ShellPkg.dec - NetworkPkg/NetworkPkg.dec - -[LibraryClasses] - DevicePathLib - PeCoffGetEntryPointLib - BaseLib - HobLib - UefiRuntimeServicesTableLib - DxeServicesTableLib - MemoryAllocationLib - UefiLib - UefiBootServicesTableLib - BaseMemoryLib - DebugLib - PrintLib - PcdLib - PerformanceLib - TimerLib - DxeServicesLib - HiiLib - ReportStatusCodeLib - NetLib - BmpSupportLib - -[Guids] - ## SOMETIMES_CONSUMES ## HOB # The hob holding memory type infor= mation - ## SOMETIMES_CONSUMES ## SystemTable # The identifier of memory type inf= ormation type in system table - ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation" - ## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation" - gEfiMemoryTypeInformationGuid =20 - ## SOMETIMES_CONSUMES ## Variable:L"BootXXXX" # Boot option variable - ## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable - ## SOMETIMES_CONSUMES ## Variable:L"DriverXXXX" # Driver load option. - ## SOMETIMES_PRODUCES ## Variable:L"DriverXXXX" # Driver load option. - ## SOMETIMES_CONSUMES ## Variable:L"BootNext" # Next Boot Option - ## SOMETIMES_PRODUCES ## Variable:L"BootNext" # Next Boot Option - ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" # The boot option array - ## SOMETIMES_PRODUCES ## Variable:L"BootOrder" # The boot option array - ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" # The driver order list - ## SOMETIMES_CONSUMES ## Variable:L"ConIn" # The device path of co= nsole in device - ## SOMETIMES_PRODUCES ## Variable:L"ConIn" # The device path of co= nsole in device - ## SOMETIMES_CONSUMES ## Variable:L"ConOut" # The device path of co= nsole out device - ## SOMETIMES_PRODUCES ## Variable:L"ConOut" # The device path of co= nsole out device - ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" # The device path of er= ror out device - ## SOMETIMES_PRODUCES ## Variable:L"ErrOut" # The device path of er= ror out device - ## SOMETIMES_PRODUCES ## Variable:L"BootCurrent" # The boot option of cu= rrent boot - ## SOMETIMES_PRODUCES ## Variable:L"BootNext" # The number of next bo= ot option - gEfiGlobalVariableGuid - gEfiFileInfoGuid ## SOMETIMES_CONSUMES ## G= UID - gLastEnumLangGuid ## SOMETIMES_PRODUCES ## V= ariable:L"LastEnumLang" # Platform language at last time enumeration. - gHdBootDevicePathVariablGuid ## SOMETIMES_PRODUCES ## V= ariable:L"HDDP" # The device path of Boot file on Hard device. - gBdsLibStringPackageGuid ## CONSUMES ## HII # HII S= tring PackageList Guid - ## SOMETIMES_PRODUCES ## Variable:L"LegacyDevOrder" - ## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder" - gEfiLegacyDevOrderVariableGuid - gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## G= UID - gUefiShellFileGuid - -[Protocols] - gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES - gEfiLoadFileProtocolGuid ## SOMETIMES_CONSUMES - gEfiSimpleTextOutProtocolGuid ## CONSUMES - gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES - gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMES - gEfiSimpleNetworkProtocolGuid ## SOMETIMES_CONSUMES - gEfiDebugPortProtocolGuid ## SOMETIMES_CONSUMES - gEfiSimpleTextInProtocolGuid ## CONSUMES - gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES - gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES - gEfiLegacyBiosProtocolGuid ## SOMETIMES_CONSUMES - gEfiCpuArchProtocolGuid ## CONSUMES - gEfiDevicePathProtocolGuid ## CONSUMES - gEfiAcpiS3SaveProtocolGuid ## SOMETIMES_CONSUMES - gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES - gEfiUgaDrawProtocolGuid |gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport #= # SOMETIMES_CONSUMES - gEfiOEMBadgingProtocolGuid ## SOMETIMES_CONSUMES - gEfiHiiFontProtocolGuid ## CONSUMES - gEfiUserManagerProtocolGuid ## SOMETIMES_CONSUMES - gEfiUsbIoProtocolGuid ## SOMETIMES_CONSUMES - gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES - -[FeaturePcd] - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSU= MES - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootlogoOnlyEnable ## CONSU= MES - -[Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange ## = SOMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad ## SOMETIMES= _CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES= _CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## C= ONSUMES - -# -# [BootMode]=20 -# RECOVERY_FULL ## SOMETIMES_CONSUMES # Memory Type Information varia= ble -# - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/GenericBdsLib.uni b/Platform/Intel/Vlv2TbltDevice= Pkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.uni deleted file mode 100644 index c853d3409e..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/GenericBdsLib.uni +++ /dev/null @@ -1,19 +0,0 @@ -// /** @file -// General BDS library. -// -// General BDS defines and produce general interfaces for platform BDS dri= ver including: -// 1) BDS boot policy interface; -// 2) BDS boot device connect interface; -// 3) BDS Misc interfaces for mainting boot variable, ouput string, etc. -// -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
-// -// SPDX-License-Identifier: BSD-2-Clause-Patent -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "General BDS libra= ry" - -#string STR_MODULE_DESCRIPTION #language en-US "General BDS defin= es and produces general interfaces for a platform BDS driver including: 1) = BDS boot policy interface; 2) BDS boot device connect interface; 3) BDS Mis= c interfaces for maintaining boot variable, output string, etc." - diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/GenericBdsStrings.uni b/Platform/Intel/Vlv2TbltDe= vicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsSt= rings.uni deleted file mode 100644 index 59a75e548b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/GenericBdsStrings.uni +++ /dev/null @@ -1,30 +0,0 @@ -///** @file -// =20 -// String definitions for Boot Option description. -// =20 -// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
-// SPDX-License-Identifier: BSD-2-Clause-Patent -// =20 -//**/ - -/=3D# - -#langdef en-US "English" -#langdef fr-FR "Fran=C3=A7ais" - -#string STR_DESCRIPTION_FLOPPY #language en-US "EFI Floppy" - #language fr-FR "fr-FR: EFI Floppy" -#string STR_DESCRIPTION_CD_DVD #language en-US "EFI DVD/CDROM" - #language fr-FR "fr-FR: EFI DVD/CD= ROM" -#string STR_DESCRIPTION_HARDDRIVE #language en-US "EFI Hard Drive" - #language fr-FR "fr-FR: EFI Hard D= rive" -#string STR_DESCRIPTION_USB #language en-US "EFI USB Device" - #language fr-FR "fr-FR: EFI USB De= vice" -#string STR_DESCRIPTION_SCSI #language en-US "EFI SCSI Device" - #language fr-FR "fr-FR: EFI SCSI D= evice" -#string STR_DESCRIPTION_MISC #language en-US "EFI Misc Device" - #language fr-FR "fr-FR: EFI Misc D= evice" -#string STR_DESCRIPTION_NETWORK #language en-US "EFI Network " - #language fr-FR "fr-FR: EFI Networ= k " -#string STR_DESCRIPTION_NON_BLOCK #language en-US "EFI Non-Block Boo= t Device" - #language fr-FR "fr-FR: EFI Non-Bl= ock Boot Device" diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/InternalBdsLib.h b/Platform/Intel/Vlv2TbltDeviceP= kg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h deleted file mode 100644 index 025f06572b..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/InternalBdsLib.h +++ /dev/null @@ -1,173 +0,0 @@ -/** @file - BDS library definition, include the file and data structure - -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _INTERNAL_BDS_LIB_H_ -#define _INTERNAL_BDS_LIB_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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME) - #if defined (MDE_CPU_EBC) - // - // Uefi specification only defines the default boot file name for = IA32, X64 - // and IPF processor, so need define boot file name for EBC archit= ecture here. - // - #define EFI_REMOVABLE_MEDIA_FILE_NAME L"\\EFI\\BOOT\\BOOTEBC.EFI" - #else - #error "Can not determine the default boot file name for unknown p= rocessor type!" - #endif -#endif - -/** - Get the headers (dos, image, optional header) from an image - - @param Device SimpleFileSystem device handle - @param FileName File name for the image - @param DosHeader Pointer to dos header - @param Hdr The buffer in which to return the PE32, PE= 32+, or TE header. - - @retval EFI_SUCCESS Successfully get the machine type. - @retval EFI_NOT_FOUND The file is not found. - @retval EFI_LOAD_ERROR File is not a valid image file. - -**/ -EFI_STATUS -EFIAPI -BdsLibGetImageHeader ( - IN EFI_HANDLE Device, - IN CHAR16 *FileName, - OUT EFI_IMAGE_DOS_HEADER *DosHeader, - OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr - ); - -/** - This routine adjust the memory information for different memory type and=20 - save them into the variables for next boot. -**/ -VOID -BdsSetMemoryTypeInformationVariable ( - VOID - ); - -/** - Validate the EFI Boot#### or Driver#### variable (VendorGuid/Name) - - @param Variable Boot#### variable data. - @param VariableSize Returns the size of the EFI variable that = was read - - @retval TRUE The variable data is correct. - @retval FALSE The variable data is corrupted. - -**/ -BOOLEAN=20 -ValidateOption ( - UINT8 *Variable, - UINTN VariableSize - ); - -/** - Set the variable and report the error through status code upon failure. - - @param VariableName A Null-terminated string that is the name= of the vendor's variable. - Each VariableName is unique for each Vend= orGuid. VariableName must - contain 1 or more characters. If Variable= Name is an empty string, - then EFI_INVALID_PARAMETER is returned. - @param VendorGuid A unique identifier for the vendor. - @param Attributes Attributes bitmask to set for the variabl= e. - @param DataSize The size in bytes of the Data buffer. Unl= ess the EFI_VARIABLE_APPEND_WRITE,=20 - EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, = or=20 - EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRI= TE_ACCESS attribute is set, a size of zero=20 - causes the variable to be deleted. When t= he EFI_VARIABLE_APPEND_WRITE attribute is=20 - set, then a SetVariable() call with a Dat= aSize of zero will not cause any change to=20 - the variable value (the timestamp associa= ted with the variable may be updated however=20 - even if no new data value is provided,see= the description of the=20 - EFI_VARIABLE_AUTHENTICATION_2 descriptor = below. In this case the DataSize will not=20 - be zero since the EFI_VARIABLE_AUTHENTICA= TION_2 descriptor will be populated).=20 - @param Data The contents for the variable. - - @retval EFI_SUCCESS The firmware has successfully stored the = variable and its data as - defined by the Attributes. - @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits,= name, and GUID was supplied, or the - DataSize exceeds the maximum allowed. - @retval EFI_INVALID_PARAMETER VariableName is an empty string. - @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold t= he variable and its data. - @retval EFI_DEVICE_ERROR The variable could not be retrieved due t= o a hardware error. - @retval EFI_WRITE_PROTECTED The variable in question is read-only. - @retval EFI_WRITE_PROTECTED The variable in question cannot be delete= d. - @retval EFI_SECURITY_VIOLATION The variable could not be written due to = EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS=20 - or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_= WRITE_ACESS being set, but the AuthInfo=20 - does NOT pass the validation check carrie= d out by the firmware. - - @retval EFI_NOT_FOUND The variable trying to be updated or dele= ted was not found. -**/ -EFI_STATUS -SetVariableAndReportStatusCodeOnError ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data - ); - -#endif // _BDS_LIB_H_ diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/String.c b/Platform/Intel/Vlv2TbltDevicePkg/Overr= ide/IntelFrameworkModulePkg/Library/GenericBdsLib/String.c deleted file mode 100644 index f36860d5a1..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/String.c +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - String support - -Copyright (c) 2010, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ -#include "String.h" - -/** - Get string by string id from HII Interface - - - @param Id String ID. - - @retval CHAR16 * String from ID. - @retval NULL If error occurs. - -**/ -CHAR16 * -BdsLibGetStringById ( - IN EFI_STRING_ID Id - ) -{ - return HiiGetString (gBdsLibStringPackHandle, Id, NULL); -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModule= Pkg/Library/GenericBdsLib/String.h b/Platform/Intel/Vlv2TbltDevicePkg/Overr= ide/IntelFrameworkModulePkg/Library/GenericBdsLib/String.h deleted file mode 100644 index 53cabe64a9..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Lib= rary/GenericBdsLib/String.h +++ /dev/null @@ -1,42 +0,0 @@ -/** @file - String support - -Copyright (c) 2010, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _STRING_H_ -#define _STRING_H_ - -#include -#include -#include -#include -#include - -extern EFI_HII_HANDLE gBdsLibStringPackHandle; - -// -// This is the VFR compiler generated header file which defines the -// string identifiers. -// - -extern UINT8 GenericBdsLibStrings[]; - -/** - Get string by string id from HII Interface - - - @param Id String ID. - - @retval CHAR16 * String from ID. - @retval NULL If error occurs. - -**/ -CHAR16 * -BdsLibGetStringById ( - IN EFI_STRING_ID Id - ); - -#endif // _STRING_H_ diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index 15a4251cf8..b0fbbdb9cb 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -9,12 +9,10 @@ #**/ =20 [Defines] -DEFINE FLASH_BASE =3D 0xFF800000 #The base address of the 4Mb FL= ASH Device. -DEFINE FLASH_SIZE =3D 0x00800000 #The flash size in bytes of the= 4Mb FLASH Device. -DEFINE FLASH_BLOCK_SIZE =3D 0x1000 #The block size in bytes of the = 4Mb FLASH Device. -DEFINE FLASH_NUM_BLOCKS =3D 0x800 #The number of blocks in 4Mb F= LASH Device. -DEFINE FLASH_AREA_BASE_ADDRESS =3D 0xFF8000= 00 -DEFINE FLASH_AREA_SIZE =3D 0x008000= 00 +DEFINE FLASH_BASE =3D 0xFF800000 #The base address of the 8Mb FL= ASH Device. +DEFINE FLASH_SIZE =3D 0x00800000 #The flash size in bytes of the= 8Mb FLASH Device. +DEFINE FLASH_BLOCK_SIZE =3D 0x1000 #The block size in bytes of the= 8Mb FLASH Device. +DEFINE FLASH_NUM_BLOCKS =3D 0x800 #The number of blocks in 8Mb FL= ASH Device. =20 DEFINE FLASH_REGION_VLVMICROCODE_OFFSET =3D 0x004000= 00 DEFINE FLASH_REGION_VLVMICROCODE_SIZE =3D 0x000400= 00 @@ -62,8 +60,11 @@ [FD.Vlv] # #Flash location override based on actual flash map # -SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaBaseAddress =3D $= (FLASH_AREA_BASE_ADDRESS) -SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize =3D $= (FLASH_AREA_SIZE) +SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaBaseAddress =3D $= (FLASH_BASE) +SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize =3D $= (FLASH_SIZE) + +SET gPlatformModuleTokenSpaceGuid.PcdBiosRomBase =3D $= (FLASH_BASE) +SET gPlatformModuleTokenSpaceGuid.PcdBiosRomSize =3D $= (FLASH_SIZE) =20 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress =3D $(FLASH_REGI= ON_VLVMICROCODE_BASE) + 0x60 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize =3D $(FLASH_R= EGION_VLVMICROCODE_SIZE) - 0x60 @@ -401,12 +402,9 @@ [FV.FVMAIN] INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf INF MdeModulePkg/Universal/Metronome/Metronome.inf -INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf -!if $(ARCH) =3D=3D IA32 -INF USE=3DIA32 MdeModulePkg/Logo/Logo.inf -!else -INF USE=3DX64 MdeModulePkg/Logo/Logo.inf -!endif +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +INF MdeModulePkg/Logo/LogoDxe.inf +INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index b8ac61d710..107c160b76 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -9,34 +9,32 @@ #**/ =20 [Defines] -DEFINE FLASH_BASE =3D 0xFFC00000 #The base address of the 4Mb FL= ASH Device. -DEFINE FLASH_SIZE =3D 0x00400000 #The flash size in bytes of the= 4Mb FLASH Device. -DEFINE FLASH_BLOCK_SIZE =3D 0x1000 #The block size in bytes of the = 4Mb FLASH Device. -DEFINE FLASH_NUM_BLOCKS =3D 0x400 #The number of blocks in 4Mb F= LASH Device. -DEFINE FLASH_AREA_BASE_ADDRESS =3D 0xFF8000= 00 -DEFINE FLASH_AREA_SIZE =3D 0x008000= 00 +DEFINE FLASH_BASE =3D 0xFF800000 #The base address of the 8Mb FL= ASH Device. +DEFINE FLASH_SIZE =3D 0x00800000 #The flash size in bytes of the= 8Mb FLASH Device. +DEFINE FLASH_BLOCK_SIZE =3D 0x1000 #The block size in bytes of the= 8Mb FLASH Device. +DEFINE FLASH_NUM_BLOCKS =3D 0x800 #The number of blocks in 8Mb FL= ASH Device. =20 -DEFINE FLASH_REGION_VLVMICROCODE_OFFSET =3D 0x000000= 00 +DEFINE FLASH_REGION_VLVMICROCODE_OFFSET =3D 0x004000= 00 DEFINE FLASH_REGION_VLVMICROCODE_SIZE =3D 0x000400= 00 DEFINE FLASH_REGION_VLVMICROCODE_BASE =3D 0xFFC000= 00 =20 -DEFINE FLASH_REGION_VPD_OFFSET =3D 0x000400= 00 +DEFINE FLASH_REGION_VPD_OFFSET =3D 0x004400= 00 DEFINE FLASH_REGION_VPD_SIZE =3D 0x0003E0= 00 =20 -DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET =3D 0x0007E0= 00 +DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET =3D 0x0047E0= 00 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE =3D 0x000020= 00 =20 =20 -DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET =3D 0x000800= 00 +DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET =3D 0x004800= 00 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE =3D 0x000400= 00 =20 -DEFINE FLASH_REGION_FVMAIN_OFFSET =3D 0x001100= 00 -DEFINE FLASH_REGION_FVMAIN_SIZE =3D 0x002150= 00 +DEFINE FLASH_REGION_FVMAIN_OFFSET =3D 0x005100= 00 +DEFINE FLASH_REGION_FVMAIN_SIZE =3D 0x002100= 00 =20 -DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET =3D 0x003250= 00 -DEFINE FLASH_REGION_FV_RECOVERY2_SIZE =3D 0x0006B0= 00 +DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET =3D 0x007200= 00 +DEFINE FLASH_REGION_FV_RECOVERY2_SIZE =3D 0x000700= 00 =20 -DEFINE FLASH_REGION_FV_RECOVERY_OFFSET =3D 0x003900= 00 +DEFINE FLASH_REGION_FV_RECOVERY_OFFSET =3D 0x007900= 00 DEFINE FLASH_REGION_FV_RECOVERY_SIZE =3D 0x000700= 00 =20 ##########################################################################= ###### @@ -62,8 +60,11 @@ [FD.Vlv] # #Flash location override based on actual flash map # -SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaBaseAddress =3D $= (FLASH_AREA_BASE_ADDRESS) -SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize =3D $= (FLASH_AREA_SIZE) +SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaBaseAddress =3D $= (FLASH_BASE) +SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize =3D $= (FLASH_SIZE) + +SET gPlatformModuleTokenSpaceGuid.PcdBiosRomBase =3D $= (FLASH_BASE) +SET gPlatformModuleTokenSpaceGuid.PcdBiosRomSize =3D $= (FLASH_SIZE) =20 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress =3D $(FLASH_REGI= ON_VLVMICROCODE_BASE) + 0x60 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize =3D $(FLASH_R= EGION_VLVMICROCODE_SIZE) - 0x60 @@ -84,9 +85,12 @@ [FD.Vlv] # Fv Size can be adjusted; FVMAIN_COMPACT can be reduced to 0x120000, and = FV_RECOVERY can be enlarged to 0x80000 # ##########################################################################= ###### -# Since the Fce tool don't have gcc version, we can't handle default varia= ble in Linux, -# so we hardcode the default value of variable here. -# Please note that we MUST update the binary once the default value is cha= nged. + + # + # IFWI Header + # +0x0000|0x1000 +FILE=3DVlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER.bin =20 # # CPU Microcodes @@ -347,12 +351,9 @@ [FV.FVMAIN] INF UefiCpuPkg/CpuDxe/CpuDxe.inf INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf INF MdeModulePkg/Universal/Metronome/Metronome.inf -INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf -!if $(ARCH) =3D=3D IA32 -INF USE=3DIA32 MdeModulePkg/Logo/Logo.inf -!else -INF USE=3DX64 MdeModulePkg/Logo/Logo.inf -!endif +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +INF MdeModulePkg/Logo/LogoDxe.inf +INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index 3910281c49..e4c6750c70 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -118,7 +118,6 @@ [LibraryClasses.common] DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableL= ib.inf UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf - GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf @@ -523,6 +522,8 @@ [PcdsFixedAtBuild.common] # gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000 =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } + # # Clear unused single certificate PCD # @@ -933,19 +934,18 @@ [Components.X64] } MdeModulePkg/Universal/Metronome/Metronome.inf =20 - IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf + PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } - - $(PLATFORM_PACKAGE)/UiApp/UiApp.inf + MdeModulePkg/Logo/LogoDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf + } =20 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 2ae594e5be..f5795e5ab0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -116,7 +116,6 @@ [LibraryClasses.common] DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableL= ib.inf UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf - GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf @@ -520,6 +519,8 @@ [PcdsFixedAtBuild.common] # gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000 =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } + # # Clear unused single certificate PCD # @@ -917,19 +918,18 @@ [Components.IA32] } MdeModulePkg/Universal/Metronome/Metronome.inf =20 - IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf + PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } - - $(PLATFORM_PACKAGE)/UiApp/UiApp.inf + MdeModulePkg/Logo/LogoDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf + } =20 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 5cdc9bebc8..a930a85a35 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -118,7 +118,6 @@ [LibraryClasses.common] DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableL= ib.inf UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf - GenericBdsLib|$(PLATFORM_PACKAGE)/Override/IntelFrameworkModulePkg/Libra= ry/GenericBdsLib/GenericBdsLib.inf BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf FlashDeviceLib|Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i= nf @@ -522,6 +521,8 @@ [PcdsFixedAtBuild.common] # gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000 =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } + # # Clear unused single certificate PCD # @@ -932,19 +933,18 @@ [Components.X64] } MdeModulePkg/Universal/Metronome/Metronome.inf =20 - IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf{ + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBd= sLib.inf - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPor= t.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= PortLib16550.inf + PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } - - $(PLATFORM_PACKAGE)/UiApp/UiApp.inf + MdeModulePkg/Logo/LogoDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf + } =20 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/UiApp/FrontPage.c b/Platform/= Intel/Vlv2TbltDevicePkg/UiApp/FrontPage.c deleted file mode 100644 index 3e58a6d22a..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/UiApp/FrontPage.c +++ /dev/null @@ -1,33 +0,0 @@ -/** @file - - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 - SPDX-License-Identifier: BSD-2-Clause-Patent - - = =20 - - - -**/ - -/** - The user Entry Point for Application. The user code starts with this fun= ction - as the real entry point for the image goes into a library that calls this - function. - - @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. - @param[in] 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 po= int. - -**/ -EFI_STATUS -EFIAPI -InitializeUserInterface ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - return EFI_SUCCESS; -} diff --git a/Platform/Intel/Vlv2TbltDevicePkg/UiApp/UiApp.inf b/Platform/In= tel/Vlv2TbltDevicePkg/UiApp/UiApp.inf deleted file mode 100644 index f7a0a83b80..0000000000 --- a/Platform/Intel/Vlv2TbltDevicePkg/UiApp/UiApp.inf +++ /dev/null @@ -1,32 +0,0 @@ -# -# -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
-# = =20 -# SPDX-License-Identifier: BSD-2-Clause-Patent - -# = =20 -# -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D UiApp - FILE_GUID =3D 462CAA21-7614-4503-836E-8AB6F4662331 - MODULE_TYPE =3D UEFI_APPLICATION - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D InitializeUserInterface - -# -# The following information is for reference only and not required by the = build tools. -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC -# - -[Sources] - FrontPage.c - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - UefiApplicationEntryPoint --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43069): https://edk2.groups.io/g/devel/message/43069 Mute This Topic: https://groups.io/mt/32267625/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43070+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43070+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949770; cv=none; d=zoho.com; s=zohoarc; b=XPH7GJ4jURc36yCq3HDxWoGcxKUFu4W0CnaO4m55v4wUgRP1cEfJ3Mg1/7KClOgq/rHbBjsHLWcYCiDVopIAeCrSg/Pup0UYBTackkiuLuBvqusPyvoglRQh1//xcdjRAtwTZGmSQXxo8hG0uXGioVpJMVQ357LuNVozGqpKLxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949770; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=6g4eA+0kF48csxHDVcfP7aIFQpZYY3cMo+xyTxLQOMY=; b=hn69fCIJgkOzF/9ndesr/abJGF4U3fGmFQuJUo53CbkrRj0Cw3QRqDUCw3wv/fFT6JuSKRnp9CCGq2ix3vQTu/R4s63J2DRMy47PeyrgSYeOB5fNhPrJ7OlIGJIYQA5017NQkslcVNA/vriXwtOCuafXEOkLUerKZtgD5fnbXXA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43070+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156194977033919.3416288218167; Sun, 30 Jun 2019 19:56:10 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480245" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:07 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 11/14] Vlv2TbltDevicePkg: Update boot mode/state behaviors Date: Sun, 30 Jun 2019 19:55:50 -0700 Message-Id: <20190701025553.18596-12-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949769; bh=tRDvc0okZged8z5B8fjDnu+qzqy7Hy5qXlpvcStqjwg=; h=Cc:Date:From:Reply-To:Subject:To; b=dC0pyEz5xkyxmH+pLFuNI4LAbqig1Gvst1N32NqaCT9W/tGcYKOdNfk4fB7cOIAeZTG x47N7bdAhpGXRbGsGUKzKcPF1a9lOe8xJXDH7e10l2r9HnzD9yrHfffaa7nOlAdk4VH69 9i/x8ZWUbTpTmXCh9XOcYAx2IMBwxugH/gE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Add platform specific PcdBootState PCD to remove Intel Framework dependency * Set PcdUserPhysicalPresence to TRUE to Enable UEFI Secure Boot Setup Menus * Remove unused code when NOCS_S3_SUPPORT is not set * Update PlatformBootManagerLib to not perform a connect all when FastBoot is enabled. * Add support for BOOT_ON_FLASH_UPDATE * Remove logic in CheckSystemConfigSave() that was generating an ASSERT() when setup changes were saved. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../DxePlatformBootManagerLib/BdsPlatform.c | 33 ++++++- .../DxePlatformBootManagerLib.inf | 4 +- .../PlatformDxe/PlatformDxe.inf | 1 - .../Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 99 +------------------ .../Vlv2TbltDevicePkg/PlatformPei/Platform.c | 8 -- .../Vlv2TbltDevicePkg/PlatformPei/Platform.h | 27 +---- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 8 ++ .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 + .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 + .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 + .../PlatformSetupDxe/PlatformSetupDxe.inf | 1 - .../PlatformSetupDxe/SetupInfoRecords.c | 51 ---------- 12 files changed, 51 insertions(+), 187 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/BdsPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBo= otManagerLib/BdsPlatform.c index 4dd3827a6e..7fbbf281c6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Bd= sPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Bd= sPlatform.c @@ -1,7 +1,7 @@ /** @file This file include all platform action which can be customized by IBV/OEM. =20 -Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -1164,7 +1164,7 @@ PlatformBootManagerBeforeConsole ( // Fill ConIn/ConOut in Full Configuration boot mode // gBootMode =3D GetBootModeHob(); - DEBUG ((DEBUG_INFO, "PlatformBootManagerInit - %x\n", gBootMode)); + DEBUG ((DEBUG_INFO, "PlatformBootManagerBeforeConsole: BootMode =3D %x\n= ", gBootMode)); =20 if (gBootMode =3D=3D BOOT_WITH_FULL_CONFIGURATION || gBootMode =3D=3D BOOT_WITH_DEFAULT_SETTINGS || @@ -1263,7 +1263,18 @@ ConnectSequence ( IN EFI_BOOT_MODE BootMode ) { - EfiBootManagerConnectAll (); + switch (BootMode) { + case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: + case BOOT_WITH_MINIMAL_CONFIGURATION: + case BOOT_ON_S4_RESUME: + break; + case BOOT_WITH_FULL_CONFIGURATION: + case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: + case BOOT_WITH_DEFAULT_SETTINGS: + default: + EfiBootManagerConnectAll (); + break; + } } =20 /** @@ -1311,6 +1322,7 @@ PlatformBootManagerAfterConsole ( VOID ) { + EFI_STATUS Status; EFI_BOOT_MODE LocalBootMode; =20 DEBUG ((DEBUG_INFO, "PlatformBootManagerAfterConsole\n")); @@ -1319,7 +1331,7 @@ PlatformBootManagerAfterConsole ( // Get current Boot Mode // LocalBootMode =3D gBootMode; - DEBUG ((DEBUG_INFO, "Current local bootmode - %x\n", LocalBootMode)); + DEBUG ((DEBUG_INFO, "PlatformBootManagerAfterConsole: BootMode =3D %x\n"= , gBootMode)); =20 // // Logo show @@ -1372,6 +1384,19 @@ PlatformBootManagerAfterConsole ( break; } =20 + // + // Use a DynamicHii type pcd to save the boot status, which is used to + // control configuration mode, such as FULL/MINIMAL/NO_CHANGES configura= tion. + // + DEBUG ((DEBUG_INFO, "PcdBootState =3D %d\n", PcdGetBool(PcdBootState))); + if (PcdGetBool(PcdBootState)) { + Status =3D PcdSetBoolS(PcdBootState, FALSE); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Set PcdBootState to FALSE failed.\n")); + } + DEBUG ((DEBUG_INFO, "PcdBootState =3D %d\n", PcdGetBool(PcdBootState))= ); + } + Print (L"Press F7 for BootMenu!\n"); =20 EfiBootManagerRefreshAllBootOption (); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManage= rLib/DxePlatformBootManagerLib.inf b/Platform/Intel/Vlv2TbltDevicePkg/Libra= ry/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf index b04169ad33..0579a18660 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Dx= ePlatformBootManagerLib.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Dx= ePlatformBootManagerLib.inf @@ -1,7 +1,7 @@ ### @file # Component name for module DxePlatformBootManagerLib # -# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -48,6 +48,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec SecurityPkg/SecurityPkg.dec MinPlatformPkg/MinPlatformPkg.dec + Vlv2TbltDevicePkg/PlatformPkg.dec =20 [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable ## CONSUM= ES @@ -66,6 +67,7 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleInputDevicePath ## CONSU= MES gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleOutputDevicePath ## CONSU= MES gMinPlatformPkgTokenSpaceGuid.PcdTrustedStorageDevicePath ## CONSU= MES + gPlatformModuleTokenSpaceGuid.PcdBootState =20 [Sources] BdsPlatform.c diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index a9ef744ef7..9fee691365 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -84,7 +84,6 @@ [Guids] gEfiGlobalVariableGuid gEfiEventExitBootServicesGuid gEfiVlv2VariableGuid - gEfiSecureBootEnableDisableGuid gEfiEndOfDxeEventGroupGuid =20 [Protocols] diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c index 9fdcb620a3..5269b1ed39 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -84,6 +82,7 @@ CapsulePpiNotifyCallback ( if (Status =3D=3D EFI_SUCCESS) { if (Capsule->CheckCapsuleUpdate ((EFI_PEI_SERVICES**)PeiServices) = =3D=3D EFI_SUCCESS) { BootMode =3D BOOT_ON_FLASH_UPDATE; + DEBUG ((EFI_D_ERROR, "Setting BootMode to BOOT_ON_FLASH_UPDATE\n")= ); Status =3D (*PeiServices)->SetBootMode((const EFI_PEI_SERVICES **)= PeiServices, BootMode); ASSERT_EFI_ERROR (Status); } @@ -93,98 +92,6 @@ CapsulePpiNotifyCallback ( return Status; } =20 -#ifdef NOCS_S3_SUPPORT -EFI_STATUS -UpdateBootMode ( - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; - UINT16 SleepType; - CHAR16 *strBootMode; - - Status =3D (*PeiServices)->GetBootMode(PeiServices, &BootMode); - ASSERT_EFI_ERROR (Status); - if (BootMode =3D=3D BOOT_IN_RECOVERY_MODE){ - return Status; - } - - // - // Let's assume things are OK if not told otherwise - // - BootMode =3D BOOT_WITH_FULL_CONFIGURATION; - - if (GetSleepTypeAfterWakeup (PeiServices, &SleepType)) { - switch (SleepType) { - case V_PCH_ACPI_PM1_CNT_S3: - BootMode =3D BOOT_ON_S3_RESUME; - Status =3D (*PeiServices)->NotifyPpi (PeiServices, &mCapsuleNotify= List[0]); - ASSERT_EFI_ERROR (Status); - break; - - case V_PCH_ACPI_PM1_CNT_S4: - BootMode =3D BOOT_ON_S4_RESUME; - break; - - case V_PCH_ACPI_PM1_CNT_S5: - BootMode =3D BOOT_ON_S5_RESUME; - break; - } // switch (SleepType) - } - - if (IsFastBootEnabled (PeiServices)) { - DEBUG ((EFI_D_INFO, "Prioritizing Boot mode to BOOT_WITH_MINIMAL_CONFI= GURATION\n")); - PrioritizeBootMode (&BootMode, BOOT_WITH_MINIMAL_CONFIGURATION); - } - - switch (BootMode) { - case BOOT_WITH_FULL_CONFIGURATION: - strBootMode =3D L"BOOT_WITH_FULL_CONFIGURATION"; - break; - case BOOT_WITH_MINIMAL_CONFIGURATION: - strBootMode =3D L"BOOT_WITH_MINIMAL_CONFIGURATION"; - break; - case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: - strBootMode =3D L"BOOT_ASSUMING_NO_CONFIGURATION_CHANGES"; - break; - case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: - strBootMode =3D L"BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS"; - break; - case BOOT_WITH_DEFAULT_SETTINGS: - strBootMode =3D L"BOOT_WITH_DEFAULT_SETTINGS"; - break; - case BOOT_ON_S4_RESUME: - strBootMode =3D L"BOOT_ON_S4_RESUME"; - break; - case BOOT_ON_S5_RESUME: - strBootMode =3D L"BOOT_ON_S5_RESUME"; - break; - case BOOT_ON_S2_RESUME: - strBootMode =3D L"BOOT_ON_S2_RESUME"; - break; - case BOOT_ON_S3_RESUME: - strBootMode =3D L"BOOT_ON_S3_RESUME"; - - break; - case BOOT_ON_FLASH_UPDATE: - strBootMode =3D L"BOOT_ON_FLASH_UPDATE"; - break; - case BOOT_IN_RECOVERY_MODE: - strBootMode =3D L"BOOT_IN_RECOVERY_MODE"; - break; - default: - strBootMode =3D L"Unknown boot mode"; - } // switch (BootMode) - - DEBUG ((EFI_D_ERROR, "Setting BootMode to %s\n", strBootMode)); - Status =3D (*PeiServices)->SetBootMode(PeiServices, BootMode); - ASSERT_EFI_ERROR (Status); - - return Status; -} -#endif - /** Get sleep type after wakeup =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c index aa03f6ea95..90998871dc 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c @@ -813,14 +813,6 @@ PeiInitPlatform ( sizeof (EFI_PLATFORM_INFO_HOB) ); =20 - // - // Set the new boot mode for MRC - // -#ifdef NOCS_S3_SUPPORT - Status =3D UpdateBootMode (PeiServices); - ASSERT_EFI_ERROR (Status); -#endif - DEBUG((EFI_D_INFO, "Setup MMIO size ... \n\n")); =20 // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h index e1817b28c6..4f71e519e0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h @@ -1,12 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - **/ =20 =20 @@ -24,26 +21,6 @@ typedef struct { =20 #define STALL_PEIM_FROM_THIS(a) CR (a, STALL_CALLBACK_STATE_INFORMATION, S= tallNotify, STALL_PEIM_SIGNATURE) =20 -#ifdef NOCS_S3_SUPPORT - -/** - Peform the boot mode determination logic - If the box is closed, then - 1. If it's first time to boot, it's boot with full config . - 2. If the ChassisIntrution is selected, force to be a boot with full con= fig - 3. Otherwise it's boot with no change. - - @param PeiServices General purpose services available to every PEIM. - @param BootMode The detected boot mode. - - @retval EFI_SUCCESS if the boot mode could be set -**/ -EFI_STATUS -UpdateBootMode ( - IN CONST EFI_PEI_SERVICES **PeiServices - ); -#endif - /** This function reset the entire platform, including all processor and dev= ices, and reboots the system. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index 5b255f4b05..a5c7062cbb 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -161,6 +161,14 @@ [PcdsDynamic,PcdsDynamicEx] gPlatformModuleTokenSpaceGuid.PcdInConfigMode|FALSE|BOOLEAN|0x80000001 gPlatformModuleTokenSpaceGuid.PcdConnectUSBKeyboardonWaitForKeyStroke|FA= LSE|BOOLEAN|0x80000002 gPlatformModuleTokenSpaceGuid.PcdEnableWatchdogSwSmiInputValue|0|UINT8|0= x80000003 + + ## Indicates if the machine has completed one boot cycle before. + # After the complete boot, BootState will be set to FALSE.

+ # TRUE - The complete boot cycle has not happened before.
+ # FALSE - The complete boot cycle has happened before.
+ # @Prompt Boot State Flag + gPlatformModuleTokenSpaceGuid.PcdBootState|TRUE|BOOLEAN|0x80000004 + # #device firmware update support # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index e4c6750c70..2123745ccd 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -680,6 +680,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common.DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"|= gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModuleT= okenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -733,6 +734,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index f5795e5ab0..086668d570 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -677,6 +677,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common.DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"|= gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModuleT= okenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -730,6 +731,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index a930a85a35..5f2dd65ec8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -679,6 +679,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common.DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"|= gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModuleT= okenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -732,6 +733,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupD= xe.inf index b745574421..85e8b1e8d6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf @@ -93,7 +93,6 @@ [Guids] gEfiIfrTianoGuid ## CONSUMES ## Guid gEfiPlatformInfoGuid gEfiNormalSetupGuid - gEfiSecureBootEnableDisableGuid gOsSelectionVariableGuid gEfiGlobalVariableGuid =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRec= ords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords= .c index efd4a723e1..be99356d0f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -1448,60 +1448,9 @@ CheckSystemConfigLoad(SYSTEM_CONFIGURATION *SystemCo= nfigPtr) } } =20 - -// -// "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 =3D sizeof(SecureBootCfg); - SecureBootNotFound =3D FALSE; - Status =3D gRT->GetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - NULL, - &DataSize, - &SecureBootCfg - ); - - if (EFI_ERROR(Status)) { - SecureBootNotFound =3D TRUE; - } - if (SecureBootNotFound) { - Status =3D gRT->GetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - NULL, - &DataSize, - &SecureBootCfg - ); - ASSERT_EFI_ERROR(Status); - } - if ((SecureBootCfg) !=3D SystemConfigPtr->SecureBoot) { - SecureBootCfg =3D !SecureBootCfg; - Status =3D gRT->SetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE= _ACCESS, - sizeof (UINT8), - &SecureBootCfg - ); - } - } =20 VOID --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43070): https://edk2.groups.io/g/devel/message/43070 Mute This Topic: https://groups.io/mt/32267626/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43071+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43071+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949770; cv=none; d=zoho.com; s=zohoarc; b=iePX3trIAD9xrC7hhjcu6HwcGg222SPl7qHyQxYtr4dp9sLXBURnnbatKR1GjkIzjGSsLj/cJeejUUa4Ga57qIeiDrwuoy88GLw1g52Im8AS3OOp1C/YbOwz3w9e4/Fe2MsoQOCjBnGtQeeDjNZ/GCF0eTY5F4MwjmDIhuGZCwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949770; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Uu1Qo4BZkQA5Gs00NCDNl4GoMLoBJCITMsqzprLKcfo=; b=iVKd7yhiu8O6Cbu/0KFBLXE2r+XeEhf8sFIseo6UsZYY+kCM/VZd6jCrdVPJVQZrcBi1nNOqWDdp/5GSxPORz6U6/P7+e5GxnXdbpCyyjC+Ze4HVBpyTZbqtJUMVyhQGPObn5pNWp54D+KRhs/XEq/ICuUPPWEYU/U9Pso5l3Fg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43071+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949770540123.92740632905748; Sun, 30 Jun 2019 19:56:10 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480250" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 12/14] Vlv2TbltDevicePkg/PlatformSmm: Switch to PI SMM Protocols Date: Sun, 30 Jun 2019 19:55:51 -0700 Message-Id: <20190701025553.18596-13-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949770; bh=RiysKCJeCANifxB5290GXh0EFtZsbxtJcH7aYiC5sIQ=; h=Cc:Date:From:Reply-To:Subject:To; b=cR4/jotGDll6f0rO89OqugZZbHUOIFtJD9VIYoCOU/mPsE0ChsLcB71j06R79MPYp2e ni0vy4hLTX5q1mCjywkwBfBaFHGyR1ivrKQ+bTpTMbEogsvxGPzYYJHVb2ttK6m3N4O6N mDOUgdqJEPn1BIhU6WjlfqMf97TT38lljwI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Change use of Intel Framework SMM Protocols to PI SMM Protocols. This removes Intel Framework dependencies. The PI SMM Protocols added are: * gEfiSmmPowerButtonDispatch2ProtocolGuid * gEfiSmmSxDispatch2ProtocolGuid * gEfiSmmSwDispatch2ProtocolGuid Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Vlv2TbltDevicePkg/PlatformSmm/Platform.c | 112 +++++++++++------- .../PlatformSmm/PlatformSmm.inf | 16 +-- .../PlatformSmm/SmmPlatform.h | 104 +++++++--------- 3 files changed, 114 insertions(+), 118 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c index fb9d090ada..c78174ed08 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c @@ -101,14 +101,14 @@ InitializePlatformSmm ( EFI_STATUS Status; UINT8 Index; EFI_HANDLE Handle; - EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT PowerButtonContext; - EFI_SMM_POWER_BUTTON_DISPATCH_PROTOCOL *PowerButtonDispatch; + EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT PowerButtonContext; + EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL *PowerButtonDispatch; EFI_SMM_ICHN_DISPATCH_CONTEXT IchnContext; EFI_SMM_ICHN_DISPATCH_PROTOCOL *IchnDispatch; - EFI_SMM_SX_DISPATCH_PROTOCOL *SxDispatch; - EFI_SMM_SX_DISPATCH_CONTEXT EntryDispatchContext; - EFI_SMM_SW_DISPATCH_PROTOCOL *SwDispatch; - EFI_SMM_SW_DISPATCH_CONTEXT SwContext; + EFI_SMM_SX_DISPATCH2_PROTOCOL *SxDispatch; + EFI_SMM_SX_REGISTER_CONTEXT EntryDispatchContext; + EFI_SMM_SW_DISPATCH2_PROTOCOL *SwDispatch; + EFI_SMM_SW_REGISTER_CONTEXT SwContext; UINTN VarSize; EFI_BOOT_MODE BootMode; =20 @@ -171,18 +171,18 @@ InitializePlatformSmm ( // // Get the Power Button protocol // - Status =3D gBS->LocateProtocol( - &gEfiSmmPowerButtonDispatchProtocolGuid, - NULL, - (void **)&PowerButtonDispatch - ); + Status =3D gSmst->SmmLocateProtocol( + &gEfiSmmPowerButtonDispatch2ProtocolGuid, + NULL, + (VOID **)&PowerButtonDispatch + ); ASSERT_EFI_ERROR(Status); =20 if (BootMode !=3D BOOT_ON_FLASH_UPDATE) { // // Register for the power button event // - PowerButtonContext.Phase =3D PowerButtonEntry; + PowerButtonContext.Phase =3D EfiPowerButtonEntry; Status =3D PowerButtonDispatch->Register( PowerButtonDispatch, PowerButtonCallback, @@ -194,11 +194,11 @@ InitializePlatformSmm ( // // Get the Sx dispatch protocol // - Status =3D gBS->LocateProtocol ( - &gEfiSmmSxDispatchProtocolGuid, - NULL, - (void **)&SxDispatch - ); + Status =3D gSmst->SmmLocateProtocol( + &gEfiSmmSxDispatch2ProtocolGuid, + NULL, + (VOID **)&SxDispatch + ); ASSERT_EFI_ERROR(Status); =20 // @@ -209,7 +209,7 @@ InitializePlatformSmm ( =20 Status =3D SxDispatch->Register ( SxDispatch, - (EFI_SMM_SX_DISPATCH)SxSleepEntryCallBack, + SxSleepEntryCallBack, &EntryDispatchContext, &Handle ); @@ -247,11 +247,11 @@ InitializePlatformSmm ( // // Get the Sw dispatch protocol // - Status =3D gBS->LocateProtocol ( - &gEfiSmmSwDispatchProtocolGuid, - NULL, - (void **)&SwDispatch - ); + Status =3D gSmst->SmmLocateProtocol ( + &gEfiSmmSwDispatch2ProtocolGuid, + NULL, + (VOID **)&SwDispatch + ); ASSERT_EFI_ERROR(Status); =20 // @@ -341,11 +341,13 @@ InitializePlatformSmm ( return EFI_SUCCESS; } =20 -VOID +EFI_STATUS EFIAPI SmmReadyToBootCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { EFI_STATUS Status; @@ -371,6 +373,7 @@ SmmReadyToBootCallback ( mSetSmmVariableProtocolSmiAllowed =3D FALSE; } =20 + return EFI_SUCCESS; } =20 /** @@ -385,8 +388,10 @@ SmmReadyToBootCallback ( EFI_STATUS EFIAPI =20 SxSleepEntryCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { EFI_STATUS Status; @@ -479,11 +484,13 @@ SetAfterG3On ( When a power button event happens, it shuts off the machine =20 **/ -VOID +EFI_STATUS EFIAPI PowerButtonCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { // @@ -538,6 +545,8 @@ PowerButtonCallback ( // Should not return // CpuDeadLoop(); + + return EFI_SUCCESS; } =20 =20 @@ -547,11 +556,13 @@ PowerButtonCallback ( @param DispatchContext - The predefined context which contained sleep ty= pe and phase =20 **/ -VOID +EFI_STATUS EFIAPI S5SleepAcLossCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { // @@ -561,6 +572,7 @@ S5SleepAcLossCallBack ( if (mAcLossVariable =3D=3D 1) { SetAfterG3On (TRUE); } + return EFI_SUCCESS; } =20 /** @@ -571,11 +583,13 @@ S5SleepAcLossCallBack ( @retval Clears the Save State bit in the clock. =20 **/ -VOID +EFI_STATUS EFIAPI S4S5CallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { =20 @@ -590,6 +604,7 @@ S4S5CallBack ( IoWrite32(GPIO_BASE_ADDRESS + R_PCH_GPIO_SC_LVL, Data32); } =20 + return EFI_SUCCESS; } =20 =20 @@ -624,16 +639,18 @@ S4S5ProgClock() Enable SCI =20 @param DispatchHandle - EFI Handle - @param DispatchContext - Pointer to the EFI_SMM_SW_DISPATCH_CONTEXT + @param DispatchContext - Pointer to the EFI_SMM_SW_REGISTER_CONTEXT =20 @retval Nothing =20 **/ -VOID +EFI_STATUS EFIAPI EnableAcpiCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { UINT32 SmiEn; @@ -690,7 +707,7 @@ EnableAcpiCallback ( Pm1Cnt |=3D B_PCH_ACPI_PM1_CNT_SCI_EN; IoWrite16(mAcpiBaseAddr + R_PCH_ACPI_PM1_CNT, Pm1Cnt); =20 - + return EFI_SUCCESS; } =20 /** @@ -710,16 +727,18 @@ EnableAcpiCallback ( Disable SCI =20 @param DispatchHandle - EFI Handle - @param DispatchContext - Pointer to the EFI_SMM_SW_DISPATCH_CONTEXT + @param DispatchContext - Pointer to the EFI_SMM_SW_REGISTER_CONTEXT =20 @retval Nothing =20 **/ -VOID +EFI_STATUS EFIAPI DisableAcpiCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ) { UINT16 Pm1Cnt; @@ -737,6 +756,7 @@ DisableAcpiCallback ( Pm1Cnt &=3D ~B_PCH_ACPI_PM1_CNT_SCI_EN; IoWrite16(mAcpiBaseAddr + R_PCH_ACPI_PM1_CNT, Pm1Cnt); =20 + return EFI_SUCCESS; } =20 /** diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf b= /Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf index 73c3b6f2d0..9aff4a4895 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf @@ -36,6 +36,7 @@ [Sources] [LibraryClasses] UefiDriverEntryPoint UefiBootServicesTableLib + SmmServicesTableLib DebugLib IoLib BaseLib @@ -52,15 +53,14 @@ [Guids] [Protocols] gEfiSmmIchnDispatchProtocolGuid gEfiGlobalNvsAreaProtocolGuid - gEfiSmmSwDispatchProtocolGuid - gEfiSmmPowerButtonDispatchProtocolGuid - gEfiSmmSxDispatchProtocolGuid + gEfiSmmSwDispatch2ProtocolGuid + gEfiSmmPowerButtonDispatch2ProtocolGuid + gEfiSmmSxDispatch2ProtocolGuid gEfiSmmVariableProtocolGuid =20 [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec =20 @@ -68,11 +68,11 @@ [Pcd.common] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress =20 [Depex] - gEfiSmmAccess2ProtocolGuid AND - gEfiSmmPowerButtonDispatchProtocolGuid AND - gEfiSmmSxDispatchProtocolGuid AND + gEfiSmmAccess2ProtocolGuid AND + gEfiSmmPowerButtonDispatch2ProtocolGuid AND + gEfiSmmSxDispatch2ProtocolGuid AND gEfiSmmIchnDispatchProtocolGuid AND - gEfiSmmSwDispatchProtocolGuid AND + gEfiSmmSwDispatch2ProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND gEfiGlobalNvsAreaProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h b/P= latform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h index bcb1d8ae92..735a562e3e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h @@ -21,18 +21,16 @@ Abstract: =20 =20 =20 -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include #include -#include "Protocol/GlobalNvsArea.h" +#include #include #include #include @@ -42,6 +40,7 @@ Abstract: #include "PlatformBaseAddresses.h" =20 #include +#include #include #include #include @@ -130,53 +129,59 @@ extern EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridg= eIo; // // Callback function prototypes // -VOID +EFI_STATUS EFIAPI PowerButtonCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_POWER_BUTTON_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 -VOID -S5SleepWakeOnLanCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext - ); - -VOID +EFI_STATUS EFIAPI S5SleepAcLossCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 =20 -VOID +EFI_STATUS EFIAPI =20 S4S5CallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 -VOID +EFI_STATUS EFIAPI =20 EnableAcpiCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 -VOID +EFI_STATUS EFIAPI DisableAcpiCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 -VOID +EFI_STATUS EFIAPI SmmReadyToBootCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 VOID @@ -185,46 +190,18 @@ DummyTco1Callback ( IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext ); =20 - -VOID -PerrSerrCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext - ); - -VOID -RiCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext - ); - - VOID SetAfterG3On ( BOOLEAN Enable ); =20 -VOID -TurnOffVregUsb ( - ); - -VOID -PStateSupportCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext - ); - -VOID -PStateTransitionCallback ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext - ); - EFI_STATUS EFIAPI =20 SxSleepEntryCallBack ( - IN EFI_HANDLE DispatchHandle, - IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext + IN EFI_HANDLE DispatchHandle, + IN CONST VOID *Context OPTIONAL, + IN OUT VOID *CommBuffer OPTIONAL, + IN OUT UINTN *CommBufferSize OPTIONAL ); =20 EFI_STATUS @@ -232,6 +209,5 @@ SaveRuntimeScriptTable ( VOID ); =20 - #endif =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43071): https://edk2.groups.io/g/devel/message/43071 Mute This Topic: https://groups.io/mt/32267627/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43072+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43072+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949770; cv=none; d=zoho.com; s=zohoarc; b=XQuDcoWAS2sfiedVBSHYr2+3wGGU9FX1be+Kt9XAafxnK6TH8d6eLrexvQz69FhnVLG9tJA5guRA9MqMVvSIL/jMaTff+au0ihosIzfZgXjfEgx4CVQiuAvOy173JoDe46UVFPOjTmP9bE7XiGzHNXQBxGCg8LQt5AXguS+JS9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949770; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=l43auo6fnPZYq6LAjxWxwfxTEMvKAlPJ48imo5W36tA=; b=P3ml/npdA6JLaDek2WYkNADiT4PYPdQoMnbSVq4k2tXnCKiDbzOA4VeoUAXZJEKRAxE1RQSpdONOHmWJk1jN+wL2kJZ45kuvxcuVUp15MwDg8BFZjAofpRhfKH4Op1tgZQCXirJ5Ld0Payxj68yZ6JqS8jPW/4MXvKs1Behdono= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43072+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949770727953.4847746406025; Sun, 30 Jun 2019 19:56:10 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480253" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol Date: Sun, 30 Jun 2019 19:55:52 -0700 Message-Id: <20190701025553.18596-14-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949770; bh=rWZ7MFbNkmjIkokNMNqggDU1PZ7Gh7m2pS3Be7BINts=; h=Cc:Date:From:Reply-To:Subject:To; b=pFDTiPf0GBHpfZmlbRtTO1ToFM6ymAYEcVSOwLdgpfyJ08oPW7y6LPMavuLoT6Md7KC 0g6XVRVdCrjcjrlVs5cGjRcHpfyp80saHWkxZ7+LLvDksDORmlqaen62ShrGjxFL8MCZ/ 1+YkdZIOS2A/YeOUTeUTdpjTkG4SM2mGZCw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Remove use of ACPI Support Protocol from IntelFrameworkPkg and use the ACPI Table Protocol and ACPI SDT Protocol from the MdePkg. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../AcpiPlatform/AcpiPlatform.c | 72 +++++-------------- .../AcpiPlatform/AcpiPlatform.h | 2 +- .../AcpiPlatform/AcpiPlatform.inf | 5 +- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 +- 9 files changed, 26 insertions(+), 64 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 13d904b834..962baf561d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -35,8 +35,7 @@ Abstract: #include #include #include -#include -#include +#include #include #include #include @@ -142,15 +141,15 @@ LocateSupportProtocol ( // // See if it has the ACPI storage file. // - Status =3D ((EFI_FIRMWARE_VOLUME_PROTOCOL *) (*Instance))->ReadFile ( - *Instance, - &gEfiAcpiTab= leStorageGuid, - NULL, - &Size, - &FileType, - &Attributes, - &FvStatus - ); + Status =3D ((EFI_FIRMWARE_VOLUME2_PROTOCOL *) (*Instance))->ReadFile ( + *Instance, + &gEfiAcpiT= ableStorageGuid, + NULL, + &Size, + &FileType, + &Attribute= s, + &FvStatus + ); =20 // // If we found it, then we are done. @@ -633,13 +632,11 @@ OnReadyToBoot ( ) { EFI_STATUS Status; - EFI_ACPI_TABLE_VERSION TableVersion; - EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; SYSTEM_CONFIGURATION SetupVarBuffer; UINTN VariableSize; EFI_PLATFORM_CPU_INFO *PlatformCpuInfoPtr =3D NULL; EFI_PLATFORM_CPU_INFO PlatformCpuInfo; - EFI_PEI_HOB_POINTERS GuidHob; + EFI_PEI_HOB_POINTERS GuidHob; =20 if (mFirstNotify) { return; @@ -701,23 +698,6 @@ OnReadyToBoot ( ); ASSERT_EFI_ERROR (Status); } - - // - // Find the AcpiSupport protocol. - // - Status =3D LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **= ) &AcpiSupport, 0); - ASSERT_EFI_ERROR (Status); - - TableVersion =3D EFI_ACPI_TABLE_VERSION_2_0; - - // - // Publish ACPI 1.0 or 2.0 Tables. - // - Status =3D AcpiSupport->PublishTables ( - AcpiSupport, - TableVersion - ); - ASSERT_EFI_ERROR (Status); } =20 VOID @@ -759,8 +739,8 @@ AcpiPlatformEntryPoint ( { EFI_STATUS Status; EFI_STATUS AcpiStatus; - EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; + EFI_ACPI_TABLE_PROTOCOL *AcpiTable; + EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; INTN Instance; EFI_ACPI_COMMON_HEADER *CurrentTable; UINTN TableHandle; @@ -821,9 +801,9 @@ AcpiPlatformEntryPoint ( } =20 // - // Find the AcpiSupport protocol. + // Find the AcpiTable protocol. // - Status =3D LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **= ) &AcpiSupport, 0); + Status =3D LocateSupportProtocol (&gEfiAcpiTableProtocolGuid, (VOID **) = &AcpiTable, 0); ASSERT_EFI_ERROR (Status); =20 // @@ -1171,11 +1151,10 @@ AcpiPlatformEntryPoint ( // Add the table. // TableHandle =3D 0; - AcpiStatus =3D AcpiSupport->SetAcpiTable ( - AcpiSupport, + AcpiStatus =3D AcpiTable->InstallAcpiTable ( + AcpiTable, CurrentTable, - TRUE, - TableVersion, + Size, &TableHandle ); ASSERT_EFI_ERROR (AcpiStatus); @@ -1189,21 +1168,6 @@ AcpiPlatformEntryPoint ( } } =20 - // - // Publish ACPI 1.0 or 2.0 Tables. - // -// Status =3D AcpiSupport->PublishTables ( -// AcpiSupport, -// TableVersion -// ); -// ASSERT_EFI_ERROR (Status); - -// Status =3D EfiCreateEventReadyToBootEx ( -// TPL_NOTIFY, -// OnReadyToBoot, -// NULL, -// &Event -// ); Event =3D NULL; OnReadyToBoot (Event, NULL); =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b= /Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h index b27ca661ff..8289eecc6d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h @@ -30,7 +30,7 @@ Abstract: #include #include #include -#include +#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf= b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf index ce4db9fa85..6f843d6d2e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf @@ -34,7 +34,6 @@ [sources.common] [Packages] Vlv2TbltDevicePkg/PlatformPkg.dec MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec @@ -64,7 +63,7 @@ [Guids] [Protocols] gEnhancedSpeedstepProtocolGuid gEfiPlatformCpuProtocolGuid - gEfiAcpiSupportProtocolGuid + gEfiAcpiTableProtocolGuid gEfiFirmwareVolume2ProtocolGuid gEfiMpServiceProtocolGuid gEfiGlobalNvsAreaProtocolGuid @@ -78,5 +77,5 @@ [Pcd] [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND - gEfiAcpiSupportProtocolGuid AND + gEfiAcpiTableProtocolGuid AND gEfiMpServiceProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.dec index a5c7062cbb..abe9d7e3a0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -44,7 +44,6 @@ [Guids] gEfiSetupVariableGuid =3D { 0xec87d643, 0xeba4, 0x4bb5= , { 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0x0d, 0xa9 } } gEfiPlatformInfoGuid =3D { 0x1e2acc41, 0xe26a, 0x483d= , { 0xaf, 0xc7, 0xa0, 0x56, 0xc3, 0x4e, 0x08, 0x7b } } gMfgModeVariableGuid =3D { 0xEF14FD78, 0x0793, 0x4e2b= , { 0xAC, 0x6D, 0x06, 0x28, 0x47, 0xE0, 0x17, 0x91 } } - gEfiAcpiTableStorageGuid =3D { 0x7e374e25, 0x8e01, 0x4fee= , { 0x87, 0xf2, 0x39, 0x0c, 0x23, 0xc6, 0x06, 0xcd } } gACPIOSFRMfgStringVariableGuid =3D { 0x72234213, 0x0fd7, 0x48a1= , { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRRefDataBlockVariableGuid =3D { 0x72234213, 0x0fd7, 0x48a1= , { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRModelStringVariableGuid =3D { 0xca1bcad9, 0xe021, 0x4547= , { 0xa1, 0xb0, 0x5b, 0x22, 0xc7, 0xf6, 0x87, 0xf4 } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkg.fdf index b0fbbdb9cb..0661c778c1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -504,7 +504,7 @@ [FV.FVMAIN] # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDx= e.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index 107c160b76..06bdebb10b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -453,7 +453,7 @@ [FV.FVMAIN] # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDx= e.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index 2123745ccd..b558caa61f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -1108,7 +1108,7 @@ [Components.X64] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 086668d570..99ada0ef0a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -1092,7 +1092,7 @@ [Components.IA32] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 5f2dd65ec8..87404d2d82 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -1107,7 +1107,7 @@ [Components.X64] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43072): https://edk2.groups.io/g/devel/message/43072 Mute This Topic: https://groups.io/mt/32267628/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 8 08:09:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43073+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43073+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949770; cv=none; d=zoho.com; s=zohoarc; b=TfjSntrOacGBkWzvdP62h4Ycf6qJn+65bcs/9SWyhcbKgRFccdFZslFhOyseG5B0crWyCHvOCNbaGIsypDgXVpcR5wrW8pq7I+H2M5//A/m1Tg4DISNz7pR7rVv5mfgNugSmDoVrDNKZqNkgTb2lv3ZKG5FFCqlD6EEcUa10Gko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949770; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=j1XjPVmeRMSby4q7NGdobF8GH9XMRqPBLNzFH8kIX+8=; b=E9CfNwoHs78KRmmIcjllkzzFFqt7BgGOq1BSQaPkDgaCqPK5IruKNv2D+HnNMsdjNHnaWng5TajXvU8oX6zrGn65+165mzaO3Zn4JXY6mbJDUJh/UXg2sq181t2Yovp/LMC4gZ6dO7rlZ41qkQwWvboJgoFT3tFG8I0kvP5xw8I= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43073+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156194977076855.26456322264107; Sun, 30 Jun 2019 19:56:10 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480259" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:09 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 14/14] Vlv2TbltDevicePkg/PlatformInitPei: Update MemoryTypeInformation Date: Sun, 30 Jun 2019 19:55:53 -0700 Message-Id: <20190701025553.18596-15-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561949770; bh=9BwYplotQ/z4azjIGXPBgUe95AkIKI7e6EcNW1YOedI=; h=Cc:Date:From:Reply-To:Subject:To; b=DkppW4nqBT9JVq7loSo1ssGLFrrzmllbc3SgyYCbVY057GF0rV23GznFJSqkKn3xo2I qOa+EfKKaofZ/IREOgHCjBAbKRdIKVMZPQh8rKBUqYM4g7OWZ2AgyNH86GMTSbeqgB7xg O/yCl/02dfAquGQD7UotxUS0CnI6C6b6KRQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Reduce extra reboots when UEFI Shell is run followed by an OS boot. The extra reboot is due to use of EfiLoaderCode that exceeds the MemoryTypeInformation bin size. EfiLoaderCode should not be tracked. Remove all memory types that should not be tracked, and update the remaining bin sizes based on observed memory usage on an X64 DEBUG profile. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../PlatformInitPei/MemoryPeim.c | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c = b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c index e6189b7713..64b606637a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -40,19 +38,10 @@ Abstract: =20 EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] =3D { { EfiACPIReclaimMemory, 0x40 }, // 0x40 pages =3D 256k for ASL - { EfiACPIMemoryNVS, 0x100 }, // 0x100 pages =3D 1 MB for S3= , SMM, HII, etc - { EfiReservedMemoryType, 0x600 }, // 48k for BIOS Reserved - { EfiMemoryMappedIO, 0 }, - { EfiMemoryMappedIOPortSpace, 0 }, - { EfiPalCode, 0 }, - { EfiRuntimeServicesCode, 0x200 }, + { EfiACPIMemoryNVS, 0x40 }, // 0x40 pages =3D 256k MB for = S3, SMM, HII, etc + { EfiReservedMemoryType, 0x80 }, // 512k for BIOS Reserved + { EfiRuntimeServicesCode, 0x100 }, { EfiRuntimeServicesData, 0x100 }, - { EfiLoaderCode, 0x100 }, - { EfiLoaderData, 0x100 }, - { EfiBootServicesCode, 0x800 }, - { EfiBootServicesData, 0x2500}, - { EfiConventionalMemory, 0 }, - { EfiUnusableMemory, 0 }, { EfiMaxMemoryType, 0 } }; =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43073): https://edk2.groups.io/g/devel/message/43073 Mute This Topic: https://groups.io/mt/32267629/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-