diff options
author | Guo Mang <mang.guo@intel.com> | 2017-04-27 11:29:09 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-04-27 13:02:41 +0800 |
commit | 09091ace1c1c500db998cff6cd068e78b2c1b2af (patch) | |
tree | 276e7f5b8c2dd978ea7f1fea8905ca48865e2615 /CorebootPayloadPkg | |
parent | 69c93872c9cc480cc00c6df508b5f9072ab23658 (diff) | |
download | edk2-platforms-09091ace1c1c500db998cff6cd068e78b2c1b2af.tar.xz |
CorebootPayloadPkg: Remove unused Package
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'CorebootPayloadPkg')
27 files changed, 0 insertions, 7011 deletions
diff --git a/CorebootPayloadPkg/BuildAndIntegrationInstructions.txt b/CorebootPayloadPkg/BuildAndIntegrationInstructions.txt deleted file mode 100644 index 6cc3d95827..0000000000 --- a/CorebootPayloadPkg/BuildAndIntegrationInstructions.txt +++ /dev/null @@ -1,82 +0,0 @@ -================================================================================
-Build And Integration Instructions
-2014 June 24th
-================================================================================
-
-================================================================================
-DISCLAIMER
-================================================================================
-This release note as well as the software described in it is furnished under license
-and may only be used or copied in accordance with the terms of the license. The
-information in this manual is furnished for informational use only, is subject to
-change without notice, and should not be construed as a commitment by Intel Corporation.
-Intel Corporation assumes no responsibility or liability for any errors or inaccuracies
-that may appear in this document or any software that may be provided in association
-with this document.
-Except as permitted by such license, no part of this document may be reproduced,
-stored in a retrieval system, or transmitted in any form or by any means without
-the express written consent of Intel Corporation.
-
-================================================================================
- INDEX
-================================================================================
-A. INTRODUCTION
-B. HOW TO BUILD
-C. HOW TO INTEGRATE
-
-================================================================================
-A. INTRODUCTION
-================================================================================
-This document provides instructions on how to build Coreboot Uefi Payload and
-how to integrate it into coreboot firmware.
-
-================================================================================
-B. HOW TO BUILD
-================================================================================
-1. Run the below two commands in windows command prompt window:
- edksetup.bat
-
- For debug ia32 build:
- build -a IA32 -p CorebootPayloadPkg\CorebootPayloadPkgIa32.dsc -b DEBUG -t <ToolChain>
-
- For release ia32 build:
- build -a IA32 -p CorebootPayloadPkg\CorebootPayloadPkgIa32.dsc -b RELEASE -t <ToolChain>
-
- For debug X64 build:
- build -a IA32 -a X64 -p CorebootPayloadPkg\CorebootPayloadPkgIa32X64.dsc -b DEBUG -t <ToolChain>
-
- For release X64 build:
- build -a IA32 -a X64 -p CorebootPayloadPkg\CorebootPayloadPkgIa32X64.dsc -b RELEASE -t <ToolChain>
-
- <ToolChain> is the EDK II build environment on your host. Currently it was tested with VS2008x64 toolchain.
-
- For details about EDK II build steps, refer to http://svn.code.sf.net/p/edk2/code/branches/UDK2014/BuildNotes2.txt
-
-2. If build is successfully, the payload image (UEFIPAYLOAD.fd) will be generated inside the folder of Build\CorebootPayloadPkg.
-
-================================================================================
-C. HOW TO INTEGRATE
-================================================================================
-1. Copy the payload image (UEFIPAYLOAD.fd) into the top-level directory of Coreboot source tree.
-2. Run "make menuconfig" in linux console to start Coreboot configuration surface.
-3. In the Payload section,
- 1) Choose "An ELF executable payload" for the option of "Add a payload".
- 2) Type the path of payload image for the option of "Payload path and filename".
- 3) Select the option of "Use LZMA compression for payloads".
-
-4. If the graphics console is required in Coreboot UEFI payload, running VGA option rom should be enabled.
- For details:
- 1) In the Device section, select the option of "Run VGA Option ROMs".
- 2) In the VGA BIOS section, select the option of "Add a VGA BIOS Image", Input the path of vga bios image
- for the option of VGA BIOS path and filename, give the values of vendor id and device id for the option
- of "VGA device PCI IDs".
- 3) In the Display section,
- Select the option of "Set framebuffer graphics resolution"
- Choose a right display mode for the option of "framebuffer graphics resolution".
- Note: If the boot OS is windows, please choose the display mode supporting 32 bit color.
- Select the option of "Keep VESA framebuffer"
-
-5. Press ESC key to exit the Coreboot configuration surface. If there is a question prompted like "Do you wish to save your new configuration?",
- choose Yes.
-
-6. Run "make" to build the coreboot firmware image.
diff --git a/CorebootPayloadPkg/Contributions.txt b/CorebootPayloadPkg/Contributions.txt deleted file mode 100644 index f87cbd73c6..0000000000 --- a/CorebootPayloadPkg/Contributions.txt +++ /dev/null @@ -1,218 +0,0 @@ -
-======================
-= Code Contributions =
-======================
-
-To make a contribution to a TianoCore project, follow these steps.
-1. Create a change description in the format specified below to
- use in the source control commit log.
-2. Your commit message must include your "Signed-off-by" signature,
- and "Contributed-under" message.
-3. Your "Contributed-under" message explicitly states that the
- contribution is made under the terms of the specified
- contribution agreement. Your "Contributed-under" message
- must include the name of contribution agreement and version.
- For example: Contributed-under: TianoCore Contribution Agreement 1.0
- The "TianoCore Contribution Agreement" is included below in
- this document.
-4. Submit your code to the TianoCore project using the process
- that the project documents on its web page. If the process is
- not documented, then submit the code on development email list
- for the project.
-5. It is preferred that contributions are submitted using the same
- copyright license as the base project. When that is not possible,
- then contributions using the following licenses can be accepted:
- * BSD (2-clause): http://opensource.org/licenses/BSD-2-Clause
- * BSD (3-clause): http://opensource.org/licenses/BSD-3-Clause
- * MIT: http://opensource.org/licenses/MIT
- * Python-2.0: http://opensource.org/licenses/Python-2.0
- * Zlib: http://opensource.org/licenses/Zlib
-
- Contributions of code put into the public domain can also be
- accepted.
-
- Contributions using other licenses might be accepted, but further
- review will be required.
-
-=====================================================
-= Change Description / Commit Message / Patch Email =
-=====================================================
-
-Your change description should use the standard format for a
-commit message, and must include your "Signed-off-by" signature
-and the "Contributed-under" message.
-
-== Sample Change Description / Commit Message =
-
-=== Start of sample patch email message ===
-
-From: Contributor Name <contributor@example.com>
-Subject: [PATCH] CodeModule: Brief-single-line-summary
-
-Full-commit-message
-
-Contributed-under: TianoCore Contribution Agreement 1.0
-Signed-off-by: Contributor Name <contributor@example.com>
----
-
-An extra message for the patch email which will not be considered part
-of the commit message can be added here.
-
-Patch content inline or attached
-
-=== End of sample patch email message ===
-
-=== Notes for sample patch email ===
-
-* The first line of commit message is taken from the email's subject
- line following [PATCH]. The remaining portion of the commit message
- is the email's content until the '---' line.
-* git format-patch is one way to create this format
-
-=== Definitions for sample patch email ===
-
-* "CodeModule" is a short idenfier for the affected code. For
- example MdePkg, or MdeModulePkg UsbBusDxe.
-* "Brief-single-line-summary" is a short summary of the change.
-* The entire first line should be less than ~70 characters.
-* "Full-commit-message" a verbose multiple line comment describing
- the change. Each line should be less than ~70 characters.
-* "Contributed-under" explicitely states that the contribution is
- made under the terms of the contribtion agreement. This
- agreement is included below in this document.
-* "Signed-off-by" is the contributor's signature identifying them
- by their real/legal name and their email address.
-
-========================================
-= TianoCore Contribution Agreement 1.0 =
-========================================
-
-INTEL CORPORATION ("INTEL") MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
-INFORMATION AND/OR OTHER MATERIALS FOR USE IN THE TIANOCORE OPEN SOURCE
-PROJECT (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE
-TERMS AND CONDITIONS OF THIS AGREEMENT BETWEEN YOU AND INTEL AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR
-REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE
-CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
-AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
-USE THE CONTENT.
-
-Unless otherwise indicated, all Content made available on the TianoCore
-site is provided to you under the terms and conditions of the BSD
-License ("BSD"). A copy of the BSD License is available at
-http://opensource.org/licenses/bsd-license.php
-or when applicable, in the associated License.txt file.
-
-Certain other content may be made available under other licenses as
-indicated in or with such Content. (For example, in a License.txt file.)
-
-You accept and agree to the following terms and conditions for Your
-present and future Contributions submitted to TianoCore site. Except
-for the license granted to Intel hereunder, You reserve all right,
-title, and interest in and to Your Contributions.
-
-== SECTION 1: Definitions ==
-* "You" or "Contributor" shall mean the copyright owner or legal
- entity authorized by the copyright owner that is making a
- Contribution hereunder. All other entities that control, are
- controlled by, or are under common control with that entity are
- considered to be a single Contributor. For the purposes of this
- definition, "control" means (i) the power, direct or indirect, to
- cause the direction or management of such entity, whether by
- contract or otherwise, or (ii) ownership of fifty percent (50%)
- or more of the outstanding shares, or (iii) beneficial ownership
- of such entity.
-* "Contribution" shall mean any original work of authorship,
- including any modifications or additions to an existing work,
- that is intentionally submitted by You to the TinaoCore site for
- inclusion in, or documentation of, any of the Content. For the
- purposes of this definition, "submitted" means any form of
- electronic, verbal, or written communication sent to the
- TianoCore site or its representatives, including but not limited
- to communication on electronic mailing lists, source code
- control systems, and issue tracking systems that are managed by,
- or on behalf of, the TianoCore site for the purpose of
- discussing and improving the Content, but excluding
- communication that is conspicuously marked or otherwise
- designated in writing by You as "Not a Contribution."
-
-== SECTION 2: License for Contributions ==
-* Contributor hereby agrees that redistribution and use of the
- Contribution in source and binary forms, with or without
- modification, are permitted provided that the following
- conditions are met:
-** Redistributions of source code must retain the Contributor's
- copyright notice, this list of conditions and the following
- disclaimer.
-** Redistributions in binary form must reproduce the Contributor's
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-* Disclaimer. None of the names of Contributor, Intel, or the names
- of their respective contributors may be used to endorse or
- promote products derived from this software without specific
- prior written permission.
-* Contributor grants a license (with the right to sublicense) under
- claims of Contributor's patents that Contributor can license that
- are infringed by the Contribution (as delivered by Contributor) to
- make, use, distribute, sell, offer for sale, and import the
- Contribution and derivative works thereof solely to the minimum
- extent necessary for licensee to exercise the granted copyright
- license; this patent license applies solely to those portions of
- the Contribution that are unmodified. No hardware per se is
- licensed.
-* EXCEPT AS EXPRESSLY SET FORTH IN SECTION 3 BELOW, THE
- CONTRIBUTION IS PROVIDED BY THE CONTRIBUTOR "AS IS" AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
- CONTRIBUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-
-== SECTION 3: Representations ==
-* You represent that You are legally entitled to grant the above
- license. If your employer(s) has rights to intellectual property
- that You create that includes Your Contributions, You represent
- that You have received permission to make Contributions on behalf
- of that employer, that Your employer has waived such rights for
- Your Contributions.
-* You represent that each of Your Contributions is Your original
- creation (see Section 4 for submissions on behalf of others).
- You represent that Your Contribution submissions include complete
- details of any third-party license or other restriction
- (including, but not limited to, related patents and trademarks)
- of which You are personally aware and which are associated with
- any part of Your Contributions.
-
-== SECTION 4: Third Party Contributions ==
-* Should You wish to submit work that is not Your original creation,
- You may submit it to TianoCore site separately from any
- Contribution, identifying the complete details of its source
- and of any license or other restriction (including, but not
- limited to, related patents, trademarks, and license agreements)
- of which You are personally aware, and conspicuously marking the
- work as "Submitted on behalf of a third-party: [named here]".
-
-== SECTION 5: Miscellaneous ==
-* Applicable Laws. Any claims arising under or relating to this
- Agreement shall be governed by the internal substantive laws of
- the State of Delaware or federal courts located in Delaware,
- without regard to principles of conflict of laws.
-* Language. This Agreement is in the English language only, which
- language shall be controlling in all respects, and all versions
- of this Agreement in any other language shall be for accommodation
- only and shall not be binding. All communications and notices made
- or given pursuant to this Agreement, and all documentation and
- support to be provided, unless otherwise noted, shall be in the
- English language.
-
diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.dec b/CorebootPayloadPkg/CorebootPayloadPkg.dec deleted file mode 100644 index b33b79c1d6..0000000000 --- a/CorebootPayloadPkg/CorebootPayloadPkg.dec +++ /dev/null @@ -1,54 +0,0 @@ -## @file
-# Coreboot Payload Package
-#
-# Provides drivers and definitions to create uefi payload for coreboot.
-#
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials are licensed and made available under
-# the terms and conditions of the BSD License that accompanies this distribution.
-# The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- DEC_SPECIFICATION = 0x00010005
- PACKAGE_NAME = CorebootPayloadPkg
- PACKAGE_GUID = 58ABC905-951E-472e-8590-77BA8A50BE63
- PACKAGE_VERSION = 0.1
-
-[LibraryClasses]
-
-[Guids]
- #
- ## Defines the token space for the Coreboot Payload Package PCDs.
- #
- gUEfiCorebootPayloadPkgTokenSpaceGuid = {0x1d127ea, 0xf6f1, 0x4ef6, {0x94, 0x15, 0x8a, 0x0, 0x0, 0x93, 0xf8, 0x9d}}
-
- #
- # Gop Temp
- #
- gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
-
-[Ppis]
-
-[Protocols]
- #
- # Gop Temp
- #
- gPlatformGOPPolicyGuid = { 0xec2e931b, 0x3281, 0x48a5, { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } }
-
-################################################################################
-#
-# PCD Declarations section - list of all PCDs Declared by this Package
-# Only this package should be providing the
-# declaration, other packages should not.
-#
-################################################################################
-[PcdsFixedAtBuild, PcdsPatchableInModule]
-
-[PcdsDynamic, PcdsDynamicEx]
-
diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.fdf b/CorebootPayloadPkg/CorebootPayloadPkg.fdf deleted file mode 100644 index 303e626842..0000000000 --- a/CorebootPayloadPkg/CorebootPayloadPkg.fdf +++ /dev/null @@ -1,315 +0,0 @@ -## @file
-# Coreboot Payload Package
-#
-# Provides drivers and definitions to create uefi payload for coreboot.
-#
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials are licensed and made available under
-# the terms and conditions of the BSD License that accompanies this distribution.
-# The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-################################################################################
-[FD.UefiPayload]
-BaseAddress = 0x800000|gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase
-Size = 0x410000|gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize
-ErasePolarity = 1
-BlockSize = 0x1000
-NumBlocks = 0x410
-
-0x00000000|0x030000
-FV = PEIFV
-
-0x00030000|0x3E0000
-FV = DXEFV
-
-################################################################################
-[FV.PEIFV]
-BlockSize = 0x1000
-FvAlignment = 16
-ERASE_POLARITY = 1
-MEMORY_MAPPED = TRUE
-STICKY_WRITE = TRUE
-LOCK_CAP = TRUE
-LOCK_STATUS = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP = TRUE
-WRITE_STATUS = TRUE
-WRITE_LOCK_CAP = TRUE
-WRITE_LOCK_STATUS = TRUE
-READ_DISABLED_CAP = TRUE
-READ_ENABLED_CAP = TRUE
-READ_STATUS = TRUE
-READ_LOCK_CAP = TRUE
-READ_LOCK_STATUS = TRUE
-
-INF CorebootModulePkg/SecCore/SecCore.inf
-
-INF MdeModulePkg/Core/Pei/PeiMain.inf
-INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
-INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
-INF CorebootModulePkg/CbSupportPei/CbSupportPei.inf
-INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-
-################################################################################
-
-[FV.DXEFV]
-BlockSize = 0x1000
-FvForceRebase = FALSE
-FvAlignment = 16
-ERASE_POLARITY = 1
-MEMORY_MAPPED = TRUE
-STICKY_WRITE = TRUE
-LOCK_CAP = TRUE
-LOCK_STATUS = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP = TRUE
-WRITE_STATUS = TRUE
-WRITE_LOCK_CAP = TRUE
-WRITE_LOCK_STATUS = TRUE
-READ_DISABLED_CAP = TRUE
-READ_ENABLED_CAP = TRUE
-READ_STATUS = TRUE
-READ_LOCK_CAP = TRUE
-READ_LOCK_STATUS = TRUE
-
-APRIORI DXE {
- INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
- INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
- INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
-}
-
-#
-# DXE Phase modules
-#
-INF MdeModulePkg/Core/Dxe/DxeMain.inf
-INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
-INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
-
-INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-INF UefiCpuPkg/CpuDxe/CpuDxe.inf
-INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
-INF MdeModulePkg/Application/UiApp/UiApp.inf
-!if $(USE_HPET_TIMER) == TRUE
-INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-!else
-INF PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-!endif
-INF MdeModulePkg/Universal/Metronome/Metronome.inf
-INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
-INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
-INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
-
-INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
-INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
-INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
-INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
-INF CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
-
-INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-#
-# PCI Support
-#
-INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
-
-#
-# ISA Support
-#
-INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
-
-#
-# Console Support
-#
-INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-
-#
-# SCSI/ATA/IDE/DISK Support
-#
-INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-INF CorebootModulePkg/SataControllerDxe/SataControllerDxe.inf
-INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
-INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
-INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-
-INF FatPkg/EnhancedFatDxe/Fat.inf
-
-#
-# SD/eMMC Support
-#
-INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
-INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
-INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
-
-#
-# Usb Support
-#
-INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
-INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
-INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
-INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
-INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
-INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-
-#
-# OHCI Support
-#
-INF QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Dxe/OhciDxe.inf
-
-#
-# Shell
-#
-!if $(SHELL_TYPE) == BUILD_SHELL
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
-
-!if $(SHELL_TYPE) == FULL_BIN
-!if $(ARCH) == IA32
-INF RuleOverride = BINARY USE = IA32 EdkShellBinPkg/FullShell/FullShell.inf
-!else
-INF RuleOverride = BINARY USE = X64 EdkShellBinPkg/FullShell/FullShell.inf
-!endif
-!endif
-
-!if $(SHELL_TYPE) == MIN_BIN
-!if $(ARCH) == IA32
-INF RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
-!else
-INF RuleOverride = BINARY USE = X64 ShellBinPkg/MinUefiShell/MinUefiShell.inf
-!endif
-!endif
-
-!if $(SHELL_TYPE) == UEFI_BIN
-!if $(ARCH) == IA32
-INF RuleOverride = BINARY USE = IA32 ShellBinPkg/UefiShell/UefiShell.inf
-!else
-INF RuleOverride = BINARY USE = X64 ShellBinPkg/UefiShell/UefiShell.inf
-!endif
-!endif
-
-FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
- SECTION RAW = MdeModulePkg/Logo/Logo.bmp
-}
-
-#
-# Framebuffer Gop
-#
-INF CorebootPayloadPkg/FbGop/FbGop.inf
-
-################################################################################
-#
-# Rules are use with the [FV] section's module INF type to define
-# how an FFS file is created for a given INF file. The following Rule are the default
-# rules for the different module type. User can add the customized rules to define the
-# content of the FFS file.
-#
-################################################################################
-
-[Rule.Common.SEC]
- FILE SEC = $(NAMED_GUID) {
- PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- }
-
-[Rule.Common.PEI_CORE]
- FILE PEI_CORE = $(NAMED_GUID) {
- PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING ="$(MODULE_NAME)" Optional
- VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.PEIM]
- FILE PEIM = $(NAMED_GUID) {
- PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
- PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.DXE_CORE]
- FILE DXE_CORE = $(NAMED_GUID) {
- PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.DXE_DRIVER]
- FILE DRIVER = $(NAMED_GUID) {
- DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
- PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.DXE_RUNTIME_DRIVER]
- FILE DRIVER = $(NAMED_GUID) {
- DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
- PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.UEFI_DRIVER]
- FILE DRIVER = $(NAMED_GUID) {
- DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
- PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.UEFI_DRIVER.BINARY]
- FILE DRIVER = $(NAMED_GUID) {
- DXE_DEPEX DXE_DEPEX Optional |.depex
- PE32 PE32 |.efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.UEFI_APPLICATION]
- FILE APPLICATION = $(NAMED_GUID) {
- PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.UEFI_APPLICATION.BINARY]
- FILE APPLICATION = $(NAMED_GUID) {
- PE32 PE32 |.efi
- UI STRING="$(MODULE_NAME)" Optional
- VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
- }
-
-[Rule.Common.USER_DEFINED.ACPITABLE]
- FILE FREEFORM = $(NAMED_GUID) {
- RAW ACPI |.acpi
- RAW ASL |.aml
- }
-
-[Rule.Common.USER_DEFINED.CSM]
- FILE FREEFORM = $(NAMED_GUID) {
- RAW BIN |.bin
- }
-
-[Rule.Common.SEC.RESET_VECTOR]
- FILE RAW = $(NAMED_GUID) {
- RAW RAW |.raw
- }
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc deleted file mode 100644 index cdfcb75b59..0000000000 --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc +++ /dev/null @@ -1,578 +0,0 @@ -## @file
-# Coreboot Payload Package
-#
-# Provides drivers and definitions to create uefi payload for coreboot.
-#
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials are licensed and made available under
-# the terms and conditions of the BSD License that accompanies this distribution.
-# The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
- PLATFORM_NAME = CorebootPayloadPkg
- PLATFORM_GUID = F71608AB-D63D-4491-B744-A99998C8CD96
- PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010005
- SUPPORTED_ARCHITECTURES = IA32
- BUILD_TARGETS = DEBUG|RELEASE|NOOPT
- SKUID_IDENTIFIER = DEFAULT
- OUTPUT_DIRECTORY = Build/CorebootPayloadPkgIA32
- FLASH_DEFINITION = CorebootPayloadPkg/CorebootPayloadPkg.fdf
-
- DEFINE SECURE_BOOT_ENABLE = FALSE
- DEFINE SOURCE_DEBUG_ENABLE = FALSE
-
- #
- # CPU options
- #
- DEFINE MAX_LOGICAL_PROCESSORS = 64
-
- #
- # PCI options
- #
- DEFINE PCIE_BASE = 0xE0000000
-
- #
- # Serial port set up
- #
- DEFINE BAUD_RATE = 115200
- DEFINE SERIAL_CLOCK_RATE = 1843200
- DEFINE SERIAL_LINE_CONTROL = 3 # 8-bits, no parity
- DEFINE SERIAL_HARDWARE_FLOW_CONTROL = FALSE
- DEFINE SERIAL_DETECT_CABLE = FALSE
- DEFINE SERIAL_FIFO_CONTROL = 7 # Enable FIFO
- DEFINE SERIAL_EXTENDED_TX_FIFO_SIZE = 16
- DEFINE UART_DEFAULT_BAUD_RATE = $(BAUD_RATE)
- DEFINE UART_DEFAULT_DATA_BITS = 8
- DEFINE UART_DEFAULT_PARITY = 1
- DEFINE UART_DEFAULT_STOP_BITS = 1
- DEFINE DEFAULT_TERMINAL_TYPE = 0
-
- #
- # typedef struct {
- # UINT16 VendorId; ///< Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries.
- # UINT16 DeviceId; ///< Device ID to match the PCI device
- # UINT32 ClockRate; ///< UART clock rate. Set to 0 for default clock rate of 1843200 Hz
- # UINT64 Offset; ///< The byte offset into to the BAR
- # UINT8 BarIndex; ///< Which BAR to get the UART base address
- # UINT8 RegisterStride; ///< UART register stride in bytes. Set to 0 for default register stride of 1 byte.
- # UINT16 ReceiveFifoDepth; ///< UART receive FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
- # UINT16 TransmitFifoDepth; ///< UART transmit FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
- # UINT8 Reserved[2];
- # } PCI_SERIAL_PARAMETER;
- #
- # Vendor FFFF Device 0000 Prog Interface 1, BAR #0, Offset 0, Stride = 1, Clock 1843200 (0x1c2000)
- #
- # [Vendor] [Device] [----ClockRate---] [------------Offset-----------] [Bar] [Stride] [RxFifo] [TxFifo] [Rsvd] [Vendor]
- DEFINE PCI_SERIAL_PARAMETERS = {0xff,0xff, 0x00,0x00, 0x0,0x20,0x1c,0x00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x00, 0x01, 0x0,0x0, 0x0,0x0, 0x0,0x0, 0xff,0xff}
-
- #
- # Chipset options
- #
- DEFINE USE_HPET_TIMER = FALSE
-
- #
- # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI]
- #
- DEFINE SHELL_TYPE = FULL_BIN
-
-[BuildOptions]
- *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
- GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG
- GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
- INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
- MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
-
-[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
- MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this Platform.
-#
-################################################################################
-[SkuIds]
- 0|DEFAULT
-
-################################################################################
-#
-# Library Class section - list of all Library Classes needed by this Platform.
-#
-################################################################################
-[LibraryClasses]
- #
- # Entry point
- #
- PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
- PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
- DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-
- #
- # Basic
- #
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
- IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-!if $(PCIE_BASE) == 0
- PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
- PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
-!else
- PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
- PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-!endif
- PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
- PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
-
- #
- # UEFI & PI
- #
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
- UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
- PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
- PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-
- #
- # Generic Modules
- #
- UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
- UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
- OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
- CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
- SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
-
- #
- # CPU
- #
- MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
- LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
-
- #
- # Platform
- #
- TimerLib|CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
- ResetSystemLib|CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf
- SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
- PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
- PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
- IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
- CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf
-
- #
- # Misc
- #
- DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-!if $(SOURCE_DEBUG_ENABLE) == TRUE
- PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
- DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
-!else
- PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
- DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-!endif
- CbParseLib|CorebootModulePkg/Library/CbParseLib/CbParseLib.inf
- DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
- LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-
-[LibraryClasses.IA32.SEC]
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
-
-[LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.PEIM]
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!if $(SOURCE_DEBUG_ENABLE)
- DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
-!endif
-
-[LibraryClasses.common.DXE_CORE]
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
- MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
-!if $(SOURCE_DEBUG_ENABLE)
- DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-!endif
- CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
- CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
- MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-
-################################################################################
-#
-# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
-#
-################################################################################
-[PcdsFeatureFlag]
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
-[PcdsFixedAtBuild]
- gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
- gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
- gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000
-
- gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
- gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
-
- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE)
-
-!if $(SOURCE_DEBUG_ENABLE)
- gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
-!endif
-
-[PcdsPatchableInModule.common]
- gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!if $(SOURCE_DEBUG_ENABLE)
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
-!else
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
-!endif
-
- #
- # The following parameters are set by Library/PlatformHookLib
- #
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f8
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
-
- #
- # Enable these parameters to be set on the command line
- #
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|$(SERIAL_CLOCK_RATE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|$(SERIAL_LINE_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|$(SERIAL_HARDWARE_FLOW_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|$(SERIAL_DETECT_CABLE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
-
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
- gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
-
- gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
-
- #
- # Set the proper Shell file GUID
- #
- !if $(SHELL_TYPE) == FULL_BIN
- # c57ad6b7-0515-40a8-9d21-551652854e37
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 }
- !else
- # 7C04A583-9E3E-4f1c-AD65-E05268D0B4D1
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1c, 0x4f, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
- !endif
-
-################################################################################
-#
-# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
-#
-################################################################################
-
-[PcdsDynamicDefault]
- gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
-
- ## This PCD defines the video horizontal resolution.
- # This PCD could be set to 0 then video resolution could be at highest resolution.
- gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
- ## This PCD defines the video vertical resolution.
- # This PCD could be set to 0 then video resolution could be at highest resolution.
- gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
-
- ## The PCD is used to specify the video horizontal resolution of text setup.
- gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|0
- ## The PCD is used to specify the video vertical resolution of text setup.
- gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|0
-
-################################################################################
-#
-# Components Section - list of all EDK II Modules needed by this Platform.
-#
-################################################################################
-[Components.IA32]
- #
- # SEC Core
- #
- CorebootModulePkg/SecCore/SecCore.inf
-
- #
- # PEI Core
- #
- MdeModulePkg/Core/Pei/PeiMain.inf
-
- #
- # PEIM
- #
- MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
- MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
- MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
-
- CorebootModulePkg/CbSupportPei/CbSupportPei.inf
- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-
-[Components.IA32]
- #
- # DXE Core
- #
- MdeModulePkg/Core/Dxe/DxeMain.inf {
- <LibraryClasses>
- NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
- }
-
- #
- # Components that produce the architectural protocols
- #
- MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
- UefiCpuPkg/CpuDxe/CpuDxe.inf
- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
- MdeModulePkg/Application/UiApp/UiApp.inf {
- <LibraryClasses>
- NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
- NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
- NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
- }
-!if $(USE_HPET_TIMER) == TRUE
- PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-!else
- PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-!endif
- MdeModulePkg/Universal/Metronome/Metronome.inf
- MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
- MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
- MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
- MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
- MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
- MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
-
- #
- # Following are the DXE drivers
- #
- MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
-
- MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
- MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
- UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
- MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
- MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
- PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
- MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
- MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
- MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
-
- CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
-
- #
- # SMBIOS Support
- #
- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-
- #
- # ACPI Support
- #
- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-
- #
- # PCI Support
- #
- MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
- <LibraryClasses>
- PciHostBridgeLib|CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
- }
-
- #
- # SCSI/ATA/IDE/DISK Support
- #
- MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
- MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
- MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
- FatPkg/EnhancedFatDxe/Fat.inf
- CorebootModulePkg/SataControllerDxe/SataControllerDxe.inf
- MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-
- #
- # SD/eMMC Support
- #
- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
- MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
-
- #
- # Usb Support
- #
- MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
- MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-
- #
- # OHCI support
- #
- QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Dxe/OhciDxe.inf
-
- #
- # ISA Support
- #
- MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
-
- #
- # Console Support
- #
- MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
- MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
- MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-
- #
- # Framebuffer Gop
- #
- CorebootPayloadPkg/FbGop/FbGop.inf
-
- #------------------------------
- # Build the shell
- #------------------------------
-
-!if $(SHELL_TYPE) == BUILD_SHELL
-
-[PcdsFixedAtBuild]
- ## This flag is used to control initialization of the shell library
- # This should be FALSE for compiling the shell application itself only.
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
-
- #
- # Shell Lib
- #
-[LibraryClasses]
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-
-[Components.IA32]
- ShellPkg/Application/Shell/Shell.inf {
-
- #------------------------------
- # Basic commands
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
-
- #------------------------------
- # Networking commands
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf
-
- #------------------------------
- # Performance command
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf
-
- #------------------------------
- # Support libraries
- #------------------------------
-
- <LibraryClasses>
- DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- }
-
-!endif
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc deleted file mode 100644 index 6b16af63ba..0000000000 --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc +++ /dev/null @@ -1,579 +0,0 @@ -## @file
-# Coreboot Payload Package
-#
-# Provides drivers and definitions to create uefi payload for coreboot.
-#
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials are licensed and made available under
-# the terms and conditions of the BSD License that accompanies this distribution.
-# The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
- PLATFORM_NAME = CorebootPayloadPkg
- PLATFORM_GUID = F71608AB-D63D-4491-B744-A99998C8CD96
- PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010005
- SUPPORTED_ARCHITECTURES = IA32|X64
- BUILD_TARGETS = DEBUG|RELEASE|NOOPT
- SKUID_IDENTIFIER = DEFAULT
- OUTPUT_DIRECTORY = Build/CorebootPayloadPkgX64
- FLASH_DEFINITION = CorebootPayloadPkg/CorebootPayloadPkg.fdf
-
- DEFINE SECURE_BOOT_ENABLE = FALSE
- DEFINE SOURCE_DEBUG_ENABLE = FALSE
-
- #
- # CPU options
- #
- DEFINE MAX_LOGICAL_PROCESSORS = 64
-
- #
- # PCI options
- #
- DEFINE PCIE_BASE = 0xE0000000
-
- #
- # Serial port set up
- #
- DEFINE BAUD_RATE = 115200
- DEFINE SERIAL_CLOCK_RATE = 1843200
- DEFINE SERIAL_LINE_CONTROL = 3 # 8-bits, no parity
- DEFINE SERIAL_HARDWARE_FLOW_CONTROL = FALSE
- DEFINE SERIAL_DETECT_CABLE = FALSE
- DEFINE SERIAL_FIFO_CONTROL = 7 # Enable FIFO
- DEFINE SERIAL_EXTENDED_TX_FIFO_SIZE = 16
- DEFINE UART_DEFAULT_BAUD_RATE = $(BAUD_RATE)
- DEFINE UART_DEFAULT_DATA_BITS = 8
- DEFINE UART_DEFAULT_PARITY = 1
- DEFINE UART_DEFAULT_STOP_BITS = 1
- DEFINE DEFAULT_TERMINAL_TYPE = 0
-
- #
- # typedef struct {
- # UINT16 VendorId; ///< Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries.
- # UINT16 DeviceId; ///< Device ID to match the PCI device
- # UINT32 ClockRate; ///< UART clock rate. Set to 0 for default clock rate of 1843200 Hz
- # UINT64 Offset; ///< The byte offset into to the BAR
- # UINT8 BarIndex; ///< Which BAR to get the UART base address
- # UINT8 RegisterStride; ///< UART register stride in bytes. Set to 0 for default register stride of 1 byte.
- # UINT16 ReceiveFifoDepth; ///< UART receive FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
- # UINT16 TransmitFifoDepth; ///< UART transmit FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
- # UINT8 Reserved[2];
- # } PCI_SERIAL_PARAMETER;
- #
- # Vendor FFFF Device 0000 Prog Interface 1, BAR #0, Offset 0, Stride = 1, Clock 1843200 (0x1c2000)
- #
- # [Vendor] [Device] [----ClockRate---] [------------Offset-----------] [Bar] [Stride] [RxFifo] [TxFifo] [Rsvd] [Vendor]
- DEFINE PCI_SERIAL_PARAMETERS = {0xff,0xff, 0x00,0x00, 0x0,0x20,0x1c,0x00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x00, 0x01, 0x0,0x0, 0x0,0x0, 0x0,0x0, 0xff,0xff}
-
- #
- # Chipset options
- #
- DEFINE USE_HPET_TIMER = FALSE
-
- #
- # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI]
- #
- DEFINE SHELL_TYPE = FULL_BIN
-
-[BuildOptions]
- *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
- GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG
- GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
- INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
- MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
-
-[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
- MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this Platform.
-#
-################################################################################
-[SkuIds]
- 0|DEFAULT
-
-################################################################################
-#
-# Library Class section - list of all Library Classes needed by this Platform.
-#
-################################################################################
-[LibraryClasses]
- #
- # Entry point
- #
- PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
- PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
- DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-
- #
- # Basic
- #
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
- IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-!if $(PCIE_BASE) == 0
- PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
- PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
-!else
- PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
- PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-!endif
- PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
- PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
-
- #
- # UEFI & PI
- #
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
- UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
- PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
- PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-
- #
- # Generic Modules
- #
- UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
- UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
- OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
- CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
- SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
-
- #
- # CPU
- #
- MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
- LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
-
- #
- # Platform
- #
- TimerLib|CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
- ResetSystemLib|CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf
- SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
- PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
- PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
- IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
- CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf
-
- #
- # Misc
- #
- DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-!if $(SOURCE_DEBUG_ENABLE) == TRUE
- PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
- DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
-!else
- PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
- DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
-!endif
- CbParseLib|CorebootModulePkg/Library/CbParseLib/CbParseLib.inf
- DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
- LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-
-[LibraryClasses.IA32.SEC]
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
-
-[LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.PEIM]
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!if $(SOURCE_DEBUG_ENABLE)
- DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
-!endif
-
-[LibraryClasses.common.DXE_CORE]
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
- MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
-!if $(SOURCE_DEBUG_ENABLE)
- DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
-!endif
- CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
- CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
- MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-
-################################################################################
-#
-# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
-#
-################################################################################
-[PcdsFeatureFlag]
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
-[PcdsFixedAtBuild]
- gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
- gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
- gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000
-
- gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
- gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
-
- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE)
-
-!if $(SOURCE_DEBUG_ENABLE)
- gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
-!endif
-
-[PcdsPatchableInModule.common]
- gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!if $(SOURCE_DEBUG_ENABLE)
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
-!else
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
-!endif
-
- #
- # The following parameters are set by Library/PlatformHookLib
- #
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f8
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
-
- #
- # Enable these parameters to be set on the command line
- #
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|$(SERIAL_CLOCK_RATE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|$(SERIAL_LINE_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|$(SERIAL_HARDWARE_FLOW_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|$(SERIAL_DETECT_CABLE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
-
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
- gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
-
- gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
-
- #
- # Set the proper Shell file GUID
- #
- !if $(SHELL_TYPE) == FULL_BIN
- # c57ad6b7-0515-40a8-9d21-551652854e37
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 }
- !else
- # 7C04A583-9E3E-4f1c-AD65-E05268D0B4D1
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1c, 0x4f, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
- !endif
-
-################################################################################
-#
-# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
-#
-################################################################################
-
-[PcdsDynamicDefault]
- gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
- gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
-
- ## This PCD defines the video horizontal resolution.
- # This PCD could be set to 0 then video resolution could be at highest resolution.
- gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
- ## This PCD defines the video vertical resolution.
- # This PCD could be set to 0 then video resolution could be at highest resolution.
- gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
-
- ## The PCD is used to specify the video horizontal resolution of text setup.
- gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|0
- ## The PCD is used to specify the video vertical resolution of text setup.
- gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|0
-
-################################################################################
-#
-# Components Section - list of all EDK II Modules needed by this Platform.
-#
-################################################################################
-[Components.IA32]
- #
- # SEC Core
- #
- CorebootModulePkg/SecCore/SecCore.inf
-
- #
- # PEI Core
- #
- MdeModulePkg/Core/Pei/PeiMain.inf
-
- #
- # PEIM
- #
- MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
- MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
- MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
-
- CorebootModulePkg/CbSupportPei/CbSupportPei.inf
- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-
-[Components.X64]
- #
- # DXE Core
- #
- MdeModulePkg/Core/Dxe/DxeMain.inf {
- <LibraryClasses>
- NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
- }
-
- #
- # Components that produce the architectural protocols
- #
- MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
- UefiCpuPkg/CpuDxe/CpuDxe.inf
- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
- MdeModulePkg/Application/UiApp/UiApp.inf {
- <LibraryClasses>
- NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
- NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
- NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
- }
-!if $(USE_HPET_TIMER) == TRUE
- PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-!else
- PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
-!endif
- MdeModulePkg/Universal/Metronome/Metronome.inf
- MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
- MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
- MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
- MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
- MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
- PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
- MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
-
- #
- # Following are the DXE drivers
- #
- MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
-
- MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
- MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
- UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
- MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
- MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
- PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
- MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
- MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
- MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
-
- CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
-
- #
- # SMBIOS Support
- #
- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-
- #
- # ACPI Support
- #
- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-
- #
- # PCI Support
- #
- MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
- <LibraryClasses>
- PciHostBridgeLib|CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
- }
-
- #
- # SCSI/ATA/IDE/DISK Support
- #
- MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
- MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
- MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
- FatPkg/EnhancedFatDxe/Fat.inf
- CorebootModulePkg/SataControllerDxe/SataControllerDxe.inf
- MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-
- #
- # SD/eMMC Support
- #
- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
- MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
-
- #
- # Usb Support
- #
- MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
- MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-
- #
- # OHCI support
- #
- QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Dxe/OhciDxe.inf
-
- #
- # ISA Support
- #
- MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
-
- #
- # Console Support
- #
- MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
- MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
- MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-
- #
- # Framebuffer Gop
- #
- CorebootPayloadPkg/FbGop/FbGop.inf
-
- #------------------------------
- # Build the shell
- #------------------------------
-
-!if $(SHELL_TYPE) == BUILD_SHELL
-
-[PcdsFixedAtBuild]
- ## This flag is used to control initialization of the shell library
- # This should be FALSE for compiling the shell application itself only.
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
-
- #
- # Shell Lib
- #
-[LibraryClasses]
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-
-[Components.X64]
- ShellPkg/Application/Shell/Shell.inf {
-
- #------------------------------
- # Basic commands
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
-
- #------------------------------
- # Networking commands
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf
-
- #------------------------------
- # Performance command
- #------------------------------
-
- <LibraryClasses>
- NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf
-
- #------------------------------
- # Support libraries
- #------------------------------
-
- <LibraryClasses>
- DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
- ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- }
-
-!endif
diff --git a/CorebootPayloadPkg/FbGop/ComponentName.c b/CorebootPayloadPkg/FbGop/ComponentName.c deleted file mode 100644 index 2ff1d0cde2..0000000000 --- a/CorebootPayloadPkg/FbGop/ComponentName.c +++ /dev/null @@ -1,313 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-
-This program and the accompanying materials
-are licensed and made available under the terms and conditions
-of the BSD License which accompanies this distribution. The
-full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "FbGop.h"
-
-//
-// EFI Component Name Functions
-//
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 4646 or ISO 639-2 language code format.
-
- @param DriverName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param ControllerHandle[in] The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
-
- @param ChildHandle[in] The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 4646 or ISO 639-2 language code format.
-
- @param ControllerName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
-
- @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
-
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- );
-
-
-//
-// EFI Component Name Protocol
-//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gFbGopComponentName = {
- FbGopComponentNameGetDriverName,
- FbGopComponentNameGetControllerName,
- "eng"
-};
-
-//
-// EFI Component Name 2 Protocol
-//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gFbGopComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) FbGopComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) FbGopComponentNameGetControllerName,
- "en"
-};
-
-
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mFbGopDriverNameTable[] = {
- {
- "eng;en",
- L"FB GOP Video Driver"
- },
- {
- NULL,
- NULL
- }
-};
-
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 4646 or ISO 639-2 language code format.
-
- @param DriverName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- )
-{
- return LookupUnicodeString2 (
- Language,
- This->SupportedLanguages,
- mFbGopDriverNameTable,
- DriverName,
- (BOOLEAN)(This == &gFbGopComponentName)
- );
-}
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param ControllerHandle[in] The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
-
- @param ChildHandle[in] The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 4646 or ISO 639-2 language code format.
-
- @param ControllerName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
-
- @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
-
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- )
-{
- return EFI_UNSUPPORTED;
-}
diff --git a/CorebootPayloadPkg/FbGop/FbGop.c b/CorebootPayloadPkg/FbGop/FbGop.c deleted file mode 100644 index 37d6def7f7..0000000000 --- a/CorebootPayloadPkg/FbGop/FbGop.c +++ /dev/null @@ -1,1527 +0,0 @@ -/** @file
- ConsoleOut Routines that speak VGA.
-
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
-
-This program and the accompanying materials
-are licensed and made available under the terms and conditions
-of the BSD License which accompanies this distribution. The
-full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "FbGop.h"
-
-EFI_PIXEL_BITMASK mPixelBitMask = {0x0000FF, 0x00FF00, 0xFF0000, 0x000000};
-
-//
-// Save controller attributes during first start
-//
-UINT64 mOriginalPciAttributes;
-BOOLEAN mPciAttributesSaved = FALSE;
-
-
-//
-// EFI Driver Binding Protocol Instance
-//
-EFI_DRIVER_BINDING_PROTOCOL gFbGopDriverBinding = {
- FbGopDriverBindingSupported,
- FbGopDriverBindingStart,
- FbGopDriverBindingStop,
- 0x3,
- NULL,
- NULL
-};
-
-//
-// Native resolution in EDID DetailedTiming[0]
-//
-UINT32 mNativeModeHorizontal;
-UINT32 mNativeModeVertical;
-
-/**
- Supported.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param RemainingDevicePath A pointer to the remaining portion of a device
- path
-
- @retval EFI_STATUS EFI_SUCCESS:This controller can be managed by this
- driver, Otherwise, this controller cannot be
- managed by this driver
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingSupported (
- 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;
- EFI_DEV_PATH *Node;
-
- //
- // Open the IO Abstraction(s) needed to perform the supported test
- //
- Status = gBS->OpenProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
- This->DriverBindingHandle,
- Controller,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // See if this is a PCI Graphics Controller by looking at the Command register and
- // Class Code Register
- //
- Status = PciIo->Pci.Read (
- PciIo,
- EfiPciIoWidthUint32,
- 0,
- sizeof (Pci) / sizeof (UINT32),
- &Pci
- );
- if (EFI_ERROR (Status)) {
- Status = EFI_UNSUPPORTED;
- goto Done;
- }
-
- Status = EFI_UNSUPPORTED;
- if (Pci.Hdr.ClassCode[2] == 0x03 || (Pci.Hdr.ClassCode[2] == 0x00 && Pci.Hdr.ClassCode[1] == 0x01)) {
-
- Status = EFI_SUCCESS;
- //
- // If this is a graphics controller,
- // go further check RemainingDevicePath validation
- //
- if (RemainingDevicePath != NULL) {
- Node = (EFI_DEV_PATH *) RemainingDevicePath;
- //
- // Check if RemainingDevicePath is the End of Device Path Node,
- // if yes, return EFI_SUCCESS
- //
- if (!IsDevicePathEnd (Node)) {
- //
- // If RemainingDevicePath isn't the End of Device Path Node,
- // check its validation
- //
- if (Node->DevPath.Type != ACPI_DEVICE_PATH ||
- Node->DevPath.SubType != ACPI_ADR_DP ||
- DevicePathNodeLength(&Node->DevPath) < sizeof(ACPI_ADR_DEVICE_PATH)) {
- Status = EFI_UNSUPPORTED;
- }
- }
- }
- }
-
-Done:
- gBS->CloseProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Controller
- );
-
- return Status;
-}
-
-
-/**
- Install Graphics Output Protocol onto VGA device handles.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param RemainingDevicePath A pointer to the remaining portion of a device
- path
-
- @return EFI_STATUS
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINT64 Supports;
-
- DEBUG ((EFI_D_INFO, "GOP START\n"));
-
- //
- // Initialize local variables
- //
- PciIo = NULL;
- ParentDevicePath = NULL;
-
- //
- // Prepare for status code
- //
- Status = gBS->HandleProtocol (
- Controller,
- &gEfiDevicePathProtocolGuid,
- (VOID **) &ParentDevicePath
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Open the IO Abstraction(s) needed
- //
- Status = gBS->OpenProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
- This->DriverBindingHandle,
- Controller,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
- return Status;
- }
-
- //
- // Save original PCI attributes
- //
- if (!mPciAttributesSaved) {
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationGet,
- 0,
- &mOriginalPciAttributes
- );
-
- if (EFI_ERROR (Status)) {
- goto Done;
- }
- mPciAttributesSaved = TRUE;
- }
-
- //
- // Get supported PCI attributes
- //
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationSupported,
- 0,
- &Supports
- );
- if (EFI_ERROR (Status)) {
- goto Done;
- }
-
- Supports &= (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16);
- if (Supports == 0 || Supports == (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) {
- Status = EFI_UNSUPPORTED;
- goto Done;
- }
-
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_PC_ENABLE,
- ParentDevicePath
- );
- //
- // Enable the device and make sure VGA cycles are being forwarded to this VGA device
- //
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationEnable,
- EFI_PCI_DEVICE_ENABLE,
- NULL
- );
- if (EFI_ERROR (Status)) {
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_RESOURCE_CONFLICT,
- ParentDevicePath
- );
- goto Done;
- }
-
- if (RemainingDevicePath != NULL) {
- if (IsDevicePathEnd (RemainingDevicePath)) {
- //
- // If RemainingDevicePath is the End of Device Path Node,
- // don't create any child device and return EFI_SUCESS
- Status = EFI_SUCCESS;
- goto Done;
- }
- }
-
- //
- // Create child handle and install GraphicsOutputProtocol on it
- //
- Status = FbGopChildHandleInstall (
- This,
- Controller,
- PciIo,
- NULL,
- ParentDevicePath,
- RemainingDevicePath
- );
-
-Done:
- if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
-
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_PC_DISABLE,
- ParentDevicePath
- );
-
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_NOT_DETECTED,
- ParentDevicePath
- );
- if (!HasChildHandle (Controller)) {
- if (mPciAttributesSaved) {
- //
- // Restore original PCI attributes
- //
- PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationSet,
- mOriginalPciAttributes,
- NULL
- );
- }
- }
- //
- // Release PCI I/O Protocols on the controller handle.
- //
- gBS->CloseProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Controller
- );
- }
-
- return Status;
-}
-
-
-/**
- Stop.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param NumberOfChildren Number of children handle created by this driver
- @param ChildHandleBuffer Buffer containing child handle created
-
- @retval EFI_SUCCESS Driver disconnected successfully from controller
- @retval EFI_UNSUPPORTED Cannot find FB_VIDEO_DEV structure
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- )
-{
- EFI_STATUS Status;
- BOOLEAN AllChildrenStopped;
- UINTN Index;
- EFI_PCI_IO_PROTOCOL *PciIo;
-
- AllChildrenStopped = TRUE;
-
- if (NumberOfChildren == 0) {
- //
- // Close PCI I/O protocol on the controller handle
- //
- gBS->CloseProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Controller
- );
-
- return EFI_SUCCESS;
- }
-
- for (Index = 0; Index < NumberOfChildren; Index++) {
-
- Status = EFI_SUCCESS;
-
- FbGopChildHandleUninstall (This, Controller, ChildHandleBuffer[Index]);
-
- if (EFI_ERROR (Status)) {
- AllChildrenStopped = FALSE;
- }
- }
-
- if (!AllChildrenStopped) {
- return EFI_DEVICE_ERROR;
- }
-
- if (!HasChildHandle (Controller)) {
- if (mPciAttributesSaved) {
- Status = gBS->HandleProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo
- );
- ASSERT_EFI_ERROR (Status);
-
- //
- // Restore original PCI attributes
- //
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationSet,
- mOriginalPciAttributes,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
- }
- }
-
-
- return EFI_SUCCESS;
-}
-
-
-/**
- Install child handles if the Handle supports MBR format.
-
- @param This Calling context.
- @param ParentHandle Parent Handle
- @param ParentPciIo Parent PciIo interface
- @param ParentLegacyBios Parent LegacyBios interface
- @param ParentDevicePath Parent Device Path
- @param RemainingDevicePath Remaining Device Path
-
- @retval EFI_SUCCESS If a child handle was added
- @retval other A child handle was not added
-
-**/
-EFI_STATUS
-FbGopChildHandleInstall (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ParentHandle,
- IN EFI_PCI_IO_PROTOCOL *ParentPciIo,
- IN VOID *ParentLegacyBios,
- IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-{
- EFI_STATUS Status;
- FB_VIDEO_DEV *FbGopPrivate;
- PCI_TYPE00 Pci;
- ACPI_ADR_DEVICE_PATH AcpiDeviceNode;
-
- //
- // Allocate the private device structure for video device
- //
- FbGopPrivate = (FB_VIDEO_DEV *) AllocateZeroPool (
- sizeof (FB_VIDEO_DEV)
- );
- if (NULL == FbGopPrivate) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- //
- // See if this is a VGA compatible controller or not
- //
- Status = ParentPciIo->Pci.Read (
- ParentPciIo,
- EfiPciIoWidthUint32,
- 0,
- sizeof (Pci) / sizeof (UINT32),
- &Pci
- );
- if (EFI_ERROR (Status)) {
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_CONTROLLER_ERROR,
- ParentDevicePath
- );
- goto Done;
- }
-
- //
- // Initialize the child private structure
- //
- FbGopPrivate->Signature = FB_VIDEO_DEV_SIGNATURE;
-
- //
- // Fill in Graphics Output specific mode structures
- //
- FbGopPrivate->ModeData = NULL;
-
- FbGopPrivate->VbeFrameBuffer = NULL;
-
- FbGopPrivate->EdidDiscovered.SizeOfEdid = 0;
- FbGopPrivate->EdidDiscovered.Edid = NULL;
- FbGopPrivate->EdidActive.SizeOfEdid = 0;
- FbGopPrivate->EdidActive.Edid = NULL;
-
- //
- // Fill in the Graphics Output Protocol
- //
- FbGopPrivate->GraphicsOutput.QueryMode = FbGopGraphicsOutputQueryMode;
- FbGopPrivate->GraphicsOutput.SetMode = FbGopGraphicsOutputSetMode;
-
-
- //
- // Allocate buffer for Graphics Output Protocol mode information
- //
- FbGopPrivate->GraphicsOutput.Mode = (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *) AllocatePool (
- sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE)
- );
- if (NULL == FbGopPrivate->GraphicsOutput.Mode) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- FbGopPrivate->GraphicsOutput.Mode->Info = (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) AllocatePool (
- sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)
- );
- if (NULL == FbGopPrivate->GraphicsOutput.Mode->Info) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- //
- // Set Gop Device Path, here RemainingDevicePath will not be one End of Device Path Node.
- //
- if ((RemainingDevicePath == NULL) || (!IsDevicePathEnd (RemainingDevicePath))) {
- if (RemainingDevicePath == NULL) {
- ZeroMem (&AcpiDeviceNode, sizeof (ACPI_ADR_DEVICE_PATH));
- AcpiDeviceNode.Header.Type = ACPI_DEVICE_PATH;
- AcpiDeviceNode.Header.SubType = ACPI_ADR_DP;
- AcpiDeviceNode.ADR = ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYPE_VGA, 0, 0);
- SetDevicePathNodeLength (&AcpiDeviceNode.Header, sizeof (ACPI_ADR_DEVICE_PATH));
-
- FbGopPrivate->GopDevicePath = AppendDevicePathNode (
- ParentDevicePath,
- (EFI_DEVICE_PATH_PROTOCOL *) &AcpiDeviceNode
- );
- } else {
- FbGopPrivate->GopDevicePath = AppendDevicePathNode (ParentDevicePath, RemainingDevicePath);
- }
-
- //
- // Creat child handle and device path protocol firstly
- //
- FbGopPrivate->Handle = NULL;
- Status = gBS->InstallMultipleProtocolInterfaces (
- &FbGopPrivate->Handle,
- &gEfiDevicePathProtocolGuid,
- FbGopPrivate->GopDevicePath,
- NULL
- );
- if (EFI_ERROR (Status)) {
- goto Done;
- }
- }
-
- //
- // When check for VBE, PCI I/O protocol is needed, so use parent's protocol interface temporally
- //
- FbGopPrivate->PciIo = ParentPciIo;
-
- //
- // Check for VESA BIOS Extensions for modes that are compatible with Graphics Output
- //
- Status = FbGopCheckForVbe (FbGopPrivate);
- DEBUG ((EFI_D_INFO, "FbGopCheckForVbe - %r\n", Status));
-
- if (EFI_ERROR (Status)) {
- Status = EFI_UNSUPPORTED;
- //goto Done;
- }
-
- //
- // Creat child handle and install Graphics Output Protocol,EDID Discovered/Active Protocol
- //
- Status = gBS->InstallMultipleProtocolInterfaces (
- &FbGopPrivate->Handle,
- &gEfiGraphicsOutputProtocolGuid,
- &FbGopPrivate->GraphicsOutput,
- &gEfiEdidDiscoveredProtocolGuid,
- &FbGopPrivate->EdidDiscovered,
- &gEfiEdidActiveProtocolGuid,
- &FbGopPrivate->EdidActive,
- NULL
- );
-
- if (!EFI_ERROR (Status)) {
- //
- // Open the Parent Handle for the child
- //
- Status = gBS->OpenProtocol (
- ParentHandle,
- &gEfiPciIoProtocolGuid,
- (VOID **) &FbGopPrivate->PciIo,
- This->DriverBindingHandle,
- FbGopPrivate->Handle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
- if (EFI_ERROR (Status)) {
- goto Done;
- }
- }
-
-Done:
- if (EFI_ERROR (Status)) {
- //
- // Free private data structure
- //
- FbGopDeviceReleaseResource (FbGopPrivate);
- }
-
- return Status;
-}
-
-
-/**
- Deregister an video child handle and free resources.
-
- @param This Protocol instance pointer.
- @param Controller Video controller handle
- @param Handle Video child handle
-
- @return EFI_STATUS
-
-**/
-EFI_STATUS
-FbGopChildHandleUninstall (
- EFI_DRIVER_BINDING_PROTOCOL *This,
- EFI_HANDLE Controller,
- EFI_HANDLE Handle
- )
-{
- EFI_STATUS Status;
- EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- FB_VIDEO_DEV *FbGopPrivate;
- EFI_PCI_IO_PROTOCOL *PciIo;
-
- FbGopPrivate = NULL;
- GraphicsOutput = NULL;
- PciIo = NULL;
- Status = EFI_UNSUPPORTED;
-
- Status = gBS->OpenProtocol (
- Handle,
- &gEfiGraphicsOutputProtocolGuid,
- (VOID **) &GraphicsOutput,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (!EFI_ERROR (Status)) {
- FbGopPrivate = FB_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (GraphicsOutput);
- }
-
- if (FbGopPrivate == NULL) {
- return EFI_UNSUPPORTED;
- }
-
- //
- // Close PCI I/O protocol that opened by child handle
- //
- Status = gBS->CloseProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
-
- //
- // Uninstall protocols on child handle
- //
- Status = gBS->UninstallMultipleProtocolInterfaces (
- FbGopPrivate->Handle,
- &gEfiDevicePathProtocolGuid,
- FbGopPrivate->GopDevicePath,
- &gEfiGraphicsOutputProtocolGuid,
- &FbGopPrivate->GraphicsOutput,
- NULL
- );
-
- if (EFI_ERROR (Status)) {
- gBS->OpenProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
- This->DriverBindingHandle,
- Handle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
- return Status;
- }
-
- //
- // Release all allocated resources
- //
- FbGopDeviceReleaseResource (FbGopPrivate);
-
- return EFI_SUCCESS;
-}
-
-
-/**
- Release resource for biso video instance.
-
- @param FbGopPrivate Video child device private data structure
-
-**/
-VOID
-FbGopDeviceReleaseResource (
- FB_VIDEO_DEV *FbGopPrivate
- )
-{
- if (FbGopPrivate == NULL) {
- return ;
- }
-
- //
- // Release all the resourses occupied by the FB_VIDEO_DEV
- //
-
- //
- // Free VBE Frame Buffer
- //
- if (FbGopPrivate->VbeFrameBuffer != NULL) {
- FreePool (FbGopPrivate->VbeFrameBuffer);
- }
-
- //
- // Free mode data
- //
- if (FbGopPrivate->ModeData != NULL) {
- FreePool (FbGopPrivate->ModeData);
- }
-
- //
- // Free graphics output protocol occupied resource
- //
- if (FbGopPrivate->GraphicsOutput.Mode != NULL) {
- if (FbGopPrivate->GraphicsOutput.Mode->Info != NULL) {
- FreePool (FbGopPrivate->GraphicsOutput.Mode->Info);
- FbGopPrivate->GraphicsOutput.Mode->Info = NULL;
- }
- FreePool (FbGopPrivate->GraphicsOutput.Mode);
- FbGopPrivate->GraphicsOutput.Mode = NULL;
- }
-
- if (FbGopPrivate->GopDevicePath!= NULL) {
- FreePool (FbGopPrivate->GopDevicePath);
- }
-
- FreePool (FbGopPrivate);
-
- return ;
-}
-
-
-
-/**
- Check if all video child handles have been uninstalled.
-
- @param Controller Video controller handle
-
- @return TRUE Child handles exist.
- @return FALSE All video child handles have been uninstalled.
-
-**/
-BOOLEAN
-HasChildHandle (
- IN EFI_HANDLE Controller
- )
-{
- UINTN Index;
- EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer;
- UINTN EntryCount;
- BOOLEAN HasChild;
-
- EntryCount = 0;
- HasChild = FALSE;
- gBS->OpenProtocolInformation (
- Controller,
- &gEfiPciIoProtocolGuid,
- &OpenInfoBuffer,
- &EntryCount
- );
- for (Index = 0; Index < EntryCount; Index++) {
- if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {
- HasChild = TRUE;
- }
- }
-
- return HasChild;
-}
-
-/**
- Check for VBE device.
-
- @param FbGopPrivate Pointer to FB_VIDEO_DEV structure
-
- @retval EFI_SUCCESS VBE device found
-
-**/
-EFI_STATUS
-FbGopCheckForVbe (
- IN OUT FB_VIDEO_DEV *FbGopPrivate
- )
-{
- EFI_STATUS Status;
- FB_VIDEO_MODE_DATA *ModeBuffer;
- FB_VIDEO_MODE_DATA *CurrentModeData;
- UINTN ModeNumber;
- UINTN BitsPerPixel;
- UINTN BytesPerScanLine;
- UINT32 HorizontalResolution;
- UINT32 VerticalResolution;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VbeFrameBuffer;
- EFI_HOB_GUID_TYPE *GuidHob;
- FRAME_BUFFER_INFO *pFbInfo;
-
- Status = EFI_SUCCESS;
- //
- // Find the frame buffer information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiFrameBufferInfoGuid);
- ASSERT (GuidHob != NULL);
- pFbInfo = (FRAME_BUFFER_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- //
- // Add mode to the list of available modes
- //
- VbeFrameBuffer = NULL;
- ModeBuffer = NULL;
-
- ModeNumber = 1;
- BitsPerPixel = pFbInfo->BitsPerPixel;
- HorizontalResolution = pFbInfo->HorizontalResolution;
- VerticalResolution = pFbInfo->VerticalResolution;
- BytesPerScanLine = HorizontalResolution * (BitsPerPixel / 8);
-
- ModeBuffer = (FB_VIDEO_MODE_DATA *) AllocatePool (
- ModeNumber * sizeof (FB_VIDEO_MODE_DATA)
- );
- if (NULL == ModeBuffer) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- VbeFrameBuffer =
- (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) AllocatePool (
- BytesPerScanLine * VerticalResolution
- );
- if (NULL == VbeFrameBuffer) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
-
- if (FbGopPrivate->ModeData != NULL) {
- FreePool (FbGopPrivate->ModeData);
- }
-
- if (FbGopPrivate->VbeFrameBuffer != NULL) {
- FreePool (FbGopPrivate->VbeFrameBuffer);
- }
-
- CurrentModeData = &ModeBuffer[ModeNumber - 1];
- CurrentModeData->BytesPerScanLine = (UINT16)BytesPerScanLine;
-
- CurrentModeData->Red = *(FB_VIDEO_COLOR_PLACEMENT *)&(pFbInfo->Red);
- CurrentModeData->Blue = *(FB_VIDEO_COLOR_PLACEMENT *)&(pFbInfo->Blue);
- CurrentModeData->Green = *(FB_VIDEO_COLOR_PLACEMENT *)&(pFbInfo->Green);
- CurrentModeData->Reserved = *(FB_VIDEO_COLOR_PLACEMENT *)&(pFbInfo->Reserved);
-
- CurrentModeData->BitsPerPixel = (UINT32)BitsPerPixel;
- CurrentModeData->HorizontalResolution = HorizontalResolution;
- CurrentModeData->VerticalResolution = VerticalResolution;
- CurrentModeData->FrameBufferSize = CurrentModeData->BytesPerScanLine * CurrentModeData->VerticalResolution;
- CurrentModeData->LinearFrameBuffer = (VOID *) (UINTN) pFbInfo->LinearFrameBuffer;
- CurrentModeData->VbeModeNumber = 0;
- CurrentModeData->ColorDepth = 32;
- CurrentModeData->RefreshRate = 60;
-
- CurrentModeData->PixelFormat = PixelBitMask;
- if ((CurrentModeData->BitsPerPixel == 32) &&
- (CurrentModeData->Red.Mask == 0xff) && (CurrentModeData->Green.Mask == 0xff) && (CurrentModeData->Blue.Mask == 0xff)) {
- if ((CurrentModeData->Red.Position == 0) && (CurrentModeData->Green.Position == 8) && (CurrentModeData->Blue.Position == 16)) {
- CurrentModeData->PixelFormat = PixelRedGreenBlueReserved8BitPerColor;
- } else if ((CurrentModeData->Blue.Position == 0) && (CurrentModeData->Green.Position == 8) && (CurrentModeData->Red.Position == 16)) {
- CurrentModeData->PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
- }
- }
-
- CopyMem (&(CurrentModeData->PixelBitMask), &mPixelBitMask, sizeof (EFI_PIXEL_BITMASK));
-
- FbGopPrivate->ModeData = ModeBuffer;
- FbGopPrivate->VbeFrameBuffer = VbeFrameBuffer;
-
- //
- // Assign Gop's Blt function
- //
- FbGopPrivate->GraphicsOutput.Blt = FbGopGraphicsOutputVbeBlt;
-
- FbGopPrivate->GraphicsOutput.Mode->MaxMode = 1;
- FbGopPrivate->GraphicsOutput.Mode->Mode = 0;
- FbGopPrivate->GraphicsOutput.Mode->Info->Version = 0;
- FbGopPrivate->GraphicsOutput.Mode->Info->HorizontalResolution = HorizontalResolution;
- FbGopPrivate->GraphicsOutput.Mode->Info->VerticalResolution = VerticalResolution;
- FbGopPrivate->GraphicsOutput.Mode->Info->PixelFormat = CurrentModeData->PixelFormat;
- CopyMem (&(FbGopPrivate->GraphicsOutput.Mode->Info->PixelInformation), &mPixelBitMask, sizeof (EFI_PIXEL_BITMASK));
- FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine = HorizontalResolution;
- FbGopPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- FbGopPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) CurrentModeData->LinearFrameBuffer;
- FbGopPrivate->GraphicsOutput.Mode->FrameBufferSize = CurrentModeData->FrameBufferSize;
-
- //
- // Find the best mode to initialize
- //
-
-Done:
- //
- // If there was an error, then free the mode structure
- //
- if (EFI_ERROR (Status)) {
-
- if (VbeFrameBuffer != NULL) {
- FreePool (VbeFrameBuffer);
- }
-
- if (ModeBuffer != NULL) {
- FreePool (ModeBuffer);
- }
- }
-
- return Status;
-}
-
-
-//
-// Graphics Output Protocol Member Functions for VESA BIOS Extensions
-//
-
-/**
- Graphics Output protocol interface to get video mode.
-
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to return information on.
- @param SizeOfInfo A pointer to the size, in bytes, of the Info
- buffer.
- @param Info Caller allocated buffer that returns information
- about ModeNumber.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
- video mode.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputQueryMode (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN UINT32 ModeNumber,
- OUT UINTN *SizeOfInfo,
- OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
- )
-{
- FB_VIDEO_DEV *FbGopPrivate;
- FB_VIDEO_MODE_DATA *ModeData;
-
- FbGopPrivate = FB_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (This);
-
- if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
- return EFI_INVALID_PARAMETER;
- }
-
- *Info = (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) AllocatePool (
- sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)
- );
- if (NULL == *Info) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
-
- ModeData = &FbGopPrivate->ModeData[ModeNumber];
- (*Info)->Version = 0;
- (*Info)->HorizontalResolution = ModeData->HorizontalResolution;
- (*Info)->VerticalResolution = ModeData->VerticalResolution;
- (*Info)->PixelFormat = ModeData->PixelFormat;
- CopyMem (&((*Info)->PixelInformation), &(ModeData->PixelBitMask), sizeof(ModeData->PixelBitMask));
-
- (*Info)->PixelsPerScanLine = (ModeData->BytesPerScanLine * 8) / ModeData->BitsPerPixel;
-
- return EFI_SUCCESS;
-}
-
-/**
- Graphics Output protocol interface to set video mode.
-
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to be set.
-
- @retval EFI_SUCCESS Graphics mode was changed.
- @retval EFI_DEVICE_ERROR The device had an error and could not complete the
- request.
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputSetMode (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
- IN UINT32 ModeNumber
- )
-{
- FB_VIDEO_DEV *FbGopPrivate;
- FB_VIDEO_MODE_DATA *ModeData;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
-
- if (This == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- FbGopPrivate = FB_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (This);
-
- ModeData = &FbGopPrivate->ModeData[ModeNumber];
-
- if (ModeNumber >= This->Mode->MaxMode) {
- return EFI_UNSUPPORTED;
- }
-
- if (ModeNumber == This->Mode->Mode) {
- //
- // Clear screen to black
- //
- ZeroMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
- FbGopGraphicsOutputVbeBlt (
- This,
- &Background,
- EfiBltVideoFill,
- 0,
- 0,
- 0,
- 0,
- ModeData->HorizontalResolution,
- ModeData->VerticalResolution,
- 0
- );
- return EFI_SUCCESS;
- } else {
- return EFI_UNSUPPORTED;
- }
-
-}
-
-/**
- Update physical frame buffer, copy 4 bytes block, then copy remaining bytes.
-
- @param PciIo The pointer of EFI_PCI_IO_PROTOCOL
- @param VbeBuffer The data to transfer to screen
- @param MemAddress Physical frame buffer base address
- @param DestinationX The X coordinate of the destination for BltOperation
- @param DestinationY The Y coordinate of the destination for BltOperation
- @param TotalBytes The total bytes of copy
- @param VbePixelWidth Bytes per pixel
- @param BytesPerScanLine Bytes per scan line
-
-**/
-VOID
-CopyVideoBuffer (
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN UINT8 *VbeBuffer,
- IN VOID *MemAddress,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN TotalBytes,
- IN UINT32 VbePixelWidth,
- IN UINTN BytesPerScanLine
- )
-{
- UINTN FrameBufferAddr;
- UINTN CopyBlockNum;
- UINTN RemainingBytes;
- UINTN UnalignedBytes;
- EFI_STATUS Status;
-
- FrameBufferAddr = (UINTN) MemAddress + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth;
-
- //
- // If TotalBytes is less than 4 bytes, only start byte copy.
- //
- if (TotalBytes < 4) {
- Status = PciIo->Mem.Write (
- PciIo,
- EfiPciIoWidthUint8,
- EFI_PCI_IO_PASS_THROUGH_BAR,
- (UINT64) FrameBufferAddr,
- TotalBytes,
- VbeBuffer
- );
- ASSERT_EFI_ERROR (Status);
- return;
- }
-
- //
- // If VbeBuffer is not 4-byte aligned, start byte copy.
- //
- UnalignedBytes = (4 - ((UINTN) VbeBuffer & 0x3)) & 0x3;
-
- if (UnalignedBytes != 0) {
- Status = PciIo->Mem.Write (
- PciIo,
- EfiPciIoWidthUint8,
- EFI_PCI_IO_PASS_THROUGH_BAR,
- (UINT64) FrameBufferAddr,
- UnalignedBytes,
- VbeBuffer
- );
- ASSERT_EFI_ERROR (Status);
- FrameBufferAddr += UnalignedBytes;
- VbeBuffer += UnalignedBytes;
- }
-
- //
- // Calculate 4-byte block count and remaining bytes.
- //
- CopyBlockNum = (TotalBytes - UnalignedBytes) >> 2;
- RemainingBytes = (TotalBytes - UnalignedBytes) & 3;
-
- //
- // Copy 4-byte block and remaining bytes to physical frame buffer.
- //
- if (CopyBlockNum != 0) {
- Status = PciIo->Mem.Write (
- PciIo,
- EfiPciIoWidthUint32,
- EFI_PCI_IO_PASS_THROUGH_BAR,
- (UINT64) FrameBufferAddr,
- CopyBlockNum,
- VbeBuffer
- );
- ASSERT_EFI_ERROR (Status);
- }
-
- if (RemainingBytes != 0) {
- FrameBufferAddr += (CopyBlockNum << 2);
- VbeBuffer += (CopyBlockNum << 2);
- Status = PciIo->Mem.Write (
- PciIo,
- EfiPciIoWidthUint8,
- EFI_PCI_IO_PASS_THROUGH_BAR,
- (UINT64) FrameBufferAddr,
- RemainingBytes,
- VbeBuffer
- );
- ASSERT_EFI_ERROR (Status);
- }
-}
-
-/**
- Worker function to block transfer for VBE device.
-
- @param FbGopPrivate Instance of FB_VIDEO_DEV
- @param BltBuffer The data to transfer to screen
- @param BltOperation The operation to perform
- @param SourceX The X coordinate of the source for BltOperation
- @param SourceY The Y coordinate of the source for BltOperation
- @param DestinationX The X coordinate of the destination for
- BltOperation
- @param DestinationY The Y coordinate of the destination for
- BltOperation
- @param Width The width of a rectangle in the blt rectangle in
- pixels
- @param Height The height of a rectangle in the blt rectangle in
- pixels
- @param Delta Not used for EfiBltVideoFill and
- EfiBltVideoToVideo operation. If a Delta of 0 is
- used, the entire BltBuffer will be operated on. If
- a subrectangle of the BltBuffer is used, then
- Delta represents the number of bytes in a row of
- the BltBuffer.
- @param Mode Mode data.
-
- @retval EFI_INVALID_PARAMETER Invalid parameter passed in
- @retval EFI_SUCCESS Blt operation success
-
-**/
-EFI_STATUS
-FbGopVbeBltWorker (
- IN FB_VIDEO_DEV *FbGopPrivate,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta,
- IN FB_VIDEO_MODE_DATA *Mode
- )
-{
- EFI_PCI_IO_PROTOCOL *PciIo;
- EFI_TPL OriginalTPL;
- UINTN DstY;
- UINTN SrcY;
- UINTN DstX;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt;
- VOID *MemAddress;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VbeFrameBuffer;
- UINTN BytesPerScanLine;
- UINTN Index;
- UINT8 *VbeBuffer;
- UINT8 *VbeBuffer1;
- UINT8 *BltUint8;
- UINT32 VbePixelWidth;
- UINT32 Pixel;
- UINTN TotalBytes;
-
- PciIo = FbGopPrivate->PciIo;
-
- VbeFrameBuffer = FbGopPrivate->VbeFrameBuffer;
- MemAddress = Mode->LinearFrameBuffer;
- BytesPerScanLine = Mode->BytesPerScanLine;
- VbePixelWidth = Mode->BitsPerPixel / 8;
- BltUint8 = (UINT8 *) BltBuffer;
- TotalBytes = Width * VbePixelWidth;
-
- if (((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (Width == 0 || Height == 0) {
- return EFI_INVALID_PARAMETER;
- }
- //
- // We need to fill the Virtual Screen buffer with the blt data.
- // The virtual screen is upside down, as the first row is the bootom row of
- // the image.
- //
- if (BltOperation == EfiBltVideoToBltBuffer) {
- //
- // Video to BltBuffer: Source is Video, destination is BltBuffer
- //
- if (SourceY + Height > Mode->VerticalResolution) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (SourceX + Width > Mode->HorizontalResolution) {
- return EFI_INVALID_PARAMETER;
- }
- } else {
- //
- // BltBuffer to Video: Source is BltBuffer, destination is Video
- //
- if (DestinationY + Height > Mode->VerticalResolution) {
- return EFI_INVALID_PARAMETER;
- }
-
- if (DestinationX + Width > Mode->HorizontalResolution) {
- return EFI_INVALID_PARAMETER;
- }
- }
- //
- // If Delta is zero, then the entire BltBuffer is being used, so Delta
- // is the number of bytes in each row of BltBuffer. Since BltBuffer is Width pixels size,
- // the number of bytes in each row can be computed.
- //
- if (Delta == 0) {
- Delta = Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
- }
- //
- // We have to raise to TPL Notify, so we make an atomic write the frame buffer.
- // We would not want a timer based event (Cursor, ...) to come in while we are
- // doing this operation.
- //
- OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
-
- switch (BltOperation) {
- case EfiBltVideoToBltBuffer:
- for (SrcY = SourceY, DstY = DestinationY; DstY < (Height + DestinationY); SrcY++, DstY++) {
- Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) (BltUint8 + DstY * Delta + DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
- //
- // Shuffle the packed bytes in the hardware buffer to match EFI_GRAPHICS_OUTPUT_BLT_PIXEL
- //
- VbeBuffer = ((UINT8 *) VbeFrameBuffer + (SrcY * BytesPerScanLine + SourceX * VbePixelWidth));
- for (DstX = DestinationX; DstX < (Width + DestinationX); DstX++) {
- Pixel = VbeBuffer[0] | VbeBuffer[1] << 8 | VbeBuffer[2] << 16 | VbeBuffer[3] << 24;
- Blt->Red = (UINT8) ((Pixel >> Mode->Red.Position) & Mode->Red.Mask);
- Blt->Blue = (UINT8) ((Pixel >> Mode->Blue.Position) & Mode->Blue.Mask);
- Blt->Green = (UINT8) ((Pixel >> Mode->Green.Position) & Mode->Green.Mask);
- Blt->Reserved = 0;
- Blt++;
- VbeBuffer += VbePixelWidth;
- }
-
- }
- break;
-
- case EfiBltVideoToVideo:
- for (Index = 0; Index < Height; Index++) {
- if (DestinationY <= SourceY) {
- SrcY = SourceY + Index;
- DstY = DestinationY + Index;
- } else {
- SrcY = SourceY + Height - Index - 1;
- DstY = DestinationY + Height - Index - 1;
- }
-
- VbeBuffer = ((UINT8 *) VbeFrameBuffer + DstY * BytesPerScanLine + DestinationX * VbePixelWidth);
- VbeBuffer1 = ((UINT8 *) VbeFrameBuffer + SrcY * BytesPerScanLine + SourceX * VbePixelWidth);
-
- gBS->CopyMem (
- VbeBuffer,
- VbeBuffer1,
- TotalBytes
- );
-
- //
- // Update physical frame buffer.
- //
- CopyVideoBuffer (
- PciIo,
- VbeBuffer,
- MemAddress,
- DestinationX,
- DstY,
- TotalBytes,
- VbePixelWidth,
- BytesPerScanLine
- );
- }
- break;
-
- case EfiBltVideoFill:
- VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
- Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) BltUint8;
- //
- // Shuffle the RGB fields in EFI_GRAPHICS_OUTPUT_BLT_PIXEL to match the hardware buffer
- //
- Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
- (
- (Blt->Green & Mode->Green.Mask) <<
- Mode->Green.Position
- ) |
- ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
-
- for (Index = 0; Index < Width; Index++) {
- gBS->CopyMem (
- VbeBuffer,
- &Pixel,
- VbePixelWidth
- );
- VbeBuffer += VbePixelWidth;
- }
-
- VbeBuffer = (UINT8 *) ((UINTN) VbeFrameBuffer + (DestinationY * BytesPerScanLine) + DestinationX * VbePixelWidth);
- for (DstY = DestinationY + 1; DstY < (Height + DestinationY); DstY++) {
- gBS->CopyMem (
- (VOID *) ((UINTN) VbeFrameBuffer + (DstY * BytesPerScanLine) + DestinationX * VbePixelWidth),
- VbeBuffer,
- TotalBytes
- );
- }
-
- for (DstY = DestinationY; DstY < (Height + DestinationY); DstY++) {
- //
- // Update physical frame buffer.
- //
- CopyVideoBuffer (
- PciIo,
- VbeBuffer,
- MemAddress,
- DestinationX,
- DstY,
- TotalBytes,
- VbePixelWidth,
- BytesPerScanLine
- );
- }
- break;
-
- case EfiBltBufferToVideo:
- for (SrcY = SourceY, DstY = DestinationY; SrcY < (Height + SourceY); SrcY++, DstY++) {
- Blt = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) (BltUint8 + (SrcY * Delta) + (SourceX) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
- VbeBuffer = ((UINT8 *) VbeFrameBuffer + (DstY * BytesPerScanLine + DestinationX * VbePixelWidth));
- for (DstX = DestinationX; DstX < (Width + DestinationX); DstX++) {
- //
- // Shuffle the RGB fields in EFI_GRAPHICS_OUTPUT_BLT_PIXEL to match the hardware buffer
- //
- Pixel = ((Blt->Red & Mode->Red.Mask) << Mode->Red.Position) |
- ((Blt->Green & Mode->Green.Mask) << Mode->Green.Position) |
- ((Blt->Blue & Mode->Blue.Mask) << Mode->Blue.Position);
- gBS->CopyMem (
- VbeBuffer,
- &Pixel,
- VbePixelWidth
- );
- Blt++;
- VbeBuffer += VbePixelWidth;
- }
-
- VbeBuffer = ((UINT8 *) VbeFrameBuffer + (DstY * BytesPerScanLine + DestinationX * VbePixelWidth));
-
- //
- // Update physical frame buffer.
- //
- CopyVideoBuffer (
- PciIo,
- VbeBuffer,
- MemAddress,
- DestinationX,
- DstY,
- TotalBytes,
- VbePixelWidth,
- BytesPerScanLine
- );
- }
- break;
-
- default: ;
- }
-
- gBS->RestoreTPL (OriginalTPL);
-
- return EFI_SUCCESS;
-}
-
-/**
- Graphics Output protocol instance to block transfer for VBE device.
-
- @param This Pointer to Graphics Output protocol instance
- @param BltBuffer The data to transfer to screen
- @param BltOperation The operation to perform
- @param SourceX The X coordinate of the source for BltOperation
- @param SourceY The Y coordinate of the source for BltOperation
- @param DestinationX The X coordinate of the destination for
- BltOperation
- @param DestinationY The Y coordinate of the destination for
- BltOperation
- @param Width The width of a rectangle in the blt rectangle in
- pixels
- @param Height The height of a rectangle in the blt rectangle in
- pixels
- @param Delta Not used for EfiBltVideoFill and
- EfiBltVideoToVideo operation. If a Delta of 0 is
- used, the entire BltBuffer will be operated on. If
- a subrectangle of the BltBuffer is used, then
- Delta represents the number of bytes in a row of
- the BltBuffer.
-
- @retval EFI_INVALID_PARAMETER Invalid parameter passed in
- @retval EFI_SUCCESS Blt operation success
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputVbeBlt (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta
- )
-{
- FB_VIDEO_DEV *FbGopPrivate;
- FB_VIDEO_MODE_DATA *Mode;
-
- if (This == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- FbGopPrivate = FB_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (This);
- Mode = &FbGopPrivate->ModeData[This->Mode->Mode];
-
- return FbGopVbeBltWorker (
- FbGopPrivate,
- BltBuffer,
- BltOperation,
- SourceX,
- SourceY,
- DestinationX,
- DestinationY,
- Width,
- Height,
- Delta,
- Mode
- );
-}
-
-
-/**
- The user Entry Point for module UefiFbGop. The user code starts with this function.
-
- @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 point.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopEntryPoint(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
- EFI_HOB_GUID_TYPE *GuidHob;
-
- //
- // Find the frame buffer information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiFrameBufferInfoGuid);
- if (GuidHob != NULL) {
- //
- // Install driver model protocol(s).
- //
- Status = EfiLibInstallDriverBindingComponentName2 (
- ImageHandle,
- SystemTable,
- &gFbGopDriverBinding,
- ImageHandle,
- &gFbGopComponentName,
- &gFbGopComponentName2
- );
- ASSERT_EFI_ERROR (Status);
- } else {
- DEBUG ((EFI_D_ERROR, "No FrameBuffer information from coreboot. NO GOP driver !!!\n"));
- Status = EFI_ABORTED;
- }
- return Status;
-}
-
diff --git a/CorebootPayloadPkg/FbGop/FbGop.h b/CorebootPayloadPkg/FbGop/FbGop.h deleted file mode 100644 index 4445f5c730..0000000000 --- a/CorebootPayloadPkg/FbGop/FbGop.h +++ /dev/null @@ -1,420 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-
-This program and the accompanying materials
-are licensed and made available under the terms and conditions
-of the BSD License which accompanies this distribution. The
-full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _FB_GOP_H_
-#define _FB_GOP_H_
-
-#include <Protocol/PciIo.h>
-#include <Protocol/DevicePath.h>
-#include <Protocol/GraphicsOutput.h>
-#include <Protocol/EdidActive.h>
-#include <Protocol/EdidDiscovered.h>
-
-#include <Guid/StatusCodeDataTypeId.h>
-#include <Guid/EventGroup.h>
-#include <Guid/FrameBufferInfoGuid.h>
-
-#include <Library/PcdLib.h>
-#include <Library/HobLib.h>
-#include <Library/DebugLib.h>
-#include <Library/ReportStatusCodeLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-
-#include <IndustryStandard/Pci.h>
-
-//
-// Packed format support: The number of bits reserved for each of the colors and the actual
-// position of RGB in the frame buffer is specified in the VBE Mode information
-//
-typedef struct {
- UINT8 Position; // Position of the color
- UINT8 Mask; // The number of bits expressed as a mask
-} FB_VIDEO_COLOR_PLACEMENT;
-
-//
-// BIOS Graphics Output Graphical Mode Data
-//
-typedef struct {
- UINT16 VbeModeNumber;
- UINT16 BytesPerScanLine;
- VOID *LinearFrameBuffer;
- UINTN FrameBufferSize;
- UINT32 HorizontalResolution;
- UINT32 VerticalResolution;
- UINT32 ColorDepth;
- UINT32 RefreshRate;
- UINT32 BitsPerPixel;
- FB_VIDEO_COLOR_PLACEMENT Red;
- FB_VIDEO_COLOR_PLACEMENT Green;
- FB_VIDEO_COLOR_PLACEMENT Blue;
- FB_VIDEO_COLOR_PLACEMENT Reserved;
- EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
- EFI_PIXEL_BITMASK PixelBitMask;
-} FB_VIDEO_MODE_DATA;
-
-//
-// BIOS video child handle private data Structure
-//
-#define FB_VIDEO_DEV_SIGNATURE SIGNATURE_32 ('B', 'V', 'M', 'p')
-
-typedef struct {
- UINTN Signature;
- EFI_HANDLE Handle;
-
- //
- // Consumed Protocols
- //
- EFI_PCI_IO_PROTOCOL *PciIo;
-
- //
- // Produced Protocols
- //
- EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
- EFI_EDID_DISCOVERED_PROTOCOL EdidDiscovered;
- EFI_EDID_ACTIVE_PROTOCOL EdidActive;
-
- //
- // Graphics Output Protocol related fields
- //
- UINTN CurrentMode;
- UINTN MaxMode;
- FB_VIDEO_MODE_DATA *ModeData;
-
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VbeFrameBuffer;
-
- //
- // Status code
- //
- EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
-
-} FB_VIDEO_DEV;
-
-#define FB_VIDEO_DEV_FROM_PCI_IO_THIS(a) CR (a, FB_VIDEO_DEV, PciIo, FB_VIDEO_DEV_SIGNATURE)
-#define FB_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS(a) CR (a, FB_VIDEO_DEV, GraphicsOutput, FB_VIDEO_DEV_SIGNATURE)
-
-#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
-
-//
-// Global Variables
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gFbGopDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gFbGopComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gFbGopComponentName2;
-
-//
-// Driver Binding Protocol functions
-//
-
-/**
- Supported.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param RemainingDevicePath A pointer to the remaining portion of a device
- path
-
- @retval EFI_STATUS EFI_SUCCESS:This controller can be managed by this
- driver, Otherwise, this controller cannot be
- managed by this driver
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-
-/**
- Install Graphics Output Protocol onto VGA device handles.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param RemainingDevicePath A pointer to the remaining portion of a device
- path
-
- @return EFI_STATUS
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-
-/**
- Stop.
-
- @param This Pointer to driver binding protocol
- @param Controller Controller handle to connect
- @param NumberOfChildren Number of children handle created by this driver
- @param ChildHandleBuffer Buffer containing child handle created
-
- @retval EFI_SUCCESS Driver disconnected successfully from controller
- @retval EFI_UNSUPPORTED Cannot find FB_VIDEO_DEV structure
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-//
-// Private worker functions
-//
-
-/**
- Check for VBE device.
-
- @param FbGopPrivate Pointer to FB_VIDEO_DEV structure
-
- @retval EFI_SUCCESS VBE device found
-
-**/
-EFI_STATUS
-FbGopCheckForVbe (
- IN OUT FB_VIDEO_DEV *FbGopPrivate
- );
-
-
-
-/**
- Release resource for biso video instance.
-
- @param FbGopPrivate Video child device private data structure
-
-**/
-VOID
-FbGopDeviceReleaseResource (
- FB_VIDEO_DEV *FbGopPrivate
- );
-
-//
-// BIOS Graphics Output Protocol functions
-//
-
-/**
- Graphics Output protocol interface to get video mode.
-
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to return information on.
- @param SizeOfInfo A pointer to the size, in bytes, of the Info
- buffer.
- @param Info Caller allocated buffer that returns information
- about ModeNumber.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
- video mode.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputQueryMode (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN UINT32 ModeNumber,
- OUT UINTN *SizeOfInfo,
- OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
- );
-
-
-/**
- Graphics Output protocol interface to set video mode.
-
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to be set.
-
- @retval EFI_SUCCESS Graphics mode was changed.
- @retval EFI_DEVICE_ERROR The device had an error and could not complete the
- request.
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputSetMode (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
- IN UINT32 ModeNumber
- );
-
-
-/**
- Graphics Output protocol instance to block transfer for VBE device.
-
- @param This Pointer to Graphics Output protocol instance
- @param BltBuffer The data to transfer to screen
- @param BltOperation The operation to perform
- @param SourceX The X coordinate of the source for BltOperation
- @param SourceY The Y coordinate of the source for BltOperation
- @param DestinationX The X coordinate of the destination for
- BltOperation
- @param DestinationY The Y coordinate of the destination for
- BltOperation
- @param Width The width of a rectangle in the blt rectangle in
- pixels
- @param Height The height of a rectangle in the blt rectangle in
- pixels
- @param Delta Not used for EfiBltVideoFill and
- EfiBltVideoToVideo operation. If a Delta of 0 is
- used, the entire BltBuffer will be operated on. If
- a subrectangle of the BltBuffer is used, then
- Delta represents the number of bytes in a row of
- the BltBuffer.
-
- @retval EFI_INVALID_PARAMETER Invalid parameter passed in
- @retval EFI_SUCCESS Blt operation success
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputVbeBlt (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta
- );
-
-
-/**
- Grahpics Output protocol instance to block transfer for VGA device.
-
- @param This Pointer to Grahpics Output protocol instance
- @param BltBuffer The data to transfer to screen
- @param BltOperation The operation to perform
- @param SourceX The X coordinate of the source for BltOperation
- @param SourceY The Y coordinate of the source for BltOperation
- @param DestinationX The X coordinate of the destination for
- BltOperation
- @param DestinationY The Y coordinate of the destination for
- BltOperation
- @param Width The width of a rectangle in the blt rectangle in
- pixels
- @param Height The height of a rectangle in the blt rectangle in
- pixels
- @param Delta Not used for EfiBltVideoFill and
- EfiBltVideoToVideo operation. If a Delta of 0 is
- used, the entire BltBuffer will be operated on. If
- a subrectangle of the BltBuffer is used, then
- Delta represents the number of bytes in a row of
- the BltBuffer.
-
- @retval EFI_INVALID_PARAMETER Invalid parameter passed in
- @retval EFI_SUCCESS Blt operation success
-
-**/
-EFI_STATUS
-EFIAPI
-FbGopGraphicsOutputVgaBlt (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta
- );
-
-/**
- Install child handles if the Handle supports MBR format.
-
- @param This Calling context.
- @param ParentHandle Parent Handle
- @param ParentPciIo Parent PciIo interface
- @param ParentLegacyBios Parent LegacyBios interface
- @param ParentDevicePath Parent Device Path
- @param RemainingDevicePath Remaining Device Path
-
- @retval EFI_SUCCESS If a child handle was added
- @retval other A child handle was not added
-
-**/
-EFI_STATUS
-FbGopChildHandleInstall (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ParentHandle,
- IN EFI_PCI_IO_PROTOCOL *ParentPciIo,
- IN VOID *ParentLegacyBios,
- IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-/**
- Deregister an video child handle and free resources.
-
- @param This Protocol instance pointer.
- @param Controller Video controller handle
- @param Handle Video child handle
-
- @return EFI_STATUS
-
-**/
-EFI_STATUS
-FbGopChildHandleUninstall (
- EFI_DRIVER_BINDING_PROTOCOL *This,
- EFI_HANDLE Controller,
- EFI_HANDLE Handle
- );
-
-/**
- Release resource for biso video instance.
-
- @param FbGopPrivate Video child device private data structure
-
-**/
-VOID
-FbGopDeviceReleaseResource (
- FB_VIDEO_DEV *FbGopPrivate
- );
-
-/**
- Check if all video child handles have been uninstalled.
-
- @param Controller Video controller handle
-
- @return TRUE Child handles exist.
- @return FALSE All video child handles have been uninstalled.
-
-**/
-BOOLEAN
-HasChildHandle (
- IN EFI_HANDLE Controller
- );
-#endif
diff --git a/CorebootPayloadPkg/FbGop/FbGop.inf b/CorebootPayloadPkg/FbGop/FbGop.inf deleted file mode 100644 index 0d97387679..0000000000 --- a/CorebootPayloadPkg/FbGop/FbGop.inf +++ /dev/null @@ -1,70 +0,0 @@ -## @file
-# Video driver based on legacy bios.
-#
-# This driver by using Legacy Bios protocol service to support csm Video
-# and produce Graphics Output Protocol.
-#
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions
-# of the BSD License which accompanies this distribution. The
-# full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = FbGop
- FILE_GUID = 0B04B2ED-861C-42cd-A22F-C3AAFACCB896
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = FbGopEntryPoint
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-# DRIVER_BINDING = gBiosVideoDriverBinding
-# COMPONENT_NAME = gBiosVideoComponentName
-#
-
-[Sources]
- FbGop.c
- FbGop.h
- ComponentName.c
-
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- CorebootModulePkg/CorebootModulePkg.dec
-
-[LibraryClasses]
- MemoryAllocationLib
- DevicePathLib
- UefiLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
- BaseMemoryLib
- ReportStatusCodeLib
- DebugLib
- PcdLib
- HobLib
-
-[Guids]
- gUefiFrameBufferInfoGuid
-
-[Protocols]
- gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
- gEfiPciIoProtocolGuid # PROTOCOL TO_START
- gEfiDevicePathProtocolGuid # PROTOCOL TO_START
- gEfiEdidDiscoveredProtocolGuid
- gEfiEdidActiveProtocolGuid
-
diff --git a/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c b/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c deleted file mode 100644 index 281fa53927..0000000000 --- a/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c +++ /dev/null @@ -1,276 +0,0 @@ -/** @file
- ACPI Timer implements one instance of Timer Library.
-
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials are
- licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <PiPei.h>
-#include <Library/TimerLib.h>
-#include <Library/BaseLib.h>
-#include <Library/IoLib.h>
-#include <Library/HobLib.h>
-#include <Library/DebugLib.h>
-
-#include <Guid/AcpiBoardInfoGuid.h>
-#include <IndustryStandard/Acpi.h>
-
-#define ACPI_TIMER_COUNT_SIZE BIT24
-
-UINTN mPmTimerReg = 0;
-
-/**
- The constructor function enables ACPI IO space.
-
- If ACPI I/O space not enabled, this function will enable it.
- It will always return RETURN_SUCCESS.
-
- @retval EFI_SUCCESS The constructor always returns RETURN_SUCCESS.
-
-**/
-RETURN_STATUS
-EFIAPI
-AcpiTimerLibConstructor (
- VOID
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
- ACPI_BOARD_INFO *pAcpiBoardInfo;
-
- //
- // Find the acpi board information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
- ASSERT (GuidHob != NULL);
-
- pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- mPmTimerReg = (UINTN)pAcpiBoardInfo->PmTimerRegBase;
-
- return EFI_SUCCESS;
-}
-
-/**
- Internal function to read the current tick counter of ACPI.
-
- Internal function to read the current tick counter of ACPI.
-
- @return The tick counter read.
-
-**/
-UINT32
-InternalAcpiGetTimerTick (
- VOID
- )
-{
- if (mPmTimerReg == 0)
- AcpiTimerLibConstructor ();
-
- return IoRead32 (mPmTimerReg);
-}
-
-/**
- Stalls the CPU for at least the given number of ticks.
-
- Stalls the CPU for at least the given number of ticks. It's invoked by
- MicroSecondDelay() and NanoSecondDelay().
-
- @param Delay A period of time to delay in ticks.
-
-**/
-VOID
-InternalAcpiDelay (
- IN UINT32 Delay
- )
-{
- UINT32 Ticks;
- UINT32 Times;
-
- Times = Delay >> 22;
- Delay &= BIT22 - 1;
- do {
- //
- // The target timer count is calculated here
- //
- Ticks = InternalAcpiGetTimerTick () + Delay;
- Delay = BIT22;
- //
- // Wait until time out
- // Delay >= 2^23 could not be handled by this function
- // Timer wrap-arounds are handled correctly by this function
- //
- while (((Ticks - InternalAcpiGetTimerTick ()) & BIT23) == 0) {
- CpuPause ();
- }
- } while (Times-- > 0);
-}
-
-/**
- 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
-
-**/
-UINTN
-EFIAPI
-MicroSecondDelay (
- IN UINTN MicroSeconds
- )
-{
- InternalAcpiDelay (
- (UINT32)DivU64x32 (
- MultU64x32 (
- MicroSeconds,
- ACPI_TIMER_FREQUENCY
- ),
- 1000000u
- )
- );
- return MicroSeconds;
-}
-
-/**
- Stalls the CPU for at least the given number of nanoseconds.
-
- Stalls the CPU for the number of nanoseconds specified by NanoSeconds.
-
- @param NanoSeconds The minimum number of nanoseconds to delay.
-
- @return NanoSeconds
-
-**/
-UINTN
-EFIAPI
-NanoSecondDelay (
- IN UINTN NanoSeconds
- )
-{
- InternalAcpiDelay (
- (UINT32)DivU64x32 (
- MultU64x32 (
- NanoSeconds,
- ACPI_TIMER_FREQUENCY
- ),
- 1000000000u
- )
- );
- return NanoSeconds;
-}
-
-/**
- Retrieves the current value of a 64-bit free running performance counter.
-
- Retrieves the current value of a 64-bit free running performance counter. The
- counter can either count up by 1 or count down by 1. If the physical
- performance counter counts by a larger increment, then the counter values
- must be translated. The properties of the counter can be retrieved from
- GetPerformanceCounterProperties().
-
- @return The current value of the free running performance counter.
-
-**/
-UINT64
-EFIAPI
-GetPerformanceCounter (
- VOID
- )
-{
- return (UINT64)InternalAcpiGetTimerTick ();
-}
-
-/**
- Retrieves the 64-bit frequency in Hz and the range of performance counter
- values.
-
- If StartValue is not NULL, then the value that the performance counter starts
- with immediately after is it rolls over is returned in StartValue. If
- EndValue is not NULL, then the value that the performance counter end with
- immediately before it rolls over is returned in EndValue. The 64-bit
- frequency of the performance counter in Hz is always returned. If StartValue
- is less than EndValue, then the performance counter counts up. If StartValue
- is greater than EndValue, then the performance counter counts down. For
- example, a 64-bit free running counter that counts up would have a StartValue
- of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter
- that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.
-
- @param StartValue The value the performance counter starts with when it
- rolls over.
- @param EndValue The value that the performance counter ends with before
- it rolls over.
-
- @return The frequency in Hz.
-
-**/
-UINT64
-EFIAPI
-GetPerformanceCounterProperties (
- OUT UINT64 *StartValue, OPTIONAL
- OUT UINT64 *EndValue OPTIONAL
- )
-{
- if (StartValue != NULL) {
- *StartValue = 0;
- }
-
- if (EndValue != NULL) {
- *EndValue = ACPI_TIMER_COUNT_SIZE - 1;
- }
-
- return ACPI_TIMER_FREQUENCY;
-}
-
-/**
- Converts elapsed ticks of performance counter to time in nanoseconds.
-
- This function converts the elapsed ticks of running performance counter to
- time value in unit of nanoseconds.
-
- @param Ticks The number of elapsed ticks of running performance counter.
-
- @return The elapsed time in nanoseconds.
-
-**/
-UINT64
-EFIAPI
-GetTimeInNanoSecond (
- IN UINT64 Ticks
- )
-{
- UINT64 Frequency;
- UINT64 NanoSeconds;
- UINT64 Remainder;
- INTN Shift;
-
- Frequency = GetPerformanceCounterProperties (NULL, NULL);
-
- //
- // Ticks
- // Time = --------- x 1,000,000,000
- // Frequency
- //
- NanoSeconds = MultU64x32 (DivU64x64Remainder (Ticks, Frequency, &Remainder), 1000000000u);
-
- //
- // Ensure (Remainder * 1,000,000,000) will not overflow 64-bit.
- // Since 2^29 < 1,000,000,000 = 0x3B9ACA00 < 2^30, Remainder should < 2^(64-30) = 2^34,
- // i.e. highest bit set in Remainder should <= 33.
- //
- Shift = MAX (0, HighBitSet64 (Remainder) - 33);
- Remainder = RShiftU64 (Remainder, (UINTN) Shift);
- Frequency = RShiftU64 (Frequency, (UINTN) Shift);
- NanoSeconds += DivU64x64Remainder (MultU64x32 (Remainder, 1000000000u), Frequency, NULL);
-
- return NanoSeconds;
-}
-
diff --git a/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf b/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf deleted file mode 100644 index 2bff61094a..0000000000 --- a/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf +++ /dev/null @@ -1,46 +0,0 @@ -## @file
-# ACPI Timer Library Instance.
-#
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = AcpiTimerLib
- FILE_GUID = A41BF616-EF77-4658-9992-D813071C34CF
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = TimerLib
-
- CONSTRUCTOR = AcpiTimerLibConstructor
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources]
- AcpiTimerLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- CorebootModulePkg/CorebootModulePkg.dec
-
-[LibraryClasses]
- BaseLib
- IoLib
- HobLib
- DebugLib
-
-[Guids]
- gUefiAcpiBoardInfoGuid
\ No newline at end of file diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h deleted file mode 100644 index 4852ed0d8d..0000000000 --- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h +++ /dev/null @@ -1,86 +0,0 @@ -/** @file
- Header file of PciHostBridgeLib.
-
- Copyright (C) 2016, Red Hat, Inc.
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _PCI_HOST_BRIDGE_H
-#define _PCI_HOST_BRIDGE_H
-
-typedef struct {
- ACPI_HID_DEVICE_PATH AcpiDevicePath;
- EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
-} CB_PCI_ROOT_BRIDGE_DEVICE_PATH;
-
-PCI_ROOT_BRIDGE *
-ScanForRootBridges (
- UINTN *NumberOfRootBridges
-);
-
-/**
- Initialize a PCI_ROOT_BRIDGE structure.
-
- @param[in] Supports Supported attributes.
-
- @param[in] Attributes Initial attributes.
-
- @param[in] AllocAttributes Allocation attributes.
-
- @param[in] RootBusNumber The bus number to store in RootBus.
-
- @param[in] MaxSubBusNumber The inclusive maximum bus number that can be
- assigned to any subordinate bus found behind any
- PCI bridge hanging off this root bus.
-
- The caller is repsonsible for ensuring that
- RootBusNumber <= MaxSubBusNumber. If
- RootBusNumber equals MaxSubBusNumber, then the
- root bus has no room for subordinate buses.
-
- @param[in] Io IO aperture.
-
- @param[in] Mem MMIO aperture.
-
- @param[in] MemAbove4G MMIO aperture above 4G.
-
- @param[in] PMem Prefetchable MMIO aperture.
-
- @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
-
- @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the
- caller) that should be filled in by this
- function.
-
- @retval EFI_SUCCESS Initialization successful. A device path
- consisting of an ACPI device path node, with
- UID = RootBusNumber, has been allocated and
- linked into RootBus.
-
- @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
-**/
-EFI_STATUS
-InitRootBridge (
- IN UINT64 Supports,
- IN UINT64 Attributes,
- IN UINT64 AllocAttributes,
- IN UINT8 RootBusNumber,
- IN UINT8 MaxSubBusNumber,
- IN PCI_ROOT_BRIDGE_APERTURE *Io,
- IN PCI_ROOT_BRIDGE_APERTURE *Mem,
- IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
- IN PCI_ROOT_BRIDGE_APERTURE *PMem,
- IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
- OUT PCI_ROOT_BRIDGE *RootBus
-);
-
-#endif
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c deleted file mode 100644 index b0a6361557..0000000000 --- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ /dev/null @@ -1,228 +0,0 @@ -/** @file
- Library instance of PciHostBridgeLib library class for coreboot.
-
- Copyright (C) 2016, Red Hat, Inc.
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#include <PiDxe.h>
-
-#include <IndustryStandard/Pci.h>
-#include <Protocol/PciHostBridgeResourceAllocation.h>
-#include <Protocol/PciRootBridgeIo.h>
-
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PciHostBridgeLib.h>
-#include <Library/PciLib.h>
-
-#include "PciHostBridge.h"
-
-STATIC
-CONST
-CB_PCI_ROOT_BRIDGE_DEVICE_PATH mRootBridgeDevicePathTemplate = {
- {
- {
- ACPI_DEVICE_PATH,
- ACPI_DP,
- {
- (UINT8) (sizeof(ACPI_HID_DEVICE_PATH)),
- (UINT8) ((sizeof(ACPI_HID_DEVICE_PATH)) >> 8)
- }
- },
- EISA_PNP_ID(0x0A03), // HID
- 0 // UID
- },
-
- {
- END_DEVICE_PATH_TYPE,
- END_ENTIRE_DEVICE_PATH_SUBTYPE,
- {
- END_DEVICE_PATH_LENGTH,
- 0
- }
- }
-};
-
-
-/**
- Initialize a PCI_ROOT_BRIDGE structure.
-
- @param[in] Supports Supported attributes.
-
- @param[in] Attributes Initial attributes.
-
- @param[in] AllocAttributes Allocation attributes.
-
- @param[in] RootBusNumber The bus number to store in RootBus.
-
- @param[in] MaxSubBusNumber The inclusive maximum bus number that can be
- assigned to any subordinate bus found behind any
- PCI bridge hanging off this root bus.
-
- The caller is repsonsible for ensuring that
- RootBusNumber <= MaxSubBusNumber. If
- RootBusNumber equals MaxSubBusNumber, then the
- root bus has no room for subordinate buses.
-
- @param[in] Io IO aperture.
-
- @param[in] Mem MMIO aperture.
-
- @param[in] MemAbove4G MMIO aperture above 4G.
-
- @param[in] PMem Prefetchable MMIO aperture.
-
- @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
-
- @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the
- caller) that should be filled in by this
- function.
-
- @retval EFI_SUCCESS Initialization successful. A device path
- consisting of an ACPI device path node, with
- UID = RootBusNumber, has been allocated and
- linked into RootBus.
-
- @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
-**/
-EFI_STATUS
-InitRootBridge (
- IN UINT64 Supports,
- IN UINT64 Attributes,
- IN UINT64 AllocAttributes,
- IN UINT8 RootBusNumber,
- IN UINT8 MaxSubBusNumber,
- IN PCI_ROOT_BRIDGE_APERTURE *Io,
- IN PCI_ROOT_BRIDGE_APERTURE *Mem,
- IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
- IN PCI_ROOT_BRIDGE_APERTURE *PMem,
- IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
- OUT PCI_ROOT_BRIDGE *RootBus
-)
-{
- CB_PCI_ROOT_BRIDGE_DEVICE_PATH *DevicePath;
-
- //
- // Be safe if other fields are added to PCI_ROOT_BRIDGE later.
- //
- ZeroMem (RootBus, sizeof *RootBus);
-
- RootBus->Segment = 0;
-
- RootBus->Supports = Supports;
- RootBus->Attributes = Attributes;
-
- RootBus->DmaAbove4G = FALSE;
-
- RootBus->AllocationAttributes = AllocAttributes;
- RootBus->Bus.Base = RootBusNumber;
- RootBus->Bus.Limit = MaxSubBusNumber;
- CopyMem (&RootBus->Io, Io, sizeof (*Io));
- CopyMem (&RootBus->Mem, Mem, sizeof (*Mem));
- CopyMem (&RootBus->MemAbove4G, MemAbove4G, sizeof (*MemAbove4G));
- CopyMem (&RootBus->PMem, PMem, sizeof (*PMem));
- CopyMem (&RootBus->PMemAbove4G, PMemAbove4G, sizeof (*PMemAbove4G));
-
- RootBus->NoExtendedConfigSpace = FALSE;
-
- DevicePath = AllocateCopyPool (sizeof (mRootBridgeDevicePathTemplate),
- &mRootBridgeDevicePathTemplate);
- if (DevicePath == NULL) {
- DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));
- return EFI_OUT_OF_RESOURCES;
- }
- DevicePath->AcpiDevicePath.UID = RootBusNumber;
- RootBus->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath;
-
- DEBUG ((EFI_D_INFO,
- "%a: populated root bus %d, with room for %d subordinate bus(es)\n",
- __FUNCTION__, RootBusNumber, MaxSubBusNumber - RootBusNumber));
- return EFI_SUCCESS;
-}
-
-
-/**
- Return all the root bridge instances in an array.
-
- @param Count Return the count of root bridge instances.
-
- @return All the root bridge instances in an array.
- The array should be passed into PciHostBridgeFreeRootBridges()
- when it's not used.
-**/
-PCI_ROOT_BRIDGE *
-EFIAPI
-PciHostBridgeGetRootBridges (
- UINTN *Count
-)
-{
- return ScanForRootBridges (Count);
-}
-
-
-/**
- Free the root bridge instances array returned from
- PciHostBridgeGetRootBridges().
-
- @param The root bridge instances array.
- @param The count of the array.
-**/
-VOID
-EFIAPI
-PciHostBridgeFreeRootBridges (
- PCI_ROOT_BRIDGE *Bridges,
- UINTN Count
-)
-{
- if (Bridges == NULL && Count == 0) {
- return;
- }
- ASSERT (Bridges != NULL && Count > 0);
-
- do {
- --Count;
- FreePool (Bridges[Count].DevicePath);
- } while (Count > 0);
-
- FreePool (Bridges);
-}
-
-
-/**
- Inform the platform that the resource conflict happens.
-
- @param HostBridgeHandle Handle of the Host Bridge.
- @param Configuration Pointer to PCI I/O and PCI memory resource
- descriptors. The Configuration contains the resources
- for all the root bridges. The resource for each root
- bridge is terminated with END descriptor and an
- additional END is appended indicating the end of the
- entire resources. The resource descriptor field
- values follow the description in
- EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
- .SubmitResources().
-**/
-VOID
-EFIAPI
-PciHostBridgeResourceConflict (
- EFI_HANDLE HostBridgeHandle,
- VOID *Configuration
-)
-{
- //
- // coreboot UEFI Payload does not do PCI enumeration and should not call this
- // library interface.
- //
- ASSERT (FALSE);
-}
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf deleted file mode 100644 index 15ffb45f84..0000000000 --- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf +++ /dev/null @@ -1,47 +0,0 @@ -## @file
-# Library instance of PciHostBridgeLib library class for coreboot.
-#
-# Copyright (C) 2016, Red Hat, Inc.
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
-# IMPLIED.
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = PciHostBridgeLib
- FILE_GUID = 62EE5269-CFFD-43a3-BE3F-622FC79F467E
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = PciHostBridgeLib
-
-#
-# The following information is for reference only and not required by the build
-# tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources]
- PciHostBridge.h
- PciHostBridgeLib.c
- PciHostBridgeSupport.c
-
-[Packages]
- MdeModulePkg/MdeModulePkg.dec
- MdePkg/MdePkg.dec
-
-[LibraryClasses]
- BaseMemoryLib
- DebugLib
- DevicePathLib
- MemoryAllocationLib
- PciLib
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c deleted file mode 100644 index 6d94ff72c9..0000000000 --- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c +++ /dev/null @@ -1,585 +0,0 @@ -/** @file
- Scan the entire PCI bus for root bridges to support coreboot UEFI payload.
-
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <PiDxe.h>
-#include <IndustryStandard/Pci.h>
-#include <Protocol/PciHostBridgeResourceAllocation.h>
-#include <Protocol/PciRootBridgeIo.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PciHostBridgeLib.h>
-#include <Library/PciLib.h>
-#include "PciHostBridge.h"
-
-/**
- Adjust the collected PCI resource.
-
- @param[in] Io IO aperture.
-
- @param[in] Mem MMIO aperture.
-
- @param[in] MemAbove4G MMIO aperture above 4G.
-
- @param[in] PMem Prefetchable MMIO aperture.
-
- @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
-**/
-VOID
-AdjustRootBridgeResource (
- IN PCI_ROOT_BRIDGE_APERTURE *Io,
- IN PCI_ROOT_BRIDGE_APERTURE *Mem,
- IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
- IN PCI_ROOT_BRIDGE_APERTURE *PMem,
- IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G
-)
-{
- UINT64 Mask;
-
- //
- // For now try to downgrade everything into MEM32 since
- // - coreboot does not assign resource above 4GB
- // - coreboot might allocate interleaved MEM32 and PMEM32 resource
- // in some cases
- //
- if (PMem->Base < Mem->Base) {
- Mem->Base = PMem->Base;
- }
-
- if (PMem->Limit > Mem->Limit) {
- Mem->Limit = PMem->Limit;
- }
-
- PMem->Base = MAX_UINT64;
- PMem->Limit = 0;
-
- if (MemAbove4G->Base < 0x100000000ULL) {
- if (MemAbove4G->Base < Mem->Base) {
- Mem->Base = MemAbove4G->Base;
- }
- if (MemAbove4G->Limit > Mem->Limit) {
- Mem->Limit = MemAbove4G->Limit;
- }
- MemAbove4G->Base = MAX_UINT64;
- MemAbove4G->Limit = 0;
- }
-
- if (PMemAbove4G->Base < 0x100000000ULL) {
- if (PMemAbove4G->Base < Mem->Base) {
- Mem->Base = PMemAbove4G->Base;
- }
- if (PMemAbove4G->Limit > Mem->Limit) {
- Mem->Limit = PMemAbove4G->Limit;
- }
- PMemAbove4G->Base = MAX_UINT64;
- PMemAbove4G->Limit = 0;
- }
-
- //
- // Align IO resource at 4K boundary
- //
- Mask = 0xFFFULL;
- Io->Limit = ((Io->Limit + Mask) & ~Mask) - 1;
- if (Io->Base != MAX_UINT64) {
- Io->Base &= ~Mask;
- }
-
- //
- // Align MEM resource at 1MB boundary
- //
- Mask = 0xFFFFFULL;
- Mem->Limit = ((Mem->Limit + Mask) & ~Mask) - 1;
- if (Mem->Base != MAX_UINT64) {
- Mem->Base &= ~Mask;
- }
-}
-
-/**
- Probe a bar is existed or not.
-
- @param[in] Address PCI address for the BAR.
- @param[out] OriginalValue The original bar value returned.
- @param[out] Value The probed bar value returned.
-**/
-STATIC
-VOID
-PcatPciRootBridgeBarExisted (
- IN UINT64 Address,
- OUT UINT32 *OriginalValue,
- OUT UINT32 *Value
-)
-{
- UINTN PciAddress;
-
- PciAddress = (UINTN)Address;
-
- //
- // Preserve the original value
- //
- *OriginalValue = PciRead32 (PciAddress);
-
- //
- // Disable timer interrupt while the BAR is probed
- //
- DisableInterrupts ();
-
- PciWrite32 (PciAddress, 0xFFFFFFFF);
- *Value = PciRead32 (PciAddress);
- PciWrite32 (PciAddress, *OriginalValue);
-
- //
- // Enable interrupt
- //
- EnableInterrupts ();
-}
-
-/**
- Parse PCI bar and collect the assigned PCI resouce information.
-
- @param[in] Command Supported attributes.
-
- @param[in] Bus PCI bus number.
-
- @param[in] Device PCI device number.
-
- @param[in] Function PCI function number.
-
- @param[in] BarOffsetBase PCI bar start offset.
-
- @param[in] BarOffsetEnd PCI bar end offset.
-
- @param[in] Io IO aperture.
-
- @param[in] Mem MMIO aperture.
-
- @param[in] MemAbove4G MMIO aperture above 4G.
-
- @param[in] PMem Prefetchable MMIO aperture.
-
- @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
-**/
-STATIC
-VOID
-PcatPciRootBridgeParseBars (
- IN UINT16 Command,
- IN UINTN Bus,
- IN UINTN Device,
- IN UINTN Function,
- IN UINTN BarOffsetBase,
- IN UINTN BarOffsetEnd,
- IN PCI_ROOT_BRIDGE_APERTURE *Io,
- IN PCI_ROOT_BRIDGE_APERTURE *Mem,
- IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
- IN PCI_ROOT_BRIDGE_APERTURE *PMem,
- IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G
-
-)
-{
- UINT32 OriginalValue;
- UINT32 Value;
- UINT32 OriginalUpperValue;
- UINT32 UpperValue;
- UINT64 Mask;
- UINTN Offset;
- UINTN LowBit;
- UINT64 Base;
- UINT64 Length;
- UINT64 Limit;
- PCI_ROOT_BRIDGE_APERTURE *MemAperture;
-
- for (Offset = BarOffsetBase; Offset < BarOffsetEnd; Offset += sizeof (UINT32)) {
- PcatPciRootBridgeBarExisted (
- PCI_LIB_ADDRESS (Bus, Device, Function, Offset),
- &OriginalValue, &Value
- );
- if (Value == 0) {
- continue;
- }
- if ((Value & BIT0) == BIT0) {
- //
- // IO Bar
- //
- if (Command & EFI_PCI_COMMAND_IO_SPACE) {
- Mask = 0xfffffffc;
- Base = OriginalValue & Mask;
- Length = ((~(Value & Mask)) & Mask) + 0x04;
- if (!(Value & 0xFFFF0000)) {
- Length &= 0x0000FFFF;
- }
- Limit = Base + Length - 1;
-
- if ((Base > 0) && (Base < Limit)) {
- if (Io->Base > Base) {
- Io->Base = Base;
- }
- if (Io->Limit < Limit) {
- Io->Limit = Limit;
- }
- }
- }
- } else {
- //
- // Mem Bar
- //
- if (Command & EFI_PCI_COMMAND_MEMORY_SPACE) {
-
- Mask = 0xfffffff0;
- Base = OriginalValue & Mask;
- Length = Value & Mask;
-
- if ((Value & (BIT1 | BIT2)) == 0) {
- //
- // 32bit
- //
- Length = ((~Length) + 1) & 0xffffffff;
-
- if ((Value & BIT3) == BIT3) {
- MemAperture = PMem;
- } else {
- MemAperture = Mem;
- }
- } else {
- //
- // 64bit
- //
- Offset += 4;
- PcatPciRootBridgeBarExisted (
- PCI_LIB_ADDRESS (Bus, Device, Function, Offset),
- &OriginalUpperValue,
- &UpperValue
- );
-
- Base = Base | LShiftU64 ((UINT64) OriginalUpperValue, 32);
- Length = Length | LShiftU64 ((UINT64) UpperValue, 32);
- if (Length != 0) {
- LowBit = LowBitSet64 (Length);
- Length = LShiftU64 (1ULL, LowBit);
- }
-
- if ((Value & BIT3) == BIT3) {
- MemAperture = PMemAbove4G;
- } else {
- MemAperture = MemAbove4G;
- }
- }
-
- Limit = Base + Length - 1;
- if ((Base > 0) && (Base < Limit)) {
- if (MemAperture->Base > Base) {
- MemAperture->Base = Base;
- }
- if (MemAperture->Limit < Limit) {
- MemAperture->Limit = Limit;
- }
- }
- }
- }
- }
-}
-
-/**
- Scan for all root bridges in platform.
-
- @param[out] NumberOfRootBridges Number of root bridges detected
-
- @retval Pointer to the allocated PCI_ROOT_BRIDGE structure array.
-**/
-PCI_ROOT_BRIDGE *
-ScanForRootBridges (
- OUT UINTN *NumberOfRootBridges
-)
-{
- UINTN PrimaryBus;
- UINTN SubBus;
- UINT8 Device;
- UINT8 Function;
- UINTN NumberOfDevices;
- UINTN Address;
- PCI_TYPE01 Pci;
- UINT64 Attributes;
- UINT64 Base;
- UINT64 Limit;
- UINT64 Value;
- PCI_ROOT_BRIDGE_APERTURE Io, Mem, MemAbove4G, PMem, PMemAbove4G, *MemAperture;
- PCI_ROOT_BRIDGE *RootBridges;
- UINTN BarOffsetEnd;
-
-
- *NumberOfRootBridges = 0;
- RootBridges = NULL;
-
- //
- // After scanning all the PCI devices on the PCI root bridge's primary bus,
- // update the Primary Bus Number for the next PCI root bridge to be this PCI
- // root bridge's subordinate bus number + 1.
- //
- for (PrimaryBus = 0; PrimaryBus <= PCI_MAX_BUS; PrimaryBus = SubBus + 1) {
- SubBus = PrimaryBus;
- Attributes = 0;
- Io.Base = Mem.Base = MemAbove4G.Base = PMem.Base = PMemAbove4G.Base = MAX_UINT64;
- Io.Limit = Mem.Limit = MemAbove4G.Limit = PMem.Limit = PMemAbove4G.Limit = 0;
- //
- // Scan all the PCI devices on the primary bus of the PCI root bridge
- //
- for (Device = 0, NumberOfDevices = 0; Device <= PCI_MAX_DEVICE; Device++) {
-
- for (Function = 0; Function <= PCI_MAX_FUNC; Function++) {
-
- //
- // Compute the PCI configuration address of the PCI device to probe
- //
- Address = PCI_LIB_ADDRESS (PrimaryBus, Device, Function, 0);
-
- //
- // Read the Vendor ID from the PCI Configuration Header
- //
- if (PciRead16 (Address) == MAX_UINT16) {
- if (Function == 0) {
- //
- // If the PCI Configuration Read fails, or a PCI device does not
- // exist, then skip this entire PCI device
- //
- break;
- } else {
- //
- // If PCI function != 0, VendorId == 0xFFFF, we continue to search
- // PCI function.
- //
- continue;
- }
- }
-
- //
- // Read the entire PCI Configuration Header
- //
- PciReadBuffer (Address, sizeof (Pci), &Pci);
-
- //
- // Increment the number of PCI device found on the primary bus of the
- // PCI root bridge
- //
- NumberOfDevices++;
-
- //
- // Look for devices with the VGA Palette Snoop enabled in the COMMAND
- // register of the PCI Config Header
- //
- if ((Pci.Hdr.Command & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;
- }
-
- BarOffsetEnd = 0;
-
- //
- // PCI-PCI Bridge
- //
- if (IS_PCI_BRIDGE (&Pci)) {
- //
- // Get the Bus range that the PPB is decoding
- //
- if (Pci.Bridge.SubordinateBus > SubBus) {
- //
- // If the suborinate bus number of the PCI-PCI bridge is greater
- // than the PCI root bridge's current subordinate bus number,
- // then update the PCI root bridge's subordinate bus number
- //
- SubBus = Pci.Bridge.SubordinateBus;
- }
-
- //
- // Get the I/O range that the PPB is decoding
- //
- Value = Pci.Bridge.IoBase & 0x0f;
- Base = ((UINT32) Pci.Bridge.IoBase & 0xf0) << 8;
- Limit = (((UINT32) Pci.Bridge.IoLimit & 0xf0) << 8) | 0x0fff;
- if (Value == BIT0) {
- Base |= ((UINT32) Pci.Bridge.IoBaseUpper16 << 16);
- Limit |= ((UINT32) Pci.Bridge.IoLimitUpper16 << 16);
- }
- if ((Base > 0) && (Base < Limit)) {
- if (Io.Base > Base) {
- Io.Base = Base;
- }
- if (Io.Limit < Limit) {
- Io.Limit = Limit;
- }
- }
-
- //
- // Get the Memory range that the PPB is decoding
- //
- Base = ((UINT32) Pci.Bridge.MemoryBase & 0xfff0) << 16;
- Limit = (((UINT32) Pci.Bridge.MemoryLimit & 0xfff0) << 16) | 0xfffff;
- if ((Base > 0) && (Base < Limit)) {
- if (Mem.Base > Base) {
- Mem.Base = Base;
- }
- if (Mem.Limit < Limit) {
- Mem.Limit = Limit;
- }
- }
-
- //
- // Get the Prefetchable Memory range that the PPB is decoding
- //
- Value = Pci.Bridge.PrefetchableMemoryBase & 0x0f;
- Base = ((UINT32) Pci.Bridge.PrefetchableMemoryBase & 0xfff0) << 16;
- Limit = (((UINT32) Pci.Bridge.PrefetchableMemoryLimit & 0xfff0)
- << 16) | 0xfffff;
- MemAperture = &PMem;
- if (Value == BIT0) {
- Base |= LShiftU64 (Pci.Bridge.PrefetchableBaseUpper32, 32);
- Limit |= LShiftU64 (Pci.Bridge.PrefetchableLimitUpper32, 32);
- MemAperture = &PMemAbove4G;
- }
- if ((Base > 0) && (Base < Limit)) {
- if (MemAperture->Base > Base) {
- MemAperture->Base = Base;
- }
- if (MemAperture->Limit < Limit) {
- MemAperture->Limit = Limit;
- }
- }
-
- //
- // Look at the PPB Configuration for legacy decoding attributes
- //
- if ((Pci.Bridge.BridgeControl & EFI_PCI_BRIDGE_CONTROL_ISA)
- == EFI_PCI_BRIDGE_CONTROL_ISA) {
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_IO_16;
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO;
- }
- if ((Pci.Bridge.BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA)
- == EFI_PCI_BRIDGE_CONTROL_VGA) {
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_MEMORY;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_IO;
- if ((Pci.Bridge.BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16)
- != 0) {
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_IO_16;
- }
- }
-
- BarOffsetEnd = OFFSET_OF (PCI_TYPE01, Bridge.Bar[2]);
- } else {
- //
- // Parse the BARs of the PCI device to get what I/O Ranges, Memory
- // Ranges, and Prefetchable Memory Ranges the device is decoding
- //
- if ((Pci.Hdr.HeaderType & HEADER_LAYOUT_CODE) == HEADER_TYPE_DEVICE) {
- BarOffsetEnd = OFFSET_OF (PCI_TYPE00, Device.Bar[6]);
- }
- }
-
- PcatPciRootBridgeParseBars (
- Pci.Hdr.Command,
- PrimaryBus,
- Device,
- Function,
- OFFSET_OF (PCI_TYPE00, Device.Bar),
- BarOffsetEnd,
- &Io,
- &Mem, &MemAbove4G,
- &PMem, &PMemAbove4G
- );
-
- //
- // See if the PCI device is an IDE controller
- //
- if (IS_CLASS2 (&Pci, PCI_CLASS_MASS_STORAGE,
- PCI_CLASS_MASS_STORAGE_IDE)) {
- if (Pci.Hdr.ClassCode[0] & 0x80) {
- Attributes |= EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO;
- }
- if (Pci.Hdr.ClassCode[0] & 0x01) {
- Attributes |= EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO;
- }
- if (Pci.Hdr.ClassCode[0] & 0x04) {
- Attributes |= EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO;
- }
- }
-
- //
- // See if the PCI device is a legacy VGA controller or
- // a standard VGA controller
- //
- if (IS_CLASS2 (&Pci, PCI_CLASS_OLD, PCI_CLASS_OLD_VGA) ||
- IS_CLASS2 (&Pci, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA)
- ) {
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_MEMORY;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_VGA_IO_16;
- }
-
- //
- // See if the PCI Device is a PCI - ISA or PCI - EISA
- // or ISA_POSITIVIE_DECODE Bridge device
- //
- if (Pci.Hdr.ClassCode[2] == PCI_CLASS_BRIDGE) {
- if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA ||
- Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_EISA ||
- Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE) {
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_IO;
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_IO_16;
- Attributes |= EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO;
- }
- }
-
- //
- // If this device is not a multi function device, then skip the rest
- // of this PCI device
- //
- if (Function == 0 && !IS_PCI_MULTI_FUNC (&Pci)) {
- break;
- }
- }
- }
-
- //
- // If at least one PCI device was found on the primary bus of this PCI
- // root bridge, then the PCI root bridge exists.
- //
- if (NumberOfDevices > 0) {
- RootBridges = ReallocatePool (
- (*NumberOfRootBridges) * sizeof (PCI_ROOT_BRIDGE),
- (*NumberOfRootBridges + 1) * sizeof (PCI_ROOT_BRIDGE),
- RootBridges
- );
- ASSERT (RootBridges != NULL);
-
- AdjustRootBridgeResource (&Io, &Mem, &MemAbove4G, &PMem, &PMemAbove4G);
-
- InitRootBridge (
- Attributes, Attributes, 0,
- (UINT8) PrimaryBus, (UINT8) SubBus,
- &Io, &Mem, &MemAbove4G, &PMem, &PMemAbove4G,
- &RootBridges[*NumberOfRootBridges]
- );
- RootBridges[*NumberOfRootBridges].ResourceAssigned = TRUE;
- //
- // Increment the index for the next PCI Root Bridge
- //
- (*NumberOfRootBridges)++;
- }
- }
-
- return RootBridges;
-}
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c deleted file mode 100644 index 7e92441da1..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ /dev/null @@ -1,254 +0,0 @@ -/** @file
- This file include all platform action which can be customized
- by IBV/OEM.
-
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PlatformBootManager.h"
-#include "PlatformConsole.h"
-
-VOID
-InstallReadyToLock (
- VOID
- )
-{
- EFI_STATUS Status;
- EFI_HANDLE Handle;
- EFI_SMM_ACCESS2_PROTOCOL *SmmAccess;
-
- DEBUG((DEBUG_INFO,"InstallReadyToLock entering......\n"));
- //
- // Inform the SMM infrastructure that we're entering BDS and may run 3rd party code hereafter
- // Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth
- //
- EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
- DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n"));
-
- //
- // Install DxeSmmReadyToLock protocol in order to lock SMM
- //
- Status = gBS->LocateProtocol (&gEfiSmmAccess2ProtocolGuid, NULL, (VOID **) &SmmAccess);
- if (!EFI_ERROR (Status)) {
- Handle = NULL;
- Status = gBS->InstallProtocolInterface (
- &Handle,
- &gEfiDxeSmmReadyToLockProtocolGuid,
- EFI_NATIVE_INTERFACE,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
- }
-
- DEBUG((DEBUG_INFO,"InstallReadyToLock end\n"));
- return;
-}
-
-/**
- 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 = 0; Index < Count; Index++) {
- if ((Key->OptionType == Array[Index].OptionType) &&
- (Key->Attributes == Array[Index].Attributes) &&
- (StrCmp (Key->Description, Array[Index].Description) == 0) &&
- (CompareMem (Key->FilePath, Array[Index].FilePath, GetDevicePathSize (Key->FilePath)) == 0) &&
- (Key->OptionalDataSize == Array[Index].OptionalDataSize) &&
- (CompareMem (Key->OptionalData, Array[Index].OptionalData, Key->OptionalDataSize) == 0)) {
- return (INTN) Index;
- }
- }
-
- return -1;
-}
-
-/**
- Register a boot option using a file GUID in the FV.
-
- @param FileGuid The file GUID name in FV.
- @param Description The boot option description.
- @param Attributes The attributes used for the boot option loading.
-**/
-VOID
-PlatformRegisterFvBootOption (
- EFI_GUID *FileGuid,
- CHAR16 *Description,
- UINT32 Attributes
-)
-{
- EFI_STATUS Status;
- UINTN OptionIndex;
- EFI_BOOT_MANAGER_LOAD_OPTION NewOption;
- EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
- UINTN BootOptionCount;
- MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode;
- EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
-
- Status = gBS->HandleProtocol (gImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
- ASSERT_EFI_ERROR (Status);
-
- EfiInitializeFwVolDevicepathNode (&FileNode, FileGuid);
- DevicePath = AppendDevicePathNode (
- DevicePathFromHandle (LoadedImage->DeviceHandle),
- (EFI_DEVICE_PATH_PROTOCOL *) &FileNode
- );
-
- Status = EfiBootManagerInitializeLoadOption (
- &NewOption,
- LoadOptionNumberUnassigned,
- LoadOptionTypeBoot,
- Attributes,
- Description,
- DevicePath,
- NULL,
- 0
- );
- if (!EFI_ERROR (Status)) {
- BootOptions = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot);
-
- OptionIndex = PlatformFindLoadOption (&NewOption, BootOptions, BootOptionCount);
-
- if (OptionIndex == -1) {
- Status = EfiBootManagerAddLoadOptionVariable (&NewOption, (UINTN) -1);
- ASSERT_EFI_ERROR (Status);
- }
- EfiBootManagerFreeLoadOption (&NewOption);
- EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
- }
-}
-
-/**
- Do the platform specific action before the console is connected.
-
- Such as:
- Update console variable;
- Register new Driver#### or Boot####;
- Signal ReadyToLock event.
-**/
-VOID
-EFIAPI
-PlatformBootManagerBeforeConsole (
- VOID
-)
-{
- EFI_INPUT_KEY Enter;
- EFI_INPUT_KEY F2;
- EFI_INPUT_KEY Down;
- EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
-
- PlatformConsoleInit ();
-
- //
- // Register ENTER as CONTINUE key
- //
- Enter.ScanCode = SCAN_NULL;
- Enter.UnicodeChar = CHAR_CARRIAGE_RETURN;
- EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);
-
- //
- // Map F2 to Boot Manager Menu
- //
- F2.ScanCode = SCAN_F2;
- F2.UnicodeChar = CHAR_NULL;
- EfiBootManagerGetBootManagerMenu (&BootOption);
- EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 0, &F2, NULL);
-
- //
- // Also add Down key to Boot Manager Menu since some serial terminals don't support F2 key.
- //
- Down.ScanCode = SCAN_DOWN;
- Down.UnicodeChar = CHAR_NULL;
- EfiBootManagerGetBootManagerMenu (&BootOption);
- EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 0, &Down, NULL);
-
- //
- // Install ready to lock.
- // This needs to be done before option rom dispatched.
- //
- InstallReadyToLock ();
-
- //
- // Dispatch deferred images after EndOfDxe event and ReadyToLock installation.
- //
- EfiBootManagerDispatchDeferredImages ();
-}
-
-/**
- Do the platform specific action after the console is connected.
-
- Such as:
- Dynamically switch output mode;
- Signal console ready platform customized event;
- Run diagnostics like memory testing;
- Connect certain devices;
- Dispatch aditional option roms.
-**/
-VOID
-EFIAPI
-PlatformBootManagerAfterConsole (
- VOID
-)
-{
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL White;
-
- Black.Blue = Black.Green = Black.Red = Black.Reserved = 0;
- White.Blue = White.Green = White.Red = White.Reserved = 0xFF;
-
- EfiBootManagerConnectAll ();
- EfiBootManagerRefreshAllBootOption ();
-
- //
- // Register UEFI Shell
- //
- PlatformRegisterFvBootOption (PcdGetPtr (PcdShellFile), L"UEFI Shell", LOAD_OPTION_ACTIVE);
-
- Print (
- L"\n"
- L"F2 or Down to enter Boot Manager Menu.\n"
- L"ENTER to boot directly.\n"
- L"\n"
- );
-
-}
-
-/**
- This function is called each second during the boot manager waits the timeout.
-
- @param TimeoutRemain The remaining timeout.
-**/
-VOID
-EFIAPI
-PlatformBootManagerWaitCallback (
- UINT16 TimeoutRemain
-)
-{
- return;
-}
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h deleted file mode 100644 index 90811ff53a..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h +++ /dev/null @@ -1,127 +0,0 @@ -/**@file
- Head file for BDS Platform specific code
-
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _PLATFORM_BOOT_MANAGER_H
-#define _PLATFORM_BOOT_MANAGER_H
-
-#include <PiDxe.h>
-#include <Protocol/LoadedImage.h>
-
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/UefiLib.h>
-#include <Library/UefiBootManagerLib.h>
-#include <Library/PcdLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/HiiLib.h>
-#include <Library/PrintLib.h>
-#include <Library/DxeServicesLib.h>
-#include <Library/BootLogoLib.h>
-#include <Protocol/SmmAccess2.h>
-
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- UINTN ConnectType;
-} PLATFORM_CONSOLE_CONNECT_ENTRY;
-
-extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];
-
-#define gEndEntire \
- { \
- END_DEVICE_PATH_TYPE,\
- END_ENTIRE_DEVICE_PATH_SUBTYPE,\
- { END_DEVICE_PATH_LENGTH, 0 },\
- }
-
-#define CONSOLE_OUT BIT0
-#define CONSOLE_IN BIT1
-#define STD_ERROR BIT2
-
-typedef struct {
- VENDOR_DEVICE_PATH VendorDevicePath;
- UINT32 Instance;
-} WIN_NT_VENDOR_DEVICE_PATH_NODE;
-
-//
-// Below is the platform console device path
-//
-typedef struct {
- VENDOR_DEVICE_PATH NtBus;
- WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;
- UART_DEVICE_PATH Uart;
- VENDOR_DEVICE_PATH TerminalType;
- EFI_DEVICE_PATH_PROTOCOL End;
-} NT_ISA_SERIAL_DEVICE_PATH;
-
-typedef struct {
- VENDOR_DEVICE_PATH NtBus;
- WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;
- EFI_DEVICE_PATH_PROTOCOL End;
-} NT_PLATFORM_GOP_DEVICE_PATH;
-
-/**
- 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 console.
-
- @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
-PlatformBootManagerEnableQuietBoot (
- IN EFI_GUID *LogoFile
-);
-
-/**
- Use SystemTable Conout to turn on video based Simple Text Out consoles. The
- 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
-PlatformBootManagerDisableQuietBoot (
- VOID
-);
-
-/**
- Show progress bar with title above it. It only works in Graphics mode.
-
- @param TitleForeground Foreground color for Title.
- @param TitleBackground Background color for Title.
- @param Title Title above progress bar.
- @param ProgressColor Progress bar color.
- @param Progress Progress (0-100)
- @param PreviousValue The previous value of the progress.
-
- @retval EFI_STATUS Success update the progress bar
-
-**/
-EFI_STATUS
-PlatformBootManagerShowProgress (
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,
- IN CHAR16 *Title,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,
- IN UINTN Progress,
- IN UINTN PreviousValue
-);
-
-#endif // _PLATFORM_BOOT_MANAGER_H
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf deleted file mode 100644 index 9e8ae9b36a..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ /dev/null @@ -1,80 +0,0 @@ -## @file
-# Include all platform action which can be customized by IBV/OEM.
-#
-# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = PlatformBootManagerLib
- FILE_GUID = F0D9063A-DADB-4185-85E2-D7ACDA93F7A6
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
- LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
-
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 EBC
-#
-
-[Sources]
- PlatformData.c
- PlatformConsole.c
- PlatformConsole.h
- PlatformBootManager.c
- PlatformBootManager.h
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
- CorebootPayloadPkg/CorebootPayloadPkg.dec
-
-[LibraryClasses]
- BaseLib
- UefiBootServicesTableLib
- UefiRuntimeServicesTableLib
- UefiLib
- UefiBootManagerLib
- PcdLib
- DxeServicesLib
- MemoryAllocationLib
- DevicePathLib
- HiiLib
- PrintLib
- PlatformHookLib
-
-[Guids]
- gEfiEndOfDxeEventGroupGuid
-
-[Protocols]
- gEfiGenericMemTestProtocolGuid ## CONSUMES
- gEfiGraphicsOutputProtocolGuid ## CONSUMES
- gEfiUgaDrawProtocolGuid ## CONSUMES
- gEfiBootLogoProtocolGuid ## CONSUMES
- gEfiDxeSmmReadyToLockProtocolGuid
- gEfiSmmAccess2ProtocolGuid
-
-[Pcd]
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
- gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
- gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootlogoOnlyEnable
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
- gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c deleted file mode 100644 index 4786170bb4..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c +++ /dev/null @@ -1,617 +0,0 @@ -/** @file
-This file include all platform action which can be customized by IBV/OEM.
-
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PlatformBootManager.h"
-#include "PlatformConsole.h"
-
-#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 \
- PNPID_DEVICE_PATH_NODE(0x0A03)
-
-#define gPnp16550ComPort \
- PNPID_DEVICE_PATH_NODE(0x0501)
-
-#define gUartVendor \
- { \
- { \
- HARDWARE_DEVICE_PATH, \
- HW_VENDOR_DP, \
- { \
- (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
- (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
- } \
- }, \
- {0xD3987D4B, 0x971A, 0x435F, {0x8C, 0xAF, 0x49, 0x67, 0xEB, 0x62, 0x72, 0x41}} \
- }
-
-#define gUart \
- { \
- { \
- MESSAGING_DEVICE_PATH, \
- MSG_UART_DP, \
- { \
- (UINT8) (sizeof (UART_DEVICE_PATH)), \
- (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \
- } \
- }, \
- 0, \
- 115200, \
- 8, \
- 1, \
- 1 \
- }
-
-#define gPcAnsiTerminal \
- { \
- { \
- MESSAGING_DEVICE_PATH, \
- MSG_VENDOR_DP, \
- { \
- (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
- (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
- } \
- }, \
- DEVICE_PATH_MESSAGING_PC_ANSI \
- }
-
-
-ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
-UART_DEVICE_PATH gUartDeviceNode = gUart;
-VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;
-VENDOR_DEVICE_PATH gUartDeviceVendorNode = gUartVendor;
-
-//
-// Predefined platform root bridge
-//
-PLATFORM_ROOT_BRIDGE_DEVICE_PATH gPlatformRootBridge0 = {
- gPciRootBridge,
- gEndEntire
-};
-
-EFI_DEVICE_PATH_PROTOCOL *gPlatformRootBridges[] = {
- (EFI_DEVICE_PATH_PROTOCOL *) &gPlatformRootBridge0,
- NULL
-};
-
-BOOLEAN mDetectVgaOnly;
-
-/**
- Add UART to ConOut, ConIn, ErrOut.
-
- @param[in] DeviceHandle - LPC device path.
-
- @retval EFI_SUCCESS - Serial console is added to ConOut, ConIn, and ErrOut.
- @retval EFI_STATUS - No serial console is added.
-**/
-EFI_STATUS
-PrepareLpcBridgeDevicePath (
- IN EFI_HANDLE DeviceHandle
-)
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
-
- DevicePath = NULL;
- Status = gBS->HandleProtocol (
- DeviceHandle,
- &gEfiDevicePathProtocolGuid,
- (VOID*)&DevicePath
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Register COM1
- //
- DevicePath = AppendDevicePathNode ((EFI_DEVICE_PATH_PROTOCOL *)NULL, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceVendorNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
-
- EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
- EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
- EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
-
- return EFI_SUCCESS;
-}
-
-/**
- Return the GOP device path in the platform.
-
- @param[in] PciDevicePath - Device path for the PCI graphics device.
- @param[out] GopDevicePath - Return the device path with GOP installed.
-
- @retval EFI_SUCCESS - PCI VGA is added to ConOut.
- @retval EFI_INVALID_PARAMETER - The device path parameter is invalid.
- @retval EFI_STATUS - No GOP device found.
-**/
-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;
- ACPI_ADR_DEVICE_PATH AcpiAdr;
- EFI_DEVICE_PATH_PROTOCOL *MyDevicePath;
-
- if (PciDevicePath == NULL || GopDevicePath == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- MyDevicePath = NULL;
-
- //
- // Initialize the GopDevicePath to be PciDevicePath
- //
- *GopDevicePath = PciDevicePath;
- TempPciDevicePath = PciDevicePath;
-
- Status = 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.
- //
- AcpiAdr.Header.Type = ACPI_DEVICE_PATH;
- AcpiAdr.Header.SubType = ACPI_ADR_DP;
- AcpiAdr.ADR= ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL, 8, 0);
-
- SetDevicePathNodeLength (&AcpiAdr.Header, sizeof (ACPI_ADR_DEVICE_PATH));
-
- MyDevicePath = AppendDevicePathNode(MyDevicePath, (EFI_DEVICE_PATH_PROTOCOL*)&AcpiAdr);
-
- gBS->ConnectController (PciDeviceHandle, NULL, MyDevicePath, FALSE);
-
- FreePool(MyDevicePath);
-
- Status = gBS->LocateHandleBuffer (
- ByProtocol,
- &gEfiGraphicsOutputProtocolGuid,
- NULL,
- &GopHandleCount,
- &GopHandleBuffer
- );
- if (!EFI_ERROR (Status)) {
- //
- // Add all the child handles as possible Console Device
- //
- for (Index = 0; Index < GopHandleCount; Index++) {
- Status = gBS->HandleProtocol (GopHandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID*)&TempDevicePath);
- if (EFI_ERROR (Status)) {
- continue;
- }
- if (CompareMem (
- PciDevicePath,
- TempDevicePath,
- GetDevicePathSize (PciDevicePath) - END_DEVICE_PATH_LENGTH
- ) == 0) {
- //
- // In current implementation, we only enable one of the child handles
- // 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 device
- //
- *GopDevicePath = TempDevicePath;
-
- //
- // Delete the PCI device's path that added by GetPlugInPciVgaDevicePath()
- // Add the integrity GOP device path.
- //
- EfiBootManagerUpdateConsoleVariable (ConOut, NULL, PciDevicePath);
- EfiBootManagerUpdateConsoleVariable (ConOut, TempDevicePath, NULL);
- }
- }
- gBS->FreePool (GopHandleBuffer);
- }
-
- return EFI_SUCCESS;
-}
-
-/**
- Add PCI VGA to ConOut, ConIn, ErrOut.
-
- @param[in] DeviceHandle - Handle of PciIo protocol.
-
- @retval EFI_SUCCESS - PCI VGA is added to ConOut.
- @retval EFI_STATUS - No PCI VGA device is added.
-
-**/
-EFI_STATUS
-PreparePciVgaDevicePath (
- IN EFI_HANDLE DeviceHandle
-)
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
-
- DevicePath = NULL;
- Status = gBS->HandleProtocol (
- DeviceHandle,
- &gEfiDevicePathProtocolGuid,
- (VOID*)&DevicePath
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- GetGopDevicePath (DevicePath, &GopDevicePath);
- DevicePath = GopDevicePath;
-
- EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
-
- return EFI_SUCCESS;
-}
-
-/**
- Add PCI Serial to ConOut, ConIn, ErrOut.
-
- @param[in] DeviceHandle - Handle of PciIo protocol.
-
- @retval EFI_SUCCESS - PCI Serial is added to ConOut, ConIn, and ErrOut.
- @retval EFI_STATUS - No PCI Serial device is added.
-
-**/
-EFI_STATUS
-PreparePciSerialDevicePath (
- IN EFI_HANDLE DeviceHandle
-)
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
-
- DevicePath = NULL;
- Status = gBS->HandleProtocol (
- DeviceHandle,
- &gEfiDevicePathProtocolGuid,
- (VOID*)&DevicePath
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
- DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gTerminalTypeDeviceNode);
-
- EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
- EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
- EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
-
- return EFI_SUCCESS;
-}
-
-
-/**
- For every PCI instance execute a callback function.
-
- @param[in] Id - The protocol GUID for callback
- @param[in] CallBackFunction - The callback function
- @param[in] Context - The context of the callback
-
- @retval EFI_STATUS - Callback function failed.
-
-**/
-EFI_STATUS
-EFIAPI
-VisitAllInstancesOfProtocol (
- IN EFI_GUID *Id,
- IN PROTOCOL_INSTANCE_CALLBACK CallBackFunction,
- IN VOID *Context
-)
-{
- EFI_STATUS Status;
- UINTN HandleCount;
- EFI_HANDLE *HandleBuffer;
- UINTN Index;
- VOID *Instance;
-
- //
- // Start to check all the PciIo to find all possible device
- //
- HandleCount = 0;
- HandleBuffer = NULL;
- Status = gBS->LocateHandleBuffer (
- ByProtocol,
- Id,
- NULL,
- &HandleCount,
- &HandleBuffer
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- for (Index = 0; Index < HandleCount; Index++) {
- Status = gBS->HandleProtocol (HandleBuffer[Index], Id, &Instance);
- if (EFI_ERROR (Status)) {
- continue;
- }
-
- Status = (*CallBackFunction) (
- HandleBuffer[Index],
- Instance,
- Context
- );
- }
-
- gBS->FreePool (HandleBuffer);
-
- return EFI_SUCCESS;
-}
-
-
-/**
- For every PCI instance execute a callback function.
-
- @param[in] Handle - The PCI device handle
- @param[in] Instance - The instance of the PciIo protocol
- @param[in] Context - The context of the callback
-
- @retval EFI_STATUS - Callback function failed.
-
-**/
-EFI_STATUS
-EFIAPI
-VisitingAPciInstance (
- IN EFI_HANDLE Handle,
- IN VOID *Instance,
- IN VOID *Context
-)
-{
- EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo;
- PCI_TYPE00 Pci;
-
- PciIo = (EFI_PCI_IO_PROTOCOL*) Instance;
-
- //
- // Check for all PCI device
- //
- Status = PciIo->Pci.Read (
- PciIo,
- EfiPciIoWidthUint32,
- 0,
- sizeof (Pci) / sizeof (UINT32),
- &Pci
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- return (*(VISIT_PCI_INSTANCE_CALLBACK)(UINTN) Context) (
- Handle,
- PciIo,
- &Pci
- );
-
-}
-
-
-/**
- For every PCI instance execute a callback function.
-
- @param[in] CallBackFunction - Callback function pointer
-
- @retval EFI_STATUS - Callback function failed.
-
-**/
-EFI_STATUS
-EFIAPI
-VisitAllPciInstances (
- IN VISIT_PCI_INSTANCE_CALLBACK CallBackFunction
-)
-{
- return VisitAllInstancesOfProtocol (
- &gEfiPciIoProtocolGuid,
- VisitingAPciInstance,
- (VOID*)(UINTN) CallBackFunction
- );
-}
-
-
-/**
- Do platform specific PCI Device check and add them to
- ConOut, ConIn, ErrOut.
-
- @param[in] Handle - Handle of PCI device instance
- @param[in] PciIo - PCI IO protocol instance
- @param[in] Pci - PCI Header register block
-
- @retval EFI_SUCCESS - PCI Device check and Console variable update successfully.
- @retval EFI_STATUS - PCI Device check or Console variable update fail.
-
-**/
-EFI_STATUS
-EFIAPI
-DetectAndPreparePlatformPciDevicePath (
- IN EFI_HANDLE Handle,
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN PCI_TYPE00 *Pci
-)
-{
- EFI_STATUS Status;
-
- Status = PciIo->Attributes (
- PciIo,
- EfiPciIoAttributeOperationEnable,
- EFI_PCI_DEVICE_ENABLE,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
- if (!mDetectVgaOnly) {
- //
- // Here we decide whether it is LPC Bridge
- //
- if ((IS_PCI_LPC (Pci)) ||
- ((IS_PCI_ISA_PDECODE (Pci)) &&
- (Pci->Hdr.VendorId == 0x8086)
- )
- ) {
- //
- // Add IsaKeyboard to ConIn,
- // add IsaSerial to ConOut, ConIn, ErrOut
- //
- DEBUG ((EFI_D_INFO, "Found LPC Bridge device\n"));
- PrepareLpcBridgeDevicePath (Handle);
- return EFI_SUCCESS;
- }
- //
- // Here we decide which Serial device to enable in PCI bus
- //
- if (IS_PCI_16550SERIAL (Pci)) {
- //
- // Add them to ConOut, ConIn, ErrOut.
- //
- DEBUG ((EFI_D_INFO, "Found PCI 16550 SERIAL device\n"));
- PreparePciSerialDevicePath (Handle);
- return EFI_SUCCESS;
- }
- }
-
- //
- // Here we decide which VGA device to enable in PCI bus
- //
- if (IS_PCI_VGA (Pci)) {
- //
- // Add them to ConOut.
- //
- DEBUG ((EFI_D_INFO, "Found PCI VGA device\n"));
- PreparePciVgaDevicePath (Handle);
- return EFI_SUCCESS;
- }
-
- return Status;
-}
-
-
-/**
- Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
-
- @param[in] DetectVgaOnly - Only detect VGA device if it's TRUE.
-
- @retval EFI_SUCCESS - PCI Device check and Console variable update successfully.
- @retval EFI_STATUS - PCI Device check or Console variable update fail.
-
-**/
-EFI_STATUS
-DetectAndPreparePlatformPciDevicePaths (
- BOOLEAN DetectVgaOnly
-)
-{
- mDetectVgaOnly = DetectVgaOnly;
- return VisitAllPciInstances (DetectAndPreparePlatformPciDevicePath);
-}
-
-
-/**
- The function will connect root bridge
-
- @return EFI_SUCCESS Connect RootBridge successfully.
-
-**/
-EFI_STATUS
-ConnectRootBridge (
- VOID
-)
-{
- EFI_STATUS Status;
- EFI_HANDLE RootHandle;
-
- //
- // Make all the PCI_IO protocols on PCI Seg 0 show up
- //
- Status = gBS->LocateDevicePath (
- &gEfiDevicePathProtocolGuid,
- &gPlatformRootBridges[0],
- &RootHandle
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- Status = gBS->ConnectController (RootHandle, NULL, NULL, FALSE);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- return EFI_SUCCESS;
-}
-
-/**
- Platform console init. Include the platform firmware vendor, revision
- and so crc check.
-
-**/
-VOID
-EFIAPI
-PlatformConsoleInit (
- VOID
-)
-{
- gUartDeviceNode.BaudRate = PcdGet64 (PcdUartDefaultBaudRate);
- gUartDeviceNode.DataBits = PcdGet8 (PcdUartDefaultDataBits);
- gUartDeviceNode.Parity = PcdGet8 (PcdUartDefaultParity);
- gUartDeviceNode.StopBits = PcdGet8 (PcdUartDefaultStopBits);
-
- ConnectRootBridge ();
-
- //
- // Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
- //
- DetectAndPreparePlatformPciDevicePaths (FALSE);
-}
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.h b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.h deleted file mode 100644 index 5e9fb92610..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.h +++ /dev/null @@ -1,76 +0,0 @@ -/** @file
-Head file for BDS Platform specific code
-
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _PLATFORM_CONSOLE_H
-#define _PLATFORM_CONSOLE_H
-
-#include <PiDxe.h>
-#include <IndustryStandard/Pci.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/BaseLib.h>
-#include <Library/PcdLib.h>
-#include <Library/UefiLib.h>
-#include <Library/DevicePathLib.h>
-#include <Protocol/PciIo.h>
-
-#define IS_PCI_ISA_PDECODE(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0)
-#define IS_PCI_16550SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550)
-
-//
-// Type definitions
-//
-
-//
-// Platform Root Bridge
-//
-typedef struct {
- ACPI_HID_DEVICE_PATH PciRootBridge;
- EFI_DEVICE_PATH_PROTOCOL End;
-} PLATFORM_ROOT_BRIDGE_DEVICE_PATH;
-
-typedef
-EFI_STATUS
-(EFIAPI *PROTOCOL_INSTANCE_CALLBACK)(
- IN EFI_HANDLE Handle,
- IN VOID *Instance,
- IN VOID *Context
-);
-
-/**
- @param[in] Handle - Handle of PCI device instance
- @param[in] PciIo - PCI IO protocol instance
- @param[in] Pci - PCI Header register block
-**/
-typedef
-EFI_STATUS
-(EFIAPI *VISIT_PCI_INSTANCE_CALLBACK)(
- IN EFI_HANDLE Handle,
- IN EFI_PCI_IO_PROTOCOL *PciIo,
- IN PCI_TYPE00 *Pci
-);
-
-/**
- Platform console init. Include the platform firmware vendor, revision
- and so crc check.
-
-**/
-VOID
-EFIAPI
-PlatformConsoleInit (
- VOID
-);
-
-#endif
diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c deleted file mode 100644 index 2fbe3e92b6..0000000000 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformData.c +++ /dev/null @@ -1,25 +0,0 @@ -/**@file
- Defined the platform specific device path which will be filled to
- ConIn/ConOut variables.
-
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#include "PlatformBootManager.h"
-
-///
-/// Predefined platform default console device path
-///
-PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = {
- {
- NULL,
- 0
- }
-};
diff --git a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c deleted file mode 100644 index b1cfb8e2c0..0000000000 --- a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c +++ /dev/null @@ -1,111 +0,0 @@ -/** @file
- Platform Hook Library instance for UART device upon coreboot.
-
- Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <Base.h>
-#include <Uefi/UefiBaseType.h>
-#include <Library/PciLib.h> -#include <Library/PlatformHookLib.h>
-#include <Library/CbParseLib.h>
-#include <Library/PcdLib.h>
-
-typedef struct { - UINT16 VendorId; ///< Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries. - UINT16 DeviceId; ///< Device ID to match the PCI device - UINT32 ClockRate; ///< UART clock rate. Set to 0 for default clock rate of 1843200 Hz - UINT64 Offset; ///< The byte offset into to the BAR - UINT8 BarIndex; ///< Which BAR to get the UART base address - UINT8 RegisterStride; ///< UART register stride in bytes. Set to 0 for default register stride of 1 byte. - UINT16 ReceiveFifoDepth; ///< UART receive FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes. - UINT16 TransmitFifoDepth; ///< UART transmit FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes. - UINT8 Reserved[2]; -} PCI_SERIAL_PARAMETER; - -/**
- Performs platform specific initialization required for the CPU to access
- the hardware associated with a SerialPortLib instance. This function does
- not intiailzie the serial port hardware itself. Instead, it initializes
- hardware devices that are required for the CPU to access the serial port
- hardware. This function may be called more than once.
-
- @retval RETURN_SUCCESS The platform specific initialization succeeded.
- @retval RETURN_DEVICE_ERROR The platform specific initialization could not be completed.
-
-**/
-RETURN_STATUS
-EFIAPI
-PlatformHookSerialPortInitialize (
- VOID
- )
-{
- RETURN_STATUS Status;
- UINT32 SerialRegBase;
- UINT32 SerialRegAccessType;
- UINT32 BaudRate; - UINT32 RegWidth; - UINT32 InputHertz; - UINT32 PayloadParam; - UINT32 DeviceVendor; - PCI_SERIAL_PARAMETER *SerialParam; -
- Status = CbParseSerialInfo (&SerialRegBase, &SerialRegAccessType, - &RegWidth, &BaudRate, &InputHertz, - &PayloadParam); - if (RETURN_ERROR (Status)) {
- return Status;
- }
-
- if (SerialRegAccessType == 2) { //MMIO
- Status = PcdSetBoolS (PcdSerialUseMmio, TRUE);
- } else { //IO
- Status = PcdSetBoolS (PcdSerialUseMmio, FALSE);
- }
- if (RETURN_ERROR (Status)) {
- return Status;
- }
- Status = PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);
- if (RETURN_ERROR (Status)) {
- return Status;
- }
-
- Status = PcdSet32S (PcdSerialRegisterStride, RegWidth); - if (RETURN_ERROR (Status)) { - return Status; - } - - Status = PcdSet32S (PcdSerialBaudRate, BaudRate); - if (RETURN_ERROR (Status)) { - return Status; - } - - Status = PcdSet64S (PcdUartDefaultBaudRate, BaudRate); - if (RETURN_ERROR (Status)) { - return Status; - } - - Status = PcdSet32S (PcdSerialClockRate, InputHertz); - if (RETURN_ERROR (Status)) { - return Status; - } - - if (PayloadParam >= 0x80000000) { - DeviceVendor = PciRead32 (PayloadParam & 0x0ffff000); - SerialParam = PcdGetPtr(PcdPciSerialParameters); - SerialParam->VendorId = (UINT16)DeviceVendor; - SerialParam->DeviceId = DeviceVendor >> 16; - SerialParam->ClockRate = InputHertz; - SerialParam->RegisterStride = (UINT8)RegWidth; - } - - return RETURN_SUCCESS;
-}
diff --git a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf b/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf deleted file mode 100644 index 3230105901..0000000000 --- a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +++ /dev/null @@ -1,44 +0,0 @@ -## @file
-# Platform Hook Library instance for UART device upon coreboot.
-#
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = PlatformHookLib
- FILE_GUID = 40A2CBC6-CFB8-447b-A90E-198E88FD345E
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = PlatformHookLib
- CONSTRUCTOR = PlatformHookSerialPortInitialize -
-[Sources]
- PlatformHookLib.c
-
-[LibraryClasses]
- CbParseLib
- PcdLib
- PciLib -
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- CorebootModulePkg/CorebootModulePkg.dec
-
-[Pcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio ## PRODUCES - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## PRODUCES - gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters ## PRODUCES diff --git a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c b/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c deleted file mode 100644 index b7d6f385fe..0000000000 --- a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c +++ /dev/null @@ -1,184 +0,0 @@ -/** @file
- Reset System Library functions for coreboot
-
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <PiDxe.h>
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/IoLib.h>
-#include <Library/HobLib.h>
-
-#include <Guid/AcpiBoardInfoGuid.h>
-
-VOID
-AcpiPmControl (
- UINTN SuspendType
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
- ACPI_BOARD_INFO *pAcpiBoardInfo;
- UINTN PmCtrlReg = 0;
-
- ASSERT (SuspendType <= 7);
- //
- // Find the acpi board information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
- ASSERT (GuidHob != NULL);
- pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- PmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
- IoAndThenOr16 (PmCtrlReg, (UINT16) ~0x3c00, (UINT16) (SuspendType << 10));
- IoOr16 (PmCtrlReg, BIT13);
- CpuDeadLoop ();
-}
-
-/**
- Calling this function causes a system-wide reset. This sets
- all circuitry within the system to its initial state. This type of reset
- is asynchronous to system operation and operates without regard to
- cycle boundaries.
-
- System reset should not return, if it returns, it means the system does
- not support cold reset.
-**/
-VOID
-EFIAPI
-ResetCold (
- VOID
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
- ACPI_BOARD_INFO *pAcpiBoardInfo;
-
- //
- // Find the acpi board information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
- ASSERT (GuidHob != NULL);
- pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- IoWrite8 ((UINTN)pAcpiBoardInfo->ResetRegAddress, pAcpiBoardInfo->ResetValue);
- CpuDeadLoop ();
-}
-
-/**
- Calling this function causes a system-wide initialization. The processors
- are set to their initial state, and pending cycles are not corrupted.
-
- System reset should not return, if it returns, it means the system does
- not support warm reset.
-**/
-VOID
-EFIAPI
-ResetWarm (
- VOID
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
- ACPI_BOARD_INFO *pAcpiBoardInfo;
-
- //
- // Find the acpi board information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
- ASSERT (GuidHob != NULL);
- pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- IoWrite8 ((UINTN)pAcpiBoardInfo->ResetRegAddress, pAcpiBoardInfo->ResetValue);
- CpuDeadLoop ();
-}
-
-/**
- Calling this function causes the system to enter a power state equivalent
- to the ACPI G2/S5 or G3 states.
-
- System shutdown should not return, if it returns, it means the system does
- not support shut down reset.
-**/
-VOID
-EFIAPI
-ResetShutdown (
- VOID
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
- ACPI_BOARD_INFO *pAcpiBoardInfo;
- UINTN PmCtrlReg;
-
- //
- // Find the acpi board information guid hob
- //
- GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
- ASSERT (GuidHob != NULL);
- pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
-
- //
- // GPE0_EN should be disabled to avoid any GPI waking up the system from S5
- //
- IoWrite16 ((UINTN)pAcpiBoardInfo->PmGpeEnBase, 0);
-
- //
- // Clear Power Button Status
- //
- IoWrite16((UINTN) pAcpiBoardInfo->PmEvtBase, BIT8);
-
- //
- // Transform system into S5 sleep state
- //
- PmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
- IoAndThenOr16 (PmCtrlReg, (UINT16) ~0x3c00, (UINT16) (7 << 10));
- IoOr16 (PmCtrlReg, BIT13);
- CpuDeadLoop ();
-
- ASSERT (FALSE);
-}
-
-/**
- Calling this function causes the system to enter a power state for capsule
- update.
-
- Reset update should not return, if it returns, it means the system does
- not support capsule update.
-
-**/
-VOID
-EFIAPI
-EnterS3WithImmediateWake (
- VOID
- )
-{
- AcpiPmControl (5);
- ASSERT (FALSE);
-}
-
-/**
- This function causes a systemwide reset. The exact type of the reset is
- defined by the EFI_GUID that follows the Null-terminated Unicode string passed
- into ResetData. If the platform does not recognize the EFI_GUID in ResetData
- the platform must pick a supported reset type to perform.The platform may
- optionally log the parameters from any non-normal reset that occurs.
-
- @param[in] DataSize The size, in bytes, of ResetData.
- @param[in] ResetData The data buffer starts with a Null-terminated string,
- followed by the EFI_GUID.
-**/
-VOID
-EFIAPI
-ResetPlatformSpecific (
- IN UINTN DataSize,
- IN VOID *ResetData
- )
-{
- ResetCold ();
-}
diff --git a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf b/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf deleted file mode 100644 index 1af96c6e23..0000000000 --- a/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.inf +++ /dev/null @@ -1,44 +0,0 @@ -## @file
-# Library instance for ResetSystem library class for coreboot
-#
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ResetSystemLib
- FILE_GUID = C5CD4EEE-527F-47df-9C92-B41414AF7479
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = ResetSystemLib
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF
-#
-
-[Sources]
- ResetSystemLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- CorebootModulePkg/CorebootModulePkg.dec
-
-[LibraryClasses]
- DebugLib
- IoLib
- HobLib
-
-[Guids]
- gUefiAcpiBoardInfoGuid
-
diff --git a/CorebootPayloadPkg/License.txt b/CorebootPayloadPkg/License.txt deleted file mode 100644 index be68999be6..0000000000 --- a/CorebootPayloadPkg/License.txt +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2012, Intel Corporation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
|