Sync EDKII BaseTools to BaseTools project r1971

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2010-05-18 05:04:32 +00:00
parent 3dc8585e0a
commit 40d841f6a8
417 changed files with 3829 additions and 2563 deletions

View File

@ -1,8 +1,8 @@
#!/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
#

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
#
# 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

View File

@ -6,7 +6,7 @@ Root Package 1.00
Intel is a trademark or registered trademark of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.
Copyright (c) 2007, Intel Corporation
Copyright (c) 2007, Intel Corporation. All rights reserved.
-------------------------------------------------------------------------------
Quick Start

View File

@ -8,7 +8,7 @@
<Description>
This Database tracks all packages and archives installed in this workspace.
</Description>
<Copyright>Copyright (c) 2007 - 2009, Intel Corporation All rights reserved.</Copyright>
<Copyright>Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.</Copyright>
<License>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this

View File

@ -1,8 +1,8 @@
<?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
@ -230,7 +230,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
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 packages .pkg file. </xs:documentation>
the distribution package's .pkg file. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" maxOccurs="1" name="Abstract"

View File

@ -2,8 +2,8 @@
<!--
Filename: FarManifest.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -3,8 +3,8 @@
<!--
Filename: FrameworkDataAttributes.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -3,8 +3,8 @@
<!--
Filename: FrameworkDataElements.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -3,8 +3,8 @@
<!--
Filename: FrameworkDataTypes.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -3,9 +3,9 @@
<!--
Filename: FrameworkHeaders.xsd
Copyright (c) 2007, Intel Corp.
Copyright (c) 2007, Intel Corporation. All rights reserved.
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 may be found at http://opensource.org/licenses/bsd-license.php

View File

@ -3,8 +3,8 @@
<!--
Filename: NamingConvention.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -3,8 +3,8 @@
<!--
Filename: SurfaceArea.xsd
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2007, Intel Corp.
All rights reserved. This program and the accompanying materials
Copyright (c) 2007, 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 http://opensource.org/licenses/bsd-license.php

View File

@ -2,7 +2,7 @@
<!--
Filename: WorkspaceContent.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

View File

@ -1,7 +1,7 @@
#
# Copyright (c) 2007-2010, Intel Corporation
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# All rights reserved. This program and the accompanying materials
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, 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

View File

@ -1,7 +1,7 @@
#
# Copyright (c) 2006-2007, Intel Corporation
# Copyright (c) 2006 - 2007, 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

View File

@ -1,8 +1,8 @@
#
# Copyright (c) 2006-2010, Intel Corporation
# Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions 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
# http://opensource.org/licenses/bsd-license.php
@ -109,6 +109,8 @@ DEFINE CYGWIN_BINIPF = c:/cygwin/opt/tiano/gcc/ipf/bin/ia64-pc-elf-
DEFINE GCC44_IA32_PREFIX = /usr/bin/
#DEFINE GCC44_IA32_PREFIX = ENV(HOME)/programs/gcc/4.4/ia32/
DEFINE GCC44_X64_PREFIX = /usr/bin/
#DEFINE GCC44_X64_PREFIX = ENV(HOME)/programs/gcc/4.4/x64/
DEFINE UNIX_IASL_BIN = /usr/bin/iasl
#DEFINE UNIX_IASL_BIN = $(HOME)/programs/iasl
@ -1571,10 +1573,11 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 --re
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
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -Wno-address
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections
DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable
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
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
DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
####################################################################################
@ -1703,6 +1706,27 @@ DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
*_GCC44_IA32_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
*_GCC44_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
##################
# GCC44 X64 definitions
##################
*_GCC44_X64_CC_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_SLINK_PATH = DEF(GCC44_X64_PREFIX)ar
*_GCC44_X64_DLINK_PATH = DEF(GCC44_X64_PREFIX)ld
*_GCC44_X64_ASLDLINK_PATH = DEF(GCC44_X64_PREFIX)ld
*_GCC44_X64_ASM_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_PP_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_VFRPP_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_ASLCC_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_ASLPP_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_RC_PATH = DEF(GCC44_X64_PREFIX)objcopy
*_GCC44_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
*_GCC44_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_ASLDLINK_FLAGS) -m elf_x86_64
*_GCC44_X64_ASM_FLAGS = DEF(GCC44_ASM_FLAGS) -m64 --64 -melf_x86_64
*_GCC44_X64_CC_FLAGS = DEF(GCC44_X64_CC_FLAGS) -Os
*_GCC44_X64_DLINK_FLAGS = DEF(GCC44_X64_DLINK_FLAGS)
*_GCC44_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
####################################################################################
#

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for Base Tools project build.
#
# Copyright (c) 2009 - 2010, Intel Corporation<BR>
# All rights reserved. This program and the accompanying materials
# Copyright (c) 2009 - 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for Base Tools project build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -0,0 +1,43 @@
/* OUTPUT_FORMAT(efi-bsdrv-x86_64) */
SECTIONS
{
/* . = 0 + SIZEOF_HEADERS; */
. = 0x280;
.text ALIGN(0x20) :
{
*(.text .stub .text.* .gnu.linkonce.t.*)
. = ALIGN(0x20);
} =0x90909090
.data ALIGN(0x20) :
{
*(
.rodata .rodata.* .gnu.linkonce.r.*
.data .data.* .gnu.linkonce.d.*
)
. = ALIGN(0x20);
}
.bss ALIGN(0x20) :
{
*(.bss .bss.*)
. = ALIGN(0x20);
}
.got ALIGN(0x20) :
{
*(.got .got.*)
. = ALIGN(0x20);
}
.rela ALIGN(0x20) :
{
*(.rela .rela.*)
}
/DISCARD/ : {
*(.note.GNU-stack) *(.gnu_debuglink)
*(.interp)
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
*(.comment)
}
}

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'BootSectImage' module build.
#
# Copyright (c) 2009 - 2010, Intel Corporation<BR>
# All rights reserved. This program and the accompanying materials
# Copyright (c) 2009 - 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'BootSectImage' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -4,8 +4,8 @@ Abstract:
Patch the BPB information in boot sector image file.
Patch the MBR code in MBR image file.
Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -2,8 +2,8 @@
Fat file system structure and definition.
Copyright 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -2,8 +2,8 @@
MBR Partition Entry and Table structure defintions.
Copyright 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -2,8 +2,8 @@
Functions to get info and load PE/COFF image.
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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
@ -71,6 +71,14 @@ PeCoffLoaderRelocateIpfImage (
IN UINT64 Adjust
);
RETURN_STATUS
PeCoffLoaderRelocateArmImage (
IN UINT16 **Reloc,
IN OUT CHAR8 *Fixup,
IN OUT CHAR8 **FixupData,
IN UINT64 Adjust
);
STATIC
RETURN_STATUS
PeCoffLoaderGetPeHeader (
@ -777,9 +785,11 @@ Returns:
default:
switch (MachineType) {
case EFI_IMAGE_MACHINE_IA32:
case EFI_IMAGE_MACHINE_ARMT:
Status = PeCoffLoaderRelocateIa32Image (Reloc, Fixup, &FixupData, Adjust);
break;
case EFI_IMAGE_MACHINE_ARMT:
Status = PeCoffLoaderRelocateArmImage (&Reloc, Fixup, &FixupData, Adjust);
break;
case EFI_IMAGE_MACHINE_X64:
Status = PeCoffLoaderRelocateX64Image (Reloc, Fixup, &FixupData, Adjust);
break;

View File

@ -1,7 +1,7 @@
/** @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

View File

@ -1,7 +1,7 @@
/** @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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004, 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @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

View File

@ -1,7 +1,7 @@
/** @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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'Common' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'Common' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,8 +1,8 @@
/** @file
Function prototypes and defines on Memory Only PE COFF loader
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006, 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
@ -144,4 +144,38 @@ PeCoffLoaderGetEntryPoint (
)
;
//
// These functions are used by the ARM PE/COFF relocation code and by
// the ELF to PE/COFF converter so that is why they are public
//
/**
Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
return the immediate data encoded in the instruction
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@return Immediate address encoded in the instruction
**/
UINT16
ThumbMovtImmediateAddress (
IN UINT16 *Instruction
);
/**
Update an ARM MOVT or MOVW immediate instruction immediate data.
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@param Address New addres to patch into the instruction
**/
VOID
ThumbMovtImmediatePatch (
IN OUT UINT16 *Instruction,
IN UINT16 Address
);
#endif

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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
@ -315,3 +315,121 @@ PeCoffLoaderRelocateX64Image (
return RETURN_SUCCESS;
}
/**
Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
return the immediate data encoded in the instruction
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@return Immediate address encoded in the instruction
**/
UINT16
ThumbMovtImmediateAddress (
IN UINT16 *Instruction
)
{
UINT32 Movt;
UINT16 Address;
// Thumb2 is two 16-bit instructions working together. Not a single 32-bit instruction
// Example MOVT R0, #0 is 0x0000f2c0 or 0xf2c0 0x0000
Movt = (*Instruction << 16) | (*(Instruction + 1));
// imm16 = imm4:i:imm3:imm8
// imm4 -> Bit19:Bit16
// i -> Bit26
// imm3 -> Bit14:Bit12
// imm8 -> Bit7:Bit0
Address = (UINT16)(Movt & 0x000000ff); // imm8
Address |= (UINT16)((Movt >> 4) & 0x0000f700); // imm4 imm3
Address |= (((Movt & BIT26) != 0) ? BIT11 : 0); // i
return Address;
}
/**
Update an ARM MOVT or MOVW immediate instruction immediate data.
@param Instruction Pointer to ARM MOVT or MOVW immediate instruction
@param Address New addres to patch into the instruction
**/
VOID
ThumbMovtImmediatePatch (
IN OUT UINT16 *Instruction,
IN UINT16 Address
)
{
UINT16 Patch;
// First 16-bit chunk of instruciton
Patch = ((Address >> 12) & 0x000f); // imm4
Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i
*Instruction = (*Instruction & ~0x040f) | Patch;
// Second 16-bit chunk of instruction
Patch = Address & 0x000000ff; // imm8
Patch |= ((Address << 4) & 0x00007000); // imm3
Instruction++;
*Instruction = (*Instruction & ~0x70ff) | Patch;
}
/**
Performs an ARM-based specific relocation fixup and is a no-op on other
instruction sets.
@param Reloc Pointer to the relocation record.
@param Fixup Pointer to the address to fix up.
@param FixupData Pointer to a buffer to log the fixups.
@param Adjust The offset to adjust the fixup.
@return Status code.
**/
RETURN_STATUS
PeCoffLoaderRelocateArmImage (
IN UINT16 **Reloc,
IN OUT CHAR8 *Fixup,
IN OUT CHAR8 **FixupData,
IN UINT64 Adjust
)
{
UINT16 *Fixup16;
UINT16 FixupVal;
UINT16 *Addend;
Fixup16 = (UINT16 *) Fixup;
switch ((**Reloc) >> 12) {
case EFI_IMAGE_REL_BASED_ARM_THUMB_MOVW:
FixupVal = ThumbMovtImmediateAddress (Fixup16) + (UINT16)Adjust;
ThumbMovtImmediatePatch (Fixup16, FixupVal);
if (*FixupData != NULL) {
*FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT16));
*(UINT16 *)*FixupData = *Fixup16;
*FixupData = *FixupData + sizeof (UINT16);
}
break;
case EFI_IMAGE_REL_BASED_ARM_THUMB_MOVT:
// For MOVT you need to know the lower 16-bits do do the math
// So this relocation entry is really two entries.
*Reloc = *Reloc + 1;
Addend = *Reloc;
FixupVal = (UINT16)(((ThumbMovtImmediateAddress (Fixup16) << 16) + Adjust + *Addend) >> 16);
ThumbMovtImmediatePatch (Fixup16, FixupVal);
if (*FixupData != NULL) {
*FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT16));
*(UINT16 *)*FixupData = *Fixup16;
*FixupData = *FixupData + sizeof (UINT16);
}
break;
default:
return RETURN_UNSUPPORTED;
}
return RETURN_SUCCESS;
}

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2004 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/**
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2007 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'EfiLdrImage' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'EfiLdrImage' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,6 +1,6 @@
/** @file
Copyright (c) 1999-2010 Intel Corporation. All rights reserved
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

View File

@ -1,6 +1,6 @@
/** @file
Copyright (c) 1999-2008 Intel Corporation. All rights reserved
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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'EfiRom' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'EfiRom' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

View File

@ -1,9 +1,9 @@
## @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

View File

@ -2,8 +2,8 @@
Fat file system structure and definition.
Copyright 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,7 +1,7 @@
/** @file
Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -2,8 +2,8 @@
Get Drv Num offset from Fat file system.
Copyright 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
Copyright (c) 2006 - 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

View File

@ -1,8 +1,8 @@
## @file
# Windows makefile for 'GenBootSector' module build.
#
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# 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

Some files were not shown because too many files have changed in this diff Show More