Date   

Re: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image

Dong, Eric
 

Reviewed-by: Eric Dong <eric.dong@...>

-----Original Message-----
From: Gao, Liming
Sent: Wednesday, September 21, 2016 10:39 AM
To: edk2-devel@...
Cc: Dong, Eric; Bi, Dandan
Subject: [Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image

HiiImage protocol implementation doesn't support EFI_HII_IIBT_IMAGE_PNG.

Cc: Eric Dong <eric.dong@...>
Cc: Dandan Bi <dandan.bi@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@...>
---
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 612d57a..07b3ba0 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -142,8 +142,9 @@ GetImageIdOrAddress (
break;

case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
CopyMem (&Length32, ImageBlock + sizeof (EFI_HII_IMAGE_BLOCK), sizeof (UINT32));
- ImageBlock += Length32;
+ ImageBlock += OFFSET_OF (EFI_HII_IIBT_JPEG_BLOCK, Data) + Length32;
ImageIdCurrent++;
break;

@@ -895,6 +896,7 @@ HiiGetImage (

switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1096,6 +1098,7 @@ HiiSetImage (
//
switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1497,6 +1500,7 @@ HiiDrawImageId (
//
// Get the specified Image.
//
+ ZeroMem (&Image, sizeof (Image));
Status = HiiGetImage (This, PackageList, ImageId, &Image);
if (EFI_ERROR (Status)) {
return Status;
--
2.8.0.windows.1


Re: [Patch 1/3] MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR

Dong, Eric
 

Reviewed-by: Eric Dong <eric.dong@...>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Liming Gao
Sent: Wednesday, September 21, 2016 10:39 AM
To: edk2-devel@...
Cc: Bi, Dandan; Dong, Eric
Subject: [edk2] [Patch 1/3] MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR

Cc: Eric Dong <eric.dong@...>
Cc: Dandan Bi <dandan.bi@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@...>
---
MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
index 4a7777c..ae5602f 100644
--- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
+++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers

-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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.
@@ -2126,4 +2126,10 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
///
#define STRING_TOKEN(t) t

+///
+/// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
+/// here for the easy access by C files and VFR source files.
+///
+#define IMAGE_TOKEN(t) t
+
#endif
--
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [Patch 0/4] Add support for running python tools from source on Windows

Zhu, Yonghong <yonghong.zhu@...>
 

Reviewed the series of 4 patches.
Reviewed-by: Yonghong Zhu <yonghong.zhu@...>

Best Regards,
Zhu Yonghong

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Liming Gao
Sent: Tuesday, September 13, 2016 12:03 AM
To: edk2-devel@...
Subject: [edk2] [Patch 0/4] Add support for running python tools from source on Windows

When Python tool exe files don't exist, toolsetup.bat will configure PYTHONPATH to python source code, and set BaseTools\BinWrappers\WindowsLike into system PATH directory. Then, windows batch files will be used to run python tools from source files.

Liming Gao (4):
BaseTools: Add Windows batch files to run python tool from Source
BaseTools: Update python tool to call external tools with shell true
mode
BaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATH
BaseTools: Update toolsetup.bat to set PYTHONPATH env to run python
source

BaseTools/BinWrappers/WindowsLike/BPDG.bat | 3 +
BaseTools/BinWrappers/WindowsLike/Ecc.bat | 3 +
BaseTools/BinWrappers/WindowsLike/GenDepex.bat | 3 +
BaseTools/BinWrappers/WindowsLike/GenFds.bat | 3 +
.../BinWrappers/WindowsLike/GenPatchPcdTable.bat | 3 +
.../BinWrappers/WindowsLike/PatchPcdValue.bat | 3 +
BaseTools/BinWrappers/WindowsLike/Pkcs7Sign.bat | 3 +
.../WindowsLike/Rsa2048Sha256GenerateKeys.bat | 1 +
.../BinWrappers/WindowsLike/Rsa2048Sha256Sign.bat | 3 +
BaseTools/BinWrappers/WindowsLike/TargetTool.bat | 3 +
BaseTools/BinWrappers/WindowsLike/Trim.bat | 3 +
BaseTools/BinWrappers/WindowsLike/UPT.bat | 3 +
BaseTools/BinWrappers/WindowsLike/build.bat | 3 +
BaseTools/Source/Python/Common/VpdInfoFile.py | 7 +-
BaseTools/Source/Python/Makefile | 17 +++-
BaseTools/Source/Python/build/build.py | 5 +-
BaseTools/toolsetup.bat | 101 +++++++++------------
17 files changed, 100 insertions(+), 67 deletions(-) create mode 100644 BaseTools/BinWrappers/WindowsLike/BPDG.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/Ecc.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/GenDepex.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/GenFds.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/GenPatchPcdTable.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/PatchPcdValue.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/Pkcs7Sign.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/Rsa2048Sha256GenerateKeys.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/Rsa2048Sha256Sign.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/TargetTool.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/Trim.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/UPT.bat
create mode 100644 BaseTools/BinWrappers/WindowsLike/build.bat

--
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel


[Patch 3/3] BaseTools: support generating image package from BMP/JPEG/PNG files

Liming Gao
 

From: Yonghong Zhu <yonghong.zhu@...>

BaseTools add support to generating image package from BMP/JPEG/PNG
files.
1) New file type *.idf Image definition file to describe HII image
resource. It is the ASCII text file, and includes one or more "#image
IMAGE_ID [TRANSPARENT] ImageFileName".
2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID.
3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the
generated ImageId definition.
4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated
as the output binary HII image package.

Cc: Liming Gao <liming.gao@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@...>
---
BaseTools/Conf/build_rule.template | 21 ++
BaseTools/Source/Python/AutoGen/AutoGen.py | 31 ++-
BaseTools/Source/Python/AutoGen/GenC.py | 245 +++++++++++++++++++++-
BaseTools/Source/Python/AutoGen/IdfClassObject.py | 159 ++++++++++++++
BaseTools/Source/Python/AutoGen/StrGather.py | 4 +-
BaseTools/Source/Python/Common/DataType.py | 1 +
6 files changed, 455 insertions(+), 6 deletions(-)
create mode 100644 BaseTools/Source/Python/AutoGen/IdfClassObject.py

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 7e2c6a9..1db94b6 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -568,6 +568,17 @@

<Command>

+[Image-Definition-File]
+ <InputFile>
+ *.idf, *.Idf, *.IDF
+
+ <OutputFile>
+ $(DEBUG_DIR)(+)AutoGen.c
+ $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
+ $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
+
+ <Command>
+
[Efi-Image.UEFI_OPTIONROM]
<InputFile>
?.efi, ?.EFI, ?.Efi
@@ -588,6 +599,16 @@

<Command>

+[Image-Definition-File.UEFI_HII]
+ <InputFile>
+ *.idf, *.Idf, *.IDF
+
+ <OutputFile>
+ $(DEBUG_DIR)(+)$(MODULE_NAME)ImgDefs.h
+ $(OUTPUT_DIR)(+)$(MODULE_NAME)Idf.hpk
+
+ <Command>
+
[Visual-Form-Representation-File.UEFI_HII]
<InputFile>
?.vfr
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 79bc7c6..f35ae25 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -72,7 +72,8 @@ gAutoGenHeaderFileName = "AutoGen.h"
gAutoGenStringFileName = "%(module_name)sStrDefs.h"
gAutoGenStringFormFileName = "%(module_name)sStrDefs.hpk"
gAutoGenDepexFileName = "%(module_name)s.depex"
-
+gAutoGenImageDefFileName = "%(module_name)sImgDefs.h"
+gAutoGenIdfFileName = "%(module_name)sIdf.hpk"
gInfSpecVersion = "0x00010017"

#
@@ -2590,6 +2591,7 @@ class ModuleAutoGen(AutoGen):
self._IncludePathLength = 0
self._AutoGenFileList = None
self._UnicodeFileList = None
+ self._IdfFileList = None
self._SourceFileList = None
self._ObjectFileList = None
self._BinaryFileList = None
@@ -3114,6 +3116,15 @@ class ModuleAutoGen(AutoGen):
self._UnicodeFileList = []
return self._UnicodeFileList

+ ## Return the list of Image Definition files
+ def _GetIdfFileList(self):
+ if self._IdfFileList == None:
+ if TAB_IMAGE_FILE in self.FileTypes:
+ self._IdfFileList = self.FileTypes[TAB_IMAGE_FILE]
+ else:
+ self._IdfFileList = []
+ return self._IdfFileList
+
## Return a list of files which can be built from binary
#
# "Build" binary files are just to copy them to build directory.
@@ -3276,15 +3287,19 @@ class ModuleAutoGen(AutoGen):
#
def _GetAutoGenFileList(self):
UniStringAutoGenC = True
+ IdfStringAutoGenC = True
UniStringBinBuffer = StringIO()
+ IdfGenBinBuffer = StringIO()
if self.BuildType == 'UEFI_HII':
UniStringAutoGenC = False
+ IdfStringAutoGenC = False
if self._AutoGenFileList == None:
self._AutoGenFileList = {}
AutoGenC = TemplateString()
AutoGenH = TemplateString()
StringH = TemplateString()
- GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)
+ StringIdf = TemplateString()
+ GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer, StringIdf, IdfStringAutoGenC, IdfGenBinBuffer)
#
# AutoGen.c is generated if there are library classes in inf, or there are object files
#
@@ -3308,6 +3323,17 @@ class ModuleAutoGen(AutoGen):
self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
if UniStringBinBuffer != None:
UniStringBinBuffer.close()
+ if str(StringIdf) != "":
+ AutoFile = PathClass(gAutoGenImageDefFileName % {"module_name":self.Name}, self.DebugDir)
+ self._AutoGenFileList[AutoFile] = str(StringIdf)
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if IdfGenBinBuffer != None and IdfGenBinBuffer.getvalue() != "":
+ AutoFile = PathClass(gAutoGenIdfFileName % {"module_name":self.Name}, self.OutputDir)
+ self._AutoGenFileList[AutoFile] = IdfGenBinBuffer.getvalue()
+ AutoFile.IsBinary = True
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if IdfGenBinBuffer != None:
+ IdfGenBinBuffer.close()
return self._AutoGenFileList

## Return the list of library modules explicitly or implicityly used by this module
@@ -4061,6 +4087,7 @@ class ModuleAutoGen(AutoGen):
CodaTargetList = property(_GetFinalTargetList)
FileTypes = property(_GetFileTypes)
BuildRules = property(_GetBuildRules)
+ IdfFileList = property(_GetIdfFileList)

DependentPackageList = property(_GetDependentPackageList)
DependentLibraryList = property(_GetLibraryList)
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 29951e3..8089e3a 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -14,7 +14,8 @@
## Import Modules
#
import string
-
+import collections
+import struct
from Common import EdkLogger

from Common.BuildToolError import *
@@ -23,6 +24,7 @@ from Common.Misc import *
from Common.String import StringToArray
from StrGather import *
from GenPcdDb import CreatePcdDatabaseCode
+from IdfClassObject import *

## PCD type string
gItemTypeStringDatabase = {
@@ -1619,6 +1621,232 @@ def CreateUnicodeStringCode(Info, AutoGenC, AutoGenH, UniGenCFlag, UniGenBinBuff
AutoGenH.Append("\n#define STRING_ARRAY_NAME %sStrings\n" % Info.Name)
os.chdir(WorkingDir)

+def CreateIdfFileCode(Info, AutoGenC, StringH, IdfGenCFlag, IdfGenBinBuffer):
+ if len(Info.IdfFileList) > 0:
+ ImageFiles = IdfFileClassObject(sorted (Info.IdfFileList))
+ if ImageFiles.ImageFilesDict:
+ Index = 1
+ PaletteIndex = 1
+ IncList = [Info.MetaFile.Dir]
+ SrcList = [F for F in Info.SourceFileList]
+ SkipList = ['.jpg', '.png', '.bmp', '.inf', '.idf']
+ FileList = GetFileList(SrcList, IncList, SkipList)
+ ValueStartPtr = 60
+ StringH.Append("\n//\n//Image ID\n//\n")
+ ImageInfoOffset = 0
+ PaletteInfoOffset = 0
+ ImageBuffer = pack('x')
+ PaletteBuffer = pack('x')
+ BufferStr = ''
+ PaletteStr = ''
+ for Idf in ImageFiles.ImageFilesDict:
+ if ImageFiles.ImageFilesDict[Idf]:
+ for FileObj in ImageFiles.ImageFilesDict[Idf]:
+ for sourcefile in Info.SourceFileList:
+ if FileObj.FileName == sourcefile.File:
+ if not sourcefile.Ext.upper() in ['.PNG', '.BMP', '.JPG']:
+ EdkLogger.error("build", AUTOGEN_ERROR, "The %s's postfix must be one of .bmp, .jpg, .png" % (FileObj.FileName), ExtraData="[%s]" % str(Info))
+ FileObj.File = sourcefile
+ break
+ else:
+ EdkLogger.error("build", AUTOGEN_ERROR, "The %s in %s is not defined in the driver's [Sources] section" % (FileObj.FileName, Idf), ExtraData="[%s]" % str(Info))
+
+ for FileObj in ImageFiles.ImageFilesDict[Idf]:
+ ID = FileObj.ImageID
+ File = FileObj.File
+ if not os.path.exists(File.Path) or not os.path.isfile(File.Path):
+ EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=File.Path)
+ SearchImageID (FileObj, FileList)
+ if FileObj.Referenced:
+ if (ValueStartPtr - len(DEFINE_STR + ID)) <= 0:
+ Line = DEFINE_STR + ' ' + ID + ' ' + DecToHexStr(Index, 4) + '\n'
+ else:
+ Line = DEFINE_STR + ' ' + ID + ' ' * (ValueStartPtr - len(DEFINE_STR + ID)) + DecToHexStr(Index, 4) + '\n'
+
+ TmpFile = open(File.Path, 'rb')
+ Buffer = TmpFile.read()
+ TmpFile.close()
+ if File.Ext.upper() == '.PNG':
+ TempBuffer = pack('B', EFI_HII_IIBT_IMAGE_PNG)
+ TempBuffer += pack('I', len(Buffer))
+ TempBuffer += Buffer
+ elif File.Ext.upper() == '.JPG':
+ ImageType, = struct.unpack('4s', Buffer[6:10])
+ if ImageType != 'JFIF':
+ EdkLogger.error("build", FILE_TYPE_MISMATCH, "The file %s is not a standard JPG file." % File.Path)
+ TempBuffer = pack('B', EFI_HII_IIBT_IMAGE_JPEG)
+ TempBuffer += pack('I', len(Buffer))
+ TempBuffer += Buffer
+ elif File.Ext.upper() == '.BMP':
+ TempBuffer, TempPalette = BmpImageDecoder(File, Buffer, PaletteIndex, FileObj.TransParent)
+ if len(TempPalette) > 1:
+ PaletteIndex += 1
+ PaletteBuffer += pack('H', len(TempPalette))
+ PaletteBuffer += TempPalette
+ PaletteStr = WriteLine(PaletteStr, '// %s: %s: %s' % (DecToHexStr(PaletteIndex - 1, 4), ID, DecToHexStr(PaletteIndex - 1, 4)))
+ TempPaletteList = AscToHexList(TempPalette)
+ PaletteStr = WriteLine(PaletteStr, CreateArrayItem(TempPaletteList, 16) + '\n')
+ ImageBuffer += TempBuffer
+ BufferStr = WriteLine(BufferStr, '// %s: %s: %s' % (DecToHexStr(Index, 4), ID, DecToHexStr(Index, 4)))
+ TempBufferList = AscToHexList(TempBuffer)
+ BufferStr = WriteLine(BufferStr, CreateArrayItem(TempBufferList, 16) + '\n')
+
+ StringH.Append(Line)
+ Index += 1
+
+ BufferStr = WriteLine(BufferStr, '// End of the Image Info')
+ BufferStr = WriteLine(BufferStr, CreateArrayItem(DecToHexList(EFI_HII_IIBT_END, 2)) + '\n')
+ ImageEnd = pack('B', EFI_HII_IIBT_END)
+ ImageBuffer += ImageEnd
+
+ if len(ImageBuffer) > 1:
+ ImageInfoOffset = 12
+ if len(PaletteBuffer) > 1:
+ PaletteInfoOffset = 12 + len(ImageBuffer) - 1 # -1 is for the first empty pad byte of ImageBuffer
+
+ IMAGE_PACKAGE_HDR = pack('=II', ImageInfoOffset, PaletteInfoOffset)
+ # PACKAGE_HEADER_Length = PACKAGE_HEADER + ImageInfoOffset + PaletteInfoOffset + ImageBuffer Length + PaletteCount + PaletteBuffer Length
+ if len(PaletteBuffer) > 1:
+ PACKAGE_HEADER_Length = 4 + 4 + 4 + len(ImageBuffer) - 1 + 2 + len(PaletteBuffer) - 1
+ else:
+ PACKAGE_HEADER_Length = 4 + 4 + 4 + len(ImageBuffer) - 1
+ if PaletteIndex > 1:
+ PALETTE_INFO_HEADER = pack('H', PaletteIndex - 1)
+ # EFI_HII_PACKAGE_HEADER length max value is 0xFFFFFF
+ Hex_Length = '%06X' % PACKAGE_HEADER_Length
+ if PACKAGE_HEADER_Length > 0xFFFFFF:
+ EdkLogger.error("build", AUTOGEN_ERROR, "The Length of EFI_HII_PACKAGE_HEADER exceed its maximum value", ExtraData="[%s]" % str(Info))
+ PACKAGE_HEADER = pack('=HBB', int('0x' + Hex_Length[2:], 16), int('0x' + Hex_Length[0:2], 16), EFI_HII_PACKAGE_IMAGES)
+
+ IdfGenBinBuffer.write(PACKAGE_HEADER)
+ IdfGenBinBuffer.write(IMAGE_PACKAGE_HDR)
+ if len(ImageBuffer) > 1 :
+ IdfGenBinBuffer.write(ImageBuffer[1:])
+ if PaletteIndex > 1:
+ IdfGenBinBuffer.write(PALETTE_INFO_HEADER)
+ if len(PaletteBuffer) > 1:
+ IdfGenBinBuffer.write(PaletteBuffer[1:])
+
+ if IdfGenCFlag:
+ TotalLength = EFI_HII_ARRAY_SIZE_LENGTH + PACKAGE_HEADER_Length
+ AutoGenC.Append("\n//\n//Image Pack Definition\n//\n")
+ AllStr = WriteLine('', CHAR_ARRAY_DEFIN + ' ' + Info.Module.BaseName + 'Images' + '[] = {\n')
+ AllStr = WriteLine(AllStr, '// STRGATHER_OUTPUT_HEADER')
+ AllStr = WriteLine(AllStr, CreateArrayItem(DecToHexList(TotalLength)) + '\n')
+ AllStr = WriteLine(AllStr, '// Image PACKAGE HEADER\n')
+ IMAGE_PACKAGE_HDR_List = AscToHexList(PACKAGE_HEADER)
+ IMAGE_PACKAGE_HDR_List += AscToHexList(IMAGE_PACKAGE_HDR)
+ AllStr = WriteLine(AllStr, CreateArrayItem(IMAGE_PACKAGE_HDR_List, 16) + '\n')
+ AllStr = WriteLine(AllStr, '// Image DATA\n')
+ if BufferStr:
+ AllStr = WriteLine(AllStr, BufferStr)
+ if PaletteStr:
+ AllStr = WriteLine(AllStr, '// Palette Header\n')
+ PALETTE_INFO_HEADER_List = AscToHexList(PALETTE_INFO_HEADER)
+ AllStr = WriteLine(AllStr, CreateArrayItem(PALETTE_INFO_HEADER_List, 16) + '\n')
+ AllStr = WriteLine(AllStr, '// Palette Data\n')
+ AllStr = WriteLine(AllStr, PaletteStr)
+ AllStr = WriteLine(AllStr, '};')
+ AutoGenC.Append(AllStr)
+ AutoGenC.Append("\n")
+ StringH.Append('\nextern unsigned char ' + Info.Module.BaseName + 'Images[];\n')
+ StringH.Append("\n#define IMAGE_ARRAY_NAME %sImages\n" % Info.Module.BaseName)
+
+# typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
+# EFI_HII_PACKAGE_HEADER Header; # Standard package header, where Header.Type = EFI_HII_PACKAGE_IMAGES
+# UINT32 ImageInfoOffset;
+# UINT32 PaletteInfoOffset;
+# } EFI_HII_IMAGE_PACKAGE_HDR;
+
+# typedef struct {
+# UINT32 Length:24;
+# UINT32 Type:8;
+# UINT8 Data[];
+# } EFI_HII_PACKAGE_HEADER;
+
+# typedef struct _EFI_HII_IMAGE_BLOCK {
+# UINT8 BlockType;
+# UINT8 BlockBody[];
+# } EFI_HII_IMAGE_BLOCK;
+
+def BmpImageDecoder(File, Buffer, PaletteIndex, TransParent):
+ ImageType, = struct.unpack('2s', Buffer[0:2])
+ if ImageType!= 'BM': # BMP file type is 'BM'
+ EdkLogger.error("build", FILE_TYPE_MISMATCH, "The file %s is not a standard BMP file." % File.Path)
+ BMP_IMAGE_HEADER = collections.namedtuple('BMP_IMAGE_HEADER', ['bfSize','bfReserved1','bfReserved2','bfOffBits','biSize','biWidth','biHeight','biPlanes','biBitCount', 'biCompression', 'biSizeImage','biXPelsPerMeter','biYPelsPerMeter','biClrUsed','biClrImportant'])
+ BMP_IMAGE_HEADER_STRUCT = struct.Struct('IHHIIIIHHIIIIII')
+ BmpHeader = BMP_IMAGE_HEADER._make(BMP_IMAGE_HEADER_STRUCT.unpack_from(Buffer[2:]))
+ #
+ # Doesn't support compress.
+ #
+ if BmpHeader.biCompression != 0:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "The compress BMP file %s is not support." % File.Path)
+
+ # The Width and Height is UINT16 type in Image Package
+ if BmpHeader.biWidth > 0xFFFF:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "The BMP file %s Width is exceed 0xFFFF." % File.Path)
+ if BmpHeader.biHeight > 0xFFFF:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "The BMP file %s Height is exceed 0xFFFF." % File.Path)
+
+ PaletteBuffer = pack('x')
+ if BmpHeader.biBitCount == 1:
+ if TransParent:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_1BIT_TRANS)
+ else:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_1BIT)
+ ImageBuffer += pack('B', PaletteIndex)
+ Width = (BmpHeader.biWidth + 7)/8
+ if BmpHeader.bfOffBits > BMP_IMAGE_HEADER_STRUCT.size + 2:
+ PaletteBuffer = Buffer[BMP_IMAGE_HEADER_STRUCT.size + 2 : BmpHeader.bfOffBits]
+ elif BmpHeader.biBitCount == 4:
+ if TransParent:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_4BIT_TRANS)
+ else:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_4BIT)
+ ImageBuffer += pack('B', PaletteIndex)
+ Width = (BmpHeader.biWidth + 1)/2
+ if BmpHeader.bfOffBits > BMP_IMAGE_HEADER_STRUCT.size + 2:
+ PaletteBuffer = Buffer[BMP_IMAGE_HEADER_STRUCT.size + 2 : BmpHeader.bfOffBits]
+ elif BmpHeader.biBitCount == 8:
+ if TransParent:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_8BIT_TRANS)
+ else:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_8BIT)
+ ImageBuffer += pack('B', PaletteIndex)
+ Width = BmpHeader.biWidth
+ if BmpHeader.bfOffBits > BMP_IMAGE_HEADER_STRUCT.size + 2:
+ PaletteBuffer = Buffer[BMP_IMAGE_HEADER_STRUCT.size + 2 : BmpHeader.bfOffBits]
+ elif BmpHeader.biBitCount == 24:
+ if TransParent:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_24BIT_TRANS)
+ else:
+ ImageBuffer = pack('B', EFI_HII_IIBT_IMAGE_24BIT)
+ Width = BmpHeader.biWidth * 3
+ else:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "Only support the 1 bit, 4 bit, 8bit, 24 bit BMP files.", ExtraData="[%s]" % str(File.Path))
+
+ ImageBuffer += pack('H', BmpHeader.biWidth)
+ ImageBuffer += pack('H', BmpHeader.biHeight)
+ Start = BmpHeader.bfOffBits
+ End = BmpHeader.bfSize - 1
+ for Height in range(0, BmpHeader.biHeight):
+ if Width % 4 != 0:
+ Start = End + (Width % 4) - 4 - Width
+ else:
+ Start = End - Width
+ ImageBuffer += Buffer[Start + 1 : Start + Width + 1]
+ End = Start
+
+ # handle the Palette info, BMP use 4 bytes for R, G, B and Reserved info while EFI_HII_RGB_PIXEL only have the R, G, B info
+ if PaletteBuffer and len(PaletteBuffer) > 1:
+ PaletteTemp = pack('x')
+ for Index in range(0, len(PaletteBuffer)):
+ if Index % 4 == 3:
+ continue
+ PaletteTemp += PaletteBuffer[Index]
+ PaletteBuffer = PaletteTemp[1:]
+ return ImageBuffer, PaletteBuffer
+
## Create common code
#
# @param Info The ModuleAutoGen object
@@ -1684,10 +1912,14 @@ def CreateFooterCode(Info, AutoGenC, AutoGenH):
# @param Info The ModuleAutoGen object
# @param AutoGenC The TemplateString object for C code
# @param AutoGenH The TemplateString object for header file
+# @param StringH The TemplateString object for header file
# @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
# @param UniGenBinBuffer Buffer to store uni string package data
+# @param StringIdf The TemplateString object for header file
+# @param IdfGenCFlag IdfString is generated into AutoGen C file when it is set to True
+# @param IdfGenBinBuffer Buffer to store Idf string package data
#
-def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer):
+def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer, StringIdf, IdfGenCFlag, IdfGenBinBuffer):
CreateHeaderCode(Info, AutoGenC, AutoGenH)

if Info.AutoGenVersion >= 0x00010005:
@@ -1719,6 +1951,15 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer):
StringH.Append("\n#endif\n")
AutoGenH.Append('#include "%s"\n' % FileName)

+ if Info.IdfFileList:
+ FileName = "%sImgDefs.h" % Info.Name
+ StringIdf.Append(gAutoGenHeaderString.Replace({'FileName':FileName}))
+ StringIdf.Append(gAutoGenHPrologueString.Replace({'File':'IMAGEDEFS', 'Guid':Info.Guid.replace('-','_')}))
+ CreateIdfFileCode(Info, AutoGenC, StringIdf, IdfGenCFlag, IdfGenBinBuffer)
+
+ StringIdf.Append("\n#endif\n")
+ AutoGenH.Append('#include "%s"\n' % FileName)
+
CreateFooterCode(Info, AutoGenC, AutoGenH)

# no generation of AutoGen.c for Edk modules without unicode file
diff --git a/BaseTools/Source/Python/AutoGen/IdfClassObject.py b/BaseTools/Source/Python/AutoGen/IdfClassObject.py
new file mode 100644
index 0000000..76bc6d1
--- /dev/null
+++ b/BaseTools/Source/Python/AutoGen/IdfClassObject.py
@@ -0,0 +1,159 @@
+## @file
+# This file is used to collect all defined strings in Image Definition files
+#
+# 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.
+
+##
+# Import Modules
+#
+import Common.EdkLogger as EdkLogger
+import StringIO
+from Common.BuildToolError import *
+from Common.String import GetLineNo
+from Common.Misc import PathClass
+from Common.LongFilePathSupport import LongFilePath
+import re
+import os
+
+IMAGE_TOKEN = re.compile('IMAGE_TOKEN *\(([A-Z0-9_]+) *\)', re.MULTILINE | re.UNICODE)
+
+#
+# Value of different image information block types
+#
+EFI_HII_IIBT_END = 0x00
+EFI_HII_IIBT_IMAGE_1BIT = 0x10
+EFI_HII_IIBT_IMAGE_1BIT_TRANS = 0x11
+EFI_HII_IIBT_IMAGE_4BIT = 0x12
+EFI_HII_IIBT_IMAGE_4BIT_TRANS = 0x13
+EFI_HII_IIBT_IMAGE_8BIT = 0x14
+EFI_HII_IIBT_IMAGE_8BIT_TRANS = 0x15
+EFI_HII_IIBT_IMAGE_24BIT = 0x16
+EFI_HII_IIBT_IMAGE_24BIT_TRANS = 0x17
+EFI_HII_IIBT_IMAGE_JPEG = 0x18
+EFI_HII_IIBT_IMAGE_PNG = 0x19
+EFI_HII_IIBT_DUPLICATE = 0x20
+EFI_HII_IIBT_SKIP2 = 0x21
+EFI_HII_IIBT_SKIP1 = 0x22
+EFI_HII_IIBT_EXT1 = 0x30
+EFI_HII_IIBT_EXT2 = 0x31
+EFI_HII_IIBT_EXT4 = 0x32
+
+#
+# Value of HII package type
+#
+EFI_HII_PACKAGE_TYPE_ALL = 0x00
+EFI_HII_PACKAGE_TYPE_GUID = 0x01
+EFI_HII_PACKAGE_FORMS = 0x02
+EFI_HII_PACKAGE_STRINGS = 0x04
+EFI_HII_PACKAGE_FONTS = 0x05
+EFI_HII_PACKAGE_IMAGES = 0x06
+EFI_HII_PACKAGE_SIMPLE_FONTS = 0x07
+EFI_HII_PACKAGE_DEVICE_PATH = 0x08
+EFI_HII_PACKAGE_KEYBOARD_LAYOUT = 0x09
+EFI_HII_PACKAGE_ANIMATIONS = 0x0A
+EFI_HII_PACKAGE_END = 0xDF
+EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN = 0xE0
+EFI_HII_PACKAGE_TYPE_SYSTEM_END = 0xFF
+
+class IdfFileClassObject(object):
+ def __init__(self, FileList = []):
+ self.FileList = FileList
+ self.ImageFilesDict = {}
+ self.ImageIDList = []
+ if len(self.FileList) > 0:
+ self.LoadIdfFiles(FileList)
+
+ def LoadIdfFiles(self, FileList):
+ if len(FileList) > 0:
+ for File in FileList:
+ self.LoadIdfFile(File)
+
+ def LoadIdfFile(self, File = None):
+ if File == None:
+ EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'No Image definition file is given.')
+ self.File = File
+
+ try:
+ IdfFile = open(LongFilePath(File.Path), mode='r')
+ FileIn = IdfFile.read()
+ IdfFile.close()
+ except:
+ EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=File)
+
+ ImageFileList = []
+ for Line in FileIn.splitlines():
+ Line = Line.strip()
+ Line = self.StripComments(Line)
+ if len(Line) == 0:
+ continue
+
+ if Line.find('#image ') >= 0:
+ LineDetails = Line.split()
+ LineNo = GetLineNo(FileIn, Line, False)
+ Len = len(LineDetails)
+ if Len != 3 and Len != 4:
+ EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'The format is not match #image IMAGE_ID [TRANSPARENT] ImageFileName in Line %s of File %s.' % (LineNo, File.Path))
+ if Len == 4 and LineDetails[2] != 'TRANSPARENT':
+ EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'Please use the keyword "TRANSPARENT" to describe the transparency setting in Line %s of File %s.' % (LineNo, File.Path))
+ MatchString = re.match('^[a-zA-Z][a-zA-Z0-9_]*$', LineDetails[1], re.UNICODE)
+ if MatchString == None or MatchString.end(0) != len(LineDetails[1]):
+ EdkLogger.error('Image Definition File Parser', FORMAT_INVALID, 'The Image token name %s defined in Idf file %s contains the invalid character.' % (LineDetails[1], File.Path))
+ if LineDetails[1] not in self.ImageIDList:
+ self.ImageIDList.append(LineDetails[1])
+ else:
+ EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'The %s in Line %s of File %s is already defined.' % (LineDetails[1], LineNo, File.Path))
+ if Len == 4:
+ ImageFile = ImageFileObject(LineDetails[Len-1], LineDetails[1], True)
+ else:
+ ImageFile = ImageFileObject(LineDetails[Len-1], LineDetails[1], False)
+ ImageFileList.append(ImageFile)
+ if ImageFileList:
+ self.ImageFilesDict[File] = ImageFileList
+
+ def StripComments(self, Line):
+ Comment = '//'
+ CommentPos = Line.find(Comment)
+ while CommentPos >= 0:
+ # if there are non matched quotes before the comment header
+ # then we are in the middle of a string
+ # but we need to ignore the escaped quotes and backslashes.
+ if ((Line.count('"', 0, CommentPos) - Line.count('\\"', 0, CommentPos)) & 1) == 1:
+ CommentPos = Line.find (Comment, CommentPos + 1)
+ else:
+ return Line[:CommentPos].strip()
+ return Line.strip()
+
+ def ImageDecoder(self, File):
+ pass
+
+def SearchImageID(ImageFileObject, FileList):
+ if FileList == []:
+ return ImageFileObject
+
+ for File in FileList:
+ if os.path.isfile(File):
+ Lines = open(File, 'r')
+ for Line in Lines:
+ ImageIdList = IMAGE_TOKEN.findall(Line)
+ for ID in ImageIdList:
+ EdkLogger.debug(EdkLogger.DEBUG_5, "Found ImageID identifier: " + ID)
+ ImageFileObject.SetImageIDReferenced(ID)
+
+class ImageFileObject(object):
+ def __init__(self, FileName, ImageID, TransParent = False):
+ self.FileName = FileName
+ self.File = ''
+ self.ImageID = ImageID
+ self.TransParent = TransParent
+ self.Referenced = False
+
+ def SetImageIDReferenced(self, ImageID):
+ if ImageID == self.ImageID:
+ self.Referenced = True
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index 6084004..ed33554 100644
--- a/BaseTools/Source/Python/AutoGen/StrGather.py
+++ b/BaseTools/Source/Python/AutoGen/StrGather.py
@@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger
from Common.BuildToolError import *
from UniClassObject import *
from StringIO import StringIO
-from struct import pack
+from struct import pack, unpack
from Common.LongFilePathSupport import OpenLongFilePath as open

##
@@ -131,7 +131,7 @@ def DecToHexList(Dec, Digit = 8):
def AscToHexList(Ascii):
List = []
for Item in Ascii:
- List.append('0x%2X' % ord(Item))
+ List.append('0x%02X' % ord(Item))

return List

diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index 1fe1ee4..60cbfbe 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -469,6 +469,7 @@ TAB_FRAMEWORK_IMAGE = "EFI-IMAGE-FILE"
TAB_C_CODE_FILE = "C-CODE-FILE"
TAB_C_HEADER_FILE = "C-HEADER-FILE"
TAB_UNICODE_FILE = "UNICODE-TEXT-FILE"
+TAB_IMAGE_FILE = "IMAGE-DEFINITION-FILE"
TAB_DEPENDENCY_EXPRESSION_FILE = "DEPENDENCY-EXPRESSION-FILE"
TAB_UNKNOWN_FILE = "UNKNOWN-TYPE-FILE"
TAB_DEFAULT_BINARY_FILE = "_BINARY_FILE_"
--
2.8.0.windows.1


[Patch 2/3] MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type Image

Liming Gao
 

HiiImage protocol implementation doesn't support EFI_HII_IIBT_IMAGE_PNG.

Cc: Eric Dong <eric.dong@...>
Cc: Dandan Bi <dandan.bi@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@...>
---
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 612d57a..07b3ba0 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -142,8 +142,9 @@ GetImageIdOrAddress (
break;

case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
CopyMem (&Length32, ImageBlock + sizeof (EFI_HII_IMAGE_BLOCK), sizeof (UINT32));
- ImageBlock += Length32;
+ ImageBlock += OFFSET_OF (EFI_HII_IIBT_JPEG_BLOCK, Data) + Length32;
ImageIdCurrent++;
break;

@@ -895,6 +896,7 @@ HiiGetImage (

switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1096,6 +1098,7 @@ HiiSetImage (
//
switch (BlockType) {
case EFI_HII_IIBT_IMAGE_JPEG:
+ case EFI_HII_IIBT_IMAGE_PNG:
//
// BUGBUG: need to be supported as soon as image tool is designed.
//
@@ -1497,6 +1500,7 @@ HiiDrawImageId (
//
// Get the specified Image.
//
+ ZeroMem (&Image, sizeof (Image));
Status = HiiGetImage (This, PackageList, ImageId, &Image);
if (EFI_ERROR (Status)) {
return Status;
--
2.8.0.windows.1


[Patch 1/3] MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR

Liming Gao
 

Cc: Eric Dong <eric.dong@...>
Cc: Dandan Bi <dandan.bi@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@...>
---
MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
index 4a7777c..ae5602f 100644
--- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
+++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers

-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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.
@@ -2126,4 +2126,10 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
///
#define STRING_TOKEN(t) t

+///
+/// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
+/// here for the easy access by C files and VFR source files.
+///
+#define IMAGE_TOKEN(t) t
+
#endif
--
2.8.0.windows.1


[Patch 0/3] BaseTools: Add build support to generate HII image package

Liming Gao
 

HII image package is defined in UEFI spec. But, EDK2 BaseTools doesn't support
its generation. To fill this gap, new image description file (*.idf) is
introduced to describe HII image resource. *.idf file syntax has been
proposed into edk2 community. This patch updates BaseTools base on it to
generate the binary HII image package.

Liming Gao (2):
MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C
and VFR
MdeModulePkg HiiDatabaseDxe: Ignore new EFI_HII_IIBT_IMAGE_PNG type
Image

Yonghong Zhu (1):
BaseTools: support generating image package from BMP/JPEG/PNG files

BaseTools/Conf/build_rule.template | 21 ++
BaseTools/Source/Python/AutoGen/AutoGen.py | 31 ++-
BaseTools/Source/Python/AutoGen/GenC.py | 245 ++++++++++++++++++++-
BaseTools/Source/Python/AutoGen/IdfClassObject.py | 159 +++++++++++++
BaseTools/Source/Python/AutoGen/StrGather.py | 4 +-
BaseTools/Source/Python/Common/DataType.py | 1 +
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 6 +-
.../Include/Uefi/UefiInternalFormRepresentation.h | 8 +-
8 files changed, 467 insertions(+), 8 deletions(-)
create mode 100644 BaseTools/Source/Python/AutoGen/IdfClassObject.py

--
2.8.0.windows.1


Re: [Patch] CryptoPkg: Clean up unreferenced symbol in Cryptest utility.

Ye, Ting <ting.ye@...>
 

Reviewed-by: Ye Ting <ting.ye@...>

-----Original Message-----
From: Long, Qin
Sent: Wednesday, September 21, 2016 10:22 AM
To: Ye, Ting <ting.ye@...>; edk2-devel@...
Subject: [Patch] CryptoPkg: Clean up unreferenced symbol in Cryptest utility.

Remove "TSCounterSignature" from TSVerify.c, which is not being used by anyone.

Cc: Ting Ye <ting.ye@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@...>
---
CryptoPkg/Application/Cryptest/TSVerify.c | 137 ------------------------------
1 file changed, 137 deletions(-)

diff --git a/CryptoPkg/Application/Cryptest/TSVerify.c b/CryptoPkg/Application/Cryptest/TSVerify.c
index 7a8d107..6df95b4 100644
--- a/CryptoPkg/Application/Cryptest/TSVerify.c
+++ b/CryptoPkg/Application/Cryptest/TSVerify.c
@@ -219,143 +219,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithTS[] = {
};

//
-// The RFC3161 timestamping counterSignature retrieved from the above AuthenticodeWithTS.
-//
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TSCounterSignature[] = {
- 0x30, 0x82, 0x08, 0x1c, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0,
- 0x82, 0x08, 0x0d, 0x30, 0x82, 0x08, 0x09, 0x02, 0x01, 0x03, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x05,
- 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x30, 0x81, 0xf6, 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86,
- 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04, 0xa0, 0x81, 0xe6, 0x04, 0x81, 0xe3, 0x30, 0x81, 0xe0,
- 0x02, 0x01, 0x01, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xb2, 0x31, 0x02, 0x01, 0x01, 0x30,
- 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14, 0xcd, 0x06,
- 0xf0, 0xbd, 0x8b, 0xcd, 0x5c, 0x2e, 0x5a, 0x7c, 0x42, 0x56, 0x2c, 0x20, 0x4a, 0x15, 0xcb, 0x1d,
- 0x8b, 0x0e, 0x02, 0x15, 0x00, 0xb6, 0xff, 0x47, 0x05, 0xb6, 0x2d, 0x15, 0xac, 0x3f, 0x5d, 0xd9,
- 0xcf, 0x9d, 0x54, 0x35, 0x56, 0x7c, 0xc1, 0x6e, 0x8b, 0x18, 0x0f, 0x32, 0x30, 0x31, 0x34, 0x30,
- 0x37, 0x32, 0x38, 0x30, 0x38, 0x35, 0x30, 0x30, 0x33, 0x5a, 0xa0, 0x81, 0x83, 0xa4, 0x81, 0x80,
- 0x30, 0x7e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42, 0x31,
- 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x12, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30, 0x0e,
- 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x53, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x64, 0x31, 0x1a,
- 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x11, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20,
- 0x43, 0x41, 0x20, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03,
- 0x55, 0x04, 0x03, 0x13, 0x1b, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x54, 0x69, 0x6d, 0x65,
- 0x20, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72,
- 0xa0, 0x82, 0x04, 0x97, 0x30, 0x82, 0x04, 0x93, 0x30, 0x82, 0x03, 0x7b, 0xa0, 0x03, 0x02, 0x01,
- 0x02, 0x02, 0x10, 0x47, 0x8a, 0x8e, 0xfb, 0x59, 0xe1, 0xd8, 0x3f, 0x0c, 0xe1, 0x42, 0xd2, 0xa2,
- 0x87, 0x07, 0xbe, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
- 0x05, 0x00, 0x30, 0x81, 0x95, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
- 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x02, 0x55, 0x54, 0x31,
- 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0e, 0x53, 0x61, 0x6c, 0x74, 0x20, 0x4c,
- 0x61, 0x6b, 0x65, 0x20, 0x43, 0x69, 0x74, 0x79, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04,
- 0x0a, 0x13, 0x15, 0x54, 0x68, 0x65, 0x20, 0x55, 0x53, 0x45, 0x52, 0x54, 0x52, 0x55, 0x53, 0x54,
- 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04,
- 0x0b, 0x13, 0x18, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x75, 0x73,
- 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x31, 0x1d, 0x30, 0x1b, 0x06,
- 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69,
- 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x30,
- 0x30, 0x35, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x31, 0x35, 0x30,
- 0x35, 0x31, 0x30, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x7e, 0x31, 0x0b, 0x30, 0x09,
- 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55,
- 0x04, 0x08, 0x13, 0x12, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x63,
- 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
- 0x07, 0x53, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x64, 0x31, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04,
- 0x0a, 0x13, 0x11, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x43, 0x41, 0x20, 0x4c, 0x69, 0x6d,
- 0x69, 0x74, 0x65, 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1b, 0x43,
- 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6d, 0x70,
- 0x69, 0x6e, 0x67, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x30, 0x82, 0x01,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 0x0f, 0x01, 0x01, 0xff,
- 0x04, 0x04, 0x03, 0x02, 0x06, 0xc0, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
- 0x04, 0x02, 0x30, 0x00, 0x30, 0x16, 0x06, 0x03, 0x55, 0x1d, 0x25, 0x01, 0x01, 0xff, 0x04, 0x0c,
- 0x30, 0x0a, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x08, 0x30, 0x42, 0x06, 0x03,
- 0x55, 0x1d, 0x1f, 0x04, 0x3b, 0x30, 0x39, 0x30, 0x37, 0xa0, 0x35, 0xa0, 0x33, 0x86, 0x31, 0x68,
- 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72,
- 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52,
- 0x46, 0x69, 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x63, 0x72, 0x6c,
- 0x30, 0x35, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x29, 0x30, 0x27,
- 0x30, 0x25, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x19, 0x68, 0x74,
- 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72,
- 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
- 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0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ac, 0xb3,
- 0x4a, 0x76, 0x73, 0x06, 0xc4, 0x86, 0x11, 0x3a, 0xb3, 0x5f, 0x43, 0x04, 0x52, 0x6f, 0xea, 0xb3,
- 0xd0, 0x74, 0x36, 0x4c, 0xca, 0xf1, 0x1b, 0x79, 0x84, 0x37, 0x70, 0x63, 0xad, 0x74, 0xb9, 0xaa,
- 0x0e, 0xf3, 0x98, 0xb0, 0x86, 0x08, 0xeb, 0xdb, 0xe0, 0x1f, 0x8c, 0x10, 0xf2, 0x39, 0x64, 0x9b,
- 0xae, 0x4f, 0x0a, 0x2c, 0x92, 0x8a, 0x4f, 0x18, 0xb5, 0x91, 0xe5, 0x8d, 0x1a, 0x93, 0x5f, 0x1f,
- 0xae, 0xf1, 0xa6, 0xf0, 0x2e, 0x97, 0xd0, 0xd2, 0xf6, 0x2b, 0x3c, 0x31, 0x82, 0x02, 0x61, 0x30,
- 0x82, 0x02, 0x5d, 0x02, 0x01, 0x01, 0x30, 0x81, 0xaa, 0x30, 0x81, 0x95, 0x31, 0x0b, 0x30, 0x09,
- 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
- 0x04, 0x08, 0x13, 0x02, 0x55, 0x54, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
- 0x0e, 0x53, 0x61, 0x6c, 0x74, 0x20, 0x4c, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x69, 0x74, 0x79, 0x31,
- 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x15, 0x54, 0x68, 0x65, 0x20, 0x55, 0x53,
- 0x45, 0x52, 0x54, 0x52, 0x55, 0x53, 0x54, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x31,
- 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x18, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63,
- 0x6f, 0x6d, 0x31, 0x1d, 0x30, 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x55, 0x54, 0x4e,
- 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69, 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x02, 0x10, 0x47, 0x8a, 0x8e, 0xfb, 0x59, 0xe1, 0xd8, 0x3f, 0x0c, 0xe1, 0x42, 0xd2, 0xa2,
- 0x87, 0x07, 0xbe, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0xa0, 0x81,
- 0x8c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x03, 0x31, 0x0d,
- 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04, 0x30, 0x1c, 0x06,
- 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x05, 0x31, 0x0f, 0x17, 0x0d, 0x31, 0x34,
- 0x30, 0x37, 0x32, 0x38, 0x30, 0x38, 0x35, 0x30, 0x30, 0x33, 0x5a, 0x30, 0x23, 0x06, 0x09, 0x2a,
- 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x04, 0x31, 0x16, 0x04, 0x14, 0x7a, 0xad, 0x35, 0xdc,
- 0x5b, 0xd6, 0x00, 0xd7, 0x44, 0xac, 0x80, 0x8f, 0x4f, 0xb6, 0xb4, 0x03, 0x62, 0x34, 0x53, 0xdc,
- 0x30, 0x2b, 0x06, 0x0b, 0x2a, 0x86, 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cb, 0x45, 0x0d, 0x94, 0x43,
- 0x67, 0x7a, 0x49, 0x1c, 0xb1, 0x89, 0x9d, 0x6e, 0xfa, 0x87, 0xd2, 0x4d, 0x6e, 0x74, 0x90, 0xf5,
- 0x80, 0x8c, 0x92, 0xda, 0xd9, 0xa1, 0x48, 0x20, 0x31, 0x02, 0x79, 0xde, 0xe3, 0xbd, 0x09, 0x04,
- 0xa8, 0xd4, 0x99, 0xd7, 0x3b, 0xea, 0xf8, 0xdf, 0xb3, 0xb9, 0xd7, 0xa3, 0x36, 0xa1, 0xdb, 0xd3,
- 0xec, 0x65, 0x8c, 0xb8, 0x8f, 0xfb, 0xd6, 0xef, 0x9c, 0x32, 0x3e, 0xab, 0x20, 0x74, 0xb9, 0x65,
- 0x4c, 0xc6, 0x15, 0x2f, 0x31, 0x2a, 0x34, 0x3e, 0x84, 0x09, 0xb4, 0x75, 0xbc, 0xbe, 0xaf, 0xb3,
- 0x9e, 0x85, 0xf1, 0xbb, 0x99, 0x1a, 0x07, 0xbd, 0x20, 0xa6, 0xed, 0xcf, 0xd1, 0xa6, 0x9a, 0x22,
- 0xb2, 0x6d, 0x75, 0xf4, 0x23, 0x58, 0x13, 0x78, 0x73, 0x1a, 0xb2, 0x84, 0xde, 0xad, 0xe8, 0x6d,
- 0xe6, 0xe7, 0x5c, 0xb6, 0xe6, 0x5b, 0x10, 0x37, 0x1f, 0xe3, 0x6e, 0xbd, 0x83, 0xd7, 0x51, 0xb1,
- 0x00, 0x00, 0x00, 0x00, 0x0a
- };
-
-//
// The Comodo Time Stamping Signer Certificate Used for the verification of TimeStamp signature.
//
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TSTrustedCert[] = {
--
2.10.0.windows.1


[Patch] CryptoPkg: Clean up unreferenced symbol in Cryptest utility.

Qin Long <qin.long@...>
 

Remove "TSCounterSignature" from TSVerify.c, which is not being
used by anyone.

Cc: Ting Ye <ting.ye@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@...>
---
CryptoPkg/Application/Cryptest/TSVerify.c | 137 ------------------------------
1 file changed, 137 deletions(-)

diff --git a/CryptoPkg/Application/Cryptest/TSVerify.c b/CryptoPkg/Application/Cryptest/TSVerify.c
index 7a8d107..6df95b4 100644
--- a/CryptoPkg/Application/Cryptest/TSVerify.c
+++ b/CryptoPkg/Application/Cryptest/TSVerify.c
@@ -219,143 +219,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT8 AuthenticodeWithTS[] = {
};

//
-// The RFC3161 timestamping counterSignature retrieved from the above AuthenticodeWithTS.
-//
-GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TSCounterSignature[] = {
- 0x30, 0x82, 0x08, 0x1c, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0,
- 0x82, 0x08, 0x0d, 0x30, 0x82, 0x08, 0x09, 0x02, 0x01, 0x03, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x05,
- 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x30, 0x81, 0xf6, 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86,
- 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04, 0xa0, 0x81, 0xe6, 0x04, 0x81, 0xe3, 0x30, 0x81, 0xe0,
- 0x02, 0x01, 0x01, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xb2, 0x31, 0x02, 0x01, 0x01, 0x30,
- 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14, 0xcd, 0x06,
- 0xf0, 0xbd, 0x8b, 0xcd, 0x5c, 0x2e, 0x5a, 0x7c, 0x42, 0x56, 0x2c, 0x20, 0x4a, 0x15, 0xcb, 0x1d,
- 0x8b, 0x0e, 0x02, 0x15, 0x00, 0xb6, 0xff, 0x47, 0x05, 0xb6, 0x2d, 0x15, 0xac, 0x3f, 0x5d, 0xd9,
- 0xcf, 0x9d, 0x54, 0x35, 0x56, 0x7c, 0xc1, 0x6e, 0x8b, 0x18, 0x0f, 0x32, 0x30, 0x31, 0x34, 0x30,
- 0x37, 0x32, 0x38, 0x30, 0x38, 0x35, 0x30, 0x30, 0x33, 0x5a, 0xa0, 0x81, 0x83, 0xa4, 0x81, 0x80,
- 0x30, 0x7e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42, 0x31,
- 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x12, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30, 0x0e,
- 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x53, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x64, 0x31, 0x1a,
- 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x11, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20,
- 0x43, 0x41, 0x20, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03,
- 0x55, 0x04, 0x03, 0x13, 0x1b, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x54, 0x69, 0x6d, 0x65,
- 0x20, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72,
- 0xa0, 0x82, 0x04, 0x97, 0x30, 0x82, 0x04, 0x93, 0x30, 0x82, 0x03, 0x7b, 0xa0, 0x03, 0x02, 0x01,
- 0x02, 0x02, 0x10, 0x47, 0x8a, 0x8e, 0xfb, 0x59, 0xe1, 0xd8, 0x3f, 0x0c, 0xe1, 0x42, 0xd2, 0xa2,
- 0x87, 0x07, 0xbe, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
- 0x05, 0x00, 0x30, 0x81, 0x95, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
- 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x02, 0x55, 0x54, 0x31,
- 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0e, 0x53, 0x61, 0x6c, 0x74, 0x20, 0x4c,
- 0x61, 0x6b, 0x65, 0x20, 0x43, 0x69, 0x74, 0x79, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04,
- 0x0a, 0x13, 0x15, 0x54, 0x68, 0x65, 0x20, 0x55, 0x53, 0x45, 0x52, 0x54, 0x52, 0x55, 0x53, 0x54,
- 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04,
- 0x0b, 0x13, 0x18, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x75, 0x73,
- 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x31, 0x1d, 0x30, 0x1b, 0x06,
- 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69,
- 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x30,
- 0x30, 0x35, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x31, 0x35, 0x30,
- 0x35, 0x31, 0x30, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x7e, 0x31, 0x0b, 0x30, 0x09,
- 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55,
- 0x04, 0x08, 0x13, 0x12, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x63,
- 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
- 0x07, 0x53, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x64, 0x31, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04,
- 0x0a, 0x13, 0x11, 0x43, 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x43, 0x41, 0x20, 0x4c, 0x69, 0x6d,
- 0x69, 0x74, 0x65, 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1b, 0x43,
- 0x4f, 0x4d, 0x4f, 0x44, 0x4f, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6d, 0x70,
- 0x69, 0x6e, 0x67, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d,
- 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01,
- 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xbc, 0x35, 0xa0, 0x36, 0x70,
- 0x22, 0x81, 0x11, 0xc3, 0xb2, 0x83, 0xb9, 0xd3, 0x28, 0xc6, 0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
- 0x46, 0x40, 0x40, 0x21, 0xbb, 0x83, 0x96, 0xfd, 0x86, 0x1f, 0x7a, 0xc8, 0x0d, 0x10, 0x8e, 0xa2,
- 0xf8, 0x19, 0x07, 0x58, 0x7f, 0x9f, 0xbd, 0x37, 0x02, 0x60, 0xf2, 0xa4, 0xe9, 0x9d, 0x44, 0x3f,
- 0x30, 0x05, 0xe4, 0xa7, 0x70, 0x99, 0x51, 0x9a, 0xe8, 0x17, 0xf1, 0x55, 0xca, 0xb2, 0x61, 0x89,
- 0x65, 0x46, 0xa7, 0x6a, 0xf2, 0x58, 0x46, 0x7e, 0xaa, 0xa0, 0x07, 0x02, 0x03, 0x01, 0x00, 0x01,
- 0xa3, 0x81, 0xf4, 0x30, 0x81, 0xf1, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30,
- 0x16, 0x80, 0x14, 0xda, 0xed, 0x64, 0x74, 0x14, 0x9c, 0x14, 0x3c, 0xab, 0xdd, 0x99, 0xa9, 0xbd,
- 0x5b, 0x28, 0x4d, 0x8b, 0x3c, 0xc9, 0xd8, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16,
- 0x04, 0x14, 0x2e, 0x2d, 0xb0, 0x0a, 0x44, 0x4a, 0xd3, 0x87, 0xc0, 0x02, 0x07, 0xce, 0x97, 0x7d,
- 0x50, 0x62, 0x20, 0xfd, 0x0f, 0x83, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff,
- 0x04, 0x04, 0x03, 0x02, 0x06, 0xc0, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
- 0x04, 0x02, 0x30, 0x00, 0x30, 0x16, 0x06, 0x03, 0x55, 0x1d, 0x25, 0x01, 0x01, 0xff, 0x04, 0x0c,
- 0x30, 0x0a, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x08, 0x30, 0x42, 0x06, 0x03,
- 0x55, 0x1d, 0x1f, 0x04, 0x3b, 0x30, 0x39, 0x30, 0x37, 0xa0, 0x35, 0xa0, 0x33, 0x86, 0x31, 0x68,
- 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72,
- 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52,
- 0x46, 0x69, 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x63, 0x72, 0x6c,
- 0x30, 0x35, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x29, 0x30, 0x27,
- 0x30, 0x25, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x19, 0x68, 0x74,
- 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72,
- 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
- 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0xc8, 0xfb, 0x63, 0xf8, 0x0b,
- 0x75, 0x75, 0x2c, 0x3a, 0xf1, 0xf2, 0x13, 0xa7, 0x2d, 0xb6, 0xa3, 0x1a, 0x9c, 0xad, 0x01, 0x07,
- 0xd3, 0x34, 0x8e, 0x77, 0xe0, 0xc2, 0x6e, 0xae, 0x02, 0x5d, 0x48, 0x4f, 0xa4, 0xd2, 0x21, 0xb6,
- 0x36, 0xfd, 0x2a, 0x35, 0x43, 0x7c,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x8c, 0x10, 0xf2, 0x39, 0x64, 0x9b,
- 0xae, 0x4f, 0x0a, 0x2c, 0x92, 0x8a, 0x4f, 0x18, 0xb5, 0x91, 0xe5, 0x8d, 0x1a, 0x93, 0x5f, 0x1f,
- 0xae, 0xf1, 0xa6, 0xf0, 0x2e, 0x97, 0xd0, 0xd2, 0xf6, 0x2b, 0x3c, 0x31, 0x82, 0x02, 0x61, 0x30,
- 0x82, 0x02, 0x5d, 0x02, 0x01, 0x01, 0x30, 0x81, 0xaa, 0x30, 0x81, 0x95, 0x31, 0x0b, 0x30, 0x09,
- 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
- 0x04, 0x08, 0x13, 0x02, 0x55, 0x54, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
- 0x0e, 0x53, 0x61, 0x6c, 0x74, 0x20, 0x4c, 0x61, 0x6b, 0x65, 0x20, 0x43, 0x69, 0x74, 0x79, 0x31,
- 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x15, 0x54, 0x68, 0x65, 0x20, 0x55, 0x53,
- 0x45, 0x52, 0x54, 0x52, 0x55, 0x53, 0x54, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x31,
- 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x18, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63,
- 0x6f, 0x6d, 0x31, 0x1d, 0x30, 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x55, 0x54, 0x4e,
- 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69, 0x72, 0x73, 0x74, 0x2d, 0x4f, 0x62, 0x6a, 0x65, 0x63,
- 0x74, 0x02, 0x10, 0x47, 0x8a, 0x8e, 0xfb, 0x59, 0xe1, 0xd8, 0x3f, 0x0c, 0xe1, 0x42, 0xd2, 0xa2,
- 0x87, 0x07, 0xbe, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0xa0, 0x81,
- 0x8c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x03, 0x31, 0x0d,
- 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04, 0x30, 0x1c, 0x06,
- 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x05, 0x31, 0x0f, 0x17, 0x0d, 0x31, 0x34,
- 0x30, 0x37, 0x32, 0x38, 0x30, 0x38, 0x35, 0x30, 0x30, 0x33, 0x5a, 0x30, 0x23, 0x06, 0x09, 0x2a,
- 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x04, 0x31, 0x16, 0x04, 0x14, 0x7a, 0xad, 0x35, 0xdc,
- 0x5b, 0xd6, 0x00, 0xd7, 0x44, 0xac, 0x80, 0x8f, 0x4f, 0xb6, 0xb4, 0x03, 0x62, 0x34, 0x53, 0xdc,
- 0x30, 0x2b, 0x06, 0x0b, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x02, 0x0c, 0x31,
- 0x1c, 0x30, 0x1a, 0x30, 0x18, 0x30, 0x16, 0x04, 0x14, 0x3d, 0xbb, 0x6d, 0xb5, 0x08, 0x5c, 0x6d,
- 0xd5, 0xa1, 0xca, 0x7f, 0x9c, 0xf8, 0x4e, 0xcb, 0x1a, 0x39, 0x10, 0xca, 0xc8, 0x30, 0x0d, 0x06,
- 0x09, 0x2a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0xdf, 0xb3, 0xb9, 0xd7, 0xa3, 0x36, 0xa1, 0xdb, 0xd3,
- 0xec, 0x65, 0x8c, 0xb8, 0x8f, 0xfb, 0xd6, 0xef, 0x9c, 0x32, 0x3e, 0xab, 0x20, 0x74, 0xb9, 0x65,
- 0x4c, 0xc6, 0x15, 0x2f, 0x31, 0x2a, 0x34, 0x3e, 0x84, 0x09, 0xb4, 0x75, 0xbc, 0xbe, 0xaf, 0xb3,
- 0x9e, 0x85, 0xf1, 0xbb, 0x99, 0x1a, 0x07, 0xbd, 0x20, 0xa6, 0xed, 0xcf, 0xd1, 0xa6, 0x9a, 0x22,
- 0xb2, 0x6d, 0x75, 0xf4, 0x23, 0x58, 0x13, 0x78, 0x73, 0x1a, 0xb2, 0x84, 0xde, 0xad, 0xe8, 0x6d,
- 0xe6, 0xe7, 0x5c, 0xb6, 0xe6, 0x5b, 0x10, 0x37, 0x1f, 0xe3, 0x6e, 0xbd, 0x83, 0xd7, 0x51, 0xb1,
- 0x00, 0x00, 0x00, 0x00, 0x0a
- };
-
-//
// The Comodo Time Stamping Signer Certificate Used for the verification of TimeStamp signature.
//
GLOBAL_REMOVE_IF_UNREFERENCED UINT8 TSTrustedCert[] = {
--
2.10.0.windows.1


Re: [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing ASSERT()s

Liming Gao
 

Ard:
Thanks! Other two patches are good. Reviewed-by: Liming Gao <liming.gao@...>

Thanks
Liming
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Ard Biesheuvel
Sent: Tuesday, September 20, 2016 8:41 PM
To: Wu, Hao A <hao.a.wu@...>
Cc: edk2-devel@...; Gao, Liming <liming.gao@...>; vishalo@...; leif.lindholm@...
Subject: Re: [edk2] [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing ASSERT()s

On 20 September 2016 at 13:16, Ard Biesheuvel wrote:
On 20 September 2016 at 13:02, Wu, Hao A wrote:
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Ard
Biesheuvel
Sent: Tuesday, September 20, 2016 4:38 PM
To: Wu, Hao A
Cc: leif.lindholm@...<mailto:leif.lindholm@...>; edk2-devel@...<mailto:edk2-devel@...>;
vishalo@...<mailto:vishalo@...>; Gao, Liming
Subject: Re: [edk2] [PATCH v2 2/3] MdePkg/BaseMemoryLib*: add missing
ASSERT()s

On 20 September 2016 at 03:00, Wu, Hao A wrote:
Hi Ard,

The NULL checks for the input Guids in APIs CopyGuid(), CompareGuid() and
IsZeroGuid() are implicitly done within calls to BaseLib APIs
ReadUnaligned64() and WriteUnaligned64().

So I think the functions behavior matches with their comments. What do you
think?
I disagree. ReadUnaligned64 and WriteUnaligned64 could theoretically
be implemented by a version of BaseLib that does not contain such
ASSERT()s
The comments for APIs ReadUnaligned64 and WriteUnaligned64 in BaseLib
mention the ASSERT() for inputting a NULL buffer.

I think instances of BaseLib should follow the comments.
I agree with this. But that does not justify omitting them here.
... but actually, it makes no sense to argue about this, since the
user visible outcome is the same. I will withdraw the patch.

Thanks,
Ard.
_______________________________________________
edk2-devel mailing list
edk2-devel@...<mailto:edk2-devel@...>
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [PATCH] [MdePkg ] New Debug Message Levels

Liming Gao
 

Reviewed-by: Liming Gao <liming.gao@...>

-----Original Message-----
From: Felix Poludov [mailto:Felixp@...]
Sent: Wednesday, September 21, 2016 3:29 AM
To: Kinney, Michael D <michael.d.kinney@...>; Gao, Liming
<liming.gao@...>; edk2-devel@...
Subject: RE: [PATCH] [MdePkg ] New Debug Message Levels

Mike and Liming,

Thanks for reviewing the patch.
I implemented all the requested modifications:
- EFI_D_ definitions are removed
- DEBUG_CSM is removed
- Validation expression in MdePkg.dec is updated
- MdePkg.uni is updated

Here is the updated patch
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@...>
==
diff --git a/MdePkg/Include/Library/DebugLib.h
b/MdePkg/Include/Library/DebugLib.h
index 803872c..34ea29f 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that
may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CPU 0x00002000 // Processor Driver
+#define DEBUG_CHIPSET 0x00008000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00040000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..1747bb1 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,11 +1883,16 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
@@ -1951,18 +1956,23 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
- # @Expression 0x80000002 |
(gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0
+ # @Expression 0x80000002 |
(gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F800000) == 0

gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000|UINT32|
0x00000006

## The mask is used to control ReportStatusCodeLib behavior.<BR><BR>
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index a110e45..4f3999d 100644
--- a/MdePkg/MdePkg.uni
+++ b/MdePkg/MdePkg.uni
@@ -196,11 +196,16 @@
"BIT6 - Information
message.<BR>\n"
"BIT7 - Dispatcher
message.<BR>\n"
"BIT8 - Variable message.<BR>\n"
+ "BIT9 - USB Driver
message.<BR>\n"
"BIT10 - Boot Manager
message.<BR>\n"
+ "BIT11 - PCI Bus Driver
message.<BR>\n"
"BIT12 - BlockIo Driver
message.<BR>\n"
+ "BIT13 - Processor Driver
message.<BR>\n"
"BIT14 - Network Driver
message.<BR>\n"
+ "BIT15 - Chipset/SoC Driver
message.<BR>\n"
"BIT16 - UNDI Driver
message.<BR>\n"
"BIT17 - LoadFile message.<BR>\n"
+ "BIT18 - Platform/Board Driver
message.<BR>\n"
"BIT19 - Event message.<BR>\n"
"BIT20 - Global Coherency Database
changes message.<BR>\n"
"BIT21 - Memory range cacheability
changes message.<BR>\n"
@@ -219,11 +224,16 @@
"BIT6 - Information
message.<BR>\n"
"BIT7 - Dispatcher
message.<BR>\n"
"BIT8 - Variable message.<BR>\n"
+ "BIT9 - USB Driver
message.<BR>\n"
"BIT10 - Boot Manager
message.<BR>\n"
+ "BIT11 - PCI Bus Driver
message.<BR>\n"
"BIT12 - BlockIo Driver
message.<BR>\n"
+ "BIT13 - Processor Driver
message.<BR>\n"
"BIT14 - Network Driver
message.<BR>\n"
+ "BIT15 - Chipset/SoC Driver
message.<BR>\n"
"BIT16 - UNDI Driver
message.<BR>\n"
"BIT17 - LoadFile message.<BR>\n"
+ "BIT18 - Platform/Board Driver
message.<BR>\n"
"BIT19 - Event message.<BR>\n"
"BIT20 - Global Coherency Database
changes message.<BR>\n"
"BIT21 - Memory range cacheability
changes message.<BR>\n"
==

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of
Kinney, Michael D
Sent: Tuesday, September 20, 2016 12:26 PM
To: Gao, Liming; Felix Poludov; edk2-devel@...; Kinney, Michael D
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix,

We should only add the DEBUG_ defines for new bit values. We would like
to retire the use of EFI_D_ defines and encourage use of DEBUG_ defines.
The reason is that DEBUG() macros apply to all execution phases and module
types.

Also, what is the use case for DEBUG_CSM. I would image this would only be
used for CSM wrapper modules, and the exiting define values should be
sufficient for that specific use case. That bit mask is starting to get full.

Thanks,

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of
Gao, Liming
Sent: Tuesday, September 20, 2016 7:01 AM
To: Felix Poludov <Felixp@...>; edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix:
I have two comments.
1) Update @Expression 0x80000002 |
(gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
& 0x7F84AA00) == 0. 0x7F84AA00 should be updated to match the valid
debug error level
bit mask.
2) PCD help message in MdePkg.uni is also required to be updated.

Thanks
Liming
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of
Felix Poludov
Sent: Thursday, September 15, 2016 3:27 AM
To: edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Resending with the patch (the patch was missing in the original e-mail).

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of
Felix Poludov
Sent: Wednesday, September 14, 2016 12:05 PM
To: edk2-devel@...
Subject: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Dear MdePkg maintainer,

DebugLib.h defines debug message levels. Some values such as
DEBUG_ERROR and
DEBUG_INFO define messages category, whereas other values such as
DEBUG_BLKIO and
DEBUG_VARIABLE define message domain.
This patch adds definitions for several additional message domains.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@...<mailto:felixp@...>>

Thanks
Felix

==
diff --git a/MdePkg/Include/Library/DebugLib.h
b/MdePkg/Include/Library/DebugLib.h
index 803872c..47549b7 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability
changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that
may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CSM 0x00002000 // Compatibility Support Module
+#define DEBUG_CPU 0x00008000 // Processor Driver
+#define DEBUG_CHIPSET 0x00040000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00800000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
@@ -75,6 +81,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define EFI_D_LOADFILE DEBUG_LOADFILE
#define EFI_D_EVENT DEBUG_EVENT
#define EFI_D_VERBOSE DEBUG_VERBOSE
+#define EFI_D_USB DEBUG_USB
+#define EFI_D_PCI DEBUG_PCI
+#define EFI_D_CSM DEBUG_CSM
+#define EFI_D_CPU DEBUG_CPU
+#define EFI_D_CHIPSET DEBUG_CHIPSET
+#define EFI_D_PLATFORM DEBUG_PLATFORM
#define EFI_D_ERROR DEBUG_ERROR

/**
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..eaae076 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,15 +1883,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UI
NT32|0x30001016
@@ -1951,15 +1957,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
# @Expression 0x80000002 |
(gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel &
0x7F84AA00) == 0

Please consider the environment before printing this email.

The information contained in this message may be confidential and
proprietary to
American Megatrends, Inc. This communication is intended to be read only
by the
individual or entity to whom it is addressed or by their designee. If the
reader of
this message is not the intended recipient, you are on notice that any
distribution
of this message, in any form, is strictly prohibited. Please promptly notify
the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or
destroy
all copies of the transmission.
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel

Please consider the environment before printing this email.

The information contained in this message may be confidential and
proprietary to American Megatrends, Inc. This communication is intended to
be read only by the individual or entity to whom it is addressed or by their
designee. If the reader of this message is not the intended recipient, you are
on notice that any distribution of this message, in any form, is strictly
prohibited. Please promptly notify the sender by reply e-mail or by
telephone at 770-246-8600, and then delete or destroy all copies of the
transmission.


[USB IF]Mismatch between EDK2 and a USB vendor

Yosuke Katayama1 <ykatayama1@...>
 

Hello,

This is relating to my previous post "[edk2] Is this a right place to discuss EDK2's USB IF implementation?"
We found a mismatch between EDK2 source code and our USB vendor's implementation. Could you give us your opinions?


bInterfaceNumber , 9.6.5 Interface from Universal Serial Bus 3.1 Specification Rev 1.0 says;
--
Number of this interface. Zero-based value identifying the index in the array of concurrent interfaces supported by this configuration.
--


Regarding this.
EDK2 source code (UsbDesc.c) says:
--
//
// If a configuration has several interfaces, these interfaces are
// numbered from zero to n...
//
--


The USB vendor says:
--
* Numbering is not necessarily consecutive * Each interface can be independently turned on/off * Solution allows any combination of interfaces without re-defining the interface number * One general lookup table can tell you what interface is assigned to what interface number.
* For these reasons, the interface definition is like this on our products.
* The interface definition has remained the same from the previous products, and other products before that.
* Current interface numbering is supported by all Microsoft OS * Other PC OEM customers have never raised this issue
--

As a result, the vendor's USB IF looks like below.

===>Configuration Descriptor<===
...
bNumInterfaces: 0x02 <<<<
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xA0 -> Bus Powered
-> Remote Wakeup
...
===>Interface Descriptor<===
...
bInterfaceNumber: 0x0C <<<< Interface Number starts from 0x0C instead of 0. [comment from Yosuke]
bAlternateSetting: 0x00
bNumEndpoints: 0x01
...

===>Interface Descriptor<===
...
bInterfaceNumber: 0x0D <<<<
bAlternateSetting: 0x00
bNumEndpoints: 0x00
...


and it hits the following ON_ERROR in UsbDesc.c.
--
} else if (Setting->Desc.InterfaceNumber >= NumIf) {
DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: mal-formated interface descriptor\n"));

UsbFreeInterfaceDesc (Setting);
goto ON_ERROR;
}
--


What do you think the vendor's implementation?
Also, have you ever had such a USB IF mismatch between EDK2 and USB vendors before? If so, how are you handling such cases in general?

Kind regards,
Yosuke


Re: [Patch 0/3] Fix Quark platform ASSERT() on GCC tip

Michael D Kinney
 

Jeff,

These changes look good to me and I have verified Galileo boots with these changes.

Series Reviewed-by: Michael Kinney <michael.d.kinney@...>

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Jeff Fan
Sent: Tuesday, September 20, 2016 1:29 AM
To: edk2-devel@...
Subject: [edk2] [Patch 0/3] Fix Quark platform ASSERT() on GCC tip

Flat32.S should set ESP to top of eSRAM range that aligns with Flat32.asm.
It cause ASSERT() reported at https://tianocore.acgmultimedia.com/show_bug.cgi?id=123

Jeff Fan (3):
QuarkPlatformPkg/PlatformSecLib: Fix stack pointer issue in Flat32.S
UefiCpuPkg/SecCore: Fix comment typo
UefiCpuPkg/SecCore: SecPlatformInformation(2) are optional PPIs

QuarkPlatformPkg/Library/PlatformSecLib/Ia32/Flat32.S | 4 ++--
UefiCpuPkg/SecCore/SecBist.c | 14 ++++++++------
2 files changed, 10 insertions(+), 8 deletions(-)

--
2.9.3.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel


Re: Help Required legacy booting from an EFI

Rod Smith <rodsmith@...>
 

On 09/20/2016 02:38 PM, Saqib Khan wrote:

Booting using BBS is my option,i was already looking for this and I have
attempted to modify EFIBootManagerMenuApp to work with legacy boot used ().

I have system with CSM support so essentially i will be doing all my work
on physical system not on virtual machine.

The detail you provided about BBS device path and then adding it to boot
menu is abstract for me .if you can detail this procedure a bit it will be
helpful, if required I can share the code snippet with you
You may want to look at the relevant bits of code in my rEFInd boot manager:

https://sourceforge.net/projects/refind/

In particular, look at the functions in EfiLib/legacy.c and
refind/legacy.c. One big caveat is that rEFInd includes TWO code paths
for launching BIOS-mode boot loaders -- one it inherits from its
predecessor project, rEFIt, and works only on Macs; and the other was
contributed by John Bressler and works only on UEFI-based PCs. Since I
wrote neither, I can't offer a lot of insight into how either one works.
(The Mac side, in particular, is pretty mysterious to me.) There may be
a better way to do it than what rEFInd does, but at least rEFInd's code
does work. Thus, if you need a concrete example, the rEFInd code might
be helpful.

--
Rod Smith
rodsmith@...
http://www.rodsbooks.com


Re: [PATCH] [MdePkg ] New Debug Message Levels

Felix Polyudov
 

Mike and Liming,

Thanks for reviewing the patch.
I implemented all the requested modifications:
- EFI_D_ definitions are removed
- DEBUG_CSM is removed
- Validation expression in MdePkg.dec is updated
- MdePkg.uni is updated

Here is the updated patch
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@...>
==
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 803872c..34ea29f 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CPU 0x00002000 // Processor Driver
+#define DEBUG_CHIPSET 0x00008000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00040000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..1747bb1 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,11 +1883,16 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
@@ -1951,18 +1956,23 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
- # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0
+ # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F800000) == 0
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000|UINT32|0x00000006

## The mask is used to control ReportStatusCodeLib behavior.<BR><BR>
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index a110e45..4f3999d 100644
--- a/MdePkg/MdePkg.uni
+++ b/MdePkg/MdePkg.uni
@@ -196,11 +196,16 @@
"BIT6 - Information message.<BR>\n"
"BIT7 - Dispatcher message.<BR>\n"
"BIT8 - Variable message.<BR>\n"
+ "BIT9 - USB Driver message.<BR>\n"
"BIT10 - Boot Manager message.<BR>\n"
+ "BIT11 - PCI Bus Driver message.<BR>\n"
"BIT12 - BlockIo Driver message.<BR>\n"
+ "BIT13 - Processor Driver message.<BR>\n"
"BIT14 - Network Driver message.<BR>\n"
+ "BIT15 - Chipset/SoC Driver message.<BR>\n"
"BIT16 - UNDI Driver message.<BR>\n"
"BIT17 - LoadFile message.<BR>\n"
+ "BIT18 - Platform/Board Driver message.<BR>\n"
"BIT19 - Event message.<BR>\n"
"BIT20 - Global Coherency Database changes message.<BR>\n"
"BIT21 - Memory range cacheability changes message.<BR>\n"
@@ -219,11 +224,16 @@
"BIT6 - Information message.<BR>\n"
"BIT7 - Dispatcher message.<BR>\n"
"BIT8 - Variable message.<BR>\n"
+ "BIT9 - USB Driver message.<BR>\n"
"BIT10 - Boot Manager message.<BR>\n"
+ "BIT11 - PCI Bus Driver message.<BR>\n"
"BIT12 - BlockIo Driver message.<BR>\n"
+ "BIT13 - Processor Driver message.<BR>\n"
"BIT14 - Network Driver message.<BR>\n"
+ "BIT15 - Chipset/SoC Driver message.<BR>\n"
"BIT16 - UNDI Driver message.<BR>\n"
"BIT17 - LoadFile message.<BR>\n"
+ "BIT18 - Platform/Board Driver message.<BR>\n"
"BIT19 - Event message.<BR>\n"
"BIT20 - Global Coherency Database changes message.<BR>\n"
"BIT21 - Memory range cacheability changes message.<BR>\n"
==

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Kinney, Michael D
Sent: Tuesday, September 20, 2016 12:26 PM
To: Gao, Liming; Felix Poludov; edk2-devel@...; Kinney, Michael D
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix,

We should only add the DEBUG_ defines for new bit values. We would like to retire the use of EFI_D_ defines and encourage use of DEBUG_ defines. The reason is that DEBUG() macros apply to all execution phases and module types.

Also, what is the use case for DEBUG_CSM. I would image this would only be used for CSM wrapper modules, and the exiting define values should be sufficient for that specific use case. That bit mask is starting to get full.

Thanks,

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Gao, Liming
Sent: Tuesday, September 20, 2016 7:01 AM
To: Felix Poludov <Felixp@...>; edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix:
I have two comments.
1) Update @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
& 0x7F84AA00) == 0. 0x7F84AA00 should be updated to match the valid debug error level
bit mask.
2) PCD help message in MdePkg.uni is also required to be updated.

Thanks
Liming
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Felix Poludov
Sent: Thursday, September 15, 2016 3:27 AM
To: edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Resending with the patch (the patch was missing in the original e-mail).

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Felix Poludov
Sent: Wednesday, September 14, 2016 12:05 PM
To: edk2-devel@...
Subject: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Dear MdePkg maintainer,

DebugLib.h defines debug message levels. Some values such as DEBUG_ERROR and
DEBUG_INFO define messages category, whereas other values such as DEBUG_BLKIO and
DEBUG_VARIABLE define message domain.
This patch adds definitions for several additional message domains.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@...<mailto:felixp@...>>

Thanks
Felix

==
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 803872c..47549b7 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CSM 0x00002000 // Compatibility Support Module
+#define DEBUG_CPU 0x00008000 // Processor Driver
+#define DEBUG_CHIPSET 0x00040000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00800000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
@@ -75,6 +81,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define EFI_D_LOADFILE DEBUG_LOADFILE
#define EFI_D_EVENT DEBUG_EVENT
#define EFI_D_VERBOSE DEBUG_VERBOSE
+#define EFI_D_USB DEBUG_USB
+#define EFI_D_PCI DEBUG_PCI
+#define EFI_D_CSM DEBUG_CSM
+#define EFI_D_CPU DEBUG_CPU
+#define EFI_D_CHIPSET DEBUG_CHIPSET
+#define EFI_D_PLATFORM DEBUG_PLATFORM
#define EFI_D_ERROR DEBUG_ERROR

/**
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..eaae076 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,15 +1883,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016
@@ -1951,15 +1957,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel &
0x7F84AA00) == 0

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to
American Megatrends, Inc. This communication is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the reader of
this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. Please promptly notify the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy
all copies of the transmission.
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends, Inc. This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


Re: Help Required legacy booting from an EFI

Laszlo Ersek
 

CC'ing Ray

On 09/20/16 20:38, Saqib Khan wrote:


On Mon, Sep 19, 2016 at 10:49 PM, Laszlo Ersek <lersek@...
<mailto:lersek@...>> wrote:

On 09/19/16 17:00, Saqib Khan wrote:
> Hello all, this is my first post to this list and i am very new to edk2
> development.
>
> I started by building BootManagerMenuApp with following functionality
>
> - Boot from BootManagerManueApp
> - Run an Helloworld EFI
> - Run windows 7 EFI to boot windows 7
>
> Now i want to develop an EFI which will first run Helloworld EFI then it
> will boot windows 7 which is installed on legacy boot (NOT EFI).
>
> I have looked through http://bluestop.org/edk2/docs/trunk/
<http://bluestop.org/edk2/docs/trunk/> documentation
> thoroughly but i am not able to get any thing for legacy boot from an EFI.
>
>
> It will be helpful if someone guide me the flow for legacy booting from an
> EFI .

You can add your EFI application to a SysPrep#### load option, then the
legacy-booted Windows OS to a normal Boot#### load option.


Sysprep is not my option . :-(




See "3.1.7 Required System Preparation Applications" in the UEFI-2.6
spec, about the ordering between SysPrep#### and Boot####.

Furthermore, legacy boot can be triggered by using a BBS (BIOS Boot
Specification) device path in the Boot#### option. This devpath node
type is documented in UEFI-2.6 "Table 98. Device Node Table", and in the
Compatibility Support Module Specification, rev 0.98, "3.2.1 Legacy BIOS
Protocol", near BBS_BBS_DEVICE_PATH.



Booting using BBS is my option,i was already looking for this and I have
attempted to modify EFIBootManagerMenuApp to work with legacy boot used ().

I have system with CSM support so essentially i will be doing all my
work on physical system not on virtual machine.

The detail you provided about BBS device path and then adding it to boot
menu is abstract for me .if you can detail this procedure a bit it will
be helpful, if required I can share the code snippet with you
It's been some time since I last tried CSM / legacy boot, but I think
when your platform BDS (= PlatformBootManagerLib instance) calls the
UefiBootManagerLib function called EfiBootManagerRefreshAllBootOption(),
that should generate (among other boot options) BBS boot options for all
suitable legacy OSes.

It seems that for this, you should link

IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf

into all the drivers and modules in your firmware -- via NULL library
resolution -- that consume UefiBootManagerLib. In OVMF's case at least,
the set of affected drivers is:

MdeModulePkg/Application/UiApp/UiApp.inf
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
NetworkPkg/HttpBootDxe/HttpBootDxe.inf

The important ones from these modules are likely the first two, UiApp
and BdsDxe.

(Theoretically any consumer of UefiBootManagerLib could call
EfiBootManagerRefreshAllBootOption(), and at that point you might want
LegacyBootManagerLib to have registered its "RefreshLegacyBootOption"
callback at construction time.)

In addition,

IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf

should likely be linked, via NULL resolution, into

MdeModulePkg/Application/UiApp/UiApp.inf

minimally.

(Example: please see the CSM_ENABLE parts under
"MdeModulePkg/Universal/BdsDxe/BdsDxe.inf" and
"MdeModulePkg/Application/UiApp/UiApp.inf" in OvmfPkg/OvmfPkg*dsc.
You'll find the above NULL library resolutions there.)


Apart from this I am facing another issue, i created a boot-able USB
with EFI 2.0 shell in it . I have gabby motherboard(gigabyte h97- hd3) ,
I am not able to launch EFI shell with any configuration it directly
boots windows no matter what I do, I attempted all USB port, and all
configuration like "boot from UEFI only" disabling secure boot. when I
plug US
B in another system which support UEFI but not CSM it works fine after
adding shell entry from USB. what might I be missing here?can you guide
in this case?
No clue. My take would have been "disable secure boot because your shell
binary is not signed", but you already tried that. Platform BDS is
platform-dependent, as its name says. Get another development board?

Laszlo


Re: Help Required legacy booting from an EFI

Saqib Khan <saqib.khan2011@...>
 

On Mon, Sep 19, 2016 at 10:49 PM, Laszlo Ersek <lersek@...> wrote:

On 09/19/16 17:00, Saqib Khan wrote:
Hello all, this is my first post to this list and i am very new to edk2
development.

I started by building BootManagerMenuApp with following functionality

- Boot from BootManagerManueApp
- Run an Helloworld EFI
- Run windows 7 EFI to boot windows 7

Now i want to develop an EFI which will first run Helloworld EFI then it
will boot windows 7 which is installed on legacy boot (NOT EFI).

I have looked through http://bluestop.org/edk2/docs/trunk/ documentation
thoroughly but i am not able to get any thing for legacy boot from an
EFI.


It will be helpful if someone guide me the flow for legacy booting from
an
EFI .
You can add your EFI application to a SysPrep#### load option, then the
legacy-booted Windows OS to a normal Boot#### load option.
Sysprep is not my option . :-(


See "3.1.7 Required System Preparation Applications" in the UEFI-2.6
spec, about the ordering between SysPrep#### and Boot####.

Furthermore, legacy boot can be triggered by using a BBS (BIOS Boot
Specification) device path in the Boot#### option. This devpath node
type is documented in UEFI-2.6 "Table 98. Device Node Table", and in the
Compatibility Support Module Specification, rev 0.98, "3.2.1 Legacy BIOS
Protocol", near BBS_BBS_DEVICE_PATH.

Booting using BBS is my option,i was already looking for this and I have
attempted to modify EFIBootManagerMenuApp to work with legacy boot used ().

I have system with CSM support so essentially i will be doing all my work
on physical system not on virtual machine.

The detail you provided about BBS device path and then adding it to boot
menu is abstract for me .if you can detail this procedure a bit it will be
helpful, if required I can share the code snippet with you

Apart from this I am facing another issue, i created a boot-able USB with
EFI 2.0 shell in it . I have gabby motherboard(gigabyte h97- hd3) , I am
not able to launch EFI shell with any configuration it directly boots
windows no matter what I do, I attempted all USB port, and all
configuration like "boot from UEFI only" disabling secure boot. when I plug
US
B in another system which support UEFI but not CSM it works fine after
adding shell entry from USB. what might I be missing here?can you guide in
this case?



For legacy boot to work, your platform firmware must of course include a
Compatibility Support Module.

As an example platform, SeaBIOS can be built as a CSM, then embedded
into OVMF with the -D CSM_ENABLE build switch. (Grep
OvmfPkg/OvmfPkg*.{dsc,fdf} for CSM_ENABLE.)

Specifically for Windows 7 though, you don't need a full CSM in order to
boot it under UEFI. You can boot it in UEFI mode just fine, as long as
you have some VBE services installed in the C segment. Windows 7 will
run those functions in its internal real-mode emulator, for setting up
the display:

https://en.wikipedia.org/wiki/Virtual_DOS_machine

That is, the VBE functions will not be executed natively, they will be
interpreted / emulated.

We utilized this fact for booting UEFI Windows 7 without a CSM on QEMU,
on the virtual QXL video card; see OvmfPkg/QemuVideoDxe/VbeShim.*.

Thanks
Laszlo


--
Regards
Saqib


Re: [PATCH] [MdePkg ] New Debug Message Levels

Michael D Kinney
 

Felix,

We should only add the DEBUG_ defines for new bit values. We would like to retire the use of EFI_D_ defines and encourage use of DEBUG_ defines. The reason is that DEBUG() macros apply to all execution phases and module types.

Also, what is the use case for DEBUG_CSM. I would image this would only be used for CSM wrapper modules, and the exiting define values should be sufficient for that specific use case. That bit mask is starting to get full.

Thanks,

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Gao, Liming
Sent: Tuesday, September 20, 2016 7:01 AM
To: Felix Poludov <Felixp@...>; edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix:
I have two comments.
1) Update @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
& 0x7F84AA00) == 0. 0x7F84AA00 should be updated to match the valid debug error level
bit mask.
2) PCD help message in MdePkg.uni is also required to be updated.

Thanks
Liming
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Felix Poludov
Sent: Thursday, September 15, 2016 3:27 AM
To: edk2-devel@...
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Resending with the patch (the patch was missing in the original e-mail).

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Felix Poludov
Sent: Wednesday, September 14, 2016 12:05 PM
To: edk2-devel@...
Subject: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Dear MdePkg maintainer,

DebugLib.h defines debug message levels. Some values such as DEBUG_ERROR and
DEBUG_INFO define messages category, whereas other values such as DEBUG_BLKIO and
DEBUG_VARIABLE define message domain.
This patch adds definitions for several additional message domains.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@...<mailto:felixp@...>>

Thanks
Felix

==
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 803872c..47549b7 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CSM 0x00002000 // Compatibility Support Module
+#define DEBUG_CPU 0x00008000 // Processor Driver
+#define DEBUG_CHIPSET 0x00040000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00800000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
@@ -75,6 +81,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS
OR IMPLIED.
#define EFI_D_LOADFILE DEBUG_LOADFILE
#define EFI_D_EVENT DEBUG_EVENT
#define EFI_D_VERBOSE DEBUG_VERBOSE
+#define EFI_D_USB DEBUG_USB
+#define EFI_D_PCI DEBUG_PCI
+#define EFI_D_CSM DEBUG_CSM
+#define EFI_D_CPU DEBUG_CPU
+#define EFI_D_CHIPSET DEBUG_CHIPSET
+#define EFI_D_PLATFORM DEBUG_PLATFORM
#define EFI_D_ERROR DEBUG_ERROR

/**
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..eaae076 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,15 +1883,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016
@@ -1951,15 +1957,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel &
0x7F84AA00) == 0

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to
American Megatrends, Inc. This communication is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the reader of
this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. Please promptly notify the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy
all copies of the transmission.
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel


Re: Issues with HTTPS Boot

Palmer, Thomas <thomas.palmer@...>
 

Naveen,

I cannot see attachments on this email.

What TLS versions and ciphers does your web server support? Depending on when you built the UEFI image, your server may need to have TLS v1.0 enabled and support one of the non-SHA256 ciphers listed at the top of TlsLib.c.


Regards,

Thomas Palmer

"I have only made this letter longer because I have not had the time to make it shorter" - Blaise Pascal

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of Santhapur Naveen
Sent: Tuesday, September 20, 2016 6:42 AM
To: edk2-devel@...
Subject: [edk2] Issues with HTTPS Boot

Hello All,

Since the HTTPS Boot came into picture, I was very enthusiastic to try it. I configured the server as-is explained in the white paper https://github.com/tianocore/tianocore.github.io/wiki/EDK%20II%20White%20papers

But when I try to go for an HTTPS boot, it stops after the TCP handshake. Attached is the Wireshark log. Please help me out and also let me know if any other details are needed.

Thank you,
Naveen
_______________________________________________
edk2-devel mailing list
edk2-devel@...
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [PATCH 0/6] Move/Extract generic duplicated code to Tpm2CommandLib

Yao, Jiewen
 

Reviewed-by: Jiewen.yao@...

-----Original Message-----
From: Zeng, Star
Sent: Tuesday, September 20, 2016 6:51 PM
To: edk2-devel@...
Cc: Zeng, Star <star.zeng@...>; Zhang, Chao B
<chao.b.zhang@...>; Yao, Jiewen <jiewen.yao@...>
Subject: [PATCH 0/6] Move/Extract generic duplicated code to
Tpm2CommandLib

These patches move/extract Tpm2PcrAllocateBanks(),
Tpm2GetCapabilitySupportedAndActivePcrs(), CopyDigestListToBuffer(),
GetDigestListSize() and GetDigestFromDigestList() to Tpm2CommandLib.

Cc: Chao B Zhang <chao.b.zhang@...>
Cc: Jiewen Yao <jiewen.yao@...>

Jiewen Yao (5):
SecuriryPkg/TPM2: Move Tpm2PcrAllocateBanks() to Tpm2CommandLib
SecuriryPkg/TPM2: Move GetDigestFromDigestList() to Tpm2CommandLib
SecuriryPkg/TPM2: Move GetDigestListSize() to Tpm2CommandLib
SecuriryPkg/TPM2: Move CopyDigestListToBuffer() to Tpm2CommandLib
SecuriryPkg/TPM2: Extract GetSupportedAndActivePcrs to
Tpm2CommandLib

Star Zeng (1):
SecuriryPkg/TPM2: Update function header of GetDigestFromDigestList()

SecurityPkg/Include/Library/Tpm2CommandLib.h | 85 ++++++++-
.../DxeTcg2PhysicalPresenceLib.c | 150
+---------------
.../Library/Tpm2CommandLib/Tpm2Capability.c | 92
++++++++++
SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c | 147
+++++++++++++++-
SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c | 134
+++++++++++++++
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 191
+--------------------
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 145
+---------------
SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c | 37 +---
SecurityPkg/Tcg/TrEEPei/TrEEPei.c | 37 +---
9 files changed, 470 insertions(+), 548 deletions(-)

--
2.7.0.windows.1