#!/usr/bin/env python
#
-# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
#
#
-# Copyright (c) 2006 - 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2006 - 2007, 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
Intel is a trademark or registered trademark of Intel Corporation or its\r
subsidiaries in the United States and other countries.\r
* Other names and brands may be claimed as the property of others.\r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007, Intel Corporation. All rights reserved.\r
\r
-------------------------------------------------------------------------------\r
Quick Start\r
<Description>\r
This Database tracks all packages and archives installed in this workspace.\r
</Description>\r
- <Copyright>Copyright (c) 2007 - 2009, Intel Corporation All rights reserved.</Copyright>\r
+ <Copyright>Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.</Copyright>\r
<License>\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Filename: DistributionPackage.xsd
-Copyright (c) 2008, Intel Corp. All rights reserved.
+Copyright (c) 2008, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which may be found at
code provided in the distribution file. Alternatively, this may
point to a filename that contains the License. The file (included
in the content zip file) will be stored in the same location as
- the distribution package’s .pkg file. </xs:documentation>
+ the distribution package's .pkg file. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" maxOccurs="1" name="Abstract"
<!--\r
Filename: FarManifest.xsd\r
\r
-Copyright (c) 2007, Intel Corp.\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: FrameworkDataAttributes.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: FrameworkDataElements.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: FrameworkDataTypes.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: FrameworkHeaders.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
\r
- All rights reserved. This program and the accompanying materials\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: NamingConvention.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: SurfaceArea.xsd\r
\r
- Copyright (c) 2007, Intel Corp.\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<?xml version="1.0" encoding="UTF-8"?>\r
<!--\r
-Copyright (c) 2007, Intel Corp.\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which may be found at http://opensource.org/licenses/bsd-license.php\r
\r
<!--\r
Filename: WorkspaceContent.xsd\r
\r
- Copyright (c) 2008, Intel Corp. All rights reserved.\r
+ Copyright (c) 2008, Intel Corporation. All rights reserved.\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which may be found at \r
#\r
-# Copyright (c) 2007-2010, Intel Corporation\r
-# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
-# Copyright (c) 2006-2007, Intel Corporation\r
+# Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
-# Copyright (c) 2006-2010, Intel Corporation\r
-# Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.\r
+# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
DEFINE GCC44_IA32_PREFIX = /usr/bin/\r
#DEFINE GCC44_IA32_PREFIX = ENV(HOME)/programs/gcc/4.4/ia32/\r
+DEFINE GCC44_X64_PREFIX = /usr/bin/\r
+#DEFINE GCC44_X64_PREFIX = ENV(HOME)/programs/gcc/4.4/x64/\r
\r
DEFINE UNIX_IASL_BIN = /usr/bin/iasl\r
#DEFINE UNIX_IASL_BIN = $(HOME)/programs/iasl\r
\r
DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings\r
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32\r
-DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -Wno-address\r
+DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address\r
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections\r
DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable\r
DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map\r
+DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64 --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script\r
DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)\r
\r
####################################################################################\r
*_GCC44_IA32_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386\r
*_GCC44_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)\r
\r
+##################\r
+# GCC44 X64 definitions\r
+##################\r
+*_GCC44_X64_CC_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_SLINK_PATH = DEF(GCC44_X64_PREFIX)ar\r
+*_GCC44_X64_DLINK_PATH = DEF(GCC44_X64_PREFIX)ld\r
+*_GCC44_X64_ASLDLINK_PATH = DEF(GCC44_X64_PREFIX)ld\r
+*_GCC44_X64_ASM_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_PP_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_VFRPP_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_ASLCC_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_ASLPP_PATH = DEF(GCC44_X64_PREFIX)gcc\r
+*_GCC44_X64_RC_PATH = DEF(GCC44_X64_PREFIX)objcopy\r
+\r
+*_GCC44_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64\r
+*_GCC44_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_ASLDLINK_FLAGS) -m elf_x86_64\r
+*_GCC44_X64_ASM_FLAGS = DEF(GCC44_ASM_FLAGS) -m64 --64 -melf_x86_64\r
+*_GCC44_X64_CC_FLAGS = DEF(GCC44_X64_CC_FLAGS) -Os\r
+*_GCC44_X64_DLINK_FLAGS = DEF(GCC44_X64_DLINK_FLAGS)\r
+*_GCC44_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)\r
+\r
\r
####################################################################################\r
#\r
## @file\r
# Windows makefile for Base Tools project build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for Base Tools project build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
--- /dev/null
+/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */\r
+SECTIONS\r
+{\r
+ /* . = 0 + SIZEOF_HEADERS; */\r
+ . = 0x280;\r
+ .text ALIGN(0x20) :\r
+ {\r
+ *(.text .stub .text.* .gnu.linkonce.t.*)\r
+ . = ALIGN(0x20);\r
+ } =0x90909090\r
+ .data ALIGN(0x20) :\r
+ {\r
+ *(\r
+ .rodata .rodata.* .gnu.linkonce.r.*\r
+ .data .data.* .gnu.linkonce.d.*\r
+ )\r
+ . = ALIGN(0x20);\r
+ }\r
+ .bss ALIGN(0x20) :\r
+ {\r
+ *(.bss .bss.*)\r
+ . = ALIGN(0x20);\r
+ }\r
+ .got ALIGN(0x20) :\r
+ {\r
+ *(.got .got.*)\r
+ . = ALIGN(0x20);\r
+ }\r
+ .rela ALIGN(0x20) :\r
+ {\r
+ *(.rela .rela.*)\r
+ }\r
+ /DISCARD/ : {\r
+ *(.note.GNU-stack) *(.gnu_debuglink)\r
+ *(.interp)\r
+ *(.dynsym)\r
+ *(.dynstr)\r
+ *(.dynamic)\r
+ *(.hash)\r
+ *(.comment)\r
+ }\r
+}\r
+\r
## @file\r
# Windows makefile for 'BootSectImage' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'BootSectImage' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
Patch the BPB information in boot sector image file.\r
Patch the MBR code in MBR image file.\r
\r
-Copyright 2006 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
Fat file system structure and definition.\r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
MBR Partition Entry and Table structure defintions.\r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
Functions to get info and load PE/COFF image.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
IN UINT64 Adjust\r
);\r
\r
+RETURN_STATUS\r
+PeCoffLoaderRelocateArmImage (\r
+ IN UINT16 **Reloc,\r
+ IN OUT CHAR8 *Fixup,\r
+ IN OUT CHAR8 **FixupData,\r
+ IN UINT64 Adjust\r
+ );\r
+\r
STATIC\r
RETURN_STATUS\r
PeCoffLoaderGetPeHeader (\r
default:\r
switch (MachineType) {\r
case EFI_IMAGE_MACHINE_IA32:\r
- case EFI_IMAGE_MACHINE_ARMT:\r
Status = PeCoffLoaderRelocateIa32Image (Reloc, Fixup, &FixupData, Adjust);\r
break;\r
+ case EFI_IMAGE_MACHINE_ARMT:\r
+ Status = PeCoffLoaderRelocateArmImage (&Reloc, Fixup, &FixupData, Adjust);\r
+ break;\r
case EFI_IMAGE_MACHINE_X64:\r
Status = PeCoffLoaderRelocateX64Image (Reloc, Fixup, &FixupData, Adjust);\r
break;\r
/** @file\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'Common' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'Common' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
Function prototypes and defines on Memory Only PE COFF loader\r
\r
- Copyright (c) 2006, Intel Corporation \r
- All rights reserved. This program and the accompanying materials \r
+ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
)\r
;\r
\r
+//\r
+// These functions are used by the ARM PE/COFF relocation code and by\r
+// the ELF to PE/COFF converter so that is why they are public\r
+//\r
+\r
+/**\r
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and \r
+ return the immediate data encoded in the instruction\r
+\r
+ @param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
+\r
+ @return Immediate address encoded in the instruction\r
+\r
+**/\r
+UINT16\r
+ThumbMovtImmediateAddress (\r
+ IN UINT16 *Instruction\r
+ );\r
+\r
+/**\r
+ Update an ARM MOVT or MOVW immediate instruction immediate data.\r
+\r
+ @param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
+ @param Address New addres to patch into the instruction\r
+\r
+**/\r
+VOID\r
+ThumbMovtImmediatePatch (\r
+ IN OUT UINT16 *Instruction,\r
+ IN UINT16 Address\r
+ );\r
+\r
+\r
+\r
#endif\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
return RETURN_SUCCESS;\r
}\r
\r
+/**\r
+ Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and \r
+ return the immediate data encoded in the instruction\r
+\r
+ @param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
+\r
+ @return Immediate address encoded in the instruction\r
+\r
+**/\r
+UINT16\r
+ThumbMovtImmediateAddress (\r
+ IN UINT16 *Instruction\r
+ )\r
+{\r
+ UINT32 Movt;\r
+ UINT16 Address;\r
+\r
+ // Thumb2 is two 16-bit instructions working together. Not a single 32-bit instruction\r
+ // Example MOVT R0, #0 is 0x0000f2c0 or 0xf2c0 0x0000\r
+ Movt = (*Instruction << 16) | (*(Instruction + 1)); \r
+\r
+ // imm16 = imm4:i:imm3:imm8\r
+ // imm4 -> Bit19:Bit16\r
+ // i -> Bit26\r
+ // imm3 -> Bit14:Bit12\r
+ // imm8 -> Bit7:Bit0\r
+ Address = (UINT16)(Movt & 0x000000ff); // imm8\r
+ Address |= (UINT16)((Movt >> 4) & 0x0000f700); // imm4 imm3\r
+ Address |= (((Movt & BIT26) != 0) ? BIT11 : 0); // i\r
+ return Address;\r
+}\r
+\r
+\r
+/**\r
+ Update an ARM MOVT or MOVW immediate instruction immediate data.\r
+\r
+ @param Instruction Pointer to ARM MOVT or MOVW immediate instruction\r
+ @param Address New addres to patch into the instruction\r
+**/\r
+VOID\r
+ThumbMovtImmediatePatch (\r
+ IN OUT UINT16 *Instruction,\r
+ IN UINT16 Address\r
+ )\r
+{\r
+ UINT16 Patch;\r
+\r
+ // First 16-bit chunk of instruciton\r
+ Patch = ((Address >> 12) & 0x000f); // imm4 \r
+ Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i\r
+ *Instruction = (*Instruction & ~0x040f) | Patch;\r
+\r
+ // Second 16-bit chunk of instruction\r
+ Patch = Address & 0x000000ff; // imm8\r
+ Patch |= ((Address << 4) & 0x00007000); // imm3\r
+ Instruction++;\r
+ *Instruction = (*Instruction & ~0x70ff) | Patch;\r
+}\r
+\r
+/**\r
+ Performs an ARM-based specific relocation fixup and is a no-op on other\r
+ instruction sets.\r
+\r
+ @param Reloc Pointer to the relocation record.\r
+ @param Fixup Pointer to the address to fix up.\r
+ @param FixupData Pointer to a buffer to log the fixups.\r
+ @param Adjust The offset to adjust the fixup.\r
+\r
+ @return Status code.\r
+\r
+**/\r
+RETURN_STATUS\r
+PeCoffLoaderRelocateArmImage (\r
+ IN UINT16 **Reloc,\r
+ IN OUT CHAR8 *Fixup,\r
+ IN OUT CHAR8 **FixupData,\r
+ IN UINT64 Adjust\r
+ )\r
+{\r
+ UINT16 *Fixup16;\r
+ UINT16 FixupVal;\r
+ UINT16 *Addend;\r
+\r
+ Fixup16 = (UINT16 *) Fixup;\r
+\r
+ switch ((**Reloc) >> 12) {\r
+ case EFI_IMAGE_REL_BASED_ARM_THUMB_MOVW:\r
+ FixupVal = ThumbMovtImmediateAddress (Fixup16) + (UINT16)Adjust;\r
+ ThumbMovtImmediatePatch (Fixup16, FixupVal);\r
+\r
+ if (*FixupData != NULL) {\r
+ *FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT16));\r
+ *(UINT16 *)*FixupData = *Fixup16;\r
+ *FixupData = *FixupData + sizeof (UINT16);\r
+ }\r
+ break;\r
+\r
+ case EFI_IMAGE_REL_BASED_ARM_THUMB_MOVT:\r
+ // For MOVT you need to know the lower 16-bits do do the math\r
+ // So this relocation entry is really two entries.\r
+ *Reloc = *Reloc + 1;\r
+ Addend = *Reloc; \r
+ FixupVal = (UINT16)(((ThumbMovtImmediateAddress (Fixup16) << 16) + Adjust + *Addend) >> 16);\r
+ ThumbMovtImmediatePatch (Fixup16, FixupVal);\r
+\r
+ if (*FixupData != NULL) {\r
+ *FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT16));\r
+ *(UINT16 *)*FixupData = *Fixup16;\r
+ *FixupData = *FixupData + sizeof (UINT16);\r
+ }\r
+ break;\r
+ \r
+ default:\r
+ return RETURN_UNSUPPORTED;\r
+ }\r
+\r
+ return RETURN_SUCCESS;\r
+}\r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/**\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright 2006 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'EfiLdrImage' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'EfiLdrImage' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 1999-2010 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
/** @file\r
\r
-Copyright (c) 1999-2008 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
## @file\r
# Windows makefile for 'EfiRom' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'EfiRom' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# GNU Make makefile for C tools build.
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
\r
Fat file system structure and definition.\r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright 2006 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
Get Drv Num offset from Fat file system.\r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenBootSector' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'GenCrc32' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2007 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenCrc32' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'GenFfs' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/**\r
\r
-Copyright (c) 2004-2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenFfs' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'GenFv' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2007 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
}\r
\r
if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE && pImageContext->Machine == EFI_IMAGE_MACHINE_IA64) {\r
+ //\r
+ // Process IPF PLABEL to get the real address after the image has been rebased. \r
+ // PLABEL structure is got by AddressOfEntryPoint offset to ImageBuffer stored in pImageContext->Handle.\r
+ //\r
fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (*(UINT64 *)((UINTN) pImageContext->Handle + (UINTN) AddressOfEntryPoint)));\r
} else {\r
fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));\r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenFv' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include "WinNtInclude.h"
+
+#ifndef __GNUC__
+#include <windows.h>
+#include <io.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <ctype.h>
+
+#include <Common/UefiBaseTypes.h>
+#include <IndustryStandard/PeImage.h>
+
+#include "PeCoffLib.h"
+#include "EfiUtilityMsgs.h"
+
+#include "GenFw.h"
+#include "ElfConvert.h"
+#include "Elf32Convert.h"
+
+STATIC
+VOID
+ScanSections32 (
+ VOID
+ );
+
+STATIC
+BOOLEAN
+WriteSections32 (
+ SECTION_FILTER_TYPES FilterType
+ );
+
+STATIC
+VOID
+WriteRelocations32 (
+ VOID
+ );
+
+STATIC
+VOID
+WriteDebug32 (
+ VOID
+ );
+
+STATIC
+VOID
+SetImageSize32 (
+ VOID
+ );
+
+STATIC
+VOID
+CleanUp32 (
+ VOID
+ );
+
+//
+// Rename ELF32 strucutres to common names to help when porting to ELF64.
+//
+typedef Elf32_Shdr Elf_Shdr;
+typedef Elf32_Ehdr Elf_Ehdr;
+typedef Elf32_Rel Elf_Rel;
+typedef Elf32_Sym Elf_Sym;
+typedef Elf32_Phdr Elf_Phdr;
+typedef Elf32_Dyn Elf_Dyn;
+#define ELFCLASS ELFCLASS32
+#define ELF_R_TYPE(r) ELF32_R_TYPE(r)
+#define ELF_R_SYM(r) ELF32_R_SYM(r)
+
+//
+// Well known ELF structures.
+//
+STATIC Elf_Ehdr *mEhdr;
+STATIC Elf_Shdr *mShdrBase;
+STATIC Elf_Phdr *mPhdrBase;
+
+//
+// Coff information
+//
+STATIC const UINT32 mCoffAlignment = 0x20;
+
+//
+// PE section alignment.
+//
+STATIC const UINT16 mCoffNbrSections = 5;
+
+//
+// ELF sections to offset in Coff file.
+//
+STATIC UINT32 *mCoffSectionsOffset = NULL;
+
+//
+// Offsets in COFF file
+//
+STATIC UINT32 mNtHdrOffset;
+STATIC UINT32 mTextOffset;
+STATIC UINT32 mDataOffset;
+STATIC UINT32 mHiiRsrcOffset;
+STATIC UINT32 mRelocOffset;
+
+//
+// Initialization Function
+//
+BOOLEAN
+InitializeElf32 (
+ UINT8 *FileBuffer,
+ ELF_FUNCTION_TABLE *ElfFunctions
+ )
+{
+ //
+ // Initialize data pointer and structures.
+ //
+ mEhdr = (Elf_Ehdr*) FileBuffer;
+
+ //
+ // Check the ELF32 specific header information.
+ //
+ if (mEhdr->e_ident[EI_CLASS] != ELFCLASS32) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFCLASS32");
+ return FALSE;
+ }
+ if (mEhdr->e_ident[EI_DATA] != ELFDATA2LSB) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFDATA2LSB");
+ return FALSE;
+ }
+ if ((mEhdr->e_type != ET_EXEC) && (mEhdr->e_type != ET_DYN)) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_type not ET_EXEC or ET_DYN");
+ return FALSE;
+ }
+ if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM))) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_machine not EM_386 or EM_ARM");
+ return FALSE;
+ }
+ if (mEhdr->e_version != EV_CURRENT) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
+ return FALSE;
+ }
+
+ //
+ // Update section header pointers
+ //
+ mShdrBase = (Elf_Shdr *)((UINT8 *)mEhdr + mEhdr->e_shoff);
+ mPhdrBase = (Elf_Phdr *)((UINT8 *)mEhdr + mEhdr->e_phoff);
+
+ //
+ // Create COFF Section offset buffer and zero.
+ //
+ mCoffSectionsOffset = (UINT32 *)malloc(mEhdr->e_shnum * sizeof (UINT32));
+ memset(mCoffSectionsOffset, 0, mEhdr->e_shnum * sizeof(UINT32));
+
+ //
+ // Fill in function pointers.
+ //
+ ElfFunctions->ScanSections = ScanSections32;
+ ElfFunctions->WriteSections = WriteSections32;
+ ElfFunctions->WriteRelocations = WriteRelocations32;
+ ElfFunctions->WriteDebug = WriteDebug32;
+ ElfFunctions->SetImageSize = SetImageSize32;
+ ElfFunctions->CleanUp = CleanUp32;
+
+ return TRUE;
+}
+
+
+//
+// Header by Index functions
+//
+STATIC
+Elf_Shdr*
+GetShdrByIndex (
+ UINT32 Num
+ )
+{
+ if (Num >= mEhdr->e_shnum)
+ return NULL;
+ return (Elf_Shdr*)((UINT8*)mShdrBase + Num * mEhdr->e_shentsize);
+}
+
+STATIC
+Elf_Phdr*
+GetPhdrByIndex (
+ UINT32 num
+ )
+{
+ if (num >= mEhdr->e_phnum) {
+ return NULL;
+ }
+
+ return (Elf_Phdr *)((UINT8*)mPhdrBase + num * mEhdr->e_phentsize);
+}
+
+STATIC
+UINT32
+CoffAlign (
+ UINT32 Offset
+ )
+{
+ return (Offset + mCoffAlignment - 1) & ~(mCoffAlignment - 1);
+}
+
+//
+// filter functions
+//
+STATIC
+BOOLEAN
+IsTextShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ return (BOOLEAN) ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC);
+}
+
+STATIC
+BOOLEAN
+IsHiiRsrcShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ Elf_Shdr *Namedr = GetShdrByIndex(mEhdr->e_shstrndx);
+
+ return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, ELF_HII_SECTION_NAME) == 0);
+}
+
+STATIC
+BOOLEAN
+IsDataShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ if (IsHiiRsrcShdr(Shdr)) {
+ return FALSE;
+ }
+ return (BOOLEAN) (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);
+}
+
+//
+// Elf functions interface implementation
+//
+
+STATIC
+VOID
+ScanSections32 (
+ VOID
+ )
+{
+ UINT32 i;
+ EFI_IMAGE_DOS_HEADER *DosHdr;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ UINT32 CoffEntry;
+
+ CoffEntry = 0;
+ mCoffOffset = 0;
+
+ //
+ // Coff file start with a DOS header.
+ //
+ mCoffOffset = sizeof(EFI_IMAGE_DOS_HEADER) + 0x40;
+ mNtHdrOffset = mCoffOffset;
+ switch (mEhdr->e_machine) {
+ case EM_386:
+ case EM_ARM:
+ mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);
+ break;
+ default:
+ VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)mEhdr->e_machine);
+ mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);
+ break;
+ }
+
+ mTableOffset = mCoffOffset;
+ mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
+
+ //
+ // First text sections.
+ //
+ mCoffOffset = CoffAlign(mCoffOffset);
+ mTextOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsTextShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+
+ /* Relocate entry. */
+ if ((mEhdr->e_entry >= shdr->sh_addr) &&
+ (mEhdr->e_entry < shdr->sh_addr + shdr->sh_size)) {
+ CoffEntry = mCoffOffset + mEhdr->e_entry - shdr->sh_addr;
+ }
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += shdr->sh_size;
+ }
+ }
+
+ if (mEhdr->e_machine != EM_ARM) {
+ mCoffOffset = CoffAlign(mCoffOffset);
+ }
+
+ //
+ // Then data sections.
+ //
+ mDataOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsDataShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += shdr->sh_size;
+ }
+ }
+ mCoffOffset = CoffAlign(mCoffOffset);
+
+ //
+ // The HII resource sections.
+ //
+ mHiiRsrcOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsHiiRsrcShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+ if (shdr->sh_size != 0) {
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += shdr->sh_size;
+ mCoffOffset = CoffAlign(mCoffOffset);
+ SetHiiResourceHeader ((UINT8*) mEhdr + shdr->sh_offset, mHiiRsrcOffset);
+ }
+ break;
+ }
+ }
+
+ mRelocOffset = mCoffOffset;
+
+ //
+ // Allocate base Coff file. Will be expanded later for relocations.
+ //
+ mCoffFile = (UINT8 *)malloc(mCoffOffset);
+ memset(mCoffFile, 0, mCoffOffset);
+
+ //
+ // Fill headers.
+ //
+ DosHdr = (EFI_IMAGE_DOS_HEADER *)mCoffFile;
+ DosHdr->e_magic = EFI_IMAGE_DOS_SIGNATURE;
+ DosHdr->e_lfanew = mNtHdrOffset;
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION*)(mCoffFile + mNtHdrOffset);
+
+ NtHdr->Pe32.Signature = EFI_IMAGE_NT_SIGNATURE;
+
+ switch (mEhdr->e_machine) {
+ case EM_386:
+ NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IA32;
+ NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;
+ break;
+ case EM_ARM:
+ NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_ARMT;
+ NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;
+ break;
+ default:
+ VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)mEhdr->e_machine);
+ NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IA32;
+ NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;
+ }
+
+ NtHdr->Pe32.FileHeader.NumberOfSections = mCoffNbrSections;
+ NtHdr->Pe32.FileHeader.TimeDateStamp = (UINT32) time(NULL);
+ mImageTimeStamp = NtHdr->Pe32.FileHeader.TimeDateStamp;
+ NtHdr->Pe32.FileHeader.PointerToSymbolTable = 0;
+ NtHdr->Pe32.FileHeader.NumberOfSymbols = 0;
+ NtHdr->Pe32.FileHeader.SizeOfOptionalHeader = sizeof(NtHdr->Pe32.OptionalHeader);
+ NtHdr->Pe32.FileHeader.Characteristics = EFI_IMAGE_FILE_EXECUTABLE_IMAGE
+ | EFI_IMAGE_FILE_LINE_NUMS_STRIPPED
+ | EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED
+ | EFI_IMAGE_FILE_32BIT_MACHINE;
+
+ NtHdr->Pe32.OptionalHeader.SizeOfCode = mDataOffset - mTextOffset;
+ NtHdr->Pe32.OptionalHeader.SizeOfInitializedData = mRelocOffset - mDataOffset;
+ NtHdr->Pe32.OptionalHeader.SizeOfUninitializedData = 0;
+ NtHdr->Pe32.OptionalHeader.AddressOfEntryPoint = CoffEntry;
+
+ NtHdr->Pe32.OptionalHeader.BaseOfCode = mTextOffset;
+
+ NtHdr->Pe32.OptionalHeader.BaseOfData = mDataOffset;
+ NtHdr->Pe32.OptionalHeader.ImageBase = 0;
+ NtHdr->Pe32.OptionalHeader.SectionAlignment = mCoffAlignment;
+ NtHdr->Pe32.OptionalHeader.FileAlignment = mCoffAlignment;
+ NtHdr->Pe32.OptionalHeader.SizeOfImage = 0;
+
+ NtHdr->Pe32.OptionalHeader.SizeOfHeaders = mTextOffset;
+ NtHdr->Pe32.OptionalHeader.NumberOfRvaAndSizes = EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES;
+
+ //
+ // Section headers.
+ //
+ if ((mDataOffset - mTextOffset) > 0) {
+ CreateSectionHeader (".text", mTextOffset, mDataOffset - mTextOffset,
+ EFI_IMAGE_SCN_CNT_CODE
+ | EFI_IMAGE_SCN_MEM_EXECUTE
+ | EFI_IMAGE_SCN_MEM_READ);
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ }
+
+ if ((mHiiRsrcOffset - mDataOffset) > 0) {
+ CreateSectionHeader (".data", mDataOffset, mHiiRsrcOffset - mDataOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_WRITE
+ | EFI_IMAGE_SCN_MEM_READ);
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ }
+
+ if ((mRelocOffset - mHiiRsrcOffset) > 0) {
+ CreateSectionHeader (".rsrc", mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_READ);
+
+ NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = mRelocOffset - mHiiRsrcOffset;
+ NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = mHiiRsrcOffset;
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ }
+
+}
+
+STATIC
+BOOLEAN
+WriteSections32 (
+ SECTION_FILTER_TYPES FilterType
+ )
+{
+ UINT32 Idx;
+ Elf_Shdr *SecShdr;
+ UINT32 SecOffset;
+ BOOLEAN (*Filter)(Elf_Shdr *);
+
+ //
+ // Initialize filter pointer
+ //
+ switch (FilterType) {
+ case SECTION_TEXT:
+ Filter = IsTextShdr;
+ break;
+ case SECTION_HII:
+ Filter = IsHiiRsrcShdr;
+ break;
+ case SECTION_DATA:
+ Filter = IsDataShdr;
+ break;
+ default:
+ return FALSE;
+ }
+
+ //
+ // First: copy sections.
+ //
+ for (Idx = 0; Idx < mEhdr->e_shnum; Idx++) {
+ Elf_Shdr *Shdr = GetShdrByIndex(Idx);
+ if ((*Filter)(Shdr)) {
+ switch (Shdr->sh_type) {
+ case SHT_PROGBITS:
+ /* Copy. */
+ memcpy(mCoffFile + mCoffSectionsOffset[Idx],
+ (UINT8*)mEhdr + Shdr->sh_offset,
+ Shdr->sh_size);
+ break;
+
+ case SHT_NOBITS:
+ memset(mCoffFile + mCoffSectionsOffset[Idx], 0, Shdr->sh_size);
+ break;
+
+ default:
+ //
+ // Ignore for unkown section type.
+ //
+ VerboseMsg ("%s unknown section type %x. We directly copy this section into Coff file", mInImageName, (unsigned)Shdr->sh_type);
+ break;
+ }
+ }
+ }
+
+ //
+ // Second: apply relocations.
+ //
+ for (Idx = 0; Idx < mEhdr->e_shnum; Idx++) {
+ //
+ // Determine if this is a relocation section.
+ //
+ Elf_Shdr *RelShdr = GetShdrByIndex(Idx);
+ if ((RelShdr->sh_type != SHT_REL) && (RelShdr->sh_type != SHT_RELA)) {
+ continue;
+ }
+
+ //
+ // Relocation section found. Now extract section information that the relocations
+ // apply to in the ELF data and the new COFF data.
+ //
+ SecShdr = GetShdrByIndex(RelShdr->sh_info);
+ SecOffset = mCoffSectionsOffset[RelShdr->sh_info];
+
+ //
+ // Only process relocations for the current filter type.
+ //
+ if (RelShdr->sh_type == SHT_REL && (*Filter)(SecShdr)) {
+ UINT32 RelOffset;
+
+ //
+ // Determine the symbol table referenced by the relocation data.
+ //
+ Elf_Shdr *SymtabShdr = GetShdrByIndex(RelShdr->sh_link);
+ UINT8 *Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
+
+ //
+ // Process all relocation entries for this section.
+ //
+ for (RelOffset = 0; RelOffset < RelShdr->sh_size; RelOffset += RelShdr->sh_entsize) {
+ //
+ // Set pointer to relocation entry
+ //
+ Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelOffset);
+
+ //
+ // Set pointer to symbol table entry associated with the relocation entry.
+ //
+ Elf_Sym *Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
+
+ Elf_Shdr *SymShdr;
+ UINT8 *Targ;
+ UINT16 Address;
+
+ //
+ // Check section header index found in symbol table and get the section
+ // header location.
+ //
+ if (Sym->st_shndx == SHN_UNDEF
+ || Sym->st_shndx == SHN_ABS
+ || Sym->st_shndx > mEhdr->e_shnum) {
+ Error (NULL, 0, 3000, "Invalid", "%s bad symbol definition.", mInImageName);
+ }
+ SymShdr = GetShdrByIndex(Sym->st_shndx);
+
+ //
+ // Convert the relocation data to a pointer into the coff file.
+ //
+ // Note:
+ // r_offset is the virtual address of the storage unit to be relocated.
+ // sh_addr is the virtual address for the base of the section.
+ //
+ Targ = mCoffFile + SecOffset + (Rel->r_offset - SecShdr->sh_addr);
+
+ //
+ // Determine how to handle each relocation type based on the machine type.
+ //
+ if (mEhdr->e_machine == EM_386) {
+ switch (ELF_R_TYPE(Rel->r_info)) {
+ case R_386_NONE:
+ break;
+ case R_386_32:
+ //
+ // Absolute relocation.
+ // Converts Targ from a absolute virtual address to the absolute
+ // COFF address.
+ //
+ *(UINT32 *)Targ = *(UINT32 *)Targ - SymShdr->sh_addr
+ + mCoffSectionsOffset[Sym->st_shndx];
+ break;
+ case R_386_PC32:
+ //
+ // Relative relocation: Symbol - Ip + Addend
+ //
+ *(UINT32 *)Targ = *(UINT32 *)Targ
+ + (mCoffSectionsOffset[Sym->st_shndx] - SymShdr->sh_addr)
+ - (SecOffset - SecShdr->sh_addr);
+ break;
+ default:
+ Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_386 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));
+ }
+ } else if (mEhdr->e_machine == EM_ARM) {
+ switch (ELF32_R_TYPE(Rel->r_info)) {
+ case R_ARM_RBASE:
+ // No relocation - no action required
+
+ case R_ARM_PC24:
+ case R_ARM_XPC25:
+ case R_ARM_THM_PC22:
+ case R_ARM_THM_JUMP19:
+ case R_ARM_CALL:
+ case R_ARM_JMP24:
+ // Thease are all PC-relative relocations and don't require modification
+ // GCC does not seem to have the concept of a application that just needs to get relocated.
+ break;
+
+ case R_ARM_THM_MOVW_ABS_NC:
+ // MOVW is only lower 16-bits of the addres
+ Address = (UINT16)(Sym->st_value - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]);
+ ThumbMovtImmediatePatch ((UINT16 *)Targ, Address);
+ break;
+
+ case R_ARM_THM_MOVT_ABS:
+ // MOVT is only upper 16-bits of the addres
+ Address = (UINT16)((Sym->st_value - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]) >> 16);
+ ThumbMovtImmediatePatch ((UINT16 *)Targ, Address);
+ break;
+
+ case R_ARM_ABS32:
+ case R_ARM_RABS32:
+ //
+ // Absolute relocation.
+ //
+ *(UINT32 *)Targ = *(UINT32 *)Targ - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx];
+ break;
+
+ default:
+ Error (NULL, 0, 3000, "Invalid", "WriteSections (): %s unsupported ELF EM_ARM relocation 0x%x.", mInImageName, (unsigned) ELF32_R_TYPE(Rel->r_info));
+ }
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+STATIC
+VOID
+WriteRelocations32 (
+ VOID
+ )
+{
+ UINT32 Index;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ EFI_IMAGE_DATA_DIRECTORY *Dir;
+ BOOLEAN FoundRelocations;
+ Elf_Dyn *Dyn;
+ Elf_Rel *Rel;
+ UINTN RelElementSize;
+ UINTN RelSize;
+ UINTN RelOffset;
+ UINTN K;
+ UINT8 *Targ;
+ Elf32_Phdr *DynamicSegment;
+ Elf32_Phdr *TargetSegment;
+ Elf_Sym *Sym;
+ Elf_Shdr *SymtabShdr;
+ UINT8 *Symtab;
+
+
+ for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) {
+ Elf_Shdr *RelShdr = GetShdrByIndex(Index);
+ if ((RelShdr->sh_type == SHT_REL) || (RelShdr->sh_type == SHT_RELA)) {
+ Elf_Shdr *SecShdr = GetShdrByIndex (RelShdr->sh_info);
+ if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) {
+ UINT32 RelIdx;
+
+ SymtabShdr = GetShdrByIndex (RelShdr->sh_link);
+ Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
+ FoundRelocations = TRUE;
+ for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {
+ Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);
+ Elf_Shdr *SymShdr;
+
+ Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
+ SymShdr = GetShdrByIndex (Sym->st_shndx);
+
+ if (mEhdr->e_machine == EM_386) {
+ switch (ELF_R_TYPE(Rel->r_info)) {
+ case R_386_NONE:
+ case R_386_PC32:
+ //
+ // No fixup entry required.
+ //
+ break;
+ case R_386_32:
+ //
+ // Creates a relative relocation entry from the absolute entry.
+ //
+ CoffAddFixup(mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr),
+ EFI_IMAGE_REL_BASED_HIGHLOW);
+ break;
+ default:
+ Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_386 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));
+ }
+ } else if (mEhdr->e_machine == EM_ARM) {
+ switch (ELF32_R_TYPE(Rel->r_info)) {
+ case R_ARM_RBASE:
+ // No relocation - no action required
+ case R_ARM_PC24:
+ case R_ARM_XPC25:
+ case R_ARM_THM_PC22:
+ case R_ARM_THM_JUMP19:
+ case R_ARM_CALL:
+ case R_ARM_JMP24:
+ // Thease are all PC-relative relocations and don't require modification
+ break;
+
+ case R_ARM_THM_MOVW_ABS_NC:
+ CoffAddFixup (
+ mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr),
+ EFI_IMAGE_REL_BASED_ARM_THUMB_MOVW
+ );
+ break;
+
+ case R_ARM_THM_MOVT_ABS:
+ CoffAddFixup (
+ mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr),
+ EFI_IMAGE_REL_BASED_ARM_THUMB_MOVT
+ );
+
+ // The relocation entry needs to contain the lower 16-bits so we can do math
+ CoffAddFixupEntry ((UINT16)(Sym->st_value - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]));
+ break;
+
+ case R_ARM_ABS32:
+ case R_ARM_RABS32:
+ CoffAddFixup (
+ mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr),
+ EFI_IMAGE_REL_BASED_HIGHLOW
+ );
+ break;
+
+ default:
+ Error (NULL, 0, 3000, "Invalid", "WriteRelocations(): %s unsupported ELF EM_ARM relocation 0x%x.", mInImageName, (unsigned) ELF32_R_TYPE(Rel->r_info));
+ }
+ } else {
+ Error (NULL, 0, 3000, "Not Supported", "This tool does not support relocations for ELF with e_machine %u (processor type).", (unsigned) mEhdr->e_machine);
+ }
+ }
+ }
+ }
+ }
+
+ if (!FoundRelocations && (mEhdr->e_machine == EM_ARM)) {
+ /* Try again, but look for PT_DYNAMIC instead of SHT_REL */
+
+ for (Index = 0; Index < mEhdr->e_phnum; Index++) {
+ RelElementSize = 0;
+ RelSize = 0;
+ RelOffset = 0;
+
+ DynamicSegment = GetPhdrByIndex (Index);
+
+ if (DynamicSegment->p_type == PT_DYNAMIC) {
+ Dyn = (Elf32_Dyn *) ((UINT8 *)mEhdr + DynamicSegment->p_offset);
+
+ while (Dyn->d_tag != DT_NULL) {
+ switch (Dyn->d_tag) {
+ case DT_REL:
+ RelOffset = Dyn->d_un.d_val;
+ break;
+
+ case DT_RELSZ:
+ RelSize = Dyn->d_un.d_val;
+ break;
+
+ case DT_RELENT:
+ RelElementSize = Dyn->d_un.d_val;
+ break;
+
+ default:
+ break;
+ }
+ Dyn++;
+ }
+ if (( RelOffset == 0 ) || ( RelSize == 0 ) || ( RelElementSize == 0 )) {
+ Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations.", mInImageName);
+ }
+
+ for (K = 0; K < RelSize; K += RelElementSize) {
+
+ if (DynamicSegment->p_paddr == 0) {
+ // Older versions of the ARM ELF (SWS ESPC 0003 B-02) specification define DT_REL
+ // as an offset in the dynamic segment. p_paddr is defined to be zero for ARM tools
+ Rel = (Elf32_Rel *) ((UINT8 *) mEhdr + DynamicSegment->p_offset + RelOffset + K);
+ } else {
+ // This is how it reads in the generic ELF specification
+ Rel = (Elf32_Rel *) ((UINT8 *) mEhdr + RelOffset + K);
+ }
+
+ switch (ELF32_R_TYPE (Rel->r_info)) {
+ case R_ARM_RBASE:
+ break;
+
+ case R_ARM_RABS32:
+ TargetSegment = GetPhdrByIndex (ELF32_R_SYM (Rel->r_info) - 1);
+
+ // Note: r_offset in a memory address. Convert it to a pointer in the coff file.
+ Targ = mCoffFile + mCoffSectionsOffset[ ELF32_R_SYM( Rel->r_info ) ] + Rel->r_offset - TargetSegment->p_vaddr;
+
+ *(UINT32 *)Targ = *(UINT32 *)Targ + mCoffSectionsOffset [ELF32_R_SYM( Rel->r_info )];
+
+ CoffAddFixup (mCoffSectionsOffset[ELF32_R_SYM (Rel->r_info)] + (Rel->r_offset - TargetSegment->p_vaddr), EFI_IMAGE_REL_BASED_HIGHLOW);
+ break;
+
+ default:
+ Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations, unkown type %d.", mInImageName, ELF32_R_TYPE (Rel->r_info));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ //
+ // Pad by adding empty entries.
+ //
+ while (mCoffOffset & (mCoffAlignment - 1)) {
+ CoffAddFixupEntry(0);
+ }
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ Dir = &NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC];
+ Dir->Size = mCoffOffset - mRelocOffset;
+ if (Dir->Size == 0) {
+ // If no relocations, null out the directory entry and don't add the .reloc section
+ Dir->VirtualAddress = 0;
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ } else {
+ Dir->VirtualAddress = mRelocOffset;
+ CreateSectionHeader (".reloc", mRelocOffset, mCoffOffset - mRelocOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_DISCARDABLE
+ | EFI_IMAGE_SCN_MEM_READ);
+ }
+
+}
+
+STATIC
+VOID
+WriteDebug32 (
+ VOID
+ )
+{
+ UINT32 Len;
+ UINT32 DebugOffset;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ EFI_IMAGE_DATA_DIRECTORY *DataDir;
+ EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir;
+ EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
+
+ Len = strlen(mInImageName) + 1;
+ DebugOffset = mCoffOffset;
+
+ mCoffOffset += sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)
+ + sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)
+ + Len;
+ mCoffOffset = CoffAlign(mCoffOffset);
+
+ mCoffFile = realloc(mCoffFile, mCoffOffset);
+ memset(mCoffFile + DebugOffset, 0, mCoffOffset - DebugOffset);
+
+ Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(mCoffFile + DebugOffset);
+ Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW;
+ Dir->SizeOfData = sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) + Len;
+ Dir->RVA = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
+ Dir->FileOffset = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
+
+ Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
+ Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
+ strcpy ((char *)(Nb10 + 1), mInImageName);
+
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ DataDir = &NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG];
+ DataDir->VirtualAddress = DebugOffset;
+ DataDir->Size = mCoffOffset - DebugOffset;
+ if (DataDir->Size == 0) {
+ // If no debug, null out the directory entry and don't add the .debug section
+ DataDir->VirtualAddress = 0;
+ NtHdr->Pe32.FileHeader.NumberOfSections--;
+ } else {
+ DataDir->VirtualAddress = DebugOffset;
+ CreateSectionHeader (".debug", DebugOffset, mCoffOffset - DebugOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_DISCARDABLE
+ | EFI_IMAGE_SCN_MEM_READ);
+
+ }
+}
+
+STATIC
+VOID
+SetImageSize32 (
+ VOID
+ )
+{
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+
+ //
+ // Set image size
+ //
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ NtHdr->Pe32.OptionalHeader.SizeOfImage = mCoffOffset;
+}
+
+STATIC
+VOID
+CleanUp32 (
+ VOID
+ )
+{
+ if (mCoffSectionsOffset != NULL) {
+ free (mCoffSectionsOffset);
+ }
+}
+
+
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _ELF_32_CONVERT_
+#define _ELF_32_CONVERT_
+
+BOOLEAN
+InitializeElf32 (
+ UINT8 *FileBuffer,
+ ELF_FUNCTION_TABLE *ElfFunctions
+ );
+
+#endif
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include "WinNtInclude.h"
+
+#ifndef __GNUC__
+#include <windows.h>
+#include <io.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <ctype.h>
+
+#include <Common/UefiBaseTypes.h>
+#include <IndustryStandard/PeImage.h>
+
+#include "PeCoffLib.h"
+#include "EfiUtilityMsgs.h"
+
+#include "GenFw.h"
+#include "ElfConvert.h"
+#include "Elf64Convert.h"
+
+STATIC
+VOID
+ScanSections64 (
+ VOID
+ );
+
+STATIC
+BOOLEAN
+WriteSections64 (
+ SECTION_FILTER_TYPES FilterType
+ );
+
+STATIC
+VOID
+WriteRelocations64 (
+ VOID
+ );
+
+STATIC
+VOID
+WriteDebug64 (
+ VOID
+ );
+
+STATIC
+VOID
+SetImageSize64 (
+ VOID
+ );
+
+STATIC
+VOID
+CleanUp64 (
+ VOID
+ );
+
+//
+// Rename ELF32 strucutres to common names to help when porting to ELF64.
+//
+typedef Elf64_Shdr Elf_Shdr;
+typedef Elf64_Ehdr Elf_Ehdr;
+typedef Elf64_Rel Elf_Rel;
+typedef Elf64_Rela Elf_Rela;
+typedef Elf64_Sym Elf_Sym;
+typedef Elf64_Phdr Elf_Phdr;
+typedef Elf64_Dyn Elf_Dyn;
+#define ELFCLASS ELFCLASS64
+#define ELF_R_TYPE(r) ELF64_R_TYPE(r)
+#define ELF_R_SYM(r) ELF64_R_SYM(r)
+
+//
+// Well known ELF structures.
+//
+STATIC Elf_Ehdr *mEhdr;
+STATIC Elf_Shdr *mShdrBase;
+STATIC Elf_Phdr *mPhdrBase;
+
+//
+// Coff information
+//
+STATIC const UINT32 mCoffAlignment = 0x20;
+
+//
+// PE section alignment.
+//
+STATIC const UINT16 mCoffNbrSections = 5;
+
+//
+// ELF sections to offset in Coff file.
+//
+STATIC UINT32 *mCoffSectionsOffset = NULL;
+
+//
+// Offsets in COFF file
+//
+STATIC UINT32 mNtHdrOffset;
+STATIC UINT32 mTextOffset;
+STATIC UINT32 mDataOffset;
+STATIC UINT32 mHiiRsrcOffset;
+STATIC UINT32 mRelocOffset;
+
+//
+// Initialization Function
+//
+BOOLEAN
+InitializeElf64 (
+ UINT8 *FileBuffer,
+ ELF_FUNCTION_TABLE *ElfFunctions
+ )
+{
+ //
+ // Initialize data pointer and structures.
+ //
+ VerboseMsg ("Set EHDR");
+ mEhdr = (Elf_Ehdr*) FileBuffer;
+
+ //
+ // Check the ELF64 specific header information.
+ //
+ VerboseMsg ("Check ELF64 Header Information");
+ if (mEhdr->e_ident[EI_CLASS] != ELFCLASS64) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFCLASS64");
+ return FALSE;
+ }
+ if (mEhdr->e_ident[EI_DATA] != ELFDATA2LSB) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFDATA2LSB");
+ return FALSE;
+ }
+ if ((mEhdr->e_type != ET_EXEC) && (mEhdr->e_type != ET_DYN)) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_type not ET_EXEC or ET_DYN");
+ return FALSE;
+ }
+ if (!((mEhdr->e_machine == EM_X86_64))) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_machine not EM_X86_64");
+ return FALSE;
+ }
+ if (mEhdr->e_version != EV_CURRENT) {
+ Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
+ return FALSE;
+ }
+
+ //
+ // Update section header pointers
+ //
+ VerboseMsg ("Update Header Pointers");
+ mShdrBase = (Elf_Shdr *)((UINT8 *)mEhdr + mEhdr->e_shoff);
+ mPhdrBase = (Elf_Phdr *)((UINT8 *)mEhdr + mEhdr->e_phoff);
+
+ //
+ // Create COFF Section offset buffer and zero.
+ //
+ VerboseMsg ("Create COFF Section Offset Buffer");
+ mCoffSectionsOffset = (UINT32 *)malloc(mEhdr->e_shnum * sizeof (UINT32));
+ memset(mCoffSectionsOffset, 0, mEhdr->e_shnum * sizeof(UINT32));
+
+ //
+ // Fill in function pointers.
+ //
+ VerboseMsg ("Fill in Function Pointers");
+ ElfFunctions->ScanSections = ScanSections64;
+ ElfFunctions->WriteSections = WriteSections64;
+ ElfFunctions->WriteRelocations = WriteRelocations64;
+ ElfFunctions->WriteDebug = WriteDebug64;
+ ElfFunctions->SetImageSize = SetImageSize64;
+ ElfFunctions->CleanUp = CleanUp64;
+
+ return TRUE;
+}
+
+
+//
+// Header by Index functions
+//
+STATIC
+Elf_Shdr*
+GetShdrByIndex (
+ UINT32 Num
+ )
+{
+ if (Num >= mEhdr->e_shnum)
+ return NULL;
+ return (Elf_Shdr*)((UINT8*)mShdrBase + Num * mEhdr->e_shentsize);
+}
+
+STATIC
+UINT32
+CoffAlign (
+ UINT32 Offset
+ )
+{
+ return (Offset + mCoffAlignment - 1) & ~(mCoffAlignment - 1);
+}
+
+//
+// filter functions
+//
+STATIC
+BOOLEAN
+IsTextShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ return (BOOLEAN) ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC);
+}
+
+STATIC
+BOOLEAN
+IsHiiRsrcShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ Elf_Shdr *Namedr = GetShdrByIndex(mEhdr->e_shstrndx);
+
+ return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, ELF_HII_SECTION_NAME) == 0);
+}
+
+STATIC
+BOOLEAN
+IsDataShdr (
+ Elf_Shdr *Shdr
+ )
+{
+ if (IsHiiRsrcShdr(Shdr)) {
+ return FALSE;
+ }
+ return (BOOLEAN) (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);
+}
+
+//
+// Elf functions interface implementation
+//
+
+STATIC
+VOID
+ScanSections64 (
+ VOID
+ )
+{
+ UINT32 i;
+ EFI_IMAGE_DOS_HEADER *DosHdr;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ UINT32 CoffEntry;
+
+ CoffEntry = 0;
+ mCoffOffset = 0;
+
+ //
+ // Coff file start with a DOS header.
+ //
+ mCoffOffset = sizeof(EFI_IMAGE_DOS_HEADER) + 0x40;
+ mNtHdrOffset = mCoffOffset;
+ switch (mEhdr->e_machine) {
+ case EM_X86_64:
+ case EM_IA_64:
+ mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64);
+ break;
+ default:
+ VerboseMsg ("%s unknown e_machine type. Assume X64", (UINTN)mEhdr->e_machine);
+ mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64);
+ break;
+ }
+
+ mTableOffset = mCoffOffset;
+ mCoffOffset += mCoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);
+
+ //
+ // First text sections.
+ //
+ mCoffOffset = CoffAlign(mCoffOffset);
+ mTextOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsTextShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (UINT32) ((mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1));
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+
+ /* Relocate entry. */
+ if ((mEhdr->e_entry >= shdr->sh_addr) &&
+ (mEhdr->e_entry < shdr->sh_addr + shdr->sh_size)) {
+ CoffEntry = (UINT32) (mCoffOffset + mEhdr->e_entry - shdr->sh_addr);
+ }
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += (UINT32) shdr->sh_size;
+ }
+ }
+
+ if (mEhdr->e_machine != EM_ARM) {
+ mCoffOffset = CoffAlign(mCoffOffset);
+ }
+
+ //
+ // Then data sections.
+ //
+ mDataOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsDataShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (UINT32) ((mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1));
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += (UINT32) shdr->sh_size;
+ }
+ }
+ mCoffOffset = CoffAlign(mCoffOffset);
+
+ //
+ // The HII resource sections.
+ //
+ mHiiRsrcOffset = mCoffOffset;
+ for (i = 0; i < mEhdr->e_shnum; i++) {
+ Elf_Shdr *shdr = GetShdrByIndex(i);
+ if (IsHiiRsrcShdr(shdr)) {
+ if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
+ // the alignment field is valid
+ if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
+ // if the section address is aligned we must align PE/COFF
+ mCoffOffset = (UINT32) ((mCoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1));
+ } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % shdr->sh_addralign)) {
+ // ARM RVCT tools have behavior outside of the ELF specification to try
+ // and make images smaller. If sh_addr is not aligned to sh_addralign
+ // then the section needs to preserve sh_addr MOD sh_addralign.
+ // Normally doing nothing here works great.
+ Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
+ }
+ }
+ if (shdr->sh_size != 0) {
+ mCoffSectionsOffset[i] = mCoffOffset;
+ mCoffOffset += (UINT32) shdr->sh_size;
+ mCoffOffset = CoffAlign(mCoffOffset);
+ SetHiiResourceHeader ((UINT8*) mEhdr + shdr->sh_offset, mHiiRsrcOffset);
+ }
+ break;
+ }
+ }
+
+ mRelocOffset = mCoffOffset;
+
+ //
+ // Allocate base Coff file. Will be expanded later for relocations.
+ //
+ mCoffFile = (UINT8 *)malloc(mCoffOffset);
+ memset(mCoffFile, 0, mCoffOffset);
+
+ //
+ // Fill headers.
+ //
+ DosHdr = (EFI_IMAGE_DOS_HEADER *)mCoffFile;
+ DosHdr->e_magic = EFI_IMAGE_DOS_SIGNATURE;
+ DosHdr->e_lfanew = mNtHdrOffset;
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION*)(mCoffFile + mNtHdrOffset);
+
+ NtHdr->Pe32Plus.Signature = EFI_IMAGE_NT_SIGNATURE;
+
+ switch (mEhdr->e_machine) {
+ case EM_X86_64:
+ NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_X64;
+ NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+ break;
+ case EM_IA_64:
+ NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_IPF;
+ NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+ break;
+ default:
+ VerboseMsg ("%s unknown e_machine type. Assume X64", (UINTN)mEhdr->e_machine);
+ NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_X64;
+ NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+ }
+
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections = mCoffNbrSections;
+ NtHdr->Pe32Plus.FileHeader.TimeDateStamp = (UINT32) time(NULL);
+ mImageTimeStamp = NtHdr->Pe32Plus.FileHeader.TimeDateStamp;
+ NtHdr->Pe32Plus.FileHeader.PointerToSymbolTable = 0;
+ NtHdr->Pe32Plus.FileHeader.NumberOfSymbols = 0;
+ NtHdr->Pe32Plus.FileHeader.SizeOfOptionalHeader = sizeof(NtHdr->Pe32Plus.OptionalHeader);
+ NtHdr->Pe32Plus.FileHeader.Characteristics = EFI_IMAGE_FILE_EXECUTABLE_IMAGE
+ | EFI_IMAGE_FILE_LINE_NUMS_STRIPPED
+ | EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED
+ | EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE;
+
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfCode = mDataOffset - mTextOffset;
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfInitializedData = mRelocOffset - mDataOffset;
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfUninitializedData = 0;
+ NtHdr->Pe32Plus.OptionalHeader.AddressOfEntryPoint = CoffEntry;
+
+ NtHdr->Pe32Plus.OptionalHeader.BaseOfCode = mTextOffset;
+
+ NtHdr->Pe32Plus.OptionalHeader.ImageBase = 0;
+ NtHdr->Pe32Plus.OptionalHeader.SectionAlignment = mCoffAlignment;
+ NtHdr->Pe32Plus.OptionalHeader.FileAlignment = mCoffAlignment;
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfImage = 0;
+
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfHeaders = mTextOffset;
+ NtHdr->Pe32Plus.OptionalHeader.NumberOfRvaAndSizes = EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES;
+
+ //
+ // Section headers.
+ //
+ if ((mDataOffset - mTextOffset) > 0) {
+ CreateSectionHeader (".text", mTextOffset, mDataOffset - mTextOffset,
+ EFI_IMAGE_SCN_CNT_CODE
+ | EFI_IMAGE_SCN_MEM_EXECUTE
+ | EFI_IMAGE_SCN_MEM_READ);
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;
+ }
+
+ if ((mHiiRsrcOffset - mDataOffset) > 0) {
+ CreateSectionHeader (".data", mDataOffset, mHiiRsrcOffset - mDataOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_WRITE
+ | EFI_IMAGE_SCN_MEM_READ);
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;
+ }
+
+ if ((mRelocOffset - mHiiRsrcOffset) > 0) {
+ CreateSectionHeader (".rsrc", mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_READ);
+
+ NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = mRelocOffset - mHiiRsrcOffset;
+ NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = mHiiRsrcOffset;
+ } else {
+ // Don't make a section of size 0.
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;
+ }
+
+}
+
+STATIC
+BOOLEAN
+WriteSections64 (
+ SECTION_FILTER_TYPES FilterType
+ )
+{
+ UINT32 Idx;
+ Elf_Shdr *SecShdr;
+ UINT32 SecOffset;
+ BOOLEAN (*Filter)(Elf_Shdr *);
+
+ //
+ // Initialize filter pointer
+ //
+ switch (FilterType) {
+ case SECTION_TEXT:
+ Filter = IsTextShdr;
+ break;
+ case SECTION_HII:
+ Filter = IsHiiRsrcShdr;
+ break;
+ case SECTION_DATA:
+ Filter = IsDataShdr;
+ break;
+ default:
+ return FALSE;
+ }
+
+ //
+ // First: copy sections.
+ //
+ for (Idx = 0; Idx < mEhdr->e_shnum; Idx++) {
+ Elf_Shdr *Shdr = GetShdrByIndex(Idx);
+ if ((*Filter)(Shdr)) {
+ switch (Shdr->sh_type) {
+ case SHT_PROGBITS:
+ /* Copy. */
+ memcpy(mCoffFile + mCoffSectionsOffset[Idx],
+ (UINT8*)mEhdr + Shdr->sh_offset,
+ (size_t) Shdr->sh_size);
+ break;
+
+ case SHT_NOBITS:
+ memset(mCoffFile + mCoffSectionsOffset[Idx], 0, (size_t) Shdr->sh_size);
+ break;
+
+ default:
+ //
+ // Ignore for unkown section type.
+ //
+ VerboseMsg ("%s unknown section type %x. We directly copy this section into Coff file", mInImageName, (unsigned)Shdr->sh_type);
+ break;
+ }
+ }
+ }
+
+ //
+ // Second: apply relocations.
+ //
+ VerboseMsg ("Applying Relocations...");
+ for (Idx = 0; Idx < mEhdr->e_shnum; Idx++) {
+ Elf_Shdr *RelShdr = GetShdrByIndex(Idx);
+ if ((RelShdr->sh_type != SHT_REL) && (RelShdr->sh_type != SHT_RELA)) {
+ continue;
+ }
+ SecShdr = GetShdrByIndex(RelShdr->sh_info);
+ SecOffset = mCoffSectionsOffset[RelShdr->sh_info];
+ if (RelShdr->sh_type == SHT_RELA && (*Filter)(SecShdr)) {
+ UINT64 RelIdx;
+ Elf_Shdr *SymtabShdr = GetShdrByIndex(RelShdr->sh_link);
+ UINT8 *Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
+ for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += (UINT32) RelShdr->sh_entsize) {
+ Elf_Rela *Rel = (Elf_Rela *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);
+ Elf_Sym *Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
+ Elf_Shdr *SymShdr;
+ UINT8 *Targ;
+
+ if (Sym->st_shndx == SHN_UNDEF
+ || Sym->st_shndx == SHN_ABS
+ || Sym->st_shndx > mEhdr->e_shnum) {
+ Error (NULL, 0, 3000, "Invalid", "%s bad symbol definition.", mInImageName);
+ }
+ SymShdr = GetShdrByIndex(Sym->st_shndx);
+
+ //
+ // Note: r_offset in a memory address.
+ // Convert it to a pointer in the coff file.
+ //
+ Targ = mCoffFile + SecOffset + (Rel->r_offset - SecShdr->sh_addr);
+
+ if (mEhdr->e_machine == EM_X86_64) {
+ switch (ELF_R_TYPE(Rel->r_info)) {
+ case R_X86_64_NONE:
+ break;
+ case R_X86_64_64:
+ //
+ // Absolute relocation.
+ //
+ VerboseMsg ("R_X86_64_64");
+ VerboseMsg ("Offset: 0x%08X, Addend: 0x%016LX",
+ (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),
+ *(UINT64 *)Targ);
+ *(UINT64 *)Targ = *(UINT64 *)Targ - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx];
+ VerboseMsg ("Relocation: 0x%016LX", *(UINT64*)Targ);
+ break;
+ case R_X86_64_32:
+ VerboseMsg ("R_X86_64_32");
+ VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",
+ (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),
+ *(UINT32 *)Targ);
+ *(UINT32 *)Targ = (UINT32)((UINT64)(*(UINT32 *)Targ) - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]);
+ VerboseMsg ("Relocation: 0x%08X", *(UINT32*)Targ);
+ break;
+ case R_X86_64_32S:
+ VerboseMsg ("R_X86_64_32S");
+ VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",
+ (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),
+ *(UINT32 *)Targ);
+ *(INT32 *)Targ = (INT32)((INT64)(*(INT32 *)Targ) - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]);
+ VerboseMsg ("Relocation: 0x%08X", *(UINT32*)Targ);
+ break;
+ case R_X86_64_PC32:
+ //
+ // Relative relocation: Symbol - Ip + Addend
+ //
+ VerboseMsg ("R_X86_64_PC32");
+ VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",
+ (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),
+ *(UINT32 *)Targ);
+ *(UINT32 *)Targ = (UINT32) (*(UINT32 *)Targ
+ + (mCoffSectionsOffset[Sym->st_shndx] - SymShdr->sh_addr)
+ - (SecOffset - SecShdr->sh_addr));
+ VerboseMsg ("Relocation: 0x%08X", *(UINT32 *)Targ);
+ break;
+ default:
+ Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_X86_64 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));
+ }
+ } else {
+ Error (NULL, 0, 3000, "Invalid", "Not EM_X86_X64");
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+STATIC
+VOID
+WriteRelocations64 (
+ VOID
+ )
+{
+ UINT32 Index;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ EFI_IMAGE_DATA_DIRECTORY *Dir;
+ BOOLEAN FoundRelocations;
+ Elf_Sym *Sym;
+ Elf_Shdr *SymtabShdr;
+ UINT8 *Symtab;
+
+
+ for (Index = 0, FoundRelocations = FALSE; Index < mEhdr->e_shnum; Index++) {
+ Elf_Shdr *RelShdr = GetShdrByIndex(Index);
+ if ((RelShdr->sh_type == SHT_REL) || (RelShdr->sh_type == SHT_RELA)) {
+ Elf_Shdr *SecShdr = GetShdrByIndex (RelShdr->sh_info);
+ if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) {
+ UINT64 RelIdx;
+
+ SymtabShdr = GetShdrByIndex (RelShdr->sh_link);
+ Symtab = (UINT8*)mEhdr + SymtabShdr->sh_offset;
+ FoundRelocations = TRUE;
+ for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {
+ Elf_Rela *Rel = (Elf_Rela *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);
+ Elf_Shdr *SymShdr;
+
+ Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);
+ SymShdr = GetShdrByIndex (Sym->st_shndx);
+
+ if (mEhdr->e_machine == EM_X86_64) {
+ switch (ELF_R_TYPE(Rel->r_info)) {
+ case R_X86_64_NONE:
+ case R_X86_64_PC32:
+ break;
+ case R_X86_64_64:
+ VerboseMsg ("EFI_IMAGE_REL_BASED_DIR64 Offset: 0x%08X",
+ mCoffSectionsOffset[RelShdr->sh_info] + (Rel->r_offset - SecShdr->sh_addr));
+ CoffAddFixup(
+ (UINT32) ((UINT64) mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr)),
+ EFI_IMAGE_REL_BASED_DIR64);
+ break;
+ case R_X86_64_32S:
+ case R_X86_64_32:
+ VerboseMsg ("EFI_IMAGE_REL_BASED_HIGHLOW Offset: 0x%08X",
+ mCoffSectionsOffset[RelShdr->sh_info] + (Rel->r_offset - SecShdr->sh_addr));
+ CoffAddFixup(
+ (UINT32) ((UINT64) mCoffSectionsOffset[RelShdr->sh_info]
+ + (Rel->r_offset - SecShdr->sh_addr)),
+ EFI_IMAGE_REL_BASED_HIGHLOW);
+ break;
+ default:
+ Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_X86_64 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));
+ }
+ } else {
+ Error (NULL, 0, 3000, "Not Supported", "This tool does not support relocations for ELF with e_machine %u (processor type).", (unsigned) mEhdr->e_machine);
+ }
+ }
+ }
+ }
+ }
+
+ //
+ // Pad by adding empty entries.
+ //
+ while (mCoffOffset & (mCoffAlignment - 1)) {
+ CoffAddFixupEntry(0);
+ }
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ Dir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC];
+ Dir->Size = mCoffOffset - mRelocOffset;
+ if (Dir->Size == 0) {
+ // If no relocations, null out the directory entry and don't add the .reloc section
+ Dir->VirtualAddress = 0;
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;
+ } else {
+ Dir->VirtualAddress = mRelocOffset;
+ CreateSectionHeader (".reloc", mRelocOffset, mCoffOffset - mRelocOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_DISCARDABLE
+ | EFI_IMAGE_SCN_MEM_READ);
+ }
+}
+
+STATIC
+VOID
+WriteDebug64 (
+ VOID
+ )
+{
+ UINT32 Len;
+ UINT32 DebugOffset;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+ EFI_IMAGE_DATA_DIRECTORY *DataDir;
+ EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir;
+ EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
+
+ Len = strlen(mInImageName) + 1;
+ DebugOffset = mCoffOffset;
+
+ mCoffOffset += sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)
+ + sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)
+ + Len;
+ mCoffOffset = CoffAlign(mCoffOffset);
+
+ mCoffFile = realloc(mCoffFile, mCoffOffset);
+ memset(mCoffFile + DebugOffset, 0, mCoffOffset - DebugOffset);
+
+ Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(mCoffFile + DebugOffset);
+ Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW;
+ Dir->SizeOfData = sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) + Len;
+ Dir->RVA = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
+ Dir->FileOffset = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);
+
+ Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
+ Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
+ strcpy ((char *)(Nb10 + 1), mInImageName);
+
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ DataDir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG];
+ DataDir->VirtualAddress = DebugOffset;
+ DataDir->Size = mCoffOffset - DebugOffset;
+ if (DataDir->Size == 0) {
+ // If no debug, null out the directory entry and don't add the .debug section
+ DataDir->VirtualAddress = 0;
+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;
+ } else {
+ DataDir->VirtualAddress = DebugOffset;
+ CreateSectionHeader (".debug", DebugOffset, mCoffOffset - DebugOffset,
+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA
+ | EFI_IMAGE_SCN_MEM_DISCARDABLE
+ | EFI_IMAGE_SCN_MEM_READ);
+
+ }
+}
+
+STATIC
+VOID
+SetImageSize64 (
+ VOID
+ )
+{
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
+
+ //
+ // Set image size
+ //
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
+ NtHdr->Pe32Plus.OptionalHeader.SizeOfImage = mCoffOffset;
+}
+
+STATIC
+VOID
+CleanUp64 (
+ VOID
+ )
+{
+ if (mCoffSectionsOffset != NULL) {
+ free (mCoffSectionsOffset);
+ }
+}
+
+
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _ELF_64_CONVERT_
+#define _ELF_64_CONVERT_
+
+BOOLEAN
+InitializeElf64 (
+ UINT8 *FileBuffer,
+ ELF_FUNCTION_TABLE *ElfFunctions
+ );
+
+#endif
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include "WinNtInclude.h"
+
+#ifndef __GNUC__
+#include <windows.h>
+#include <io.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <ctype.h>
+
+#include <Common/UefiBaseTypes.h>
+#include <IndustryStandard/PeImage.h>
+
+#include "EfiUtilityMsgs.h"
+
+#include "GenFw.h"
+#include "ElfConvert.h"
+#include "Elf32Convert.h"
+#include "Elf64Convert.h"
+
+//
+// Result Coff file in memory.
+//
+UINT8 *mCoffFile = NULL;
+
+//
+// COFF relocation data
+//
+EFI_IMAGE_BASE_RELOCATION *mCoffBaseRel;
+UINT16 *mCoffEntryRel;
+
+//
+// Current offset in coff file.
+//
+UINT32 mCoffOffset;
+
+//
+// Offset in Coff file of headers and sections.
+//
+UINT32 mTableOffset;
+
+//
+//*****************************************************************************
+// Common ELF Functions
+//*****************************************************************************
+//
+
+VOID
+CoffAddFixupEntry(
+ UINT16 Val
+ )
+{
+ *mCoffEntryRel = Val;
+ mCoffEntryRel++;
+ mCoffBaseRel->SizeOfBlock += 2;
+ mCoffOffset += 2;
+}
+
+VOID
+CoffAddFixup(
+ UINT32 Offset,
+ UINT8 Type
+ )
+{
+ if (mCoffBaseRel == NULL
+ || mCoffBaseRel->VirtualAddress != (Offset & ~0xfff)) {
+ if (mCoffBaseRel != NULL) {
+ //
+ // Add a null entry (is it required ?)
+ //
+ CoffAddFixupEntry (0);
+
+ //
+ // Pad for alignment.
+ //
+ if (mCoffOffset % 4 != 0)
+ CoffAddFixupEntry (0);
+ }
+
+ mCoffFile = realloc (
+ mCoffFile,
+ mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ );
+ memset (
+ mCoffFile + mCoffOffset, 0,
+ sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
+ );
+
+ mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset);
+ mCoffBaseRel->VirtualAddress = Offset & ~0xfff;
+ mCoffBaseRel->SizeOfBlock = sizeof(EFI_IMAGE_BASE_RELOCATION);
+
+ mCoffEntryRel = (UINT16 *)(mCoffBaseRel + 1);
+ mCoffOffset += sizeof(EFI_IMAGE_BASE_RELOCATION);
+ }
+
+ //
+ // Fill the entry.
+ //
+ CoffAddFixupEntry((UINT16) ((Type << 12) | (Offset & 0xfff)));
+}
+
+VOID
+CreateSectionHeader (
+ const CHAR8 *Name,
+ UINT32 Offset,
+ UINT32 Size,
+ UINT32 Flags
+ )
+{
+ EFI_IMAGE_SECTION_HEADER *Hdr;
+ Hdr = (EFI_IMAGE_SECTION_HEADER*)(mCoffFile + mTableOffset);
+
+ strcpy((char *)Hdr->Name, Name);
+ Hdr->Misc.VirtualSize = Size;
+ Hdr->VirtualAddress = Offset;
+ Hdr->SizeOfRawData = Size;
+ Hdr->PointerToRawData = Offset;
+ Hdr->PointerToRelocations = 0;
+ Hdr->PointerToLinenumbers = 0;
+ Hdr->NumberOfRelocations = 0;
+ Hdr->NumberOfLinenumbers = 0;
+ Hdr->Characteristics = Flags;
+
+ mTableOffset += sizeof (EFI_IMAGE_SECTION_HEADER);
+}
+
+//
+//*****************************************************************************
+// Functions called from GenFw main code.
+//*****************************************************************************
+//
+
+INTN
+IsElfHeader (
+ UINT8 *FileBuffer
+)
+{
+ return (FileBuffer[EI_MAG0] == ELFMAG0 &&
+ FileBuffer[EI_MAG1] == ELFMAG1 &&
+ FileBuffer[EI_MAG2] == ELFMAG2 &&
+ FileBuffer[EI_MAG3] == ELFMAG3);
+}
+
+BOOLEAN
+ConvertElf (
+ UINT8 **FileBuffer,
+ UINT32 *FileLength
+ )
+{
+ ELF_FUNCTION_TABLE ElfFunctions;
+ UINT8 EiClass;
+
+ //
+ // Determine ELF type and set function table pointer correctly.
+ //
+ VerboseMsg ("Check Efl Image Header");
+ EiClass = (*FileBuffer)[EI_CLASS];
+ if (EiClass == ELFCLASS32) {
+ if (!InitializeElf32 (*FileBuffer, &ElfFunctions)) {
+ return FALSE;
+ }
+ } else if (EiClass == ELFCLASS64) {
+ if (!InitializeElf64 (*FileBuffer, &ElfFunctions)) {
+ return FALSE;
+ }
+ } else {
+ Error (NULL, 0, 3000, "Unsupported", "ELF EI_CLASS not supported.");
+ return FALSE;
+ }
+
+ //
+ // Compute sections new address.
+ //
+ VerboseMsg ("Compute sections new address.");
+ ElfFunctions.ScanSections ();
+
+ //
+ // Write and relocate sections.
+ //
+ VerboseMsg ("Write and relocate sections.");
+ ElfFunctions.WriteSections (SECTION_TEXT);
+ ElfFunctions.WriteSections (SECTION_DATA);
+ ElfFunctions.WriteSections (SECTION_HII);
+
+ //
+ // Translate and write relocations.
+ //
+ VerboseMsg ("Translate and write relocations.");
+ ElfFunctions.WriteRelocations ();
+
+ //
+ // Write debug info.
+ //
+ VerboseMsg ("Write debug info.");
+ ElfFunctions.WriteDebug ();
+
+ //
+ // Make sure image size is correct before returning the new image.
+ //
+ VerboseMsg ("Set image size.");
+ ElfFunctions.SetImageSize ();
+
+ //
+ // Replace.
+ //
+ free (*FileBuffer);
+ *FileBuffer = mCoffFile;
+ *FileLength = mCoffOffset;
+
+ //
+ // Free resources used by ELF functions.
+ //
+ ElfFunctions.CleanUp ();
+
+ return TRUE;
+}
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _ELF_CONVERT_H_
+#define _ELF_CONVERT_H_
+
+#include "elf_common.h"
+#include "elf32.h"
+#include "elf64.h"
+
+//
+// Externally defined variables
+//
+extern UINT32 mCoffOffset;
+extern CHAR8 *mInImageName;
+extern UINT32 mImageTimeStamp;
+extern UINT8 *mCoffFile;
+extern UINT32 mTableOffset;
+
+//
+// Common EFI specific data.
+//
+#define ELF_HII_SECTION_NAME ".hii"
+
+//
+// Filter Types
+//
+typedef enum {
+ SECTION_TEXT,
+ SECTION_HII,
+ SECTION_DATA
+
+} SECTION_FILTER_TYPES;
+
+//
+// FunctionTalbe
+//
+typedef struct {
+ VOID (*ScanSections) ();
+ BOOLEAN (*WriteSections) (SECTION_FILTER_TYPES FilterType);
+ VOID (*WriteRelocations) ();
+ VOID (*WriteDebug) ();
+ VOID (*SetImageSize) ();
+ VOID (*CleanUp) ();
+
+} ELF_FUNCTION_TABLE;
+
+//
+// Common functions
+//
+VOID
+CoffAddFixup (
+ UINT32 Offset,
+ UINT8 Type
+ );
+
+VOID
+CoffAddFixupEntry (
+ UINT16 Val
+ );
+
+
+VOID
+CreateSectionHeader (
+ const CHAR8 *Name,
+ UINT32 Offset,
+ UINT32 Size,
+ UINT32 Flags
+ );
+
+#endif
## @file\r
# Windows makefile for 'GenFw' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
APPNAME = GenFw\r
\r
-OBJECTS = GenFw.o\r
+OBJECTS = GenFw.o ElfConvert.o Elf32Convert.o Elf64Convert.o\r
\r
include $(MAKEROOT)/Makefiles/app.makefile\r
\r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
#include "ParseInf.h"\r
#include "EfiUtilityMsgs.h"\r
\r
-#include "elf_common.h"\r
-#include "elf32.h"\r
-#include "elf64.h"\r
-\r
+#include "GenFw.h"\r
\r
//\r
// Version of this utility\r
//\r
// Action for this tool.\r
//\r
-#define FW_DUMMY_IMAGE 0\r
-#define FW_EFI_IMAGE 1\r
-#define FW_TE_IMAGE 2\r
-#define FW_ACPI_IMAGE 3\r
-#define FW_BIN_IMAGE 4\r
-#define FW_ZERO_DEBUG_IMAGE 5\r
-#define FW_SET_STAMP_IMAGE 6\r
-#define FW_MCI_IMAGE 7\r
-#define FW_MERGE_IMAGE 8\r
-#define FW_RELOC_STRIPEED_IMAGE 9\r
-#define FW_HII_PACKAGE_LIST_RCIMAGE 10\r
-#define FW_HII_PACKAGE_LIST_BINIMAGE 11\r
-#define FW_REBASE_IMAGE 12\r
-#define FW_SET_ADDRESS_IMAGE 13\r
-\r
-#define DUMP_TE_HEADER 0x11\r
+#define FW_DUMMY_IMAGE 0\r
+#define FW_EFI_IMAGE 1\r
+#define FW_TE_IMAGE 2\r
+#define FW_ACPI_IMAGE 3\r
+#define FW_BIN_IMAGE 4\r
+#define FW_ZERO_DEBUG_IMAGE 5\r
+#define FW_SET_STAMP_IMAGE 6\r
+#define FW_MCI_IMAGE 7\r
+#define FW_MERGE_IMAGE 8\r
+#define FW_RELOC_STRIPEED_IMAGE 9\r
+#define FW_HII_PACKAGE_LIST_RCIMAGE 10\r
+#define FW_HII_PACKAGE_LIST_BINIMAGE 11\r
+#define FW_REBASE_IMAGE 12\r
+#define FW_SET_ADDRESS_IMAGE 13\r
+\r
+#define DUMP_TE_HEADER 0x11\r
\r
#define DEFAULT_MC_PAD_BYTE_VALUE 0xFF\r
#define DEFAULT_MC_ALIGNMENT 16\r
#define _MAX_PATH 500\r
#endif\r
\r
-#define STATUS_IGNORE 0xA\r
+#define STATUS_IGNORE 0xA\r
//\r
// Structure definition for a microcode header\r
//\r
NULL\r
};\r
\r
-STATIC CHAR8 *mInImageName;\r
-\r
//\r
// Module image information\r
//\r
-STATIC UINT32 mImageTimeStamp = 0;\r
-STATIC UINT32 mImageSize = 0;\r
+CHAR8 *mInImageName;\r
+UINT32 mImageTimeStamp = 0;\r
+UINT32 mImageSize = 0;\r
+\r
\r
STATIC\r
EFI_STATUS\r
return STATUS_SUCCESS;\r
}\r
\r
-\r
-INTN\r
-IsElfHeader(\r
- UINT8 *FileBuffer\r
-)\r
-{\r
- return (FileBuffer[EI_MAG0] == ELFMAG0\r
- && FileBuffer[EI_MAG1] == ELFMAG1\r
- && FileBuffer[EI_MAG2] == ELFMAG2\r
- && FileBuffer[EI_MAG3] == ELFMAG3);\r
-}\r
-\r
-typedef Elf32_Shdr Elf_Shdr;\r
-typedef Elf32_Ehdr Elf_Ehdr;\r
-typedef Elf32_Rel Elf_Rel;\r
-typedef Elf32_Sym Elf_Sym;\r
-typedef Elf32_Phdr Elf_Phdr;\r
-typedef Elf32_Dyn Elf_Dyn;\r
-\r
-#define ELFCLASS ELFCLASS32\r
-#define ELF_R_TYPE(r) ELF32_R_TYPE(r)\r
-#define ELF_R_SYM(r) ELF32_R_SYM(r)\r
-#define ELF_HII_SECTION_NAME ".hii"\r
-//\r
-// Well known ELF structures.\r
-//\r
-Elf_Ehdr *Ehdr;\r
-Elf_Shdr *ShdrBase;\r
-Elf_Phdr *gPhdrBase;\r
-\r
-//\r
-// PE section alignment.\r
-//\r
-const UINT32 CoffAlignment = 0x20;\r
-const UINT16 CoffNbrSections = 5;\r
-\r
-//\r
-// Current offset in coff file.\r
-//\r
-UINT32 CoffOffset;\r
-\r
-//\r
-// Result Coff file in memory.\r
-//\r
-UINT8 *CoffFile = NULL;\r
-//\r
-// ELF sections to offset in Coff file.\r
-//\r
-UINT32 *CoffSectionsOffset = NULL;\r
-\r
-//\r
-// Offset in Coff file of headers and sections.\r
-//\r
-UINT32 NtHdrOffset;\r
-UINT32 TableOffset;\r
-UINT32 TextOffset;\r
-UINT32 DataOffset;\r
-UINT32 HiiRsrcOffset;\r
-UINT32 RelocOffset;\r
-\r
-EFI_IMAGE_BASE_RELOCATION *CoffBaseRel;\r
-UINT16 *CoffEntryRel;\r
-\r
-UINT32\r
-CoffAlign(\r
- UINT32 Offset\r
- )\r
-{\r
- return (Offset + CoffAlignment - 1) & ~(CoffAlignment - 1);\r
-}\r
-\r
-Elf_Shdr *\r
-GetShdrByIndex(\r
- UINT32 Num\r
- )\r
-{\r
- if (Num >= Ehdr->e_shnum)\r
- return NULL;\r
- return (Elf_Shdr*)((UINT8*)ShdrBase + Num * Ehdr->e_shentsize);\r
-}\r
-\r
-INTN\r
-CheckElfHeader(\r
- VOID\r
- )\r
-{\r
- //\r
- // Note: Magic has already been tested.\r
- //\r
- if (Ehdr->e_ident[EI_CLASS] != ELFCLASS) {\r
- Error (NULL, 0, 3000, "Unsupported", "%s needs to be ported for 64-bit ELF.", mInImageName);\r
- return 0;\r
- }\r
- if (Ehdr->e_ident[EI_DATA] != ELFDATA2LSB) {\r
- Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFDATA2LSB");\r
- return 0;\r
- }\r
- if ((Ehdr->e_type != ET_EXEC) && (Ehdr->e_type != ET_DYN)) {\r
- Error (NULL, 0, 3000, "Unsupported", "ELF e_type not ET_EXEC or ET_DYN");\r
- return 0;\r
- }\r
- if (!((Ehdr->e_machine == EM_386) || (Ehdr->e_machine == EM_ARM))) { \r
- Error (NULL, 0, 3000, "Unsupported", "ELF e_machine not EM_386 or EM_ARM");\r
- return 0;\r
- }\r
- if (Ehdr->e_version != EV_CURRENT) {\r
- Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) Ehdr->e_version, EV_CURRENT);\r
- return 0;\r
- }\r
-\r
- //\r
- // Find the section header table\r
- //\r
- ShdrBase = (Elf_Shdr *)((UINT8 *)Ehdr + Ehdr->e_shoff);\r
- gPhdrBase = (Elf_Phdr *)((UINT8 *)Ehdr + Ehdr->e_phoff);\r
-\r
- CoffSectionsOffset = (UINT32 *)malloc(Ehdr->e_shnum * sizeof (UINT32));\r
-\r
- memset(CoffSectionsOffset, 0, Ehdr->e_shnum * sizeof(UINT32));\r
- return 1;\r
-}\r
-\r
-int\r
-IsTextShdr(\r
- Elf_Shdr *Shdr\r
- )\r
-{\r
- return (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC;\r
-}\r
-\r
-int\r
-IsHiiRsrcShdr(\r
- Elf_Shdr *Shdr\r
- )\r
-{\r
- Elf_Shdr *Namedr = GetShdrByIndex(Ehdr->e_shstrndx);\r
-\r
- if (strcmp((CHAR8*)Ehdr + Namedr->sh_offset + Shdr->sh_name, ELF_HII_SECTION_NAME) == 0) {\r
- return 1;\r
- }\r
-\r
- return 0;\r
-}\r
-\r
-int\r
-IsDataShdr(\r
- Elf_Shdr *Shdr\r
- )\r
-{\r
- if (IsHiiRsrcShdr(Shdr)) {\r
- return 0;\r
- }\r
- return (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE);\r
-}\r
-\r
-VOID\r
-CreateSectionHeader(\r
- const CHAR8 *Name,\r
- UINT32 Offset,\r
- UINT32 Size,\r
- UINT32 Flags\r
- )\r
-{\r
- EFI_IMAGE_SECTION_HEADER *Hdr;\r
- Hdr = (EFI_IMAGE_SECTION_HEADER*)(CoffFile + TableOffset);\r
-\r
- strcpy((char *)Hdr->Name, Name);\r
- Hdr->Misc.VirtualSize = Size;\r
- Hdr->VirtualAddress = Offset;\r
- Hdr->SizeOfRawData = Size;\r
- Hdr->PointerToRawData = Offset;\r
- Hdr->PointerToRelocations = 0;\r
- Hdr->PointerToLinenumbers = 0;\r
- Hdr->NumberOfRelocations = 0;\r
- Hdr->NumberOfLinenumbers = 0;\r
- Hdr->Characteristics = Flags;\r
-\r
- TableOffset += sizeof (EFI_IMAGE_SECTION_HEADER);\r
-}\r
-\r
VOID\r
SetHiiResourceHeader (\r
UINT8 *HiiBinData,\r
return;\r
}\r
\r
-VOID\r
-ScanSections(\r
- VOID\r
- )\r
-{\r
- UINT32 i;\r
- EFI_IMAGE_DOS_HEADER *DosHdr;\r
- EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;\r
- UINT32 CoffEntry;\r
-\r
- CoffEntry = 0;\r
- CoffOffset = 0;\r
-\r
- //\r
- // Coff file start with a DOS header.\r
- //\r
- CoffOffset = sizeof(EFI_IMAGE_DOS_HEADER) + 0x40;\r
- NtHdrOffset = CoffOffset;\r
- switch (Ehdr->e_machine) {\r
- case EM_386:\r
- case EM_ARM:\r
- CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);\r
- break;\r
- case EM_X86_64:\r
- case EM_IA_64:\r
- CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64);\r
- break;\r
- default:\r
- VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)Ehdr->e_machine);\r
- CoffOffset += sizeof (EFI_IMAGE_NT_HEADERS32);\r
- break;\r
- }\r
-\r
- TableOffset = CoffOffset;\r
- CoffOffset += CoffNbrSections * sizeof(EFI_IMAGE_SECTION_HEADER);\r
-\r
- //\r
- // First text sections.\r
- //\r
- CoffOffset = CoffAlign(CoffOffset);\r
- TextOffset = CoffOffset;\r
- for (i = 0; i < Ehdr->e_shnum; i++) {\r
- Elf_Shdr *shdr = GetShdrByIndex(i);\r
- if (IsTextShdr(shdr)) {\r
- if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {\r
- // the alignment field is valid\r
- if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {\r
- // if the section address is aligned we must align PE/COFF \r
- CoffOffset = (CoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);\r
- } else if ((shdr->sh_addr % shdr->sh_addralign) != (CoffOffset % shdr->sh_addralign)) {\r
- // ARM RVCT tools have behavior outside of the ELF specification to try \r
- // and make images smaller. If sh_addr is not aligned to sh_addralign \r
- // then the section needs to preserve sh_addr MOD sh_addralign. \r
- // Normally doing nothing here works great.\r
- Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");\r
- }\r
- }\r
- \r
- /* Relocate entry. */\r
- if ((Ehdr->e_entry >= shdr->sh_addr) &&\r
- (Ehdr->e_entry < shdr->sh_addr + shdr->sh_size)) {\r
- CoffEntry = CoffOffset + Ehdr->e_entry - shdr->sh_addr;\r
- }\r
- CoffSectionsOffset[i] = CoffOffset;\r
- CoffOffset += shdr->sh_size;\r
- }\r
- }\r
-\r
- if (Ehdr->e_machine != EM_ARM) {\r
- CoffOffset = CoffAlign(CoffOffset);\r
- }\r
-\r
- //\r
- // Then data sections.\r
- //\r
- DataOffset = CoffOffset;\r
- for (i = 0; i < Ehdr->e_shnum; i++) {\r
- Elf_Shdr *shdr = GetShdrByIndex(i);\r
- if (IsDataShdr(shdr)) {\r
- if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {\r
- // the alignment field is valid\r
- if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {\r
- // if the section address is aligned we must align PE/COFF \r
- CoffOffset = (CoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);\r
- } else if ((shdr->sh_addr % shdr->sh_addralign) != (CoffOffset % shdr->sh_addralign)) {\r
- // ARM RVCT tools have behavior outside of the ELF specification to try \r
- // and make images smaller. If sh_addr is not aligned to sh_addralign \r
- // then the section needs to preserve sh_addr MOD sh_addralign. \r
- // Normally doing nothing here works great.\r
- Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");\r
- }\r
- }\r
- CoffSectionsOffset[i] = CoffOffset;\r
- CoffOffset += shdr->sh_size;\r
- }\r
- }\r
- CoffOffset = CoffAlign(CoffOffset);\r
-\r
- //\r
- // The HII resource sections.\r
- //\r
- HiiRsrcOffset = CoffOffset;\r
- for (i = 0; i < Ehdr->e_shnum; i++) {\r
- Elf_Shdr *shdr = GetShdrByIndex(i);\r
- if (IsHiiRsrcShdr(shdr)) {\r
- if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {\r
- // the alignment field is valid\r
- if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {\r
- // if the section address is aligned we must align PE/COFF \r
- CoffOffset = (CoffOffset + shdr->sh_addralign - 1) & ~(shdr->sh_addralign - 1);\r
- } else if ((shdr->sh_addr % shdr->sh_addralign) != (CoffOffset % shdr->sh_addralign)) {\r
- // ARM RVCT tools have behavior outside of the ELF specification to try \r
- // and make images smaller. If sh_addr is not aligned to sh_addralign \r
- // then the section needs to preserve sh_addr MOD sh_addralign. \r
- // Normally doing nothing here works great.\r
- Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");\r
- }\r
- }\r
- if (shdr->sh_size != 0) {\r
- CoffSectionsOffset[i] = CoffOffset;\r
- CoffOffset += shdr->sh_size;\r
- CoffOffset = CoffAlign(CoffOffset);\r
- SetHiiResourceHeader ((UINT8*) Ehdr + shdr->sh_offset, HiiRsrcOffset);\r
- }\r
- break;\r
- }\r
- }\r
-\r
- RelocOffset = CoffOffset;\r
-\r
- //\r
- // Allocate base Coff file. Will be expanded later for relocations.\r
- //\r
- CoffFile = (UINT8 *)malloc(CoffOffset);\r
- memset(CoffFile, 0, CoffOffset);\r
-\r
- //\r
- // Fill headers.\r
- //\r
- DosHdr = (EFI_IMAGE_DOS_HEADER *)CoffFile;\r
- DosHdr->e_magic = EFI_IMAGE_DOS_SIGNATURE;\r
- DosHdr->e_lfanew = NtHdrOffset;\r
-\r
- NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION*)(CoffFile + NtHdrOffset);\r
-\r
- NtHdr->Pe32.Signature = EFI_IMAGE_NT_SIGNATURE;\r
-\r
- switch (Ehdr->e_machine) {\r
- case EM_386:\r
- NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IA32;\r
- NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;\r
- break;\r
- case EM_X86_64:\r
- NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_X64;\r
- NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;\r
- break;\r
- case EM_IA_64:\r
- NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IPF;\r
- NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;\r
- break;\r
- case EM_ARM:\r
- NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_ARMT;\r
- NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;\r
- break;\r
- default:\r
- VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)Ehdr->e_machine);\r
- NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IA32;\r
- NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC;\r
- }\r
-\r
- NtHdr->Pe32.FileHeader.NumberOfSections = CoffNbrSections;\r
- NtHdr->Pe32.FileHeader.TimeDateStamp = (UINT32) time(NULL);\r
- mImageTimeStamp = NtHdr->Pe32.FileHeader.TimeDateStamp;\r
- NtHdr->Pe32.FileHeader.PointerToSymbolTable = 0;\r
- NtHdr->Pe32.FileHeader.NumberOfSymbols = 0;\r
- NtHdr->Pe32.FileHeader.SizeOfOptionalHeader = sizeof(NtHdr->Pe32.OptionalHeader);\r
- NtHdr->Pe32.FileHeader.Characteristics = EFI_IMAGE_FILE_EXECUTABLE_IMAGE\r
- | EFI_IMAGE_FILE_LINE_NUMS_STRIPPED\r
- | EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED\r
- | EFI_IMAGE_FILE_32BIT_MACHINE;\r
-\r
- NtHdr->Pe32.OptionalHeader.SizeOfCode = DataOffset - TextOffset;\r
- NtHdr->Pe32.OptionalHeader.SizeOfInitializedData = RelocOffset - DataOffset;\r
- NtHdr->Pe32.OptionalHeader.SizeOfUninitializedData = 0;\r
- NtHdr->Pe32.OptionalHeader.AddressOfEntryPoint = CoffEntry;\r
-\r
- NtHdr->Pe32.OptionalHeader.BaseOfCode = TextOffset;\r
-\r
- NtHdr->Pe32.OptionalHeader.BaseOfData = DataOffset;\r
- NtHdr->Pe32.OptionalHeader.ImageBase = 0;\r
- NtHdr->Pe32.OptionalHeader.SectionAlignment = CoffAlignment;\r
- NtHdr->Pe32.OptionalHeader.FileAlignment = CoffAlignment;\r
- NtHdr->Pe32.OptionalHeader.SizeOfImage = 0;\r
-\r
- NtHdr->Pe32.OptionalHeader.SizeOfHeaders = TextOffset;\r
- NtHdr->Pe32.OptionalHeader.NumberOfRvaAndSizes = EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES;\r
-\r
- //\r
- // Section headers.\r
- //\r
- if ((DataOffset - TextOffset) > 0) {\r
- CreateSectionHeader (".text", TextOffset, DataOffset - TextOffset,\r
- EFI_IMAGE_SCN_CNT_CODE\r
- | EFI_IMAGE_SCN_MEM_EXECUTE\r
- | EFI_IMAGE_SCN_MEM_READ);\r
- } else {\r
- // Don't make a section of size 0. \r
- NtHdr->Pe32.FileHeader.NumberOfSections--;\r
- }\r
-\r
- if ((HiiRsrcOffset - DataOffset) > 0) {\r
- CreateSectionHeader (".data", DataOffset, HiiRsrcOffset - DataOffset,\r
- EFI_IMAGE_SCN_CNT_INITIALIZED_DATA\r
- | EFI_IMAGE_SCN_MEM_WRITE\r
- | EFI_IMAGE_SCN_MEM_READ);\r
- } else {\r
- // Don't make a section of size 0. \r
- NtHdr->Pe32.FileHeader.NumberOfSections--;\r
- }\r
-\r
- if ((RelocOffset - HiiRsrcOffset) > 0) {\r
- CreateSectionHeader (".rsrc", HiiRsrcOffset, RelocOffset - HiiRsrcOffset,\r
- EFI_IMAGE_SCN_CNT_INITIALIZED_DATA\r
- | EFI_IMAGE_SCN_MEM_READ);\r
-\r
- NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = RelocOffset - HiiRsrcOffset;\r
- NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = HiiRsrcOffset;\r
- } else {\r
- // Don't make a section of size 0. \r
- NtHdr->Pe32.FileHeader.NumberOfSections--;\r
- }\r
-\r
-}\r
-\r
-VOID\r
-WriteSections(\r
- int (*Filter)(Elf_Shdr *)\r
- )\r
-{\r
- UINT32 Idx;\r
- Elf_Shdr *SecShdr;\r
- UINT32 SecOffset;\r
-\r
- //\r
- // First: copy sections.\r
- //\r
- for (Idx = 0; Idx < Ehdr->e_shnum; Idx++) {\r
- Elf_Shdr *Shdr = GetShdrByIndex(Idx);\r
- if ((*Filter)(Shdr)) {\r
- switch (Shdr->sh_type) {\r
- case SHT_PROGBITS:\r
- /* Copy. */\r
- memcpy(CoffFile + CoffSectionsOffset[Idx],\r
- (UINT8*)Ehdr + Shdr->sh_offset,\r
- Shdr->sh_size);\r
- break;\r
- \r
- case SHT_NOBITS:\r
- memset(CoffFile + CoffSectionsOffset[Idx], 0, Shdr->sh_size);\r
- break;\r
- \r
- default:\r
- //\r
- // Ignore for unkown section type.\r
- //\r
- VerboseMsg ("%s unknown section type %x. We directly copy this section into Coff file", mInImageName, (unsigned)Shdr->sh_type);\r
- break;\r
- }\r
- }\r
- }\r
-\r
- //\r
- // Second: apply relocations.\r
- //\r
- for (Idx = 0; Idx < Ehdr->e_shnum; Idx++) {\r
- Elf_Shdr *RelShdr = GetShdrByIndex(Idx);\r
- if (RelShdr->sh_type != SHT_REL)\r
- continue;\r
- SecShdr = GetShdrByIndex(RelShdr->sh_info);\r
- SecOffset = CoffSectionsOffset[RelShdr->sh_info];\r
- if (RelShdr->sh_type == SHT_REL && (*Filter)(SecShdr)) {\r
- UINT32 RelIdx;\r
- Elf_Shdr *SymtabShdr = GetShdrByIndex(RelShdr->sh_link);\r
- UINT8 *Symtab = (UINT8*)Ehdr + SymtabShdr->sh_offset;\r
-\r
- for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {\r
- Elf_Rel *Rel = (Elf_Rel *)((UINT8*)Ehdr + RelShdr->sh_offset + RelIdx);\r
- Elf_Sym *Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);\r
- Elf_Shdr *SymShdr;\r
- UINT8 *Targ;\r
-\r
- if (Sym->st_shndx == SHN_UNDEF\r
- || Sym->st_shndx == SHN_ABS\r
- || Sym->st_shndx > Ehdr->e_shnum) {\r
- Error (NULL, 0, 3000, "Invalid", "%s bad symbol definition.", mInImageName);\r
- }\r
- SymShdr = GetShdrByIndex(Sym->st_shndx);\r
-\r
- //\r
- // Note: r_offset in a memory address.\r
- // Convert it to a pointer in the coff file.\r
- //\r
- Targ = CoffFile + SecOffset + (Rel->r_offset - SecShdr->sh_addr);\r
-\r
- if (Ehdr->e_machine == EM_386) {\r
- switch (ELF_R_TYPE(Rel->r_info)) {\r
- case R_386_NONE:\r
- break;\r
- case R_386_32:\r
- //\r
- // Absolute relocation.\r
- //\r
- *(UINT32 *)Targ = *(UINT32 *)Targ - SymShdr->sh_addr\r
- + CoffSectionsOffset[Sym->st_shndx];\r
- break;\r
- case R_386_PC32:\r
- //\r
- // Relative relocation: Symbol - Ip + Addend\r
- //\r
- *(UINT32 *)Targ = *(UINT32 *)Targ\r
- + (CoffSectionsOffset[Sym->st_shndx] - SymShdr->sh_addr)\r
- - (SecOffset - SecShdr->sh_addr);\r
- break;\r
- default:\r
- Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_386 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));\r
- }\r
- } else if (Ehdr->e_machine == EM_ARM) {\r
- switch (ELF32_R_TYPE(Rel->r_info)) {\r
- case R_ARM_RBASE: // No relocation - no action required\r
- \r
- // Thease are all PC-relative relocations and don't require modification\r
- case R_ARM_PC24: \r
- case R_ARM_XPC25: \r
- case R_ARM_THM_PC22:\r
- case R_ARM_THM_JUMP19:\r
- case R_ARM_CALL:\r
- break;\r
-\r
- case R_ARM_ABS32:\r
- case R_ARM_RABS32:\r
- //\r
- // Absolute relocation.\r
- //\r
- *(UINT32 *)Targ = *(UINT32 *)Targ - SymShdr->sh_addr + CoffSectionsOffset[Sym->st_shndx];\r
- break;\r
- default:\r
- Error (NULL, 0, 3000, "Invalid", "WriteSections (): %s unsupported ELF EM_ARM relocation 0x%x.", mInImageName, (unsigned) ELF32_R_TYPE(Rel->r_info));\r
- }\r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-VOID\r
-CoffAddFixupEntry(\r
- UINT16 Val\r
- )\r
-{\r
- *CoffEntryRel = Val;\r
- CoffEntryRel++;\r
- CoffBaseRel->SizeOfBlock += 2;\r
- CoffOffset += 2;\r
-}\r
-\r
-VOID\r
-CoffAddFixup(\r
- UINT32 Offset,\r
- UINT8 Type\r
- )\r
-{\r
- if (CoffBaseRel == NULL\r
- || CoffBaseRel->VirtualAddress != (Offset & ~0xfff)) {\r
- if (CoffBaseRel != NULL) {\r
- //\r
- // Add a null entry (is it required ?)\r
- //\r
- CoffAddFixupEntry (0);\r
- //\r
- // Pad for alignment.\r
- //\r
- if (CoffOffset % 4 != 0)\r
- CoffAddFixupEntry (0);\r
- }\r
-\r
- CoffFile = realloc\r
- (CoffFile,\r
- CoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000);\r
- memset(CoffFile + CoffOffset, 0,\r
- sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000);\r
-\r
- CoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(CoffFile + CoffOffset);\r
- CoffBaseRel->VirtualAddress = Offset & ~0xfff;\r
- CoffBaseRel->SizeOfBlock = sizeof(EFI_IMAGE_BASE_RELOCATION);\r
-\r
- CoffEntryRel = (UINT16 *)(CoffBaseRel + 1);\r
- CoffOffset += sizeof(EFI_IMAGE_BASE_RELOCATION);\r
- }\r
-\r
- //\r
- // Fill the entry.\r
- //\r
- CoffAddFixupEntry((UINT16) ((Type << 12) | (Offset & 0xfff)));\r
-}\r
-\r
-\r
-Elf_Phdr *\r
-GetPhdrByIndex (\r
- UINT32 num\r
- )\r
-{\r
- if (num >= Ehdr->e_phnum) {\r
- return NULL;\r
- }\r
- \r
- return (Elf32_Phdr *)((UINT8*)gPhdrBase + num * Ehdr->e_phentsize);\r
-}\r
-\r
-\r
-VOID\r
-WriteRelocations (\r
- VOID\r
- )\r
-{\r
- UINT32 Index;\r
- EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;\r
- EFI_IMAGE_DATA_DIRECTORY *Dir;\r
- BOOLEAN FoundRelocations;\r
- Elf_Dyn *Dyn;\r
- Elf_Rel *Rel;\r
- UINTN RelElementSize;\r
- UINTN RelSize;\r
- UINTN RelOffset;\r
- UINTN K;\r
- UINT8 *Targ;\r
- Elf32_Phdr *DynamicSegment;\r
- Elf32_Phdr *TargetSegment;\r
-\r
- for (Index = 0, FoundRelocations = FALSE; Index < Ehdr->e_shnum; Index++) {\r
- Elf_Shdr *RelShdr = GetShdrByIndex(Index);\r
- if (RelShdr->sh_type == SHT_REL) {\r
- Elf_Shdr *SecShdr = GetShdrByIndex(RelShdr->sh_info);\r
- if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) {\r
- UINT32 RelIdx;\r
- FoundRelocations = TRUE;\r
- for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {\r
- Elf_Rel *Rel = (Elf_Rel *)\r
- ((UINT8*)Ehdr + RelShdr->sh_offset + RelIdx);\r
- \r
- if (Ehdr->e_machine == EM_386) { \r
- switch (ELF_R_TYPE(Rel->r_info)) {\r
- case R_386_NONE:\r
- case R_386_PC32:\r
- break;\r
- case R_386_32:\r
- CoffAddFixup(CoffSectionsOffset[RelShdr->sh_info]\r
- + (Rel->r_offset - SecShdr->sh_addr),\r
- EFI_IMAGE_REL_BASED_HIGHLOW);\r
- break;\r
- default:\r
- Error (NULL, 0, 3000, "Invalid", "%s unsupported ELF EM_386 relocation 0x%x.", mInImageName, (unsigned) ELF_R_TYPE(Rel->r_info));\r
- }\r
- } else if (Ehdr->e_machine == EM_ARM) {\r
- switch (ELF32_R_TYPE(Rel->r_info)) {\r
- case R_ARM_RBASE: // No relocation - no action required\r
- \r
- // Thease are all PC-relative relocations and don't require modification\r
- case R_ARM_PC24:\r
- case R_ARM_XPC25:\r
- case R_ARM_THM_PC22:\r
- case R_ARM_THM_JUMP19:\r
- case R_ARM_CALL:\r
- break;\r
- case R_ARM_ABS32:\r
- case R_ARM_RABS32:\r
- CoffAddFixup (\r
- CoffSectionsOffset[RelShdr->sh_info]\r
- + (Rel->r_offset - SecShdr->sh_addr),\r
- EFI_IMAGE_REL_BASED_HIGHLOW\r
- );\r
- break;\r
-\r
- default:\r
- Error (NULL, 0, 3000, "Invalid", "WriteRelocations(): %s unsupported ELF EM_ARM relocation 0x%x.", mInImageName, (unsigned) ELF32_R_TYPE(Rel->r_info));\r
- }\r
- } else {\r
- Error (NULL, 0, 3000, "Not Supported", "This tool does not support relocations for ELF with e_machine %u (processor type).", (unsigned) Ehdr->e_machine);\r
- }\r
- }\r
- }\r
- }\r
- }\r
-\r
- if (!FoundRelocations && (Ehdr->e_machine == EM_ARM)) {\r
- /* Try again, but look for PT_DYNAMIC instead of SHT_REL */\r
-\r
- for (Index = 0; Index < Ehdr->e_phnum; Index++) {\r
- RelElementSize = 0;\r
- RelSize = 0;\r
- RelOffset = 0;\r
-\r
- DynamicSegment = GetPhdrByIndex (Index);\r
-\r
- if (DynamicSegment->p_type == PT_DYNAMIC) {\r
- Dyn = (Elf32_Dyn *) ((UINT8 *)Ehdr + DynamicSegment->p_offset);\r
-\r
- while (Dyn->d_tag != DT_NULL) {\r
- switch (Dyn->d_tag) {\r
- case DT_REL:\r
- RelOffset = Dyn->d_un.d_val;\r
- break;\r
-\r
- case DT_RELSZ:\r
- RelSize = Dyn->d_un.d_val;\r
- break;\r
-\r
- case DT_RELENT:\r
- RelElementSize = Dyn->d_un.d_val;\r
- break;\r
-\r
- default:\r
- break;\r
- }\r
- Dyn++;\r
- }\r
- if (( RelOffset == 0 ) || ( RelSize == 0 ) || ( RelElementSize == 0 )) {\r
- Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations.", mInImageName);\r
- }\r
-\r
- for (K = 0; K < RelSize; K += RelElementSize) {\r
-\r
- if (DynamicSegment->p_paddr == 0) {\r
- // This seems to be how it works on armcc???? Have the email in to find out?\r
- Rel = (Elf32_Rel *) ((UINT8 *) Ehdr + DynamicSegment->p_offset + RelOffset + K);\r
- } else {\r
- // This is how it reads in the ELF specification\r
- Rel = (Elf32_Rel *) ((UINT8 *) Ehdr + RelOffset + K);\r
- }\r
-\r
- switch (ELF32_R_TYPE (Rel->r_info)) {\r
- case R_ARM_RBASE:\r
- break;\r
- case R_ARM_RABS32:\r
- TargetSegment = GetPhdrByIndex (ELF32_R_SYM (Rel->r_info) - 1);\r
-\r
- // Note: r_offset in a memory address. Convert it to a pointer in the coff file.\r
- Targ = CoffFile + CoffSectionsOffset[ ELF32_R_SYM( Rel->r_info ) ] + Rel->r_offset - TargetSegment->p_vaddr;\r
-\r
- *(UINT32 *)Targ = *(UINT32 *)Targ + CoffSectionsOffset [ELF32_R_SYM( Rel->r_info )];\r
-\r
- CoffAddFixup (CoffSectionsOffset[ELF32_R_SYM (Rel->r_info)] + (Rel->r_offset - TargetSegment->p_vaddr), EFI_IMAGE_REL_BASED_HIGHLOW);\r
- break;\r
- default:\r
- Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations, unkown type %d.", mInImageName, ELF32_R_TYPE (Rel->r_info));\r
- break;\r
- }\r
- }\r
- break;\r
- }\r
- }\r
- }\r
-\r
- //\r
- // Pad by adding empty entries.\r
- //\r
- while (CoffOffset & (CoffAlignment - 1)) {\r
- CoffAddFixupEntry(0);\r
- }\r
-\r
-\r
- NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(CoffFile + NtHdrOffset);\r
- Dir = &NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC];\r
- Dir->Size = CoffOffset - RelocOffset;\r
- if (Dir->Size == 0) {\r
- // If no relocations, null out the directory entry and don't add the .reloc section\r
- Dir->VirtualAddress = 0;\r
- NtHdr->Pe32.FileHeader.NumberOfSections--;\r
- } else {\r
- Dir->VirtualAddress = RelocOffset;\r
- CreateSectionHeader (".reloc", RelocOffset, CoffOffset - RelocOffset,\r
- EFI_IMAGE_SCN_CNT_INITIALIZED_DATA\r
- | EFI_IMAGE_SCN_MEM_DISCARDABLE\r
- | EFI_IMAGE_SCN_MEM_READ);\r
- }\r
-\r
-}\r
-\r
-VOID\r
-WriteDebug(\r
- VOID\r
- )\r
-{\r
- UINT32 Len;\r
- UINT32 DebugOffset;\r
- EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;\r
- EFI_IMAGE_DATA_DIRECTORY *DataDir;\r
- EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir;\r
- EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;\r
-\r
- Len = strlen(mInImageName) + 1;\r
- DebugOffset = CoffOffset;\r
-\r
- CoffOffset += sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)\r
- + sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)\r
- + Len;\r
- CoffOffset = CoffAlign(CoffOffset);\r
-\r
- CoffFile = realloc(CoffFile, CoffOffset);\r
- memset(CoffFile + DebugOffset, 0, CoffOffset - DebugOffset);\r
-\r
- Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(CoffFile + DebugOffset);\r
- Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW;\r
- Dir->SizeOfData = sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) + Len;\r
- Dir->RVA = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);\r
- Dir->FileOffset = DebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);\r
-\r
- Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);\r
- Nb10->Signature = CODEVIEW_SIGNATURE_NB10;\r
- strcpy ((char *)(Nb10 + 1), mInImageName);\r
-\r
-\r
- NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(CoffFile + NtHdrOffset);\r
- DataDir = &NtHdr->Pe32.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG];\r
- DataDir->VirtualAddress = DebugOffset;\r
- DataDir->Size = CoffOffset - DebugOffset;\r
- if (DataDir->Size == 0) {\r
- // If no debug, null out the directory entry and don't add the .debug section\r
- DataDir->VirtualAddress = 0;\r
- NtHdr->Pe32.FileHeader.NumberOfSections--;\r
- } else {\r
- DataDir->VirtualAddress = DebugOffset;\r
- CreateSectionHeader (".debug", DebugOffset, CoffOffset - DebugOffset,\r
- EFI_IMAGE_SCN_CNT_INITIALIZED_DATA\r
- | EFI_IMAGE_SCN_MEM_DISCARDABLE\r
- | EFI_IMAGE_SCN_MEM_READ);\r
-\r
- }\r
-}\r
-\r
-VOID\r
-ConvertElf (\r
- UINT8 **FileBuffer,\r
- UINT32 *FileLength\r
- )\r
-{\r
- EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;\r
-\r
- //\r
- // Check header, read section table.\r
- //\r
- Ehdr = (Elf32_Ehdr*)*FileBuffer;\r
- if (!CheckElfHeader())\r
- return;\r
-\r
- VerboseMsg ("Check Efl Image Header");\r
- //\r
- // Compute sections new address.\r
- //\r
- \r
- ScanSections();\r
-\r
- VerboseMsg ("Compute sections new address.");\r
-\r
- //\r
- // Write and relocate sections.\r
- //\r
- WriteSections(IsTextShdr);\r
- WriteSections(IsDataShdr);\r
- WriteSections(IsHiiRsrcShdr);\r
- VerboseMsg ("Write and relocate sections.");\r
-\r
- //\r
- // Translate and write relocations.\r
- //\r
- WriteRelocations();\r
- VerboseMsg ("Translate and write relocations.");\r
-\r
- //\r
- // Write debug info.\r
- //\r
- WriteDebug();\r
- VerboseMsg ("Write debug info.");\r
-\r
- NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(CoffFile + NtHdrOffset);\r
- NtHdr->Pe32.OptionalHeader.SizeOfImage = CoffOffset;\r
-\r
- //\r
- // Replace.\r
- //\r
- free(*FileBuffer);\r
- *FileBuffer = CoffFile;\r
- *FileLength = CoffOffset;\r
-\r
- //\r
- // Free memory space\r
- //\r
- if (CoffSectionsOffset != NULL) {\r
- free (CoffSectionsOffset);\r
- }\r
-}\r
-\r
-\r
EFI_IMAGE_OPTIONAL_HEADER_UNION *\r
GetPeCoffHeader (\r
void *Data\r
// Convert EFL image to PeImage\r
//\r
if (IsElfHeader(FileBuffer)) {\r
- VerboseMsg ("Convert the input ELF Image to Pe Image");\r
- ConvertElf(&FileBuffer, &FileLength);\r
+ VerboseMsg ("Convert %s from ELF to PE/COFF.", mInImageName);\r
+ if (!ConvertElf(&FileBuffer, &FileLength)) {\r
+ Error (NULL, 0, 3000, "Invalid", "Unable to convert %s from ELF to PE/COFF.", mInImageName);\r
+ goto Finish;\r
+ }\r
}\r
\r
//\r
--- /dev/null
+/** @file
+
+Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _GEN_FW_H_
+#define _GEN_FW_H_
+
+VOID
+SetHiiResourceHeader (
+ UINT8 *HiiBinData,
+ UINT32 OffsetToFile
+ );
+
+INTN
+IsElfHeader (
+ UINT8 *FileBuffer
+ );
+
+BOOLEAN
+ConvertElf (
+ UINT8 **FileBuffer,
+ UINT32 *FileLength
+ );
+
+#endif
## @file\r
# Windows makefile for 'GenFw' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
LIBS = $(LIB_PATH)\Common.lib\r
\r
-OBJECTS = GenFw.obj\r
+OBJECTS = GenFw.obj ElfConvert.obj Elf32Convert.obj Elf64Convert.obj\r
\r
#CFLAGS = $(CFLAGS) /nodefaultlib:libc.lib\r
\r
/** @file
Ported ELF include files from FreeBSD
-Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
-All rights reserved. This program and the accompanying materials
+Copyright (c) 2009 - 2010, Apple Inc. 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
/** @file
Ported ELF include files from FreeBSD
-Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
-All rights reserved. This program and the accompanying materials
+Copyright (c) 2009 - 2010, Apple Inc. 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
/** @file
Ported ELF include files from FreeBSD
-Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
-All rights reserved. This program and the accompanying materials
+Copyright (c) 2009 - 2010, Apple Inc. 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
#define R_ARM_GOTPC 25 /* Add PC-relative GOT table address. */
#define R_ARM_GOT32 26 /* Add PC-relative GOT offset. */
#define R_ARM_PLT32 27 /* Add PC-relative PLT offset. */
-#define R_ARM_CALL 28
+#define R_ARM_CALL 28
+#define R_ARM_JMP24 29
+#define R_ARM_THM_MOVW_ABS_NC 47
+#define R_ARM_THM_MOVT_ABS 48
+
#define R_ARM_THM_JUMP19 51
#define R_ARM_GNU_VTENTRY 100
#define R_ARM_GNU_VTINHERIT 101
## @file\r
# Windows makefile for 'GenPage' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright 2006 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenPage' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file \r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenSec' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GenSec' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'GenVtf' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/**\r
\r
-Copyright (c) 1999-2010 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
/** @file\r
\r
-Copyright (c) 1999-2008 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
## @file\r
# Windows makefile for 'GenVtf' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
Fat file system structure and definition.\r
\r
-Copyright 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'GnuGenBootSector' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright 2006 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
This file is stand alone self consistent set of definitions. \r
\r
- Copyright (c) 2006, Intel Corporation \r
- All rights reserved. This program and the accompanying materials \r
+ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
typedef UINT64 PHYSICAL_ADDRESS;\r
\r
+#define BIT0 0x00000001\r
+#define BIT1 0x00000002\r
+#define BIT2 0x00000004\r
+#define BIT3 0x00000008\r
+#define BIT4 0x00000010\r
+#define BIT5 0x00000020\r
+#define BIT6 0x00000040\r
+#define BIT7 0x00000080\r
+#define BIT8 0x00000100\r
+#define BIT9 0x00000200\r
+#define BIT10 0x00000400\r
+#define BIT11 0x00000800\r
+#define BIT12 0x00001000\r
+#define BIT13 0x00002000\r
+#define BIT14 0x00004000\r
+#define BIT15 0x00008000\r
+#define BIT16 0x00010000\r
+#define BIT17 0x00020000\r
+#define BIT18 0x00040000\r
+#define BIT19 0x00080000\r
+#define BIT20 0x00100000\r
+#define BIT21 0x00200000\r
+#define BIT22 0x00400000\r
+#define BIT23 0x00800000\r
+#define BIT24 0x01000000\r
+#define BIT25 0x02000000\r
+#define BIT26 0x04000000\r
+#define BIT27 0x08000000\r
+#define BIT28 0x10000000\r
+#define BIT29 0x20000000\r
+#define BIT30 0x40000000\r
+#define BIT31 0x80000000\r
+#define BIT32 0x0000000100000000ULL\r
+#define BIT33 0x0000000200000000ULL\r
+#define BIT34 0x0000000400000000ULL\r
+#define BIT35 0x0000000800000000ULL\r
+#define BIT36 0x0000001000000000ULL\r
+#define BIT37 0x0000002000000000ULL\r
+#define BIT38 0x0000004000000000ULL\r
+#define BIT39 0x0000008000000000ULL\r
+#define BIT40 0x0000010000000000ULL\r
+#define BIT41 0x0000020000000000ULL\r
+#define BIT42 0x0000040000000000ULL\r
+#define BIT43 0x0000080000000000ULL\r
+#define BIT44 0x0000100000000000ULL\r
+#define BIT45 0x0000200000000000ULL\r
+#define BIT46 0x0000400000000000ULL\r
+#define BIT47 0x0000800000000000ULL\r
+#define BIT48 0x0001000000000000ULL\r
+#define BIT49 0x0002000000000000ULL\r
+#define BIT50 0x0004000000000000ULL\r
+#define BIT51 0x0008000000000000ULL\r
+#define BIT52 0x0010000000000000ULL\r
+#define BIT53 0x0020000000000000ULL\r
+#define BIT54 0x0040000000000000ULL\r
+#define BIT55 0x0080000000000000ULL\r
+#define BIT56 0x0100000000000000ULL\r
+#define BIT57 0x0200000000000000ULL\r
+#define BIT58 0x0400000000000000ULL\r
+#define BIT59 0x0800000000000000ULL\r
+#define BIT60 0x1000000000000000ULL\r
+#define BIT61 0x2000000000000000ULL\r
+#define BIT62 0x4000000000000000ULL\r
+#define BIT63 0x8000000000000000ULL\r
+\r
#endif\r
/** @file\r
EDK II specific HII relative definition.\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
The firmware file related definitions in PI.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
The firmware volume related definitions in PI.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Defines data types and constants introduced in UEFI.\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Defines for the EFI Capsule functionality.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
IFR is primarily consumed by the EFI presentation engine, and produced by EFI\r
internal application and drivers as well as all add-in card option-ROM drivers\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/**@file\r
Header file for EFI Variable Services.\r
\r
- Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved. <BR>\r
+ Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
working block, the header structure of the variable block, FTW\r
working block, or event log block.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Terminal Device Path Vendor Guid.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
Guid used to define the Firmware File System. See PI spec volume 3 for more\r
details.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Processor or Compiler specific defines and types for x64.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
This file contains some basic ACPI definitions that are consumed by drivers\r
that do not care about ACPI versions.\r
\r
- Copyright (c) 2006, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b\r
\r
- Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved. \r
+ Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
ACPI 2.0 definitions from the ACPI Specification, revision 2.0\r
\r
- Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved. \r
+ Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004\r
\r
- Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved. \r
+ Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Support for EFI PCI specification.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
in the PCI Firmware Specification, version 3.0 draft version 0.5.\r
Specification is available at http://www.pcisig.com.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved. \r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
\r
@bug Fix text - doc as defined in MSFT EFI specification.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).\r
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.\r
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.\r
+#define EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 // Supports addresses > 2-GB\r
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.\r
#define EFI_IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.\r
#define EFI_IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file\r
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9\r
#define EFI_IMAGE_REL_BASED_DIR64 10\r
\r
+#define EFI_IMAGE_REL_BASED_ARM_THUMB_MOVW 11\r
+#define EFI_IMAGE_REL_BASED_ARM_THUMB_MOVT 12\r
+\r
///\r
/// Line number format.\r
///\r
/** @file\r
Support for PCI 2.2 standard.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Support for PCI 2.3 standard.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Support for PCI 3.0 standard.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
from a software point of view. It also must persist from boot to boot, so \r
it can not contain things like PCI bus numbers that change from boot to boot.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
\r
Abstraction of a very simple graphics device.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
section extraction protocol. That is, all instances of the GUIDed section\r
extraction protocol must have the same interface structure.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
be used by resources which want to publish IFR/Font/String data and have it\r
collected by the Configuration engine.\r
\r
- Copyright (c) 2007, Intel Corporation All rights reserved.\r
+ Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
\r
Abstraction of a very simple graphics device.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
/** @file\r
Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64).\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation All rights reserved.\r
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
## @file\r
# Windows makefile for 'LzmaCompress' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
LzmaUtil.c -- Test application for LZMA compression\r
2008-11-23 : Igor Pavlov : Public domain\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'LzmaCompress' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for C tools build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
@REM ## @file\r
@REM #\r
-@REM # Copyright (c) 2007 - 2010, Intel Corporation\r
-@REM # All rights reserved. This program and the accompanying materials\r
+@REM # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+@REM # This program and the accompanying materials\r
@REM # are licensed and made available under the terms and conditions of the BSD License\r
@REM # which accompanies this distribution. The full text of the license may be found at\r
@REM # http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# ARCH = ia32 or IA32 for IA32 build
# ARCH = ia64 or IA64 for IA64 build
#
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved\r
+Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# package and install PyEfiCompressor extension\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved\r
+Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
## @file\r
# package and install PyEfiCompressor extension\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'Split' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'Split' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
Split a file into two pieces at the request offset.\r
\r
-Copyright (c) 1999-2010 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
## @file\r
# Windows makefile for 'TianoCompress' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'TianoCompress' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2007 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/** @file\r
Internal include file for Tiano Decompress Libary.\r
\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
/** @file\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'VfrCompile' module build.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'VfrCompile' module build.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
VfrCompiler main class and main function.\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
VfrCompiler internal defintions.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
VfrCompiler error handler.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
VfrCompiler Error definition\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
The definition of CFormPkg's member function\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
The definition of CFormPkg's member function\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
/*++\r
-Copyright (c) 2004 - 2010, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
vfrStatementString :\r
<<\r
CIfrString SObj;\r
+ UINT32 VarArraySize;\r
+ UINT8 StringMinSize;\r
+ UINT8 StringMaxSize;\r
>>\r
L:String << SObj.SetLineNo(L->getLine()); >>\r
vfrQuestionHeader[SObj] ","\r
{\r
Key "=" KN:Number "," << AssignQuestionKey (SObj, KN); >>\r
}\r
- MinSize "=" MIN:Number "," << SObj.SetMinSize (_STOU8(MIN->getText())); >>\r
- MaxSize "=" MAX:Number "," << SObj.SetMaxSize (_STOU8(MAX->getText())); >>\r
+ MinSize "=" MIN:Number "," << \r
+ VarArraySize = _GET_CURRQEST_ARRAY_SIZE();\r
+ StringMinSize = _STOU8(MIN->getText());\r
+ if (_STOU64(MIN->getText()) > StringMinSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MIN->getLine(), "String MinSize takes only one byte, which can't be larger than 0xFF.");\r
+ } else if (VarArraySize != 0 && StringMinSize > VarArraySize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MIN->getLine(), "String MinSize can't be larger than the max number of elements in string array.");\r
+ }\r
+ SObj.SetMinSize (StringMinSize);\r
+ >>\r
+ MaxSize "=" MAX:Number "," << \r
+ StringMaxSize = _STOU8(MAX->getText());\r
+ if (_STOU64(MAX->getText()) > StringMaxSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "String MaxSize takes only one byte, which can't be larger than 0xFF.");\r
+ } else if (VarArraySize != 0 && StringMaxSize > VarArraySize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "String MaxSize can't be larger than the max number of elements in string array.");\r
+ } else if (StringMaxSize < StringMinSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "String MaxSize can't be less than String MinSize.");\r
+ }\r
+ SObj.SetMaxSize (StringMaxSize);\r
+ >>\r
vfrStatementQuestionOptionList\r
E:EndString << CRT_END_OP (E); >>\r
";"\r
vfrStatementPassword :\r
<<\r
CIfrPassword PObj;\r
+ UINT32 VarArraySize;\r
+ UINT16 PasswordMinSize;\r
+ UINT16 PasswordMaxSize;\r
>>\r
L:Password << PObj.SetLineNo(L->getLine()); >>\r
vfrQuestionHeader[PObj] ","\r
{\r
Key "=" KN:Number "," << AssignQuestionKey (PObj, KN); >>\r
}\r
- MinSize "=" MIN:Number "," << PObj.SetMinSize (_STOU16(MIN->getText())); >>\r
- MaxSize "=" MAX:Number "," << PObj.SetMaxSize (_STOU16(MAX->getText())); >>\r
+ MinSize "=" MIN:Number "," << \r
+ VarArraySize = _GET_CURRQEST_ARRAY_SIZE();\r
+ PasswordMinSize = _STOU16(MIN->getText());\r
+ if (_STOU64(MIN->getText()) > PasswordMinSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MIN->getLine(), "Password MinSize takes only two byte, which can't be larger than 0xFFFF.");\r
+ } else if (VarArraySize != 0 && PasswordMinSize > VarArraySize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MIN->getLine(), "Password MinSize can't be larger than the max number of elements in password array.");\r
+ }\r
+ PObj.SetMinSize (PasswordMinSize);\r
+ >>\r
+ MaxSize "=" MAX:Number "," << \r
+ PasswordMaxSize = _STOU16(MAX->getText());\r
+ if (_STOU64(MAX->getText()) > PasswordMaxSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "Password MaxSize takes only two byte, which can't be larger than 0xFFFF.");\r
+ } else if (VarArraySize != 0 && PasswordMaxSize > VarArraySize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "Password MaxSize can't be larger than the max number of elements in password array.");\r
+ } else if (PasswordMaxSize < PasswordMinSize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, MAX->getLine(), "Password MaxSize can't be less than Password MinSize.");\r
+ }\r
+ PObj.SetMaxSize (PasswordMaxSize);\r
+ >>\r
{ Encoding "=" Number "," }\r
vfrStatementQuestionOptionList\r
E:EndPassword << CRT_END_OP (E); >>\r
vfrStatementOrderedList :\r
<<\r
CIfrOrderedList OLObj;\r
+ UINT32 VarArraySize;\r
>>\r
L:OrderedList << OLObj.SetLineNo(L->getLine()); >>\r
vfrQuestionHeader[OLObj] ","\r
- << OLObj.SetMaxContainers ((UINT8) _GET_CURRQEST_ARRAY_SIZE()); >>\r
+ << \r
+ VarArraySize = _GET_CURRQEST_ARRAY_SIZE();\r
+ OLObj.SetMaxContainers ((UINT8) (VarArraySize > 0xFF ? 0xFF : VarArraySize));\r
+ >>\r
{\r
- MaxContainers "=" M:Number "," << OLObj.SetMaxContainers (_STOU8(M->getText())); >>\r
+ MaxContainers "=" M:Number "," << \r
+ if (_STOU64(M->getText()) > _STOU8(M->getText())) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, M->getLine(), "OrderedList MaxContainers takes only one byte, which can't be larger than 0xFF.");\r
+ } else if (VarArraySize != 0 && _STOU8(M->getText()) > VarArraySize) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, M->getLine(), "OrderedList MaxContainers can't be larger than the max number of elements in array.");\r
+ }\r
+ OLObj.SetMaxContainers (_STOU8(M->getText()));\r
+ >>\r
}\r
{ F:FLAGS "=" vfrOrderedListFlags[OLObj, F->getLine()] }\r
vfrStatementQuestionOptionList\r
(\r
vfrQuestionHeader[TObj, QUESTION_TIME] ","\r
{ F:FLAGS "=" vfrTimeFlags[TObj, F->getLine()] "," }\r
- vfrStatementDefault\r
+ vfrStatementQuestionOptionList\r
)\r
|\r
(\r
\r
Vfr common library functions.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
\r
Vfr common library functions.\r
\r
-Copyright (c) 2004 - 2010, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
http://opensource.org/licenses/bsd-license.php \r
## @file\r
# Windows makefile for 'VolInfo' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for 'VolInfo' module build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/** @file
-Copyright (c) 1999 - 2010, Intel Corporation
-All rights reserved. This program and the accompanying materials
+Copyright (c) 1999 - 2010, 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
static
EFI_STATUS
PrintFvInfo (
- IN VOID *Fv
+ IN VOID *Fv,
+ IN BOOLEAN IsChildFv
);
static
LoadGuidedSectionToolsTxt (argv[0]);
- PrintFvInfo (FvImage);
+ PrintFvInfo (FvImage, FALSE);
//
// Clean up
static
EFI_STATUS
PrintFvInfo (
- IN VOID *Fv
+ IN VOID *Fv,
+ IN BOOLEAN IsChildFv
)
/*++
Arguments:
Fv - Firmware Volume to print information about
+ IsChildFv - Flag specifies whether the input FV is a child FV.
Returns:
}
}
- printf ("There are a total of %d files in this FV\n", (int) NumberOfFiles);
+ if (IsChildFv) {
+ printf ("There are a total of %d files in the child FV\n", (int) NumberOfFiles);
+ } else {
+ printf ("There are a total of %d files in this FV\n", (int) NumberOfFiles);
+ }
return EFI_SUCCESS;
}
break;
case EFI_SECTION_FIRMWARE_VOLUME_IMAGE:
- Status = PrintFvInfo (((EFI_FIRMWARE_VOLUME_IMAGE_SECTION*)Ptr) + 1);
+ Status = PrintFvInfo (((EFI_FIRMWARE_VOLUME_IMAGE_SECTION*)Ptr) + 1, TRUE);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 0003, "printing of FV section contents failed", NULL);
return EFI_SECTION_ERROR;
/** @file
-Copyright (c) 1999 - 2008, Intel Corporation
-All rights reserved. This program and the accompanying materials
+Copyright (c) 1999 - 2008, 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
## @file\r
# Generate AutoGen.h, AutoGen.c and *.depex files\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
return\r
\r
for ModuleType in self.DepexList:\r
- if len(self.DepexList[ModuleType]) == 0:\r
+ # Ignore empty [depex] section or [depex] section for "USER_DEFINED" module\r
+ if len(self.DepexList[ModuleType]) == 0 or ModuleType == "USER_DEFINED":\r
continue\r
+\r
Dpx = GenDepex.DependencyExpression(self.DepexList[ModuleType], ModuleType, True)\r
DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}\r
\r
## @file
# The engine for building files
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, 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
## @file
# Routines for generating AutoGen.h and AutoGen.c
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, 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
## @file\r
# This file is used to generate DEPEX file for module's dependency expression\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Create makefile for MS nmake and GNU make
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, 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
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# Import Modules\r
#\r
import os, codecs, re\r
+import distutils.util\r
import Common.EdkLogger as EdkLogger\r
from Common.BuildToolError import *\r
from Common.String import GetLineNo\r
else:\r
EdkLogger.error("Unicode File Parser", FORMAT_INVALID, "Invalid ISO 639-2 language code : %s" % LangName, File)\r
\r
+ if (LangName[0] == 'X' or LangName[0] == 'x') and LangName[1] == '-':\r
+ return LangName\r
if length == 2:\r
if LangName.isalpha():\r
return LangName\r
# Get Language definition\r
#\r
def GetLangDef(self, File, Line):\r
- Lang = Line.split(u"//")[0].split()\r
+ Lang = distutils.util.split_quoted((Line.split(u"//")[0]))\r
if len(Lang) != 3:\r
try:\r
- FileIn = codecs.open(File, mode='rb', encoding='utf-16').read()\r
+ FileIn = codecs.open(File.Path, mode='rb', encoding='utf-16').read()\r
except UnicodeError, X:\r
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File);\r
except:\r
EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=File);\r
LineNo = GetLineNo(FileIn, Line, False)\r
EdkLogger.error("Unicode File Parser", PARSER_ERROR, "Wrong language definition",\r
- ExtraData="""%s\n\t*Correct format is like '#langdef eng "English"'""" % Line, File = File, Line = LineNo)\r
+ ExtraData="""%s\n\t*Correct format is like '#langdef en-US "English"'""" % Line, File = File, Line = LineNo)\r
else:\r
LangName = GetLanguageCode(Lang[1], self.IsCompatibleMode, self.File)\r
- LangPrintName = Lang[2][1:-1]\r
+ LangPrintName = Lang[2]\r
\r
IsLangInDef = False\r
for Item in self.LanguageDef:\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Standardized Error Hanlding infrastructures.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, 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
## @file\r
# This file is used to define common static strings used by INF/DEC/DSC files\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create a database used by ECC tool\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of DEC file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of DEC file in light mode\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Define a dictionary structure\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of DSC file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This is the base class for applications that operate on an EDK II Workspace \r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of the build database\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# This file implements the log mechanism for Python tools.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, 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
## @file\r
# This file is used to define each component of FDF file\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# parse FDF file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, 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
## @file\r
# This file is used to define the identification of INF/DEC/DSC files\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of INF file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of INF file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Contains several utilitities shared by migration tools.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Common routines used by all tools
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, 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
RealFile, RealRoot = RealPath2(self.File, self.Root, self.AlterRoot)
if not RealRoot and not RealFile:
- return FILE_NOT_FOUND, self.File
+ RealFile = self.File
+ if self.AlterRoot:
+ RealFile = os.path.join(self.AlterRoot, self.File)
+ elif self.Root:
+ RealFile = os.path.join(self.Root, self.File)
+ return FILE_NOT_FOUND, os.path.join(self.AlterRoot, RealFile)
ErrorCode = 0
ErrorInfo = ''
## @file\r
# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process\r
#\r
-# Copyright (c) 2008 ~ 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define common string related functions used in parsing process\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of Target.txt file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define each component of tools_def.txt file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to parse a xml file of .PKG file\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This is an XML API that uses a syntax similar to XPath, but it is written in\r
# standard python so that no extra python packages are required to use it.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define common items of class object\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define class for data sturcture used in ECC\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define a class object to describe a distribution package\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# classes represent data in FDF\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define a class object to describe a module\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define a class object to describe a package\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define a class object to describe a platform\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
/* @file\r
This file is used to be the grammar file of ECC tool\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available\r
# under the terms and conditions of the BSD License which accompanies this\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available\r
# under the terms and conditions of the BSD License which accompanies this\r
## @file\r
# This file is used to define checkpoints used by ECC tool\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
\r
for Dirpath, Dirnames, Filenames in self.WalkTree():\r
for F in Filenames:\r
- if os.path.splitext(F)[1] in ('.h', '.c'):\r
+ Ext = os.path.splitext(F)[1]\r
+ if Ext in ('.h', '.c'):\r
FullName = os.path.join(Dirpath, F)\r
MsgList = c.CheckFileHeaderDoxygenComments(FullName)\r
+ elif Ext in ('.inf', '.dec', '.dsc', '.fdf'):\r
+ FullName = os.path.join(Dirpath, F)\r
+ if not open(FullName).read().startswith('## @file'):\r
+ SqlStatement = """ select ID from File where FullPath like '%s'""" % FullName\r
+ ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
+ for Result in ResultSet:\r
+ Msg = 'INF/DEC/DSC/FDF file header comment should begin with ""## @file""'\r
+ EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
+ \r
\r
# Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5\r
def DoxygenCheckFunctionHeader(self):\r
self.MetaDataFileCheckGuidDuplicate()\r
self.MetaDataFileCheckModuleFileNoUse()\r
self.MetaDataFileCheckPcdType()\r
+ self.MetaDataFileCheckModuleFileGuidDuplication()\r
\r
# Check whether each file defined in meta-data exists\r
def MetaDataFileCheckPathName(self):\r
#ERROR_META_DATA_FILE_CHECK_PCD_TYPE\r
pass\r
\r
+ # Internal worker function to get the INF workspace relative path from FileID\r
+ def GetInfFilePathFromID(self, FileID):\r
+ Table = EccGlobalData.gDb.TblFile\r
+ SqlCommand = """select A.FullPath from %s as A where A.ID = %s""" % (Table.Table, FileID)\r
+ RecordSet = Table.Exec(SqlCommand)\r
+ Path = ""\r
+ for Record in RecordSet:\r
+ Path = Record[0].replace(EccGlobalData.gWorkspace, '')\r
+ if Path.startswith('\\') or Path.startswith('/'):\r
+ Path = Path[1:]\r
+ return Path\r
+ \r
+ # Check whether two module INFs under one workspace has the same FILE_GUID value\r
+ def MetaDataFileCheckModuleFileGuidDuplication(self):\r
+ if EccGlobalData.gConfig.MetaDataFileCheckModuleFileGuidDuplication == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
+ EdkLogger.quiet("Checking for pcd type in c code function usage ...")\r
+ Table = EccGlobalData.gDb.TblInf\r
+ SqlCommand = """\r
+ select A.ID, A.Value2, A.BelongsToFile, B.BelongsToFile from %s as A, %s as B\r
+ where A.Value1 = 'FILE_GUID' and B.Value1 = 'FILE_GUID' and\r
+ A.Value2 = B.Value2 and A.ID <> B.ID group by A.ID\r
+ """ % (Table.Table, Table.Table)\r
+ RecordSet = Table.Exec(SqlCommand)\r
+ for Record in RecordSet:\r
+ InfPath1 = self.GetInfFilePathFromID(Record[2])\r
+ InfPath2 = self.GetInfFilePathFromID(Record[3])\r
+ if InfPath1 and InfPath2:\r
+ if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION, InfPath1):\r
+ Msg = "The FILE_GUID of INF file [%s] is duplicated with that of %s" % (InfPath1, InfPath2)\r
+ EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION, OtherMsg = Msg, BelongsToTable = Table.Table, BelongsToItem = Record[0])\r
+ \r
+\r
# Check whether these is duplicate Guid/Ppi/Protocol name\r
def CheckGuidProtocolPpi(self, ErrorID, Model, Table):\r
Name = ''\r
## @file\r
# fragments of source file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# preprocess source file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define class Configuration\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
self.MetaDataFileCheckModuleFileNoUse = 1\r
# Check whether the PCD is correctly used in C function via its type\r
self.MetaDataFileCheckPcdType = 1\r
- \r
+ # Check whether there are FILE_GUID duplication among different INF files\r
+ self.MetaDataFileCheckModuleFileGuidDuplication = 1\r
+\r
#\r
# The check points in this section are reserved\r
#\r
## @file\r
# This file is used to create a database used by ECC tool\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to be the main entrance of ECC tool\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to save global datas used by ECC tool\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Standardized Error Hanlding infrastructures.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI = 10013\r
ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE = 10014\r
ERROR_META_DATA_FILE_CHECK_PCD_TYPE = 10015\r
+ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION = 10016\r
\r
ERROR_SPELLING_CHECK_ALL = 11000\r
\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI : "Duplicate PPI found",\r
ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found",\r
ERROR_META_DATA_FILE_CHECK_PCD_TYPE : "Wrong C code function used for this kind of PCD",\r
-\r
+ ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION : "Module file has FILE_GUID collision with other module file",\r
ERROR_SPELLING_CHECK_ALL : "",\r
}\r
\r
## @file\r
# This file is used to parse exception items found by ECC tool\r
#\r
-# Copyright (c) 2009, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# fragments of source file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to define common parser functions for meta-data\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to be the warning class of ECC tool\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to be the c coding style checking of ECC tool\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is used to set configuration of ECC tool\r
# For the items listed below, 1 means valid, 0 means invalid\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
MetaDataFileCheckModuleFileNoUse = 1\r
# Check whether the PCD is correctly used in C function via its type\r
MetaDataFileCheckPcdType = 1\r
+# Check whether there are FILE_GUID duplication among different INF files\r
+MetaDataFileCheckModuleFileGuidDuplication = 1\r
\r
#\r
# The check points in this section are reserved\r
<?xml version="1.0" encoding="UTF-8"?>\r
<ExceptionList xmlns="http://www.uefi.org/2008/2.1" xmlns:xsi="http:/www.w3.org/2001/XMLSchema-instance">\r
- <Copyright>Copyright (c) 2009 - 2010, Intel Corporation.</Copyright>\r
+ <Copyright>Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.</Copyright>\r
<License>\r
- All rights reserved.\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this distribution.\r
The full text of the license may be found at http://opensource.org/licenses/bsd-license.php\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available\r
# under the terms and conditions of the BSD License which accompanies this\r
# This file is generated by running:\r
# java org.antlr.Tool C.g\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available\r
# under the terms and conditions of the BSD License which accompanies this\r
## @file\r
# fragments of source file\r
#\r
-# Copyright (c) 2007 ~ 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# preprocess source file\r
#\r
-# Copyright (c) 2007 ~ 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create a database used by EOT tool\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to be the main entrance of EOT tool\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to save global datas\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Standardized Error Handling infrastructures.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# fragments of source file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Parse FV image
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, 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
## @file\r
# This file is used to parse INF file of EDK project\r
#\r
-# Copyright (c) 2008 - 2010 Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is used to define common parsing related functions used in parsing\r
# Inf/Dsc/Makefile process\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
if NewRecordSet:\r
NewRecord = NewRecordSet[0][0]\r
VariableValueList = NewRecord.split('},')\r
- if len(VariableValueList) > Index:\r
- VariableValue = VariableValueList[Index]\r
+ for VariableValue in VariableValueList[Index:]:\r
NewVariableValueList = VariableValue.split(',')\r
if len(NewVariableValueList) > 1:\r
NewVariableValue = NewVariableValueList[1].strip()\r
## @file\r
# Warning information of Eot\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create report for Eot tool\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# preprocess source file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
def CreateCCodeDB(FileNameList):\r
FileObjList = []\r
ParseErrorFileList = []\r
-\r
+ ParsedFiles = {}\r
for FullName in FileNameList:\r
if os.path.splitext(FullName)[1] in ('.h', '.c'):\r
+ if FullName.lower() in ParsedFiles:\r
+ continue\r
+ ParsedFiles[FullName.lower()] = 1\r
EdkLogger.info("Parsing " + FullName)\r
model = FullName.endswith('c') and DataClass.MODEL_FILE_C or DataClass.MODEL_FILE_H\r
collector = CodeFragmentCollector.CodeFragmentCollector(FullName)\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for Python tools build.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process APRIORI file data and generate PEI/DXE APRIORI file\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# name value pair\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# generate capsule\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# generate capsule\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# VTF components\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process compress section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process data section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process depex section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process rule section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FD generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# parse FDF file\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FFS generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FFS generation from FILE statement\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FFS generation from INF statement\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FV generation\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FV image section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# generate flash image
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
from Common import EdkLogger
from Common.String import *
from Common.Misc import DirCache,PathClass
+from Common.Misc import SaveFileOnChange
## Version and Copyright
versionNumber = "1.0"
def GenerateGuidXRefFile(BuildDb, ArchList):
GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
- GuidXRefFile = open(GuidXRefFileName, "w+")
+ GuidXRefFile = StringIO.StringIO('')
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch]
for ModuleFile in PlatformDataBase.Modules:
Module = BuildDb.BuildObject[ModuleFile, Arch]
GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False)\r
GuidXRefFile.close()
- GenFdsGlobalVariable.InfLogger("\nGUID cross reference file saved to %s" % GuidXRefFileName)
+ GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName)
##Define GenFd as static function
GenFd = staticmethod(GenFd)
## @file
# Global variables for GenFds
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file\r
# process GUIDed section generation\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process OptionROM generation from FILE statement\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process OptionROM generation from INF statement\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process OptionROM generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process FD Region generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Rule object for generating FFS\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Complex Rule object for generating FFS\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Simple Rule object for generating FFS\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# section base class\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process UI section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process Version section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# process VTF generation\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# PCD Name Offset in binary
# ======== ================\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Windows makefile for Python tools build.\r
#\r
-# Copyright (c) 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#!/usr/bin/env python\r
#\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#!/usr/bin/env python
#
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, 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
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is for installed package information database operations\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Install distribution package.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is for installed package information database operations\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Install distribution package.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
# PackageFile class represents the zip file of a distribution package.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Install distribution package.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Patch value into the binary file.
#
-# Copyright (c) 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, 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
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase a common table\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for data models\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for dec datas\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for dsc datas\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for ECC reports\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for fdf datas\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for files\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for functions\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for Identifiers\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for inf datas\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for pcds\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for Queries\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for ECC reports\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
IsCorrected = Record[5]\r
SqlCommand = ''\r
if BelongsToTable == 'File':\r
- SqlCommand = """select 0, FullPath from %s where ID = %s\r
+ SqlCommand = """select 1, FullPath from %s where ID = %s\r
""" % (BelongsToTable, BelongsToItem)\r
else:\r
SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Trim files preprocessed by compiler
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, 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
## Regular expression for matching Line Control directive like "#line xxx"
gLineControlDirective = re.compile('^\s*#(?:line)?\s+([0-9]+)\s+"*([^"]*)"')
## Regular expression for matching "typedef struct"
-gTypedefPattern = re.compile("^\s*typedef\s+struct\s*[{]*$", re.MULTILINE)
+gTypedefPattern = re.compile("^\s*typedef\s+struct(\s+\w+)?\s*[{]*$", re.MULTILINE)
## Regular expression for matching "#pragma pack"
gPragmaPattern = re.compile("^\s*#pragma\s+pack", re.MULTILINE)
## Regular expression for matching HEX number
CurrentIndent = Indent + Result[0][0]
IncludedFile = Result[0][1]
NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent))
+ NewFileContent.append("\n")
gIncludedAslFile.pop()
F.close()
## @file\r
# This file is used to define each component of the build database\r
#\r
-# Copyright (c) 2007 ~ 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create/update/query/erase table for files\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# This file is used to parse meta files
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, 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
## @file\r
# This file is used to create/update/query/erase a meta file table\r
#\r
-# Copyright (c) 2008, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# This file is used to create a database used by build tool\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This module contains the functionality to generate build report after\r
# build all target completes successfully.\r
#\r
-# Copyright (c) 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
import textwrap\r
import traceback\r
import sys\r
+import time\r
from datetime import datetime\r
+from StringIO import StringIO\r
from Common import EdkLogger\r
+from Common.Misc import SaveFileOnChange\r
from Common.Misc import GuidStructureByteArrayToGuidString\r
from Common.Misc import GuidStructureStringToGuidString\r
from Common.InfClassObject import gComponentType2ModuleType\r
-from Common.BuildToolError import FILE_OPEN_FAILURE\r
from Common.BuildToolError import FILE_WRITE_FAILURE\r
from Common.BuildToolError import CODE_ERROR\r
\r
for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:\r
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:\r
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue\r
- self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue\r
+ if DscDefaultValue:\r
+ self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue\r
\r
##\r
# Generate report for PCD information\r
for Pa in Wa.AutoGenObjectList:\r
for Module in Pa.LibraryAutoGenList + Pa.ModuleAutoGenList:\r
#\r
+ # BASE typed modules are EFI agnostic, so we need not scan\r
+ # their source code to find PPI/Protocol produce or consume\r
+ # information.\r
+ #\r
+ if Module.ModuleType == "BASE":\r
+ continue\r
+ #\r
# Add module referenced source files\r
#\r
self._SourceList.append(str(Module))\r
\r
try:\r
from Eot.Eot import Eot\r
+\r
#\r
- # Invoke EOT tool\r
+ # Invoke EOT tool and echo its runtime performance\r
#\r
+ EotStartTime = time.time()\r
Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,\r
FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)\r
-\r
+ EotEndTime = time.time()\r
+ EotDuration = time.strftime("%H:%M:%S", time.gmtime(int(round(EotEndTime - EotStartTime))))\r
+ EdkLogger.quiet("EOT run time: %s\n" % EotDuration)\r
+ \r
#\r
# Parse the output of EOT tool\r
#\r
def GenerateReport(self, BuildDuration):\r
if self.ReportFile:\r
try:\r
- File = open(self.ReportFile, "w+")\r
- except IOError:\r
- EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)\r
- try:\r
+ File = StringIO('')\r
for (Wa, MaList) in self.ReportList:\r
PlatformReport(Wa, MaList, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)\r
- EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))\r
+ SaveFileOnChange(self.ReportFile, File.getvalue(), False)\r
+ EdkLogger.quiet("Build report can be found at %s" % os.path.abspath(self.ReportFile))\r
except IOError:\r
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)\r
except:\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# build a platform or a module\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
# Save address map into MAP file.\r
#\r
- MapFile = open(MapFilePath, "wb")
- MapFile.write(MapBuffer.getvalue())
- MapFile.close()
- MapBuffer.close()\r
+ SaveFileOnChange(MapFilePath, MapBuffer.getvalue(), False)\r
+ MapBuffer.close()
if self.LoadFixAddress != 0:
- sys.stdout.write ("\nLoad Module At Fix Address Map file saved to %s\n" %(MapFilePath))
+ sys.stdout.write ("\nLoad Module At Fix Address Map file can be found at %s\n" %(MapFilePath))
sys.stdout.flush()
\r
## Build active platform for different build targets and different tool chains\r
## @file\r
# Collects the Guid Information in current workspace.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Open an FPD file and load all its contents to a PlatformClass object.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Contains several utilitities shared by migration tools.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Store a Platform class object to an INF file.\r
#\r
-# Copyright (c) 2007 - 2009, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Convert an XML-based FPD file to a text-based DSC file.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# Convert an MSA Module class object ot an INF Module class object by filling\r
# several info required by INF file.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Collects the Guid Information in current workspace.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Open an MSA file and load all its contents to a ModuleClass object.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Convert an XML-based MSA file to a text-based INF file.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Store a Module class object to an INF file.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#
-# Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
# Convert an SPD Package class object ot a DEC Package class object by filling\r
# some fields required by DEC file.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Open an SPD file and load all its contents to a PackageClass object.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Convert an XML-based SPD file to a text-based DEC file.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file\r
# Store a Package class object to a DEC file.\r
#\r
-# Copyright (c) 2007, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# This file is required to make Python interpreter treat the directory\r
# as containing package.\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Unit tests for C based BaseTools
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file
# Unit tests for checking syntax of Python source code
#
-# Copyright (c) 2009, Intel Corporation
+# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file\r
# Windows makefile for 'Tests' module build.\r
#\r
-# Copyright (c) 2009 - 2010, Intel Corporation<BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
## @file
# Unit tests for Python based BaseTools
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file
# Unit tests for BaseTools utilities
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file
# Utility functions and classes for BaseTools unit tests
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
## @file
# Unit tests for TianoCompress utility
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# 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
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}\r
-{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Tahoma};}{\f148\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}\r
-{\f149\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f151\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\f152\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}\r
-{\f153\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f154\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\f155\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}\r
-{\f156\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f280\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f530\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f538\fswiss\fcharset238\fprq2 Verdana CE{\*\falt Tahoma};}\r
-{\f539\fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Tahoma};}{\f541\fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Tahoma};}{\f542\fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Tahoma};}{\f545\fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Tahoma};}\r
-{\f546\fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Tahoma};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\r
-\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;}{\stylesheet{\r
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\r
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{\r
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10 \r
-\additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}\r
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid4665511}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator lgao4}{\creatim\yr2010\mo3\dy18\hr17\min7}{\revtim\yr2010\mo3\dy18\hr17\min7}{\version2}{\edmins0}{\nofpages5}{\nofwords1007}\r
-{\nofchars5745}{\nofcharsws6739}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\r
-\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect \r
-\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
-\jcompress\viewkind4\viewscale100\rsidroot4665511 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl2\r
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \r
-\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Name\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build.exe \hich\f39 \endash \loch\f39 the master command that provides the {\*\xmlopen\xmlns2{\factoidname PersonName}}dev{\*\xmlclose}\r
-eloper with a single command for selecting various options of a build\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Synopsis\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build.exe [options] [target]\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Description\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build.exe is the master command line (CLI) tool that provides the {\*\xmlopen\xmlns2{\factoidname PersonName}}dev{\*\xmlclose}eloper with a s\hich\af39\dbch\af13\loch\f39 \r
-ingle command for selecting various options of a build. In general, it checks the environment variables, gets the user\hich\f39 \rquote \loch\f39 \r
-s configuration from either the CLI or target.txt, parses the dsc, dec, inf, target.txt, tools_def.txt, generates .C, .H files and the \hich\af39\dbch\af13\loch\f39 M\hich\af39\dbch\af13\loch\f39 \r
-akefiles for one or more modules and/or the active platform, calls a make (NMake or make) program to process these Makefiles, then optionally calls GenFds to generate an fd file.\r
-\par \hich\af39\dbch\af13\loch\f39 The build tool supports two kinds of path specifications on command line - an\hich\af39\dbch\af13\loch\f39 absolutely path or a relative (to the WORKSPACE environment variable) path \hich\f39 \endash \loch\f39 \r
- in command line.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Options\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 There are no required options. \r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -a, --arch <ARCH>\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-ARCH is one of list: IA32, X64, IPF or EBC, which overrides target.txt's TARGET_ARCH definition. To s\hich\af39\dbch\af13\loch\f39 pecify more ARCH, please repeat this option.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -p, --platform PlatformName.dsc\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Build the platform specified by the DSC file name argument, overrides target.txt's ACTIVE_PLATFORM definition.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -m, --module ModuleName.inf\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build the module specified by the INF\hich\af39\dbch\af13\loch\f39 \r
- file name argument.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -b, --buildtarget <TARGET>\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-TARGET is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -t, --tagname Tagname\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Using the Tool Chain Tagname to build the platf\hich\af39\dbch\af13\loch\f39 \r
-orm, overrides target.txt's TOOL_CHAIN_TAG definition.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -f --fdf Filename.fdf\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 The name of the FDF file to use, which overrides the setting in the DSC file.\r
-\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -r --rom-image ROM_IMAGE_NAME\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 The name of FD to be generated. The name must be from [FD] section in FDF file.\r
-\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -i --fv-image FV_IMAGE_NAME\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 The name of FV to be generated. The name must be from [FV] section in FDF file.\r
-\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -n NUM\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build the platform using multi-threaded compiler. The value o\r
-\hich\af39\dbch\af13\loch\f39 verrides target.txt's MULTIPLE_THREAD and MAX_CONCURRENT_THREAD_NUMBER. Less than 2 will disable multi-thread builds.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -x --sku-id SKU_ID}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -u --skip-autogen}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Skip AutoGe\hich\af39\dbch\af13\loch\f39 \r
-n step. Note the build may fail if there\hich\f39 \rquote \loch\f39 s no AutoGen-ed files before.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -e --re-parse}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Re-parse all meta-data files. Use this option if you encounter inconsistency issue.}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -w --warning-as-error}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Treat warning in tools as error.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -j --log LOGFILE}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Put screen outp\hich\af39\dbch\af13\loch\f39 ut in specified file.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -s \hich\f39 \endash \loch\f39 silent\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \hich\f39 Tell \'93\loch\f39 \hich\f39 make\'94\loch\f39 \hich\f39 \r
- tool to run \'93\loch\f39 \hich\f39 silently\'94\loch\f39 . Internally, a \hich\f39 \lquote \loch\f39 -s\hich\f39 \rquote \loch\f39 \hich\f39 switch will be passed to \'93\loch\f39 \hich\f39 make\'94\loch\f39 tool. Don\hich\f39 \rquote \loch\f39 \r
-\hich\f39 t use this option if your \'93\loch\f39 \hich\f39 make\'94\loch\f39 tool doesn\hich\f39 \rquote \loch\f39 t support \hich\f39 \lquote \loch\f39 -s\hich\f39 \rquote \loch\f39 \hich\f39 . Instead, if your \'93\loch\f39 \hich\f39 make\'94\r
-\loch\f39 tool uses other option to do the same, you\hich\af39\dbch\af13\loch\f39 could add it to the XX_XX_XX_MAKE_FLAGS in tools_def.txt.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -d, --debug [#]\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Enable debug messages at specified level. It is used by Tool itself.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -q, --quiet\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Disable all messages except FATAL ERRORS.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -v, --verbose\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Turn on verbose output with informational me\hich\af39\dbch\af13\loch\f39 \r
-ssages printed.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -D, --define MACROS\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Macro: "Name [= Value]".\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -y, --report-file REPORTFILE}{\rtlch\fcs1 \ab\af0\afs18 \ltrch\fcs0 \r
-\b\f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Create/overwrite the report to the specified filename.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -Y, --report-type REPORTTYPE\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Flags that control the type of build report to generate. Must be one of: [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. To specify more than one flag, repeat this option on the command line and the default flag set is [PCD, L\r
-\hich\af39\dbch\af13\loch\f39 I\hich\af39\dbch\af13\loch\f39 BRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS]\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 --version\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Show program's copyright and version number then exit.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 -h, --help\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Print the copyright, version and usage of this program then exit.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Target\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 If no target is given, then default target is ALL.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 ALL}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \hich\af39\dbch\af13\loch\f39 \r
- Build everything for either the platform or module.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 GenC}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- Auto-generate all C files for either the platform or module.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 GenMake}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Generate the Makefiles \hich\f39 \endash \loch\f39 \r
- if auto-generated files are missing,\r
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 then auto-generate all C file\hich\af39\dbch\af13\loch\f39 \r
-s first for either the platform or module.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Fds}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \r
-\hich\af39\dbch\af13\loch\f39 Create the FD Image files.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Libraries}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- Build all EDK Libraries and EDK II Library Instances which are specified.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Modules}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- Build all EDK components and EDK II modules which are specified.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Clean}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- Remove intermediate files generated by the NMAKE command (leaving\r
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- the auto-generated C format, FD image files, PE32 output files, PCH \r
-\par \hich\af39\dbch\af13\loch\f39 files and LIB files).\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 CleanAll}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \r
-\hich\af39\dbch\af13\loch\f39 Remove all intermmediate, auto-\hich\af39\dbch\af13\loch\f39 generated, FV and FD image files \hich\f39 \endash \loch\f39 \r
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
- state of the tree should be exactly as if a fresh checkout or install has \r
-\par \hich\af39\dbch\af13\loch\f39 occurred.\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 CleanLib}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \r
-\hich\af39\dbch\af13\loch\f39 Remove intermediate files generated by the NMAKE command AND LIB \r
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \hich\af39\dbch\af13\loch\f39 \r
- files (leaving the auto-generated, FV and FD image files, PE32 output \r
-\par \hich\af39\dbch\af13\loch\f39 files and PCH files)\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 run}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \r
-\hich\af39\dbch\af13\loch\f39 Run platform (for emulator platform only)\r
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid4665511 \r
-\par \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Examples\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Assume that $(WORKSPACE) is C:\\MyWorkspace\r
-\par }\pard \ltrpar\ql \li180\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build platform: Nt32Pkg.dsc\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Specify the platform description file on the command line.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \hich\f39 \endash \loch\f39 \r
-a IA32\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Build the platform in the current working directory if it contains a platform description file.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\MyWorkspace\\Nt32Pkg>build \hich\f39 \endash \loch\f39 a IA32\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build the ac\hich\af39\dbch\af13\loch\f39 \r
-tive platform specified in the target.txt file.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\ MyWorkspace>build \hich\f39 \endash \loch\f39 a Ia32\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid4665511 \r
-\par }\pard \ltrpar\ql \li180\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build Module: HelloWorld.inf\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Specify the platform and Module on the command line.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \hich\f39 \endash \loch\f39 \r
-a IA32 \\\r
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \hich\f39 \endash \loch\f39 m MdeModulePkg/Application/HelloWorld/H\r
-\hich\af39\dbch\af13\loch\f39 elloWorld.inf\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Specify the Module on the command line and use the active platform specified in the target.txt file.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\MyWorkspace>build \hich\f39 \endash \loch\f39 a IA32 \\\r
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \loch\af39\dbch\af13\hich\f39 \endash \loch\f39 m MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Build the module in the current working directory if it \r
-\hich\af39\dbch\af13\loch\f39 contains a module description file and specify the platform on the command line.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \hich\f39 \r
-\endash \loch\f39 a Ia32 \\\r
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \loch\af39\dbch\af13\hich\f39 \endash \loch\f39 p Nt32Pkg\\Nt32Pkg.dsc\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 \r
-Build the module in the current working directory and use the active platform specified in the target.txt file.\r
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \hich\f39 \r
-\endash \loch\f39 a Ia32 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Bugs \r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 No known bugs.\r
-\par \hich\af39\dbch\af13\loch\f39 Report bugs to }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4665511\charrsid6704915 \hich\af39\dbch\af13\loch\f39 edk2-buildtools-devel@lists.sourceforge.net}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid4665511 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Files \r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 ta\hich\af39\dbch\af13\loch\f39 rget.txt, tools_def.txt, platform.dsc, flashmap.fdf, package.dec and module.inf.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 See also\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 GenFds.exe\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid4665511 \hich\af39\dbch\af13\loch\f39 License\r
-\par }\pard\plain \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid4665511 \hich\af39\dbch\af13\loch\f39 Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\r
-\par \r
-\par \hich\af39\dbch\af13\loch\f39 This program and the accompanying materials are licensed and made available under\hich\af39\dbch\af13\loch\f39 the terms and\r
-\par \hich\af39\dbch\af13\loch\f39 conditions of the BSD License which accompanies this distribution. The full text of the license may be\r
-\par \hich\af39\dbch\af13\loch\f39 found at:\r
-\par \hich\af39\dbch\af13\loch\f39 http://opensource.org/licenses/bsd-license.php\r
-\par \r
-\par \hich\af39\dbch\af13\loch\f39 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT W\hich\af39\dbch\af13\loch\f39 ARRANTIES\r
-\par \hich\af39\dbch\af13\loch\f39 OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\par }}
\ No newline at end of file
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}\r
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\cf1\b\f0\fs28 Name\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Build.exe \endash the master command that provides the developer with a single command for selecting various options of a build\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\cf1\b\fs28 Synopsis\par\r
+\pard\nowidctlpar\li360\sb200\cf2\fs18 Build.exe [options] [target]\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\fs28 Description\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Build.exe is the master command line (CLI) tool that provides the developer with a single command for selecting various options of a build. In general, it checks the environment variables, gets the user\rquote s configuration from either the CLI or target.txt, parses the dsc, dec, inf, target.txt, tools_def.txt, generates .C, .H files and the Makefiles for one or more modules and/or the active platform, calls a make (NMake or make) program to process these Makefiles, then optionally calls GenFds to generate an fd file.\par\r
+The build tool supports two kinds of path specifications on command line - an absolutely path or a relative (to the WORKSPACE environment variable) path \endash in command line.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 Options\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 There are no required options. \par\r
+\b -a, --arch <ARCH>\par\r
+\pard\nowidctlpar\li720\sb200\b0 ARCH is one of list: IA32, X64, IPF or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more ARCH, please repeat this option.\par\r
+\pard\nowidctlpar\li360\sb200\b -p, --platform PlatformName.dsc\par\r
+\pard\nowidctlpar\li720\sb200\b0 Build the platform specified by the DSC file name argument, overrides target.txt's ACTIVE_PLATFORM definition.\par\r
+\pard\nowidctlpar\li360\sb200\b -m, --module ModuleName.inf\par\r
+\pard\nowidctlpar\li720\sb200\b0 Build the module specified by the INF file name argument.\par\r
+\pard\nowidctlpar\li360\sb200\b -b, --buildtarget <TARGET>\par\r
+\pard\nowidctlpar\li720\sb200\b0 TARGET is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.\par\r
+\pard\nowidctlpar\li360\sb200\b -t, --tagname Tagname\par\r
+\pard\nowidctlpar\li720\sb200\b0 Using the Tool Chain Tagname to build the platform, overrides target.txt's TOOL_CHAIN_TAG definition.\par\r
+\pard\nowidctlpar\li360\sb200\b -f --fdf Filename.fdf\par\r
+\pard\nowidctlpar\li720\sb200\b0 The name of the FDF file to use, which overrides the setting in the DSC file.\par\r
+\pard\nowidctlpar\li360\sb200\b -r --rom-image ROM_IMAGE_NAME\par\r
+\pard\nowidctlpar\li720\sb200\b0 The name of FD to be generated. The name must be from [FD] section in FDF file.\par\r
+\pard\nowidctlpar\li360\sb200\b -i --fv-image FV_IMAGE_NAME\par\r
+\pard\nowidctlpar\li720\sb200\b0 The name of FV to be generated. The name must be from [FV] section in FDF file.\par\r
+\pard\nowidctlpar\li360\sb200\b -n NUM\par\r
+\pard\nowidctlpar\li720\sb200\b0 Build the platform using multi-threaded compiler. The value overrides target.txt's MULTIPLE_THREAD and MAX_CONCURRENT_THREAD_NUMBER. Less than 2 will disable multi-thread builds.\par\r
+\pard\nowidctlpar\li360\sb200\b -x --sku-id SKU_ID\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file.\par\r
+\pard\nowidctlpar\li360\sb200\b -u --skip-autogen\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Skip AutoGen step. Note the build may fail if there\rquote s no AutoGen-ed files before.\par\r
+\pard\nowidctlpar\li360\sb200\b -e --re-parse\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Re-parse all meta-data files. Use this option if you encounter inconsistency issue.\f1\par\r
+\pard\nowidctlpar\li360\sb200\b\f0 -w --warning-as-error\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Treat warning in tools as error.\par\r
+\pard\nowidctlpar\li360\sb200\b -j --log LOGFILE\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Put screen output in specified file.\par\r
+\pard\nowidctlpar\li360\sb200\b -s \endash silent\par\r
+\pard\nowidctlpar\li720\sb200\b0 Tell \ldblquote make\rdblquote tool to run \ldblquote silently\rdblquote . Internally, a \lquote -s\rquote switch will be passed to \ldblquote make\rdblquote tool. Don\rquote t use this option if your \ldblquote make\rdblquote tool doesn\rquote t support \lquote -s\rquote . Instead, if your \ldblquote make\rdblquote tool uses other option to do the same, you could add it to the XX_XX_XX_MAKE_FLAGS in tools_def.txt.\par\r
+\pard\nowidctlpar\li360\sb200\b -d, --debug [#]\par\r
+\pard\nowidctlpar\li720\sb200\b0 Enable debug messages at specified level. It is used by Tool itself.\par\r
+\pard\nowidctlpar\li360\sb200\b -q, --quiet\par\r
+\pard\nowidctlpar\li720\sb200\b0 Disable all messages except FATAL ERRORS.\par\r
+\pard\nowidctlpar\li360\sb200\b -v, --verbose\par\r
+\pard\nowidctlpar\li720\sb200\b0 Turn on verbose output with informational messages printed.\par\r
+\pard\nowidctlpar\li360\sb200\b -D, --define MACROS\par\r
+\pard\nowidctlpar\li720\sb200\b0 Macro: "Name [= Value]".\par\r
+\pard\nowidctlpar\li360\sb200\b -y, --report-file REPORTFILE\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Create/overwrite the report to the specified filename.\par\r
+\pard\nowidctlpar\li360\sb200\b -Y, --report-type REPORTTYPE\par\r
+\pard\nowidctlpar\li720\sb200\b0 Flags that control the type of build report to generate. Must be one of: [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. To specify more than one flag, repeat this option on the command line and the default flag set is [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS]\f1\par\r
+\pard\nowidctlpar\li360\sb200\b\f0 -F FLAG, --flag=FLAG\f1\par\r
+\pard\nowidctlpar\li720\sb200\b0\f0 Specify the specific option to parse EDK UNI file. Must be one of: [-c, -s]. -c is for EDK framework UNI file, and -s is for EDK UEFI UNI file. This option can also be specified by setting *_*_*_BUILD_FLAGS in [BuildOptions] section of platform DSC. If they are both specified, this value will override the setting in [BuildOptions] section of platform DSC.\par\r
+\pard\nowidctlpar\li360\sb200\b --version\par\r
+\pard\nowidctlpar\li720\sb200\b0 Show program's copyright and version number then exit.\par\r
+\pard\nowidctlpar\li360\sb200\b -h, --help\par\r
+\pard\nowidctlpar\li720\sb200\b0 Print the copyright, version and usage of this program then exit.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 Target\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 If no target is given, then default target is ALL.\par\r
+\b ALL\b0 Build everything for either the platform or module.\par\r
+\b GenC\b0 Auto-generate all C files for either the platform or module.\par\r
+\b GenMake\b0 Generate the Makefiles \endash if auto-generated files are missing,\par\r
+\pard\nowidctlpar\li360 then auto-generate all C files first for either the platform or module.\par\r
+\pard\nowidctlpar\li360\sb200\b Fds\b0 Create the FD Image files.\par\r
+\b Libraries\b0 Build all EDK Libraries and EDK II Library Instances which are specified.\par\r
+\b Modules\b0 Build all EDK components and EDK II modules which are specified.\par\r
+\b Clean\b0 Remove intermediate files generated by the NMAKE command (leaving\par\r
+\pard\nowidctlpar\li360 the auto-generated C format, FD image files, PE32 output files, PCH \par\r
+ files and LIB files).\par\r
+\pard\nowidctlpar\li360\sb200\b CleanAll\b0 Remove all intermmediate, auto-generated, FV and FD image files \endash \par\r
+\pard\nowidctlpar\li360 state of the tree should be exactly as if a fresh checkout or install has \par\r
+ occurred.\par\r
+\pard\nowidctlpar\li360\sb200\b CleanLib\b0 Remove intermediate files generated by the NMAKE command AND LIB \par\r
+\pard\nowidctlpar\li360 files (leaving the auto-generated, FV and FD image files, PE32 output \par\r
+ files and PCH files)\par\r
+\pard\nowidctlpar\li360\sb200\b run\b0 Run platform (for emulator platform only)\par\r
+\pard\nowidctlpar\li360\f1\par\r
+\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\f0\fs28 Examples\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Assume that $(WORKSPACE) is C:\\MyWorkspace\par\r
+\pard\nowidctlpar\li180\sb200 Build platform: Nt32Pkg.dsc\par\r
+\pard\nowidctlpar\li360\sb200 Specify the platform description file on the command line.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \endash a IA32\par\r
+\pard\nowidctlpar\li360\sb200\b0 Build the platform in the current working directory if it contains a platform description file.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace\\Nt32Pkg>build \endash a IA32\par\r
+\pard\nowidctlpar\li360\sb200\b0 Build the active platform specified in the target.txt file.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace>build \endash a Ia32\par\r
+\pard\nowidctlpar\li360\sb200\b0\f1\par\r
+\pard\nowidctlpar\li180\sb200\f0 Build Module: HelloWorld.inf\par\r
+\pard\nowidctlpar\li360\sb200 Specify the platform and Module on the command line.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \endash a IA32 \\\par\r
+\pard\nowidctlpar\li720 \endash m MdeModulePkg/Application/HelloWorld/HelloWorld.inf\par\r
+\pard\nowidctlpar\li360\sb200\b0 Specify the Module on the command line and use the active platform specified in the target.txt file.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build \endash a IA32 \\\par\r
+\pard\nowidctlpar\li720\endash m MdeModulePkg/Application/HelloWorld/HelloWorld.inf\par\r
+\pard\nowidctlpar\li360\sb200\b0 Build the module in the current working directory if it contains a module description file and specify the platform on the command line.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \endash a Ia32 \\\par\r
+\pard\nowidctlpar\li720\endash p Nt32Pkg\\Nt32Pkg.dsc\par\r
+\pard\nowidctlpar\li360\sb200\b0 Build the module in the current working directory and use the active platform specified in the target.txt file.\par\r
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \endash a Ia32 \par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\fs28 Bugs \par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 No known bugs.\par\r
+Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\f0\fs28 Files \par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 target.txt, tools_def.txt, platform.dsc, flashmap.fdf, package.dec and module.inf.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 See also\par\r
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 GenFds.exe\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 License\par\r
+\pard\nowidctlpar\li360\cf2\b0\fs18 Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.\par\r
+\par\r
+This program and the accompanying materials are licensed and made available under the terms and\par\r
+conditions of the BSD License which accompanies this distribution. The full text of the license may be\par\r
+found at:\par\r
+http://opensource.org/licenses/bsd-license.php\par\r
+\par\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES\par\r
+OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
+}\r
+\0
\ No newline at end of file
-{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}\r
-{\f37\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Verdana;}{\f38\fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@\'cb\'ce\'cc\'e5;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;}{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}\r
-{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}\r
-{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f172\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f410\fswiss\fcharset238\fprq2 Verdana CE;}\r
-{\f411\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f413\fswiss\fcharset161\fprq2 Verdana Greek;}{\f414\fswiss\fcharset162\fprq2 Verdana Tur;}{\f417\fswiss\fcharset186\fprq2 Verdana Baltic;}{\f418\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}\r
-{\f422\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\r
-\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;}{\stylesheet{\r
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\r
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{\r
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10 \r
-\additive \ssemihidden Default Paragraph Font;}{\*\r
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}\r
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid71424\rsid11170234}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator jwang36}{\creatim\yr2008\mo12\dy31\hr14\min57}{\revtim\yr2008\mo12\dy31\hr15\min5}{\version3}{\edmins8}{\nofpages4}\r
-{\nofwords880}{\nofchars5019}{\nofcharsws5888}{\vern24613}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect \r
-\deftab360\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
-\jcompress\viewkind4\viewscale100\rsidroot71424 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl2\r
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}\r
-{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}\r
-{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \r
-\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Name\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 GenFds.exe\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Description\r
-\par }\pard\plain \ltrpar\ql \li60\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin60\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \r
-\ltrch\fcs0 \fs18\insrsid71424 \hich\af37\dbch\af13\loch\f37 \r
-GenFds will get platform, flash and module information from target.txt,platform.dsc, flashmap.fdf, package.dec and module.inf. it will generate Ffs, Fv, FD and Section data depending on command line options. The FDF file must be pointed out. And the FDF f\r
-\hich\af37\dbch\af13\loch\f37 i\hich\af37\dbch\af13\loch\f37 le must follow the format of FDF\hich\f37 \rquote \loch\f37 s specification otherwise tool will throw a exception and stop the build.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 \r
-The FDF file describes information about flash parts as well as rules for combining binaries (Firmware Image) built from a DSC file. The output of t\hich\af37\dbch\af13\loch\f37 \r
-he first phase of an EDK II build (as defined in the EDK II Build Specification) generates valid PE32/PE32+/Coff image files. GenFds performs the second phase of the build process during which consumes the images generated during the first phase, using s\r
-\hich\af37\dbch\af13\loch\f37 t\hich\af37\dbch\af13\loch\f37 \r
-atements and rules defined in the FDF file to place the PE32/PE32+/Coff images files into one or more EFI sections, then the EFI sections may get combined with other optional sections (version, depex, user interface) sections, into EFI Firmware File syste\r
-\hich\af37\dbch\af13\loch\f37 m\hich\af37\dbch\af13\loch\f37 (FFS) Sections. FFS images are put into Firmware Volumes (FVs,) and finally, the FV sections are combined into one or more Flash Device binary image (FD.)\r
-\par \hich\af37\dbch\af13\loch\f37 The outputDir must be pointed out. Tool will generate a FV directory which includes a FFS directory,\hich\af37\dbch\af13\loch\f37 \r
- Fv file, Fv INf file and Fd file. The FFS directory contents all modules directory which contents Ffs files and section files. All output of GenFds tool output will be in FV directory. The FV directory structure is following. The outputDir should be poin\r
-\hich\af37\dbch\af13\loch\f37 t\hich\af37\dbch\af13\loch\f37 part of Efi file path. That mean for each of module which descript in the FDF file as the \hich\f37 \lquote \loch\f37 InfFIle\hich\f37 \rquote \loch\f37 \r
- statement format the GenFds tool would find out it\hich\f37 \rquote \loch\f37 \hich\f37 s input files from the path of \'93\loch\f37 $(outputDir)\\ $(Arch) \\ $(ActivePlatfromName) \\$(ModuleName) \\$(Modu\hich\af37\dbch\af13\loch\f37 l\r
-\hich\af37\dbch\af13\loch\f37 eName) \\DEBUG\r
-\par }\pard \ltrpar\ql \fi-360\li420\ri0\sb200\nowidctlpar\tx420\wrapdefault\faauto\rin0\lin420\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 1.\tab \r
-If Arch list was pointed out, GenFds tool will use this Arch instead of Arch List in Target.txt file\r
-\par }\pard \ltrpar\ql \fi-360\li420\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin420\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 2.\tab \r
-If Workspace was not pointed out, GenFds tool will use the Workspace path which set in OS environment. \r
-\par \hich\af37\dbch\af13\loch\f37 3.\tab If ActivePlatform was pointe\hich\af37\dbch\af13\loch\f37 d out, GenFds tool will use this active platform as the current platform instead of active platform which in Target.txt file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 \r
-GenFds tool support 2 kinds of path in command line. Absolutely path and relative workspace path. The GenFds tool also support $(W\hich\af37\dbch\af13\loch\f37 ORKSPACE) marco in path. For example, if the input Fdf like that $(WORKSPACE)\\NT32PKg\\\r
-Nt32.fdf, the tool will expand the $(WORKSPACE) macro with real path.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Options\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -a, --arch <ARCHS>\r
-\par }\pard \ltrpar\ql \fi1\li425\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin425\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 ARCHS is a comma separated }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 (\hich\af37\dbch\af13\loch\f37 no space) }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 list containing one or more of: IA32, X64, IP\r
-\hich\af37\dbch\af13\loch\f37 F or EBC which should be built, overrides target.txt\hich\f37 \rquote \loch\f37 s TARGET_ARCH\r
-\par }\pard \ltrpar\ql \fi-425\li425\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin425\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -p, --platform PlatformName.dsc\r
-\par }\pard \ltrpar\ql \li426\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin426\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 \r
-Build the platform specified by the DSC file name argument, over rides the ACTIVE_PLATFORM\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -f, --filename Filename\tab \tab \tab \r
-\par }\pard \ltrpar\ql \fi426\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 Input FDF file and its format must foll\hich\af37\dbch\af13\loch\f37 \r
-ow FDF specification.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -r, --rom_image FdUiName\tab \tab \tab \tab \r
-\par }\pard \ltrpar\ql \fi425\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 Build the image using the [FD] section named by FdUiName.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -i, --FvImage UiFvName\r
-\par \tab \hich\af37\dbch\af13\loch\f37 Buld the FV image using the [FV] section named by UiFvName\r
-\par \hich\af37\dbch\af13\loch\f37 -o, --output Dir\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 The output\hich\af37\dbch\af13\loch\f37 \r
- directory of Genfds tool. And this directory also should be the directory of the EFI file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -w \hich\f37 \endash \loch\f37 -workspace\r
-\par \tab \hich\af37\dbch\af13\loch\f37 The workspace path working on.}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \r
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 -b \hich\af37\dbch\af13\loch\f37 --\hich\af37\dbch\af13\loch\f37 buildtarget\hich\af37\dbch\af13\loch\f37 DEBUG|RELEASE\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 Build target is one of\hich\af37\dbch\af13\loch\f37 :\r
-\hich\af37\dbch\af13\loch\f37 DEBUG, RELEASE}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234\charrsid11170234 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 -\hich\af37\dbch\af13\loch\f37 t\hich\af37\dbch\af13\loch\f37 \r
-\hich\af37\dbch\af13\loch\f37 --\hich\af37\dbch\af13\loch\f37 tagname\hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 TOOLCHAIN_TAG\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 Specify the tool chain to build the platform}{\rtlch\fcs1 \r
-\af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234\charrsid11170234 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 -\hich\af37\dbch\af13\loch\f37 D\hich\af37\dbch\af13\loch\f37 \r
-\hich\af37\dbch\af13\loch\f37 --\hich\af37\dbch\af13\loch\f37 define\hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 MACRO=VALUE\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 Pass macro to this tool}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234\charrsid11170234 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 -\hich\af37\dbch\af13\loch\f37 s\hich\af37\dbch\af13\loch\f37 \r
-\hich\af37\dbch\af13\loch\f37 --\hich\af37\dbch\af13\loch\f37 specifyaddress \hich\af37\dbch\af13\loch\f37 ADDRESS\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 Specify \hich\af37\dbch\af13\loch\f37 driver load address}{\r
-\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11170234\charrsid11170234 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11170234 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 [--version]\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \tab \hich\af37\dbch\af13\loch\f37 Print version and copyright of this program and exit\r
-\par \hich\af37\dbch\af13\loch\f37 [-v, --verbose]\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 Turn on verbose output with informa\hich\af37\dbch\af13\loch\f37 \r
-tional messages printed. This is a count value, so specifying \hich\f37 \endash \loch\f37 vv can be used to increase the verbosity level.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 [-q, --quiet]\r
-\par \tab \hich\af37\dbch\af13\loch\f37 disable all messages except FATAL ERRORS\r
-\par \hich\af37\dbch\af13\loch\f37 [-d, --debug [#]]\r
-\par \tab \hich\af37\dbch\af13\loch\f37 Enable debug messages, at level #\r
-\par \hich\af37\dbch\af13\loch\f37 [-h, --help]\r
-\par \tab \hich\af37\dbch\af13\loch\f37 Print copyright, versi\hich\af37\dbch\af13\loch\f37 on and usage of this program and exit\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Example\r
-\par }\pard\plain \ltrpar\ql \li60\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin60\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 1. WORKSAPCE has already set. $(WORKSPACE) = c:\\work\\EdkII. The Fdf file is in c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf. Output directory is c:\\work\\EdkII\\Build\\Nt32\\\r
-Debug_MyTools. ActivePlatform is C:\\work\\EdkII\\Nt3\hich\af37\dbch\af13\loch\f37 2Pkg\\Nt32Pkg.dsc\r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \hich\f37 \endash \loch\f37 o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc\r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f $(WORKSPACE)\\Nt32Pkg\\Nt32Pkg.fdf \hich\f37 \endash \loch\f37 o $(WORSPACE)\\Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p $(WORKSAPCE)\\Nt32Pkg\\Nt32Pkg.d\r
-\hich\af37\dbch\af13\loch\f37 sc\r
-\par \r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f Nt32Pkg\\Nt32Pkg.fdf \hich\f37 \endash \loch\f37 o Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p Nt32Pkg\\Nt32Pkg.dsc\r
-\par \hich\af37\dbch\af13\loch\f37 2. Generate one FD which defined in FDF file. Use \hich\f37 \lquote \loch\f37 -r\hich\f37 \rquote \loch\f37 and Fd UIName. The Fd UIName is the name which defined in the FDf file, for detail information refer to FDF specifi\r
-\hich\af37\dbch\af13\loch\f37 cation\r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f GenFds \hich\f37 \endash \loch\f37 f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \hich\f37 \endash \loch\f37 o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p c:\\work\r
-\\EdkII\\Nt32pkg\\Nt32Pkg.dsc \hich\f37 \endash \loch\f37 r Fv_Recovery\r
-\par \hich\af37\dbch\af13\loch\f37 3. Generate one FV which defined in FDF file. Use \hich\f37 \lquote \loch\f37 -i\hich\f37 \rquote \hich\af37\dbch\af13\loch\f37 \r
- and FV UiName. The FV UIName is the name which defined in the FDF file, for detail information refers to FDF specification.\r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \hich\f37 \endash \loch\f37 o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc \r
-\hich\f37 \endash \loch\f37 I FVRec\hich\af37\dbch\af13\loch\f37 overy\r
-\par \r
-\par \hich\af37\dbch\af13\loch\f37 4. Use command line option to replace the Arch List in Target.txt. \r
-\par \hich\af37\dbch\af13\loch\f37 GenFds \hich\f37 \endash \loch\f37 f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \hich\f37 \endash \loch\f37 o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \hich\f37 \endash \loch\f37 p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 -a IA32, X64\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Bugs\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 Not found yet.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 Files \r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 target.txt, platfo\hich\af37\dbch\af13\loch\f37 rm.dsc, flashmap.fdf, package.dec and module.inf.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 See also\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 GenFv, GenFfs, GenSection, GenFw.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid71424 \hich\af37\dbch\af13\loch\f37 License\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 Copyright (c) 1999-2009 Intel Corporation. All rights reserved\r
-\par \hich\af37\dbch\af13\loch\f37 This program and the accompanying materials are licensed and made available \r
-\par \hich\af37\dbch\af13\loch\f37 under the ter\hich\af37\dbch\af13\loch\f37 ms and conditions of the BSD License which accompanies this \r
-\par \hich\af37\dbch\af13\loch\f37 distribution. The full text of the license may be found at\r
-\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\insrsid71424 \hich\af37\dbch\af13\loch\f37 http://opensource.org/licenses/bsd-license.php}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid71424 \hich\af37\dbch\af13\loch\f37 . THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,WITHOUT WARRANTIES\hich\af37\dbch\af13\loch\f37 OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\par }\pard \ltrpar\ql \li60\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin60\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid71424 \r
-\par }}
\ No newline at end of file
+{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}\r
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\f0\fs28 Name\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFds.exe\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Description\par\r
+\pard\nowidctlpar\li60\sb200\cf0\b0\fs18 GenFds will get platform, flash and module information from target.txt,platform.dsc, flashmap.fdf, package.dec and module.inf. it will generate Ffs, Fv, FD and Section data depending on command line options. The FDF file must be pointed out. And the FDF file must follow the format of FDF\rquote s specification otherwise tool will throw a exception and stop the build.\par\r
+\pard\nowidctlpar\sb200\cf2 The FDF file describes information about flash parts as well as rules for combining binaries (Firmware Image) built from a DSC file. The output of the first phase of an EDK II build (as defined in the EDK II Build Specification) generates valid PE32/PE32+/Coff image files. GenFds performs the second phase of the build process during which consumes the images generated during the first phase, using statements and rules defined in the FDF file to place the PE32/PE32+/Coff images files into one or more EFI sections, then the EFI sections may get combined with other optional sections (version, depex, user interface) sections, into EFI Firmware File system (FFS) Sections. FFS images are put into Firmware Volumes (FVs,) and finally, the FV sections are combined into one or more Flash Device binary image (FD.)\par\r
+The outputDir must be pointed out. Tool will generate a FV directory which includes a FFS directory, Fv file, Fv INf file and Fd file. The FFS directory contents all modules directory which contents Ffs files and section files. All output of GenFds tool output will be in FV directory. The FV directory structure is following. The outputDir should be point part of Efi file path. That mean for each of module which descript in the FDF file as the \lquote InfFIle\rquote statement format the GenFds tool would find out it\rquote s input files from the path of \ldblquote $(outputDir)\\ $(Arch) \\ $(ActivePlatfromName) \\$(ModuleName) \\$(ModuleName) \\DEBUG\par\r
+\pard\nowidctlpar\fi-360\li420\sb200\tx420 1.\tab If Arch list was pointed out, GenFds tool will use this Arch instead of Arch List in Target.txt file\par\r
+\pard\nowidctlpar\fi-360\li420\sb200 2.\tab If Workspace was not pointed out, GenFds tool will use the Workspace path which set in OS environment. \par\r
+3.\tab If ActivePlatform was pointed out, GenFds tool will use this active platform as the current platform instead of active platform which in Target.txt file.\par\r
+\pard\nowidctlpar\sb200 GenFds tool support 2 kinds of path in command line. Absolutely path and relative workspace path. The GenFds tool also support $(WORKSPACE) marco in path. For example, if the input Fdf like that $(WORKSPACE)\\NT32PKg\\Nt32.fdf, the tool will expand the $(WORKSPACE) macro with real path.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Options\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 -a, --arch <ARCHS>\par\r
+\pard\nowidctlpar\fi1\li425\sb200 ARCHS is a comma separated (no space) list containing one or more of: IA32, X64, IPF or EBC which should be built, overrides target.txt\rquote s TARGET_ARCH\par\r
+\pard\nowidctlpar\fi-425\li425\sb200 -p, --platform PlatformName.dsc\par\r
+\pard\nowidctlpar\li426\sb200 Build the platform specified by the DSC file name argument, over rides the ACTIVE_PLATFORM\par\r
+\pard\nowidctlpar\sb200 -f, --filename Filename\tab\tab\tab\par\r
+\pard\nowidctlpar\fi426\sb200 Input FDF file and its format must follow FDF specification.\par\r
+\pard\nowidctlpar\sb200 -r, --rom_image FdUiName\tab\tab\tab\tab\par\r
+\pard\nowidctlpar\fi425\sb200 Build the image using the [FD] section named by FdUiName.\par\r
+\pard\nowidctlpar\sb200 -i, --FvImage UiFvName\par\r
+\tab Buld the FV image using the [FV] section named by UiFvName\par\r
+-o, --output Dir\par\r
+\pard\nowidctlpar\li360\sb200 The output directory of Genfds tool. And this directory also should be the directory of the EFI file.\par\r
+\pard\nowidctlpar\sb200 -w \endash -workspace\par\r
+\tab The workspace path working on.\f1\par\r
+\f0 -b --buildtarget DEBUG|RELEASE\par\r
+\pard\nowidctlpar\li360\sb200 Build target is one of: DEBUG, RELEASE.\f1\par\r
+\pard\nowidctlpar\sb200\f0 -t --tagname TOOLCHAIN_TAG\par\r
+\pard\nowidctlpar\li360\sb200 Specify the tool chain to build the platform.\f1\par\r
+\pard\nowidctlpar\sb200\f0 -D --define MACRO=VALUE\par\r
+\pard\nowidctlpar\li360\sb200 Pass macro to this tool.\f1\par\r
+\pard\nowidctlpar\sb200\f0 -s --specifyaddress ADDRESS\par\r
+\pard\nowidctlpar\li360\sb200 Specify driver load address.\f1\par\r
+\pard\nowidctlpar\sb200\f0 [--version]\par\r
+\f1\tab\f0 Print version and copyright of this program and exit\par\r
+[-v, --verbose]\par\r
+\pard\nowidctlpar\li360\sb200 Turn on verbose output with informational messages printed. This is a count value, so specifying \endash vv can be used to increase the verbosity level.\par\r
+\pard\nowidctlpar\sb200 [-q, --quiet]\par\r
+\tab disable all messages except FATAL ERRORS\par\r
+[-d, --debug [#]]\par\r
+\tab Enable debug messages, at level #\par\r
+[-h, --help]\par\r
+\tab Print copyright, version and usage of this program and exit\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Example\par\r
+\pard\nowidctlpar\li60\sb200\cf2\b0\fs18 1. WORKSAPCE has already set. $(WORKSPACE) = c:\\work\\EdkII. The Fdf file is in c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf. Output directory is c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools. ActivePlatform is C:\\work\\EdkII\\Nt32Pkg\\Nt32Pkg.dsc\par\r
+GenFds \endash f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \endash o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \endash p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc\par\r
+GenFds \endash f $(WORKSPACE)\\Nt32Pkg\\Nt32Pkg.fdf \endash o $(WORSPACE)\\Build\\Nt32\\Debug_MyTools \endash p $(WORKSAPCE)\\Nt32Pkg\\Nt32Pkg.dsc\par\r
+\par\r
+GenFds \endash f Nt32Pkg\\Nt32Pkg.fdf \endash o Build\\Nt32\\Debug_MyTools \endash p Nt32Pkg\\Nt32Pkg.dsc\par\r
+2. Generate one FD which defined in FDF file. Use \lquote -r\rquote and Fd UIName. The Fd UIName is the name which defined in the FDf file, for detail information refer to FDF specification\par\r
+GenFds \endash f GenFds \endash f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \endash o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \endash p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc \endash r Fv_Recovery\par\r
+3. Generate one FV which defined in FDF file. Use \lquote -i\rquote and FV UiName. The FV UIName is the name which defined in the FDF file, for detail information refers to FDF specification.\par\r
+GenFds \endash f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \endash o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \endash p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc \endash I FVRecovery\par\r
+\par\r
+4. Use command line option to replace the Arch List in Target.txt. \par\r
+GenFds \endash f c:\\work\\EdkII\\Nt32pkg\\Nt32pkg.fdf \endash o c:\\work\\EdkII\\Build\\Nt32\\Debug_MyTools \endash p c:\\work\\EdkII\\Nt32pkg\\Nt32Pkg.dsc\par\r
+\pard\nowidctlpar\sb200 -a IA32, X64\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Bugs\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 Not found yet.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Files \par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 target.txt, platform.dsc, flashmap.fdf, package.dec and module.inf.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 See also\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv, GenFfs, GenSection, GenFw.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 License\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 Copyright (c) 1999 - 2009, Intel Corporation. All rights reserved.\par\r
+This program and the accompanying materials are licensed and made available \par\r
+under the terms and conditions of the BSD License which accompanies this \par\r
+distribution. The full text of the license may be found at\par\r
+\pard\nowidctlpar\cf0 http://opensource.org/licenses/bsd-license.php\cf2 . THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
+\pard\nowidctlpar\li60\sb200\f1\par\r
+}\r
+\0
\ No newline at end of file
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}\r
-{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Tahoma};}{\f148\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}\r
-{\f149\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f151\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\f152\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}\r
-{\f153\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f154\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\f155\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}\r
-{\f156\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f280\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f530\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f538\fswiss\fcharset238\fprq2 Verdana CE{\*\falt Tahoma};}\r
-{\f539\fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Tahoma};}{\f541\fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Tahoma};}{\f542\fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Tahoma};}{\f545\fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Tahoma};}\r
-{\f546\fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Tahoma};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\r
-\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;}{\stylesheet{\r
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\r
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{\r
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10 \r
-\additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}\r
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid161327\rsid289912\rsid536636\rsid550197\rsid1125541\rsid1591227\rsid2510884\rsid2566299\rsid2887531\rsid4086897\rsid4463303\rsid4544702\rsid4608121\rsid4937157\rsid5179294\rsid5535427\r
-\rsid5791475\rsid6904443\rsid7348251\rsid7432917\rsid8009887\rsid8724680\rsid9923110\rsid11665539\rsid11689149\rsid11809043\rsid11865356\rsid11877657\rsid12217334\rsid12389480\rsid12845507\rsid12854771\rsid12988031\rsid12993393\rsid13438928\rsid13787208\r
-\rsid14746353\rsid15335526\rsid15474958\rsid15929223\rsid16646888}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator lgao4}{\creatim\yr2008\mo12\dy31\hr15\min9}{\revtim\yr2010\mo3\dy18\hr17\min9}{\version42}{\edmins33}{\nofpages5}{\nofwords1007}\r
-{\nofchars5746}{\nofcharsws6740}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\r
-\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect \r
-\deftab360\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
-\jcompress\viewkind4\viewscale100\rsidroot5535427 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl2\r
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \r
-\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Name\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv.exe \hich\f39 \endash \loch\f39 build one PI firmware volume image or one UEFI capsule image.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Synopsis\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv.exe [options]}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Description\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv is used to }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\insrsid6904443 \hich\af39\dbch\af13\loch\f39 \r
-generate a PI firmware volume image or a UEFI capsule image from the PI firmware files or the binary files, which conforms to the firmware volume image format defined in PI specification or uefi capsule image format defined in UEFI specification.}{\r
-\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\par \hich\af39\dbch\af13\loch\f39 This util\hich\af39\dbch\af13\loch\f39 ity is responsible for aggregating Firmware File System (FFS}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid161327 \hich\af39\dbch\af13\loch\f39 2}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 ) files into a single FV image}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid16646888 \hich\af39\dbch\af13\loch\f39 with FFS2 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid9923110 \hich\af39\dbch\af13\loch\f39 file system guid}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 \r
-. The input files must be compliant with the PI 1.0 specification. The utility will create a FV header, append all of the FFS input file\hich\af39\dbch\af13\loch\f39 \r
-s, and optionally add the FFS pad file for those FFS files that require the specific file alignment. When adding {\*\xmlopen\xmlns2{\factoidname State}}{\*\xmlopen\xmlns2{\factoidname place}}\hich\af39\dbch\af13\loch\f39 PEI{\*\xmlclose}{\*\xmlclose}\r
- files or dxe drivers, it will relocate them to the fixed flash address or the prefered loaded memory address if necessary. Also,\hich\af39\dbch\af13\loch\f39 \r
- one symbol map file that contains the symbol information (Function and Variable) for each driver in the FV will be produced. This utility is also responsible for aggregating the binary files into a single UEFI capsule image with the UEFI capsule header. \r
-\r
-\par \hich\af39\dbch\af13\loch\f39 \r
-GenFv takes as input the path/filename of the Fv.inf or Cap.inf file, the output file name, the starting physical address of the FV, the boot driver base address and the runtime driver base address of the address.inf file to create the final Fv or Capsule\r
-\hich\af39\dbch\af13\loch\f39 \hich\af39\dbch\af13\loch\f39 \r
-image. This utility is usually called by GenFds tool, which parses platform.fdf file to create the interanl Fv.inf or Cap.inf. Generally, user doesn't need to care about these internal file format.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \r
-\hich\af39\dbch\af13\loch\f39 Options\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -o FileName, --outputfile FileName\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 The PI firmwar\hich\af39\dbch\af13\loch\f39 \r
-e volume image or Uefi Capsule image is created. This option is required.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -i FileName, --inputfile FileName}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 \r
-File is the input FV.inf or Cap.inf to specify how to construct FvImage or CapImage. Fv.inf and Cap.inf will be introduced in the following examples\hich\af39\dbch\af13\loch\f39 . File may be one capsule image }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid7432917 \hich\af39\dbch\af13\loch\f39 when its}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 header }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid8009887 \r
-\hich\af39\dbch\af13\loch\f39 is}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 dumped. This option is required.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid7348251 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 -b BlockSize, --blocksize BlockSize}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Block}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13438928 \hich\af39\dbch\af13\loch\f39 Size is one HEX or DEC format}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\hich\af39\dbch\af13\loch\f39 value required by FV image.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid289912 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid289912\charrsid289912 \hich\af39\dbch\af13\loch\f39 -n NumberBlock, --numberblock NumberBlock\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid289912\charrsid13787208 \hich\af39\dbch\af13\loch\f39 \hich\af39\dbch\af13\loch\f39 NumberBlock is one HEX or DEC format value}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13787208 \r
-\hich\af39\dbch\af13\loch\f39 . }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid289912\charrsid13787208 \hich\af39\dbch\af13\loch\f39 NumberBlock is one optional parameter.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid7348251 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 -f FfsFile, --ffsfile FfsFile}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 FfsFile is placed into FV image. Multiple files can be input one by one.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 -s FileTakeSize, --filetakesize FileTakenSize}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Specify the size of th\hich\af39\dbch\af13\loch\f39 e required space that the input file is placed in FV image. It should be specified together with the input file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -r Address, --baseaddr Address}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Address is the rebase start address for drivers that run in Flash. It supports DEC or HEX digital format.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -a Ad\hich\af39\dbch\af13\loch\f39 dressFile, --addrfile AddressFile\r
-\par \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 AddressFile is one file used to log boot driver base address and runtime driver base address. And this tool will update these two addresses after it \tab \r
-relocates all boot drivers and runtime drivers in this fv image to the \hich\af39\dbch\af13\loch\f39 preferred loaded memory address.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5791475 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5791475 \hich\af39\dbch\af13\loch\f39 -m logfile, --map logfile}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid5791475 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Logfile is the output Fv map file. If this option is not given, the FvName.map will be the default fv map file name.}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5791475 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid7348251 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5179294 \hich\af39\dbch\af13\loch\f39 -g Guid, --}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 guid Guid}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5179294 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5179294 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5179294\charrsid5179294 \hich\af39\dbch\af13\loch\f39 Guid is one specific capsule guid value}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5179294 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5179294\charrsid5179294 \hich\af39\dbch\af13\loch\f39 or fv file sys\hich\af39\dbch\af13\loch\f39 tem guid value.\r
-\par \hich\af39\dbch\af13\loch\f39 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5179294 \hich\af39\dbch\af13\loch\f39 .\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4463303\charrsid4463303 \hich\af39\dbch\af13\loch\f39 --FvNameGuid}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4463303 \hich\af39\dbch\af13\loch\f39 Guid}{\rtlch\fcs1 \r
-\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5179294\charrsid4463303 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid4608121 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5179294 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid4608121\charrsid4608121 \hich\af39\dbch\af13\loch\f39 Guid is }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4608121 \hich\af39\dbch\af13\loch\f39 used to specify }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15929223 \r
-\hich\af39\dbch\af13\loch\f39 Fv Name.}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid8724680 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4608121\charrsid4608121 \r
-\par \hich\af39\dbch\af13\loch\f39 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5179294\charrsid4608121 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid7348251 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 --capflag CapFlag}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid7348251 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Specify capsule reset flag (PersistAcrossReset, PopulateSyst}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid536636 \hich\af39\dbch\af13\loch\f39 emTable or}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid536636\charrsid536636 \hich\af39\dbch\af13\loch\f39 InitiateReset or}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid536636 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\hich\af39\dbch\af13\loch\f39 none).\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid7348251 \hich\af39\dbch\af13\loch\f39 --capheadsize HeadSize}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7348251 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Specify head size for capsule image in the format of HEX or DEC.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12217334 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12217334 \hich\af39\dbch\af13\loch\f39 -c, --capsule}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid12217334 \r
-\par \tab \hich\af39\dbch\af13\loch\f39 Create Uefi capsule image.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -p, --dump}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\r
-\par \tab \hich\af39\dbch\af13\loch\f39 Dump a capsule image header.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -v, --verbose\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \tab \hich\af39\dbch\af13\loch\f39 Turn on verbose output with informational messages.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6904443 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid15335526\charrsid15335526 \hich\af39\dbch\af13\loch\f39 -q, --quiet }{\rtlch\fcs1 \r
-\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid15335526 \r
-\par \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15335526\charrsid15335526 \hich\af39\dbch\af13\loch\f39 Disable all messages except key message and fatal error}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid15335526 \hich\af39\dbch\af13\loch\f39 .}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid15335526\charrsid15335526 \r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -d, --debug level\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \tab \hich\af39\dbch\af13\loch\f39 Enable debug message with specified level.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 --version\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Show program's version number and exit\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 -h, --hel\hich\af39\dbch\af13\loch\f39 p\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Show this help message and exit\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Example\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 1. Generate BFV that contains {\*\xmlopen\xmlns2{\factoidname PersonName}}\hich\af39\dbch\af13\loch\f39 PEI{\*\xmlclose} drivers in Flash with the input FV.inf, base address, and the output file name.\r
-\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv -i FvRecovery.inf -o FvRecovery.fv -r 0xFFFD0000\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 FvRecovery.inf\r
-\par \hich\af39\dbch\af13\loch\f39 [options]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_BLOCK_\hich\af39\dbch\af13\loch\f39 SIZE = 0x10000 #required option\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_NUM_BLOCKS = 0x3\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_BASE_ADDRESS = 0xFFFD0000 #optional, if command line -r is not specified, this option will be used.\r
-\par \hich\af39\dbch\af13\loch\f39 [attributes]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_ERASE_POLARITY = 1\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_WRITE_ENABLED_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_READ_ENABLED_C\hich\af39\dbch\af13\loch\f39 AP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_READ_LOCK_STATUS = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_WRITE_STATUS = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_READ_DISABLED_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_WRITE_LOCK_STATUS = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_LOCK_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_LOCK_STATUS = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_ERASE_POLARITY = 1\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_MEMORY_MAPPED = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_READ_LOCK_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_WRITE_DISABLED_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_READ_STATUS = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_WRITE_LOCK_CAP = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_STICKY_WRITE = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_FVB2_ALIGNMENT_16 = TRUE\r
-\par \hich\af39\dbch\af13\loch\f39 [files]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\52C05B14-0B98-496c-BC3B-04B50211D680PeiMain\\52C05B14-0B98-496c-BC\hich\af39\dbch\af13\loch\f39 3B-04B50211D680.ffs\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50PcdPeim\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs\r
-\par \hich\af39\dbch\af13\loch\f39 ......}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 2. Generate FvMain that contains Dxe drivers loaded in the preferred loaded memory address wi\hich\af39\dbch\af13\loch\f39 th the }{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid12854771 \hich\af39\dbch\af13\loch\f39 input FV.inf, address file, the output file name}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11865356 \hich\af39\dbch\af13\loch\f39 , its }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11877657 \hich\af39\dbch\af13\loch\f39 firmware file system guid }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11809043 \hich\af39\dbch\af13\loch\f39 (FFS2}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11877657 \r
-\hich\af39\dbch\af13\loch\f39 ) and}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12854771 \hich\af39\dbch\af13\loch\f39 its }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2887531 \hich\af39\dbch\af13\loch\f39 guid }{\rtlch\fcs1 \r
-\af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12854771 \hich\af39\dbch\af13\loch\f39 name.}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv -i FvMain.inf -o FvMain.fv -a Addr.inf}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12854771 \hich\af39\dbch\af13\loch\f39 }{\r
-\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid11865356 \loch\af39\dbch\af13\hich\f39 \endash \loch\f39 g }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid11865356\charrsid11865356 \hich\af39\dbch\af13\loch\f39 \r
-8c8ce578-8a3d-4f1c-9935-896185c32dd3 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12854771 \loch\af39\dbch\af13\hich\f39 \endash \loch\f39 FvNameGuid }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12854771\charrsid12854771 \r
-\hich\af39\dbch\af13\loch\f39 6D99E806-3D38-42c2-A095-5F4300BFD7DC}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Addr.inf}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 [options]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_BOOT_DRIVER_BASE_ADDRESS = 0x1f300000\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_RUNTIME_DRIVER_BASE_ADDRESS = 0x1f600000}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 3. Generate the capsule image with the input cap.inf, and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv -i BiosUpdate.inf -o BiosUpdate.cap\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 BiosUpdate.inf}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 [options]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_CAPSULE_\hich\af39\dbch\af13\loch\f39 GUID = 25A5CD7D-A5EB-4d74-9C28-D6EF04E03B16 (Required)\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_CAPSULE_HEADER_SIZE = 0x20 (Optional)\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_CAPSULE_FLAGS = PopulateSystemTable (Optional)\r
-\par \hich\af39\dbch\af13\loch\f39 [attributes]\r
-\par \hich\af39\dbch\af13\loch\f39 [files]\r
-\par \hich\af39\dbch\af13\loch\f39 EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\EDBEDF47-6EA3-4512-83C1-70F4769D4BDE-Capsule_A.fvi\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15929223 \hich\af39\dbch\af13\loch\f39 4}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 . Dump capsule image header inf\hich\af39\dbch\af13\loch\f39 \r
-ormation for the input capsule image.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 GenFv -p -i BiosUpdate.cap -o Cap.info}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Bugs\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 No known bugs.\r
-\par \hich\af39\dbch\af13\loch\f39 Report bugs to }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1591227\charrsid6704915 \hich\af39\dbch\af13\loch\f39 edk2-buildtools-{\*\xmlopen\xmlns2{\factoidname PersonName}}dev{\*\xmlclose}el@lists.sourceforge.net}\r
-{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Files\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 See also\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid6904443 \hich\af39\dbch\af13\loch\f39 License\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 Copyright (c) 2007}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5535427 \hich\af39\dbch\af13\loch\f39 -2009}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \r
-\hich\af39\dbch\af13\loch\f39 Intel Corporation. All rights reserved\r
-\par \hich\af39\dbch\af13\loch\f39 This program and the accompanying materials are licensed and made available \r
-\par \hich\af39\dbch\af13\loch\f39 under the terms and conditions of the BSD License which accompanies this \r
-\par \hich\af39\dbch\af13\loch\f39 distribution. The full text of the license may be found at\r
-\par \hich\af39\dbch\af13\loch\f39 http://opensource.org/licenses/bsd-license.ph\hich\af39\dbch\af13\loch\f39 p\r
-\par \r
-\par \hich\af39\dbch\af13\loch\f39 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6904443 \hich\af39\dbch\af13\loch\f39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-\par }}
\ No newline at end of file
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}\r
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv.exe \endash build one PI firmware volume image or one UEFI capsule image.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 GenFv.exe [options]\b0\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFv is used to \cf0 generate a PI firmware volume image or a UEFI capsule image from the PI firmware files or the binary files, which conforms to the firmware volume image format defined in PI specification or uefi capsule image format defined in UEFI specification.\cf2\f1\par\r
+\f0 This utility is responsible for aggregating Firmware File System (FFS2) files into a single FV image with FFS2 file system guid. The input files must be compliant with the PI 1.0 specification. The utility will create a FV header, append all of the FFS input files, and optionally add the FFS pad file for those FFS files that require the specific file alignment. When adding PEI files or dxe drivers, it will relocate them to the fixed flash address or the prefered loaded memory address if necessary. Also, one symbol map file that contains the symbol information (Function and Variable) for each driver in the FV will be produced. This utility is also responsible for aggregating the binary files into a single UEFI capsule image with the UEFI capsule header. \par\r
+GenFv takes as input the path/filename of the Fv.inf or Cap.inf file, the output file name, the starting physical address of the FV, the boot driver base address and the runtime driver base address of the address.inf file to create the final Fv or Capsule image. This utility is usually called by GenFds tool, which parses platform.fdf file to create the interanl Fv.inf or Cap.inf. Generally, user doesn't need to care about these internal file format.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0 \cf1\b\fs28 Options\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 -o FileName, --outputfile FileName\par\r
+\pard\nowidctlpar\li360\sb200\b0 The PI firmware volume image or Uefi Capsule image is created. This option is required.\par\r
+\pard\nowidctlpar\sb200\b -i FileName, --inputfile FileName\b0\f1\par\r
+\pard\nowidctlpar\li360\sb200\f0 File is the input FV.inf or Cap.inf to specify how to construct FvImage or CapImage. Fv.inf and Cap.inf will be introduced in the following examples. File may be one capsule image when its header is dumped. This option is required.\par\r
+\pard\nowidctlpar\sb200\b -b BlockSize, --blocksize BlockSize\b0\f1\par\r
+\tab\f0 BlockSize is one HEX or DEC format value required by FV image.\par\r
+\b -n NumberBlock, --numberblock NumberBlock\par\r
+\b0 NumberBlock is one HEX or DEC format value. NumberBlock is one optional parameter.\par\r
+\b -f FfsFile, --ffsfile FfsFile\b0\f1\par\r
+\tab\f0 FfsFile is placed into FV image. Multiple files can be input one by one.\par\r
+\b -s FileTakeSize, --filetakesize FileTakenSize\b0\f1\par\r
+\tab\f0 Specify the size of the required space that the input file is placed in FV image. It should be specified together with the input file.\par\r
+\b -r Address, --baseaddr Address\b0\f1\par\r
+\tab\f0 Address is the rebase start address for drivers that run in Flash. It supports DEC or HEX digital format.\par\r
+\b -a AddressFile, --addrfile AddressFile\par\r
+\tab\b0 AddressFile is one file used to log boot driver base address and runtime driver base address. And this tool will update these two addresses after it \tab relocates all boot drivers and runtime drivers in this fv image to the preferred loaded memory address.\par\r
+\b -m logfile, --map logfile\b0\f1\par\r
+\tab\f0 Logfile is the output Fv map file. If this option is not given, the FvName.map will be the default fv map file name.\b\f1\par\r
+\f0 -g Guid, --guid Guid\b0\f1\par\r
+\f0 Guid is one specific capsule guid value or fv file system guid value.\par\r
+Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\par\r
+\b --FvNameGuid Guid\f1\par\r
+\b0\f0 Guid is used to specify Fv Name. \f1\par\r
+\f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\f1\par\r
+\b\f0 --capflag CapFlag\b0\f1\par\r
+\tab\f0 Specify capsule reset flag (PersistAcrossReset, PopulateSystemTable or InitiateReset or none).\par\r
+\b --capheadsize HeadSize\b0\f1\par\r
+\tab\f0 Specify head size for capsule image in the format of HEX or DEC.\par\r
+\b -c, --capsule\b0\f1\par\r
+\tab\f0 Create Uefi capsule image.\par\r
+\b -p, --dump\b0\f1\par\r
+\tab\f0 Dump a capsule image header.\par\r
+\b -v, --verbose\par\r
+\b0\f1\tab\f0 Turn on verbose output with informational messages.\par\r
+\b -q, --quiet \f1\par\r
+\f0 \b0 Disable all messages except key message and fatal error.\b\f1\par\r
+\f0 -d, --debug level\par\r
+\b0\f1\tab\f0 Enable debug message with specified level.\par\r
+\b --version\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par\r
+\pard\nowidctlpar\sb200\b -h, --help\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate BFV that contains PEI drivers in Flash with the input FV.inf, base address, and the output file name.\par\r
+\b GenFv -i FvRecovery.inf -o FvRecovery.fv -r 0xFFFD0000\par\r
+\b0 FvRecovery.inf\par\r
+[options]\par\r
+EFI_BLOCK_SIZE = 0x10000 #required option\par\r
+EFI_NUM_BLOCKS = 0x3\par\r
+EFI_BASE_ADDRESS = 0xFFFD0000 #optional, if command line -r is not specified, this option will be used.\par\r
+[attributes]\par\r
+EFI_ERASE_POLARITY = 1\par\r
+EFI_WRITE_ENABLED_CAP = TRUE\par\r
+EFI_READ_ENABLED_CAP = TRUE\par\r
+EFI_READ_LOCK_STATUS = TRUE\par\r
+EFI_WRITE_STATUS = TRUE\par\r
+EFI_READ_DISABLED_CAP = TRUE\par\r
+EFI_WRITE_LOCK_STATUS = TRUE\par\r
+EFI_LOCK_CAP = TRUE\par\r
+EFI_LOCK_STATUS = TRUE\par\r
+EFI_ERASE_POLARITY = 1\par\r
+EFI_MEMORY_MAPPED = TRUE\par\r
+EFI_READ_LOCK_CAP = TRUE\par\r
+EFI_WRITE_DISABLED_CAP = TRUE\par\r
+EFI_READ_STATUS = TRUE\par\r
+EFI_WRITE_LOCK_CAP = TRUE\par\r
+EFI_STICKY_WRITE = TRUE\par\r
+EFI_FVB2_ALIGNMENT_16 = TRUE\par\r
+[files]\par\r
+EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\52C05B14-0B98-496c-BC3B-04B50211D680PeiMain\\52C05B14-0B98-496c-BC3B-04B50211D680.ffs\par\r
+EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50PcdPeim\\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs\par\r
+......\b\f1\par\r
+\b0\f0 2. Generate FvMain that contains Dxe drivers loaded in the preferred loaded memory address with the input FV.inf, address file, the output file name, its firmware file system guid (FFS2) and its guid name.\f1\par\r
+\b\f0 GenFv -i FvMain.inf -o FvMain.fv -a Addr.inf \endash g 8c8ce578-8a3d-4f1c-9935-896185c32dd3 \endash FvNameGuid 6D99E806-3D38-42c2-A095-5F4300BFD7DC\f1\par\r
+\b0\f0 Addr.inf\b\f1\par\r
+\b0\f0 [options]\par\r
+EFI_BOOT_DRIVER_BASE_ADDRESS = 0x1f300000\par\r
+EFI_RUNTIME_DRIVER_BASE_ADDRESS = 0x1f600000\b\f1\par\r
+\b0\f0 3. Generate the capsule image with the input cap.inf, and the output file name.\par\r
+\b GenFv -i BiosUpdate.inf -o BiosUpdate.cap\par\r
+\b0 BiosUpdate.inf\b\f1\par\r
+\b0\f0 [options]\par\r
+EFI_CAPSULE_GUID = 25A5CD7D-A5EB-4d74-9C28-D6EF04E03B16 (Required)\par\r
+EFI_CAPSULE_HEADER_SIZE = 0x20 (Optional)\par\r
+EFI_CAPSULE_FLAGS = PopulateSystemTable (Optional)\par\r
+[attributes]\par\r
+[files]\par\r
+EFI_FILE_NAME = K:\\Build\\NT32\\DEBUG_MYTOOLS\\Fv\\Ffs\\EDBEDF47-6EA3-4512-83C1-70F4769D4BDE-Capsule_A.fvi\par\r
+4. Dump capsule image header information for the input capsule image.\par\r
+\b GenFv -p -i BiosUpdate.cap -o Cap.info\b0\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Bugs\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
+Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
+\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
+This program and the accompanying materials are licensed and made available \par\r
+under the terms and conditions of the BSD License which accompanies this \par\r
+distribution. The full text of the license may be found at\par\r
+http://opensource.org/licenses/bsd-license.php\par\r
+\par\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
+\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
+}\r
+\0
\ No newline at end of file
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}\r
-{\f36\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Tahoma};}\r
-{\f148\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\f149\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f151\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}\r
-{\f152\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\f153\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f154\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}\r
-{\f155\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\f156\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f280\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f508\fswiss\fcharset238\fprq2 Tahoma CE;}\r
-{\f509\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f511\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f512\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f513\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f514\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}\r
-{\f515\fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f516\fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f517\fswiss\fcharset222\fprq2 Tahoma (Thai);}{\f530\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}\r
-{\f538\fswiss\fcharset238\fprq2 Verdana CE{\*\falt Tahoma};}{\f539\fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Tahoma};}{\f541\fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Tahoma};}{\f542\fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Tahoma};}\r
-{\f545\fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Tahoma};}{\f546\fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Tahoma};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\r
-\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\r
-\red8\green96\blue168;}{\stylesheet{\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\r
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{\r
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10 \r
-\additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\r
-\s15\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \cbpat9 \rtlch\fcs1 \af36\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe2052\loch\f36\hich\af36\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext15 \ssemihidden \styrsid9256052 \r
-Document Map;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid200735\rsid747391\rsid804235\rsid1006462\rsid1114661\rsid1189587\rsid1720354\rsid2505219\rsid2650853\rsid3286690\rsid3350056\rsid4087862\rsid4144673\rsid4266238\rsid4731505\r
-\rsid4982015\rsid5065021\rsid5177422\rsid5510712\rsid5648175\rsid5929449\rsid6126508\rsid6228389\rsid6441940\rsid6553824\rsid7094037\rsid7154530\rsid8349431\rsid8794482\rsid9256052\rsid9533504\rsid10230445\rsid10837442\rsid11028874\rsid11357415\r
-\rsid11495481\rsid11868619\rsid12192700\rsid12275166\rsid12334510\rsid12854407\rsid16059034\rsid16126898\rsid16281781}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator lgao4}{\creatim\yr2008\mo12\dy31\hr15\min18}{\revtim\yr2010\mo3\dy18\hr17\min9}\r
-{\version45}{\edmins6569}{\nofpages4}{\nofwords791}{\nofchars4510}{\nofcharsws5291}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\r
-\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect \r
-\deftab360\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
-\jcompress\viewkind4\viewscale100\rsidroot4982015 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl2\r
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \r
-\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Name\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw.exe \hich\f39 \endash \loch\f39 build a UEFI image or other image.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Synopsis\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 \hich\f39 GenFw.exe [options] Filename [Filename]\'85}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Description\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 \r
-Genfw is mainly used to process PE32 image to get the expected image data or image file. PE32 is a general-purpose image format that contains, among other information, data identifying the target environment for execution of the image. This utility can mo\r
-\hich\af39\dbch\af13\loch\f39 d\hich\af39\dbch\af13\loch\f39 \r
-ify the standard PE32 image to create UEFI image with EFI subsystem type, PI Terse Executable image with the compact TE image header, zero its dubug data or reset its time stamp. It can also extract PE32 image data to create bin file, extract PE32 image d\r
-\hich\af39\dbch\af13\loch\f39 a\hich\af39\dbch\af13\loch\f39 \r
-ta section to create Acpi table image, or dump PI TE image header information. It can also parse the text MicroCode definition file to create the MicroCode binary image, merge (concatenate) several MicroCode binary images into a single file by pad value a\r
-\hich\af39\dbch\af13\loch\f39 n\hich\af39\dbch\af13\loch\f39 d alignment requirement. This tool also supports the override the input file with the output contents.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Options\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Filename1 [FilenameN]\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 {\*\xmlopen\xmlns2{\factoidname City}}{\*\xmlopen\xmlns2{\factoidname place}}\hich\af39\dbch\af13\loch\f39 \r
-Input{\*\xmlclose} {\*\xmlopen\xmlns2{\factoidname State}}\hich\af39\dbch\af13\loch\f39 PE{\*\xmlclose}{\*\xmlclose}/PE32+ image, or TE image, or MicroCode Txt file, or MicroCode bin file}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid9533504 \r
-\hich\af39\dbch\af13\loch\f39 , or hii binary pakcages}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 .\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -o F\hich\af39\dbch\af13\loch\f39 ileName, --outputfile FileName\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 The EFI image, TeImage, AcpiImage, MicroBin}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid1189587 \hich\af39\dbch\af13\loch\f39 , hii }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid16126898 \hich\af39\dbch\af13\loch\f39 package lists file}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \r
-\hich\af39\dbch\af13\loch\f39 or other modified PE image will be created.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -e EFI_FILETYPE, --efiImage EFI_FILETYPE\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid11028874 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \hich\af39\dbch\af13\loch\f39 \r
-Create Efi Image. EFI_FILETYPE is one of BASE, SEC,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \r
-\hich\af39\dbch\af13\loch\f39 PEI_CORE, PEIM, DXE_CORE,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3350056 \hich\af39\dbch\af13\loch\f39 SMM_CORE,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \r
-\hich\af39\dbch\af13\loch\f39 DXE_DRIVER, UEFI_APPLICATION,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \hich\af39\dbch\af13\loch\f39 DXE_SAL_DRIVER, UEFI_DRIVER, }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11028874\charrsid11028874 \hich\af39\dbch\af13\loch\f39 DXE_RUNTIME_DRIVER,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11028874\charrsid11028874 \hich\af39\dbch\af13\loch\f39 DXE_SMM_DRIVER, SECURITY_CORE, COMBINED_PEIM_DRIVER,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \hich\af39\dbch\af13\loch\f39 PIC_PEIM, RELOCATABLE_PEIM, BS_DRIVER, RT_DRIVER,}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \hich\af39\dbch\af13\loch\f39 APPLICATION, SAL_RT_DRIVER to support \hich\af39\dbch\af13\loch\f39 all module types}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874 \r
-\hich\af39\dbch\af13\loch\f39 .}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid11028874\charrsid11028874 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -c, --acpi\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Create Acpi table.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -t, --terse\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Create Te Image.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -u, --dump\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Dump TeImage Header.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -z, --zero\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid804235\charrsid804235 \hich\af39\dbch\af13\loch\f39 Zero the Debug Data Fields in the PE input image file.}{\r
-\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid804235 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid804235\charrsid804235 \hich\af39\dbch\af13\loch\f39 It also zeros the time stamp fields.}{\rtlch\fcs1 \r
-\af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690\charrsid804235 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -b, --exe2bin\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Convert the input EXE to the o\hich\af39\dbch\af13\loch\f39 utput BIN file.\r
-\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid4982015 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4982015 \hich\af39\dbch\af13\loch\f39 -l, --stripped\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid4982015 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1114661\charrsid5177422 \hich\af39\dbch\af13\loch\f39 Strip off the relocation info}{\rtlch\fcs1 \r
-\af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5929449 \hich\af39\dbch\af13\loch\f39 rmation data}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1114661\charrsid5177422 \hich\af39\dbch\af13\loch\f39 from PE or TE image.}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid4982015 \r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -s timedate, --stamp timedate\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid7154530 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 timedate fo}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid8794482 \hich\af39\dbch\af13\loch\f39 \hich\f39 rmat is \'93\loch\f39 \hich\f39 yyyy-mm-dd 00:00:00\'94\loch\f39 . I}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 \hich\f39 \r
-f timedata is set to \'93\loch\f39 \hich\f39 NOW\'94\loch\f39 , current system time is used.}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7154530 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid7154530\charrsid7154530 \hich\af39\dbch\af13\loch\f39 The support}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7154530 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7154530\charrsid7154530 \r
-\hich\af39\dbch\af13\loch\f39 date scope is 1970-1-1 8:0:0 ~ 2038-1-19 3:14:07}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1114661 \hich\af39\dbch\af13\loch\f39 .}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690\charrsid7154530 \r
-\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -m, --mcifile\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Convert input microcode txt definition file to microcode bin file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -j, --join\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Merge multiple microcode bin files to one file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12334510 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12334510 \hich\af39\dbch\af13\loch\f39 -a NUM, --align NUM\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid12334510 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12334510 \hich\af39\dbch\af13\loch\f39 NUM is one HEX or DEC format alignment value, \r
-\hich\af39\dbch\af13\loch\f39 which is used to combine multip}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1114661 \hich\af39\dbch\af13\loch\f39 le}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12334510 \hich\af39\dbch\af13\loch\f39 \r
- microcode bin files.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12334510 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid12334510 \hich\af39\dbch\af13\loch\f39 -p NUM, --pad NUM\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid12334510 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12334510 \hich\af39\dbch\af13\loch\f39 \r
-NUM is one HEX or DEC format padding value, which is used to combine multip}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1114661 \hich\af39\dbch\af13\loch\f39 le}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12334510 \r
-\hich\af39\dbch\af13\loch\f39 microcode bin files.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3286690 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4266238 \hich\af39\dbch\af13\loch\f39 --keepex}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 c}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4266238 \hich\af39\dbch\af13\loch\f39 e}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 \r
-ptiontable\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3286690 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Don\hich\f39 \rquote \loch\f39 t clear exception table.\r
-\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3286690 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 --keepzeropending\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3286690 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Don\hich\f39 \rquote \loch\f39 t strip zero\r
-\hich\af39\dbch\af13\loch\f39 pending of .reloc.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 -r, --replace\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 Overwrite the input file with the output content.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6126508\charrsid9256052 \hich\af39\dbch\af13\loch\f39 \r
--g HiiPackageListGuid, --hiiguid HiiPackageListGuid\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 Guid is used to specify hii package list guid.}{\rtlch\fcs1 \r
-\af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid9256052 \r
-\par \hich\af39\dbch\af13\loch\f39 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 --hiipackage }{\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid6126508 \r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 Combine all input binary hii pack}{\r
-\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 a}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 \r
-ges into a single package list as the text resource data}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 file }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \r
-\hich\af39\dbch\af13\loch\f39 (RC}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 file format}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 ).\r
-\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 --hiibinpackage }{\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid6126508 \r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6126508 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 C}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 ombine all input binary hii pac}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 k}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid6126508 \hich\af39\dbch\af13\loch\f39 a}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6126508\charrsid4087862 \hich\af39\dbch\af13\loch\f39 ges into a single package list as the binary resource section.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -v, --verbose\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Turn on verbos\hich\af39\dbch\af13\loch\f39 \r
-e output with informational messages.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3286690 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -d, --debug level\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \tab \hich\af39\dbch\af13\loch\f39 Enable debug message with specified level.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 --version\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Show program's version number and exit\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 -h, --help\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Show this help message and exit\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Example\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 1. Generate Efi image with the input PE image, module ty\hich\af39\dbch\af13\loch\f39 pe and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 e PEI_CORE PeiMain.dll \hich\f39 \endash \loch\f39 o PeiMain.efi\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 2. Generate Te image with the input PE image and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 t PeiMain.dll \hich\f39 \endash \loch\f39 o PeiMain.te\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 3. Generate acpi table image with the input PE image and the output file nam\hich\af39\dbch\af13\loch\f39 e.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 c Facs.dll \hich\f39 \endash \loch\f39 o Facs.acpi\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 4. Dump TeImage Header with the input Te Image and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 u PeiMain.te \hich\f39 \endash \loch\f39 o PeiMain.teheader\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 5. Modify PeImage by zero its debug data.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 z PeiMain.dll \hich\f39 \endash \loch\f39 o Peimain.zero\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 6. Modify PeImage by set new timestamp and override the input image without the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 \hich\f39 s \'93\loch\f39 \hich\f39 2007-8-16 16:06:32\'94\loch\f39 PeiMain.dll \hich\f39 \endash \loch\f39 r\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 7. Extract bin image from PeImage.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 b PeiMain.dll \hich\f39 \endash \loch\f39 o PeiMain.bin\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 8. Generate the microcode b\hich\af39\dbch\af13\loch\f39 inary file from the micro code txt file.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 m Mci.txt \hich\f39 \endash \loch\f39 o Mci.bin\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 9. Merge the multiple mci binary files to one file.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 j Mci.bin1 Mci.bin2 Mci.bin3 \hich\f39 \endash \loch\f39 a 32 \hich\f39 \endash \loch\f39 p 0xFF \hich\f39 \endash \r
-\loch\f39 o Mci.bin\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid2650853 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12854407 \hich\af39\dbch\af13\loch\f39 10}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2650853 \r
-\hich\af39\dbch\af13\loch\f39 . }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10230445 \hich\af39\dbch\af13\loch\f39 Generate the text resource file}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2505219 \hich\af39\dbch\af13\loch\f39 }{\r
-\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4144673 \hich\af39\dbch\af13\loch\f39 (RC format) }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid8349431 \hich\af39\dbch\af13\loch\f39 based o}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid16281781 \hich\af39\dbch\af13\loch\f39 n all input binary \hich\af39\dbch\af13\loch\f39 HII packages}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6441940 \hich\af39\dbch\af13\loch\f39 and }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid11357415 \hich\af39\dbch\af13\loch\f39 their package list guid}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2650853 \hich\af39\dbch\af13\loch\f39 .\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid2650853 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 o SampleHii.rc \hich\f39 \endash \r
-\loch\f39 g }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 D49D2EB0-44D5-4621-9FD6-1A92C9109B99 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \r
-\loch\af39\dbch\af13\hich\f39 \endash \loch\f39 hiipackage }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 SampleStr.hpk}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \r
-\hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 Sample}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 Vfr}{\r
-\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 .hpk}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid2650853\charrsid4731505 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12854407 \hich\af39\dbch\af13\loch\f39 11.}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2650853 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid2505219 \r
-\hich\af39\dbch\af13\loch\f39 Generate }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid747391 \hich\af39\dbch\af13\loch\f39 the binary resource section based on all input binary HII packages and their package list guid.}{\rtlch\fcs1 \af39\afs18 \r
-\ltrch\fcs0 \fs18\cf1\insrsid2650853 \r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 GenFw \hich\f39 \endash \loch\f39 o SampleHii.bin \hich\f39 \endash \loch\f39 g }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 D49D2EB0-44D5-4621-9FD6-1A92C9109B99 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \loch\af39\dbch\af13\hich\f39 \endash \loch\f39 hii}{\rtlch\fcs1 \r
-\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10837442 \hich\af39\dbch\af13\loch\f39 bin}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 package }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 SampleStr.hpk}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 Sample}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid4731505 \hich\af39\dbch\af13\loch\f39 Vfr}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \r
-\b\fs18\cf1\insrsid4731505\charrsid4731505 \hich\af39\dbch\af13\loch\f39 .hpk}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid2650853 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Bugs\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 No known bugs.\r
-\par \hich\af39\dbch\af13\loch\f39 Report bugs to }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid1006462\charrsid6704915 \hich\af39\dbch\af13\loch\f39 edk2-buildtools-{\*\xmlopen\xmlns2{\factoidname PersonName}}dev{\*\xmlclose}el@lists.sourceforge.net}\r
-{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Files\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 See also\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid3286690 \hich\af39\dbch\af13\loch\f39 License\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 Copyright (c) 2007}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4982015 \hich\af39\dbch\af13\loch\f39 -2009}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \r
-\hich\af39\dbch\af13\loch\f39 Intel Corporation. All rights reserved\r
-\par \hich\af39\dbch\af13\loch\f39 This program and the accompanying materials are licensed and made available \r
-\par \hich\af39\dbch\af13\loch\f39 under the terms and conditions of the BSD License which accompanies this \r
-\par \hich\af39\dbch\af13\loch\f39 distribution. The full text of the license may be found at\r
-\par \hich\af39\dbch\af13\loch\f39 http://opensource.org/licenses/bsd-license.php\r
-\par \r
-\par \hich\af39\dbch\af13\loch\f39 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3286690 \hich\af39\dbch\af13\loch\f39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\insrsid3286690 \r
-\par }}
\ No newline at end of file
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}\r
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenFw.exe \endash build a UEFI image or other image.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 GenFw.exe [options] Filename [Filename]\'85\b0\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 Genfw is mainly used to process PE32 image to get the expected image data or image file. PE32 is a general-purpose image format that contains, among other information, data identifying the target environment for execution of the image. This utility can modify the standard PE32 image to create UEFI image with EFI subsystem type, PI Terse Executable image with the compact TE image header, zero its dubug data or reset its time stamp. It can also extract PE32 image data to create bin file, extract PE32 image data section to create Acpi table image, or dump PI TE image header information. It can also parse the text MicroCode definition file to create the MicroCode binary image, merge (concatenate) several MicroCode binary images into a single file by pad value and alignment requirement. This tool also supports the override the input file with the output contents.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Options\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 Filename1 [FilenameN]\par\r
+\pard\nowidctlpar\li360\sb200\b0 Input PE/PE32+ image, or TE image, or MicroCode Txt file, or MicroCode bin file, or hii binary pakcages.\par\r
+\pard\nowidctlpar\sb200\b -o FileName, --outputfile FileName\par\r
+\pard\nowidctlpar\li360\sb200\b0 The EFI image, TeImage, AcpiImage, MicroBin, hii package lists file or other modified PE image will be created.\par\r
+\pard\nowidctlpar\sb200\b -e EFI_FILETYPE, --efiImage EFI_FILETYPE\par\r
+\pard\nowidctlpar\li360\sb200\b0 Create Efi Image. EFI_FILETYPE is one of BASE, SEC, PEI_CORE, PEIM, DXE_CORE, SMM_CORE, DXE_DRIVER, UEFI_APPLICATION, DXE_SAL_DRIVER, UEFI_DRIVER, DXE_RUNTIME_DRIVER, DXE_SMM_DRIVER, SECURITY_CORE, COMBINED_PEIM_DRIVER, PIC_PEIM, RELOCATABLE_PEIM, BS_DRIVER, RT_DRIVER, APPLICATION, SAL_RT_DRIVER to support all module types.\f1\par\r
+\pard\nowidctlpar\sb200\b\f0 -c, --acpi\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Create Acpi table.\par\r
+\pard\nowidctlpar\sb200\b -t, --terse\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Create Te Image.\par\r
+\pard\nowidctlpar\sb200\b -u, --dump\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Dump TeImage Header.\par\r
+\pard\nowidctlpar\sb200\b -z, --zero\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Zero the Debug Data Fields in the PE input image file. It also zeros the time stamp fields.\f1\par\r
+\pard\nowidctlpar\sb200\b\f0 -b, --exe2bin\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Convert the input EXE to the output BIN file.\par\r
+\pard\nowidctlpar\sb200\b -l, --stripped\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Strip off the relocation information data from PE or TE image.\f1\par\r
+\pard\nowidctlpar\sb200\b\f0 -s timedate, --stamp timedate\par\r
+\pard\nowidctlpar\li360\sb200\b0 timedate format is \ldblquote yyyy-mm-dd 00:00:00\rdblquote . If timedata is set to \ldblquote NOW\rdblquote , current system time is used. The support date scope is 1970-1-1 8:0:0 ~ 2038-1-19 3:14:07.\f1\par\r
+\pard\nowidctlpar\sb200\b\f0 -m, --mcifile\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Convert input microcode txt definition file to microcode bin file.\par\r
+\pard\nowidctlpar\sb200\b -j, --join\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Merge multiple microcode bin files to one file.\par\r
+\pard\nowidctlpar\sb200\b -a NUM, --align NUM\par\r
+\pard\nowidctlpar\li360\sb200\b0 NUM is one HEX or DEC format alignment value, which is used to combine multiple microcode bin files.\par\r
+\pard\nowidctlpar\sb200\b -p NUM, --pad NUM\par\r
+\pard\nowidctlpar\li360\sb200\b0 NUM is one HEX or DEC format padding value, which is used to combine multiple microcode bin files.\par\r
+\pard\nowidctlpar\sb200\b --keepexceptiontable\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Don\rquote t clear exception table.\par\r
+\pard\nowidctlpar\sb200\b --keepzeropending\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Don\rquote t strip zero pending of .reloc.\par\r
+\pard\nowidctlpar\sb200\b -r, --replace\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Overwrite the input file with the output content.\par\r
+\pard\nowidctlpar\sb200\b -g HiiPackageListGuid, --hiiguid HiiPackageListGuid\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Guid is used to specify hii package list guid.\f1\par\r
+\f0 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\par\r
+\pard\nowidctlpar\sb200\b --hiipackage \f1\par\r
+\pard\nowidctlpar\fi360\sb200\b0\f0 Combine all input binary hii packages into a single package list as the text resource data file (RC file format).\par\r
+\pard\nowidctlpar\sb200\b --hiibinpackage \f1\par\r
+\pard\nowidctlpar\fi360\sb200\b0\f0 Combine all input binary hii packages into a single package list as the binary resource section.\par\r
+\pard\nowidctlpar\sb200\b -v, --verbose\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Turn on verbose output with informational messages.\par\r
+\pard\nowidctlpar\sb200\b -d, --debug level\par\r
+\b0\f1\tab\f0 Enable debug message with specified level.\par\r
+\b --version\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par\r
+\pard\nowidctlpar\sb200\b -h, --help\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate Efi image with the input PE image, module type and the output file name.\par\r
+\b GenFw \endash e PEI_CORE PeiMain.dll \endash o PeiMain.efi\par\r
+\b0 2. Generate Te image with the input PE image and the output file name.\par\r
+\b GenFw \endash t PeiMain.dll \endash o PeiMain.te\par\r
+\b0 3. Generate acpi table image with the input PE image and the output file name.\par\r
+\b GenFw \endash c Facs.dll \endash o Facs.acpi\par\r
+\b0 4. Dump TeImage Header with the input Te Image and the output file name.\par\r
+\b GenFw \endash u PeiMain.te \endash o PeiMain.teheader\par\r
+\b0 5. Modify PeImage by zero its debug data.\par\r
+\b GenFw \endash z PeiMain.dll \endash o Peimain.zero\par\r
+\b0 6. Modify PeImage by set new timestamp and override the input image without the output file name.\par\r
+\b GenFw \endash s \ldblquote 2007-8-16 16:06:32\rdblquote PeiMain.dll \endash r\par\r
+\b0 7. Extract bin image from PeImage.\par\r
+\b GenFw \endash b PeiMain.dll \endash o PeiMain.bin\par\r
+\b0 8. Generate the microcode binary file from the micro code txt file.\par\r
+\b GenFw \endash m Mci.txt \endash o Mci.bin\par\r
+\b0 9. Merge the multiple mci binary files to one file.\par\r
+\b GenFw \endash j Mci.bin1 Mci.bin2 Mci.bin3 \endash a 32 \endash p 0xFF \endash o Mci.bin\par\r
+\b0 10. Generate the text resource file (RC format) based on all input binary HII packages and their package list guid.\par\r
+\b GenFw \endash o SampleHii.rc \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiipackage SampleStr.hpk SampleVfr.hpk\f1\par\r
+\b0\f0 11. Generate the binary resource section based on all input binary HII packages and their package list guid.\f1\par\r
+\b\f0 GenFw \endash o SampleHii.bin \endash g D49D2EB0-44D5-4621-9FD6-1A92C9109B99 \endash hiibinpackage SampleStr.hpk SampleVfr.hpk\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Bugs\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
+Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
+\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
+This program and the accompanying materials are licensed and made available \par\r
+under the terms and conditions of the BSD License which accompanies this \par\r
+distribution. The full text of the license may be found at\par\r
+http://opensource.org/licenses/bsd-license.php\par\r
+\par\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
+\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
+\cf0\f1\par\r
+}\r
+\0
\ No newline at end of file
-{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\f4\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Helvetica;}\r
-{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}\r
-{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Tahoma};}{\f148\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f149\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}\r
-{\f151\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f152\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\f153\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}\r
-{\f154\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\f155\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}\r
-{\f156\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\f188\fswiss\fcharset238\fprq2 Helvetica CE;}{\f189\fswiss\fcharset204\fprq2 Helvetica Cyr;}{\f191\fswiss\fcharset161\fprq2 Helvetica Greek;}\r
-{\f192\fswiss\fcharset162\fprq2 Helvetica Tur;}{\f193\fbidi \fswiss\fcharset177\fprq2 Helvetica (Hebrew);}{\f194\fbidi \fswiss\fcharset178\fprq2 Helvetica (Arabic);}{\f195\fswiss\fcharset186\fprq2 Helvetica Baltic;}\r
-{\f196\fswiss\fcharset163\fprq2 Helvetica (Vietnamese);}{\f280\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f530\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f538\fswiss\fcharset238\fprq2 Verdana CE{\*\falt Tahoma};}\r
-{\f539\fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Tahoma};}{\f541\fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Tahoma};}{\f542\fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Tahoma};}{\f545\fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Tahoma};}\r
-{\f546\fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Tahoma};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\r
-\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;}{\stylesheet{\r
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{\r
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{\r
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10 \r
-\additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}\r
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5846868\rsid6037879\rsid6902473}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator lgao4}{\creatim\yr2008\mo12\dy31\hr15\min21}{\revtim\yr2010\mo3\dy18\hr17\min9}{\version4}{\edmins2}\r
-{\nofpages3}{\nofwords653}{\nofchars3726}{\nofcharsws4371}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\r
-\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect \r
-\deftab360\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
-\jcompress\viewkind4\viewscale100\rsidroot6902473 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl2\r
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}\r
-{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \r
-\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Name\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec.exe \hich\f39 \endash \loch\f39 bu\hich\af39\dbch\af13\loch\f39 ild one PI section file.\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Synopsis\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 \hich\f39 GenSec.exe [options] [Filename]\'85}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Description\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 \r
-GenSec is used to generate valid EFI_SECTION type files, which conforms to the firmware file section defined in PI specification, from PE32/PE32+/COFF image files or other binary files. This utility will produce a file that is the section header concatena\r
-\hich\af39\dbch\af13\loch\f39 t\hich\af39\dbch\af13\loch\f39 ed with the contents of the input file. It does not validate that the contents of the input file match the section added.\r
-\par \hich\af39\dbch\af13\loch\f39 PI SECTION Types referred to the Volume 3 of the PI 1.0 specification.\r
-\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\r
-\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\pard \ltrpar\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 Mnemonic\cell \r
-\hich\af4\dbch\af13\loch\f4 PI Section Type\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow0\irowband0\ltrrow\r
-\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \r
-\clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \r
-\cellx5800\row \ltrrow}\pard \ltrpar\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 COMPRESS\cell \hich\af4\dbch\af13\loch\f4 \r
-EFI_SECTION_COMPRESSION\cell }\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow1\irowband1\ltrrow\ts11\trgaph108\trleft36\trbrdrt\r
-\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\r
-\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow\r
-}\pard \ltrpar\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 GUID\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_GUID_DEFINED\cell \r
-}\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow2\irowband2\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\r
-\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 PE32\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_PE32\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow3\irowband3\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 PIC\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_PIC\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow4\irowband4\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 TE\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_TE\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow5\irowband5\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 DXE_DEPEX\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_DXE_DEPEX\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow6\irowband6\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 VERSION\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_VERSION\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow7\irowband7\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 UI\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_USER_INTERFACE\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow8\irowband8\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\r
-\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 COMPAT16\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_COMPATIBILITY16\cell \r
-}\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow9\irowband9\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\r
-\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 FVIMAGE\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_FIRMWARE_VOLUME_IMAGE\cell \r
-}\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow10\irowband10\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\r
-\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 SUBGUID\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_FREEFORM_SUBTYPE_GUID\cell \r
-}\pard \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow11\irowband11\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\r
-\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 RAW\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_RAW\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow12\irowband12\ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \r
-\trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row \ltrrow}\pard \ltrpar\r
-\ql \li0\ri0\sa60\sl240\slmult0\nowidctlpar\intbl\wrapdefault\faauto\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \hich\af4\dbch\af13\loch\f4 PEI_DEPEX\cell \hich\af4\dbch\af13\loch\f4 EFI_SECTION_PEI_DEPEX\cell }\pard \ltrpar\r
-\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\rtlch\fcs1 \af4\afs18 \ltrch\fcs0 \f4\fs18\insrsid5846868 \trowd \irow13\irowband13\lastrow \ltrrow\ts11\trgaph108\trleft36\trbrdrt\brdrs\brdrw15 \trbrdrl\r
-\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trftsWidth1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\tblind144\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \r
-\cltxlrtb\clftsWidth3\clwWidth1392\clshdrawnil \cellx1428\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4372\clshdrawnil \cellx5800\row }\pard\plain \ltrpar\r
-\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\r
-\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Options\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs18 \r
-\ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Filename1 [FilenameN]\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Input PE/PE32+ image, or TE image, or other binary files.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -o FileName, --outputfile FileName\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 The PI section file is created. This option is required.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -s SectionType, --sectiontype SectionType\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 \r
-SectionType defined in PI spec is one type of EFI_SECTION_COMPRESSION, EFI_SECTION_GUID_DEFINED, EFI_SECTION_PE32, EFI_SECTION_PIC, EFI_SECTION_TE, EFI_SECTI\hich\af39\dbch\af13\loch\f39 \r
-ON_DXE_DEPEX, EFI_SECTION_COMPATIBILITY16, EFI_SECTION_USER_INTERFACE, EFI_SECTION_VERSION, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, EFI_SECTION_RAW, EFI_SECTION_FREEFORM_SUBTYPE_GUID, EFI_SECTION_PEI_DEPEX. If sectiontype is not given, EFI_SECTION_ALL is defau\r
-\hich\af39\dbch\af13\loch\f39 l\hich\af39\dbch\af13\loch\f39 t type to contain the input all sections to one section file.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -c [Type], --compress [Type]\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 \r
-Compress method type can be PI_NONE or PI_STD. If Type is not given, PI_STD is default type.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -g GuidValue, --vendor GuidValue\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GuidValue is one specific vendor guid v\hich\af39\dbch\af13\loch\f39 \r
-alue for guided section. Its format is 00000000-0000-0000-0000-000000000000. If it is not given, the default CRC32 guided is used.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5846868 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -l GuidHeaderLength, --HeaderLength GuidHeaderLength\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid5846868 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Specify the size of header of GUID-ed data.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -r GuidAttr, --attributes Gu\hich\af39\dbch\af13\loch\f39 idAttr\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 \r
-GuidAttr is guided section attributes, which may be PROCESSING_REQUIRED or AUTH_STATUS_VALID. If it is not given, PROCESSING_REQUIRED is the default attribute.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -n String, --name String\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 String is a NULL terminated string used in Ui section.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -j Number\hich\af39\dbch\af13\loch\f39 , --buildnumber Number\r
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Number is an integer value between 0000 and 9999 used in Ver section.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -v, --verbose\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Turn on verbose output with informational messages.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5846868 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -d, --debug level\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \tab \hich\af39\dbch\af13\loch\f39 Enable debug message with specified level.\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 --version\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Show program's version nu\hich\af39\dbch\af13\loch\f39 mber and exit\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 -h, --help\r
-\par }\pard \ltrpar\ql \fi360\li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Show this help message and exit\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Example\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 1. Generate PE32 section file with the input PE image, PE32 section type and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec -s EFI_SECTION_PE32 PeiMain.efi -o PeiMain.pe32 \r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 2. Generate compression section file with the input section files, compression method and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec -s EFI_SECTION_COMPRESSION \hich\f39 \endash \loch\f39 c PI_STD PeiMain.pe32 PeiMain.ui PeiMain.ver -o PeiMain.com\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 3. Generate the default CRC32 guided section file\hich\af39\dbch\af13\loch\f39 with the input section files, and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec \hich\f39 \endash \loch\f39 s EFI_SECTION_GUID_DEFINED PeiMain.pe32 PeiMain.ui PeiMain.ver \hich\f39 \endash \loch\f39 o PeiMain.guided\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 4. Generate the vendor specific guided section file with the input vendor raw files, the vendor guid, and the \hich\af39\dbch\af13\loch\f39 output file name.\r
-\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec \hich\f39 \endash \loch\f39 s EFI_SECTION_GUID_DEFINED \hich\f39 \endash \loch\f39 g A31280AD-481E-41B6-95E8-127F-4C984779 \hich\f39 \endash \r
-\loch\f39 r PROCESSING_REQUIRED \hich\f39 \endash \loch\f39 r AUTH_STATUS_VALID PeiMain.raw \hich\f39 \endash \loch\f39 o PeiMain.guided\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 5. Generate UI section with the input string and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Gensec -s EFI_SEC\hich\af39\dbch\af13\loch\f39 TION_USER_INTERFACE \hich\f39 \endash \loch\f39 \hich\f39 n \'93\loch\f39 \hich\f39 PeiMain\'94\loch\f39 \r
-\hich\f39 \endash \loch\f39 o PeiMain.ui\r
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 6. Generate VER section with the input build number and the output file name.\r
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 GenSec -s EFI_SECTION_VERSION \hich\f39 \endash \loch\f39 j 20 \hich\f39 \endash \loch\f39 o PeiMain.ver\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Bugs\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 No known bugs.\r
-\par \hich\af39\dbch\af13\loch\f39 Report bugs to }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6037879\charrsid6704915 \hich\af39\dbch\af13\loch\f39 edk2-buildtools-{\*\xmlopen\xmlns2{\factoidname PersonName}}dev{\*\xmlclose}el@lists.sourceforge.net}\r
-{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Files\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Se\hich\af39\dbch\af13\loch\f39 e also\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 None\r
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
-\fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5846868 \hich\af39\dbch\af13\loch\f39 License\r
-\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \r
-\fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 Copyright (c) 2007}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6902473 \hich\af39\dbch\af13\loch\f39 -2009}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \r
-\hich\af39\dbch\af13\loch\f39 Intel Corporation. All rights reserved\r
-\par \hich\af39\dbch\af13\loch\f39 This program and the accompanying materials are licensed and made available \r
-\par \hich\af39\dbch\af13\loch\f39 under the terms and conditions of the BSD License which accompanies this \r
-\par \hich\af39\dbch\af13\loch\f39 distribution. The ful\hich\af39\dbch\af13\loch\f39 l text of the license may be found at\r
-\par \hich\af39\dbch\af13\loch\f39 http://opensource.org/licenses/bsd-license.php\r
-\par \r
-\par \hich\af39\dbch\af13\loch\f39 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5846868 \hich\af39\dbch\af13\loch\f39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-\par }}
\ No newline at end of file
+{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Helvetica;}}\r
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenSec.exe \endash build one PI section file.\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\fs28 Synopsis\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 GenSec.exe [options] [Filename]\'85\b0\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Description\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 GenSec is used to generate valid EFI_SECTION type files, which conforms to the firmware file section defined in PI specification, from PE32/PE32+/COFF image files or other binary files. This utility will produce a file that is the section header concatenated with the contents of the input file. It does not validate that the contents of the input file match the section added.\par\r
+PI SECTION Types referred to the Volume 3 of the PI 1.0 specification.\par\r
+\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0\cf0\f2 Mnemonic\cell PI Section Type\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 COMPRESS\cell EFI_SECTION_COMPRESSION\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 GUID\cell EFI_SECTION_GUID_DEFINED\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PE32\cell EFI_SECTION_PE32\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PIC\cell EFI_SECTION_PIC\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 TE\cell EFI_SECTION_TE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 DXE_DEPEX\cell EFI_SECTION_DXE_DEPEX\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 VERSION\cell EFI_SECTION_VERSION\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 UI\cell EFI_SECTION_USER_INTERFACE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 COMPAT16\cell EFI_SECTION_COMPATIBILITY16\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 FVIMAGE\cell EFI_SECTION_FIRMWARE_VOLUME_IMAGE\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 SUBGUID\cell EFI_SECTION_FREEFORM_SUBTYPE_GUID\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 RAW\cell EFI_SECTION_RAW\cell\row\trowd\trgaph108\trleft36\trbrdrl\brdrs\brdrw15 \trbrdrt\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trpaddl108\trpaddr108\trpaddfl3\trpaddfr3\r
+\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx1428\clbrdrl\brdrw15\brdrs\clbrdrt\brdrw15\brdrs\clbrdrr\brdrw15\brdrs\clbrdrb\brdrw15\brdrs \cellx5800\pard\intbl\nowidctlpar\sa60\sl240\slmult0 PEI_DEPEX\cell EFI_SECTION_PEI_DEPEX\cell\row\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Options\par\r
+\pard\nowidctlpar\sb200\cf2\fs18 Filename1 [FilenameN]\par\r
+\pard\nowidctlpar\li360\sb200\b0 Input PE/PE32+ image, or TE image, or other binary files.\par\r
+\pard\nowidctlpar\sb200\b -o FileName, --outputfile FileName\par\r
+\pard\nowidctlpar\li360\sb200\b0 The PI section file is created. This option is required.\par\r
+\pard\nowidctlpar\sb200\b -s SectionType, --sectiontype SectionType\par\r
+\pard\nowidctlpar\li360\sb200\b0 SectionType defined in PI spec is one type of EFI_SECTION_COMPRESSION, EFI_SECTION_GUID_DEFINED, EFI_SECTION_PE32, EFI_SECTION_PIC, EFI_SECTION_TE, EFI_SECTION_DXE_DEPEX, EFI_SECTION_COMPATIBILITY16, EFI_SECTION_USER_INTERFACE, EFI_SECTION_VERSION, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, EFI_SECTION_RAW, EFI_SECTION_FREEFORM_SUBTYPE_GUID, EFI_SECTION_PEI_DEPEX. If sectiontype is not given, EFI_SECTION_ALL is default type to contain the input all sections to one section file.\par\r
+\pard\nowidctlpar\sb200\b -c [Type], --compress [Type]\par\r
+\pard\nowidctlpar\li360\sb200\b0 Compress method type can be PI_NONE or PI_STD. If Type is not given, PI_STD is default type.\par\r
+\pard\nowidctlpar\sb200\b -g GuidValue, --vendor GuidValue\par\r
+\pard\nowidctlpar\li360\sb200\b0 GuidValue is one specific vendor guid value for guided section. Its format is 00000000-0000-0000-0000-000000000000. If it is not given, the default CRC32 guided is used.\par\r
+\pard\nowidctlpar\sb200\b -l GuidHeaderLength, --HeaderLength GuidHeaderLength\par\r
+\pard\nowidctlpar\li360\sb200\b0 Specify the size of header of GUID-ed data.\par\r
+\pard\nowidctlpar\sb200\b -r GuidAttr, --attributes GuidAttr\par\r
+\pard\nowidctlpar\li360\sb200\b0 GuidAttr is guided section attributes, which may be PROCESSING_REQUIRED or AUTH_STATUS_VALID. If it is not given, PROCESSING_REQUIRED is the default attribute.\par\r
+\pard\nowidctlpar\sb200\b -n String, --name String\par\r
+\pard\nowidctlpar\li360\sb200\b0 String is a NULL terminated string used in Ui section.\par\r
+\pard\nowidctlpar\sb200\b -j Number, --buildnumber Number\par\r
+\pard\nowidctlpar\li360\sb200\b0 Number is an integer value between 0000 and 9999 used in Ver section.\par\r
+\pard\nowidctlpar\sb200\b -v, --verbose\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Turn on verbose output with informational messages.\par\r
+\pard\nowidctlpar\sb200\b -d, --debug level\par\r
+\b0\f1\tab\f0 Enable debug message with specified level.\par\r
+\b --version\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show program's version number and exit\par\r
+\pard\nowidctlpar\sb200\b -h, --help\par\r
+\pard\nowidctlpar\fi360\sb200\b0 Show this help message and exit\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 Example\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Generate PE32 section file with the input PE image, PE32 section type and the output file name.\par\r
+\b GenSec -s EFI_SECTION_PE32 PeiMain.efi -o PeiMain.pe32 \par\r
+\b0 2. Generate compression section file with the input section files, compression method and the output file name.\par\r
+\b GenSec -s EFI_SECTION_COMPRESSION \endash c PI_STD PeiMain.pe32 PeiMain.ui PeiMain.ver -o PeiMain.com\par\r
+\b0 3. Generate the default CRC32 guided section file with the input section files, and the output file name.\par\r
+\b GenSec \endash s EFI_SECTION_GUID_DEFINED PeiMain.pe32 PeiMain.ui PeiMain.ver \endash o PeiMain.guided\par\r
+\b0 4. Generate the vendor specific guided section file with the input vendor raw files, the vendor guid, and the output file name.\par\r
+\b GenSec \endash s EFI_SECTION_GUID_DEFINED \endash g A31280AD-481E-41B6-95E8-127F-4C984779 \endash r PROCESSING_REQUIRED \endash r AUTH_STATUS_VALID PeiMain.raw \endash o PeiMain.guided\par\r
+\b0 5. Generate UI section with the input string and the output file name.\par\r
+\b Gensec -s EFI_SECTION_USER_INTERFACE \endash n \ldblquote PeiMain\rdblquote \endash o PeiMain.ui\par\r
+\b0 6. Generate VER section with the input build number and the output file name.\par\r
+\b GenSec -s EFI_SECTION_VERSION \endash j 20 \endash o PeiMain.ver\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\fs28 Bugs\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
+Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
+\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
+\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
+This program and the accompanying materials are licensed and made available \par\r
+under the terms and conditions of the BSD License which accompanies this \par\r
+distribution. The full text of the license may be found at\par\r
+http://opensource.org/licenses/bsd-license.php\par\r
+\par\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
+\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
+}\r
+\0
\ No newline at end of file
# http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-doc/
# howto-build/mingw-w64-howto-build.txt?revision=216&view=markup
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, 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
'mingw-w64/files/mingw-w64/mingw-w64-snapshot/' + \
'mingw-w64-v1.0-snapshot-$version.tar.bz2/download',
'extract-dir': os.path.join('mingw-w64-v1.0-$version', 'mingw-w64-headers'),
- 'version': '20100223',
- 'md5': '700b9f54e740b1b962c8a3a0f52b7c04',
+ 'version': '20100427',
+ 'md5': '1fe68f486bba8995f6a5cf0ed06c80f3',
},
}
@REM however it may be executed directly from the BaseTools project folder\r
@REM if the file is not executed within a WORKSPACE\BaseTools folder.\r
@REM\r
-@REM Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.\r
+@REM Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
@REM\r
@REM This program and the accompanying materials are licensed and made available\r
@REM under the terms and conditions of the BSD Licensewhich accompanies this \r