python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
## @file
# This file is used to parse a PCD file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
CommonXml
'''
##
# Import Modules
#
from Core.DistributionPackageClass import DistributionPackageHeaderObject
from Library.St... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/CommonXml.py |
## @file
# This file is used to parse a PCD file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
PcdXml
'''
##
# Import Modules
#
from Library.Xml.XmlRoutines import XmlElement
from Library.Xml.XmlRoutines import XmlAttrib... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/PcdXml.py |
## @file
# Python 'Library' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
Xml
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/__init__.py |
## @file
# This file is used to parse a xml file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GuidProtocolPpiXml
'''
from Library.StringUtils import ConvertNEToNOTEQ
from Library.StringUtils import ConvertNOTEQToNE
from L... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py |
## @file
# This file is used to parse a Module file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
ModuleSurfaceAreaXml
'''
from xml.dom import minidom
from Library.StringUtils import ConvertNEToNOTEQ
from Library.StringUt... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py |
## @file
# This file is used to parse a xml file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
XmlParser
'''
##
# Import Modules
#
import re
from Library.Xml.XmlRoutines import XmlNode
from Library.Xml.XmlRoutines import... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/XmlParser.py |
## @file
# This file is for converting package information data file to xml file.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
IniToXml
'''
import os.path
import re
from time import strftime
from time import localtime
import Logger.... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/IniToXml.py |
## @file
# This file is used to parse a Package file of .PKG file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
PackageSurfaceAreaXml
'''
from xml.dom import minidom
from Library.StringUtils import GetStringOfList
from Library.Xml.Xml... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py |
## @file
# Python 'Object' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
Object
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/__init__.py |
## @file
# This file is used to define common items of class object
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Common Object
'''
from Library.DataType import TAB_LANGUAGE_EN_US
## HelpTextObject
#
# @param object: Inherited fro... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/POM/CommonObject.py |
## @file
# Python 'Object' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
POM
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/POM/__init__.py |
## @file
# This file is used to define a class object to describe a module
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
ModuleObject
'''
##
# Import Modules
#
from Object.POM.CommonObject import CommonPropertiesObject
from Object.POM.C... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py |
## @file
# This file is used to define a class object to describe a package
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
PackageObject
'''
##
# Import Modules
#
from Object.POM.CommonObject import CommonPropertiesObject
from Object.POM... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py |
## @file
# This file is used to define class objects for DEC file. It will consumed by
#DecParser
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
DecObject
'''
## Import modules
#
import os.path
from Library.Misc import Sdict
from Librar... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/DecObject.py |
## @file
# This file is used to define class objects of INF file [Guids] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfGuidObject
'''
from Library.ParserValidate import IsValidCVariableName
f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py |
## @file
# This file is used to define common class objects for INF file.
# It will consumed by InfParser
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfCommonObject
'''
## InfLineCommentObject
#
# Comment Object for any line in the ... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfCommonObject.py |
## @file
# This file is used to define class objects of INF file [Sources] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfSourcesObject
'''
import os
from Logger import StringTable as ST
from... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py |
## @file
# This file is used to define class objects of INF file [Pcds] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfPcdObject
'''
import os
import re
from Logger import StringTable as ST
fr... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py |
## @file
# This file is used to define class objects of [Defines] section for INF file.
# It will consumed by InfParser
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfDefineObject
'''
import os
import re
from Logger import StringTabl... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py |
## @file
# This file is used to define class objects of INF file [Depex] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfDepexObject
'''
from Library import DataType as DT
from Library import G... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfDepexObject.py |
## @file
# Python 'Object' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
PARSER
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/__init__.py |
## @file
# This file is used to define class objects of INF file [Ppis] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfPpiObject
'''
from Library.ParserValidate import IsValidCVariableName
fro... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py |
## @file
# This file is used to define class objects of INF file miscellaneous.
# Include BootMode/HOB/Event and others. It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfMisc
'''
import Logger.Log as Logge... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py |
## @file
# This file is used to define class objects of INF file [Binaries] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfBinaryObject
'''
import os
from copy import deepcopy
from Library im... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py |
## @file
# This file is used to define class objects of INF file [Packages] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfPackageObject
'''
from Logger import StringTable as ST
from Logger im... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py |
## @file
# This file is used to define class objects of INF file header.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfHeaderObject
'''
## INF file header object
#
# A sample file header
#
# ## @file ... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py |
## @file
# This file is used to define class objects of INF file [LibraryClasses] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfLibraryClassesObject
'''
from Logger import StringTable as ST
f... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py |
## @file
# This file is used to define class objects of INF file [BuildOptions] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfBuildOptionObject
'''
from Library import GlobalData
from Object... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfBuildOptionObject.py |
## @file
# This file is used to define common class objects of [Defines] section for INF file.
# It will consumed by InfParser
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfDefineCommonObject
'''
from Object.Parser.InfCommonObject im... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfDefineCommonObject.py |
## @file
# This file is used to define class objects of INF file [UserExtension] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfUserExtensionsObject
'''
from Logger import StringTable as ST
fr... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py |
## @file
# This file is used to define class objects of INF file [Protocols] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfProtocolObject
'''
from Library.ParserValidate import IsValidCVariab... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py |
## @file InfPomAlignmentMisc.py
# This file contained the routines for InfPomAlignment
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
InfPomAlignmentMisc
'''
##
# Import modules
#
import Logger.Log as Logger
from Library import DataTyp... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py |
## @file DecPomAlignment.py
# This file contained the adapter for convert INF parser object to POM Object
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
DecPomAlignment
'''
from __future__ import print_function
##
# Import Modules
#
im... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py |
## @file
# Python 'Parser' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
PomAdapter
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/PomAdapter/__init__.py |
## @file InfPomAlignment.py
# This file contained the adapter for convert INF parser object to POM Object
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
InfPomAlignment
'''
##
# Import modules
#
import os.path
from Logger import StringTa... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py |
## @file
# Python 'Library' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenMetaFile
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/GenMetaFile/__init__.py |
## @file GenMetaFileMisc.py
#
# This file contained the miscellaneous routines for GenMetaFile usage.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenMetaFileMisc
'''
from Library import DataType as DT
from Library import GlobalData
... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py |
## @file GenInfFile.py
#
# This file contained the logical of transfer package object to INF files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenInf
'''
import os
import stat
import codecs
from hashlib import md5
from Core.FileHook ... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py |
## @file GenDecFile.py
#
# This file contained the logical of transfer package object to DEC files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenDEC
'''
import os
import stat
import codecs
from hashlib import md5
from Core.FileHook... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py |
## @file GenXmlFile.py
#
# This file contained the logical of generate XML files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenXmlFile
'''
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/UPT/GenMetaFile/GenXmlFile.py |
## @file
# Generate a capsule windows driver.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenerateWindowsDriver
'''
import sys
import argparse
import uuid
import struct
import subprocess
import os
import tempfile
import shutil
import platfor... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Capsule/GenerateWindowsDriver.py |
## @file
# Generate a capsule.
#
# This tool generates a UEFI Capsule around an FMP Capsule. The capsule payload
# be signed using signtool or OpenSSL and if it is signed the signed content
# includes an FMP Payload Header.
#
# This tool is intended to be used to generate UEFI Capsules to update the
# system firmware o... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Capsule/GenerateCapsule.py |
##
# UefiBuild Plugin that supports Window Capsule files based on the
# Windows Firmware Update Platform spec.
# Creates INF, Cat, and then signs it
#
# To install run pip install --upgrade edk2-pytool-library
# edk2-pytool-library-0.9.1 is required.
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyr... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Capsule/WindowsCapsuleSupportHelper.py |
## @file
# This file is used to define the FMMT dependent external tool.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/__init__.py |
# @file
# Firmware Module Management Tool.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import argparse
from core.FMMTOperation import *
parser = argparse.ArgumentParser(description='''
View the Binary Structure of FD/F... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/FMMT.py |
## @file
# This file is used to define the BIOS Tree Node.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from FirmwareStorageFormat.FvHeader import *
from FirmwareStorageFormat.FfsFileHeader import *
from FirmwareStorageFormat.SectionHeader import... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/BiosTreeNode.py |
## @file
# This file is used to the implementation of Bios layout handler.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
from core.BiosTree import *
from core.GuidTools import GUIDTools
from core.BiosTreeNode import *
from FirmwareStorag... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/FvHandler.py |
## @file
# This file is used to define the functions to operate bios binary file.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from core.FMMTParser import *
from core.FvHandler import *
from utils.FvLayoutPrint import *
from utils.FmmtLogger impo... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/FMMTOperation.py |
## @file
# This file is used to define the FMMT dependent external tool management class.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import glob
import logging
import os
import shutil
import sys
import tempfile
import uuid
from FirmwareStorageF... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/GuidTools.py |
## @file
# This file is used to implement of the various bianry parser.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from re import T
import copy
import os
import sys
from FirmwareStorageFormat.Common import *
from core.BiosTreeNode import *
from... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/BinaryFactoryProduct.py |
## @file
# This file is used to define the interface of Bios Parser.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from FirmwareStorageFormat.Common import *
from core.BinaryFactoryProduct import ParserEntry
from core.BiosTreeNode import *
from co... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/FMMTParser.py |
## @file
# This file is used to define the Bios layout tree structure and related operations.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import collections
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as lo... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/core/BiosTree.py |
## @file
# This file is used to define the Fmmt Logger.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import sys
import os
logfile = 'FMMT_Build.log'
if os.path.exists(logfile):
os.remove(logfile)
FmmtLogger = logging.getLog... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/utils/FmmtLogger.py |
## @file
# This file is used to define the printer for Bios layout.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from utils.FmmtLogger import FmmtLogger as logger
def GetFormatter(layout_format: str):
if layout_format == 'json':
retu... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/FMMT/utils/FvLayoutPrint.py |
## @file
# Common routines used by workspace
#
# Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
from collections import OrderedDict, defaultdict
from Common.DataType import SUP_MODULE_USER_DEFINED
from Commo... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/WorkspaceCommon.py |
## @file
# This file is used to define each component of the build database
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from collections import OrderedDict, namedtuple
from Common.DataType import *
import collections
import re
from collect... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/BuildClassObject.py |
## @file
# Python 'Workspace' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/__init__.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_impor... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## Platform build information from DSC file
#
# This class... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/DscBuildData.py |
## @file
# This file is used to create/update/query/erase a meta file table
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import uuid
import Common.EdkLogger as EdkLogger
from Com... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/MetaFileTable.py |
## @file
# This file is used to check format of comments
#
# Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from CommonDataClass.DataClass import (
MODEL_PCD_PATCHABLE_IN_MODULE,
MODEL_PCD_DYNAMIC_EX,
MODEL_PCD_DYNAMIC,
MODEL_EFI_GUID,
... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/MetaFileCommentParser.py |
## @file
# This file is used to create/update/query/erase table for files
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
import Common.EdkLogger as EdkLogger
from CommonDataClass impor... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/MetaDataTable.py |
## @file
# This file is used to parse meta files
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future_... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/MetaFileParser.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from Common.StringUtils import *
from Common.DataType import... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/DecBuildData.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
from Common.DataType... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Workspace/InfBuildData.py |
# @file
# Split a file into two pieces at the request offset.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
import unittest
import tempfile
import os
import shutil
import Split.Split as sp
import struct as st
class TestSp... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/tests/Split/test_split.py |
## @file
# Python 'PatchPcdValue' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/PatchPcdValue/__init__.py |
## @file
# Patch value into the binary file.
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
from Common.LongFilePathSupport import OpenLongFilePath as open
import sys
from optparse imp... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py |
## @file
# Trim files preprocessed by compiler
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
import sys
import re
from io import BytesIO
import codecs
from optparse import OptionParser... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Trim/Trim.py |
## @file
# This file implements the log mechanism for Python tools.
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# Copyright 2001-2016 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software an... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/EdkLogger.py |
## @file
# Common routines used by all tools
#
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import sys
import string
import threading
import time
import re
import pickle
import arr... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Misc.py |
## @file
# This file is used to define each component of Target.txt file
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
import Common.GlobalDa... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/TargetTxtClassObject.py |
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
import re
gIsWindows = None
gWorkspace = "."
gOptions = None
gCaseInsensitive = False
gAllFiles = None
gComma... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/GlobalData.py |
## @file
# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from .StringUtils import *... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Parsing.py |
## @file
#
# This file is for build version number auto generation
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
gBUILD_VERSION = "Developer Build based on Revision: Unknown"
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/BuildVersion.py |
# # @file
# This file is used to parse and evaluate range expression in Pcd declaration.
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
# # Import Modules
#
from __future__ import print_function
from Common.GlobalData import *
from CommonDataCl... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/RangeExpression.py |
## @file
# This file is used to define common string related functions used in parsing process
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import re
from . import DataType
import... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/StringUtils.py |
## @file
# Override built in module os to provide support for long file path
#
# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
import os
from . import LongFilePathOsPath
from Common.LongFilePathSupport impo... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/LongFilePathOs.py |
## @file
# Python 'Common' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/__init__.py |
## @file
# manage multiple workspace file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import Common.LongFilePathOs as os
from Common.DataTyp... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/MultipleWorkspace.py |
## @file
# This file is used to define each component of tools_def.txt file
#
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.LongFilePathOs as os
import re
from . import... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/ToolDefClassObject.py |
## @file
# help with caching in BaseTools
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## Import Modules
#
# for class function
class cached_class_function(object):
def __init__(self, function):
self._function = function
def __g... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/caching.py |
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
# Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights r... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/DataType.py |
## @file
#
# This package manage the VPD PCD information file which will be generated
# by build tool's autogen.
# The VPD PCD information file will be input for third-party BPDG tool which
# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
#
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/VpdInfoFile.py |
## @file
# Standardized Error Handling infrastructures.
#
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
FILE_OPEN_FAILURE = 1
FILE_WRITE_FAILURE = 2
FILE_PARSE_FAILURE = 3
FILE_READ_FAILURE = 4
FILE_CREATE_FAILURE = 5
FILE_CHECKSUM_FAILURE = 6... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/BuildToolError.py |
## @file
# This file is used to parse and evaluate expression in directive or PCD value.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
## Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
from Common... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Expression.py |
## @file
# Override built in function file.open to provide support for long file path
#
# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import os
import platform
import shutil
import codecs
##
# OpenLongPath
# Convert a file path to a long file... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/LongFilePathSupport.py |
# # @file
#
# This file is used to handle the variable attributes and property information
#
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
class VariableAttributes(object):
EFI_VARIABLE_NON_VOLATILE = 0x00000001
EFI_VARIABLE_BOOTSERV... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/VariableAttributes.py |
## @file
# Override built in module os.path to provide support for long file path
#
# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import os
from Common.LongFilePathSupport import LongFilePath
def isfile(path):
return os.path.isfile(LongFilePath(... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/LongFilePathOsPath.py |
## @file
# Python 'Common.Uefi' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/__init__.py |
## @file
# Module that encodes and decodes a EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER with
# a payload.
#
# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpCapsuleHeader
'''
import struct
import uuid
class FmpCapsuleImageHeaderClass (object... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py |
## @file
# Module that encodes and decodes a EFI_FIRMWARE_IMAGE_AUTHENTICATION with
# certificate data and payload data.
#
# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpAuthHeader
'''
import struct
import uuid
class FmpAuthHeaderClass... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py |
## @file
# Python 'Common.Uefi.Capsule' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/Capsule/__init__.py |
## @file
# Module that encodes and decodes a EFI_CAPSULE_HEADER with a payload
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
UefiCapsuleHeader
'''
import struct
import uuid
class UefiCapsuleHeaderClass (object):
# typedef struct {
# ... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/Capsule/UefiCapsuleHeader.py |
## @file
# Module that encodes and decodes a capsule dependency.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import struct
import json
import sys
import uuid
import re
'''
CapsuleDependency
'''
class OpConvert (object):
def __init__ (self):
... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Uefi/Capsule/CapsuleDependency.py |
## @file
# Python 'Common.Edk2' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Edk2/__init__.py |
## @file
# Python 'Common.Edk2.Capsule' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Edk2/Capsule/__init__.py |
## @file
# Module that encodes and decodes a FMP_PAYLOAD_HEADER with a payload.
# The FMP_PAYLOAD_HEADER is processed by the FmpPayloadHeaderLib in the
# FmpDevicePkg.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpPayloadHeader
'''
import s... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Common/Edk2/Capsule/FmpPayloadHeader.py |
## @file
# This file is used to create/update/query/erase table for Identifiers
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Common.Strin... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Table/TableIdentifier.py |
## @file
# This file is used to create/update/query/erase table for ECC reports
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import Common.Lon... | nvtrust-main | infrastructure/kvm/ovmf/ovmf_source/BaseTools/Source/Python/Table/TableReport.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.